Customers
Create, update, delete, and query the available Customers in Stripe.
Table Specific Information
Select
Server-Side Query Support
The driver will use the Stripe API to filter the results by the following columns and operators while the rest of the filter is executed client side within the driver.
- Id, Created, and Email support the following operators: <,>>=,<,<=,=.
The provider supports all columns to be used as criteria in the WHERE clause of SELECT statement, as long as SupportEnhancedSQL is set to True. If SupportEnhancedSQL property is set to False, you still can retrieve:
-a Customer by specifying its Id:
SELECT * FROM Customers WHERE Id = 'cus_AA9uRhvt0xicaf'
-Customers created after a specific date (Created may be used with the >, >=, <, <=, or = conditions and may be used twice to specify a range):
SELECT * FROM Customers WHERE Created > '2016-01-03'
Insert
To create a new customer, at least Email or Description is required:
INSERT INTO Customers (Email, Description) VALUES ('[email protected]', 'New account')
To apply a discount to a new customer, set the DiscountId field to the CouponId, which will be discounted:
INSERT INTO Customers (Email, Description, DiscountId) VALUES ('[email protected]', 'New account', 'cup_123456')
Update
To modify a Customer, specify the Customer Id and run an Update statement.
UPDATE Customers SET Description = 'An updated account' WHERE Id = 'cus_85PEPye2wfN4u4'
To apply a discount to an existing customer, set the DiscountId field to the CouponId, which will be discounted:
UPDATE Customers SET DiscountId = 'cup_123456' WHERE Id = 'cus_85PEPye2wfN4u4'
Delete
To Delete a Customer, specify the Customer Id and run an Delete statement.
DELETE FROM CUSTOMERS WHERE Id = 'cus_8AcjiGnVMz2sMr'
Columns
Name | Type | ReadOnly | References | Description |
Id [KEY] | String | True |
The Id of the customer. | |
AddressAggregate | String | False |
The customer's address. | |
Balance | Integer | False |
The current balance of the customer. | |
Created | Datetime | True |
The time of creation. | |
Currency | String | False |
The currency the customer can be charged in for recurring billing purposes. | |
DefaultSource | String | False |
The Id of the default source attached to this customer. | |
Delinquent | Boolean | True |
Whether or not the latest charge for the latest invoice of the customer has failed. | |
DiscountId | String | False |
CustomerDiscounts.CouponId |
The id of the discount coupon. |
Description | String | False |
The customer description.The description field on customer endpoints has a maximum character length limit of 350. | |
String | False |
The email of the customer. | ||
Livemode | Boolean | True |
If the customer is in live mode. | |
MetadataAggregate | String | False |
The set of key/value pairs that you can attach to a customer object. | |
Name | String | False |
The customer's full name or business name. | |
Phone | String | False |
The customer's phone number. | |
ShippingAggregate | String | False |
The shipping information associated with the customer. | |
SourcesdataAggregate | String | False |
The payment sources of the customer, if any. | |
SubscriptionsDataAggregate | String | False |
The current subscriptions of the customer, if any. | |
TaxExempt | String | False |
Describes the customer's tax exemption status. One of none, exempt, or reverse. When set to reverse, invoice and receipt PDFs include the text 'Reverse charge'. | |
InvoicePrefix | String | False |
The prefix for the customer used to generate unique invoice numbers. | |
NextInvoiceSequence | Integer | False |
The suffix of the customer's next invoice number, e.g., 0001. | |
TestClock | String | False |
ID of the test clock this customer belongs to. | |
PreferredLocales | String | False |
The customer's preferred locales (languages), ordered by preference. | |
InvoiceSettingsCustomFieldsAggregate | String | False |
Default custom fields to be displayed on invoices for this customer. | |
InvoiceSettingsDefaultPaymentMethod | String | False |
ID of a payment method that's attached to the customer, to be used as the customer's default payment method for subscriptions and invoices. | |
InvoiceSettingsFooter | String | False |
Default footer to be displayed on invoices for this customer. | |
TaxAggregate | String | False |
Tax details for the customer. | |
TaxIdsAggregate | String | False |
The customer's tax IDs. |
Pseudo-Columns
Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source.
Name | Type | Description |
AccountId | String |
The Id of the connected account to get customers for. |