Customers
Represents the customers in a Stripe account, including contact, address, billing, tax, and discount details.
Table-Specific Information
SELECT
The driver uses 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.
| Column | Supported Operators |
| Id | = |
| Created | <, <=, =, >, >= |
| = | |
| MetadataAggregate | =, != |
| Name | =, !=, CONTAINS |
| Phone | =, !=, CONTAINS |
| TestClock | = |
| AccountId | = |
You can select:
- A customer by specifying their Id:
SELECT * FROM Customers WHERE Id = 'cus_AA9uRhvt0xicaf'
- Customers created after a specific date:
SELECT * FROM Customers WHERE Created > '2018-01-01'
- Created can also be used twice to specify a range:
SELECT * FROM Customers WHERE Created >= '2018-01-01 00:00:00.0' AND Created <= '2018-12-31 23:59:59.0'
- Created can also be used twice to specify a range:
INSERT
To create a new customer:
INSERT INTO Customers (Email, Description) VALUES ('[email protected]', 'New account')
UPDATE
To modify a customer, specify the customer's Id:
UPDATE Customers SET Description = 'An updated account' WHERE Id = 'cus_85PEPye2wfN4u4'
DELETE
To delete a customer, specify the customer's Id:
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 at which the customer was created. Measured in seconds since the Unix epoch. | |
| Currency | String | True |
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 |
Indicates whether the latest charge for the latest invoice of the customer has failed. | |
| CouponId | String | True |
DEPRECATED. 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 |
Indicates whether the customer is in live mode. | |
| MetadataAggregate | String | False |
The set of key/value pairs that you can attach to the 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. | |
| TaxExempt | String | False |
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, such as 0001. | |
| TestClock | String | False |
The 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 |
The Id of a payment method that is 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. | |
| TaxIdsAggregate | String | True |
The customer's tax Ids. | |
| DiscountId | String | True |
The Id of the discount. | |
| DiscountCheckoutSession | String | True |
The Checkout session that this coupon is applied to, if it is applied to a particular session in payment mode. Will not be present for subscription mode. | |
| DiscountCustomer | String | True |
The Id of the customer associated with this discount. | |
| DiscountStart | Datetime | True |
If the subscription has a trial, the beginning of that trial. | |
| DiscountEnd | Datetime | True |
If the subscription has a trial, the end of that trial. | |
| DiscountInvoice | String | True |
The invoice that the discount's coupon was applied to, if it was applied directly to a particular invoice. | |
| DiscountInvoiceItem | String | True |
The Id of the invoice line item that the discount's coupon was applied to, if it was applied directly to an invoice line item. | |
| DiscountPromotionCode | String | True |
The promotion code applied to create this discount. | |
| DiscountSubscription | String | True |
The subscription that this coupon is applied to, if it is applied to a particular subscription. | |
| DiscountCouponCreatedAt | Datetime | True |
DEPRECATED. The date on which the coupon was created. | |
| DiscountCouponCurrency | String | True |
DEPRECATED. The three-letter ISO code for the currency of the amount to take off, if amount_off has been set. | |
| DiscountCouponName | String | True |
DEPRECATED. The name of the coupon displayed to customers on, for instance, invoices or receipts. | |
| DiscountCouponDuration | String | True |
DEPRECATED. Specifies how long a customer who applies this coupon receives the discount, one of forever, once, or repeating. | |
| DiscountCouponDurationInMonths | Integer | True |
DEPRECATED. The number of months the coupon applies. | |
| DiscountCouponAmountOff | Integer | True |
DEPRECATED. The amount, in the currency specified, that is taken off the subtotal of any invoices for this customer. | |
| DiscountCouponPercentOff | Decimal | True |
DEPRECATED. The percent that is taken off the subtotal of any invoices for this customer for the duration of the coupon. For example, a coupon with a percent_off of 50 makes a $100 invoice $50 instead. | |
| DiscountCouponValid | Boolean | True |
DEPRECATED. Indicates whether this coupon can still be applied to a customer, taking into account the other coupon properties. | |
| DiscountCouponMaxRedemptions | Integer | True |
DEPRECATED. The maximum number of times this coupon can be redeemed, in total, before it is no longer valid. | |
| DiscountCouponRedeemBy | Datetime | True |
DEPRECATED. The date after which the coupon can no longer be redeemed. | |
| DiscountCouponTimesRedeemed | Integer | True |
DEPRECATED. The number of times this coupon has been applied to a customer. | |
| DiscountCouponObject | String | True |
DEPRECATED. The string representing the object's type. Objects of the same type share the same value. | |
| DiscountCouponLiveMode | Boolean | True |
DEPRECATED. Indicates whether the object exists in live mode. Returns true if the object exists in live mode and false if the object exists in test mode. | |
| DiscountCouponMetadataAggregate | String | True |
DEPRECATED. The set of key-value pairs that you can attach to the coupon object. | |
| SourcesAggregate | String | True |
The customer's payment sources. | |
| SubscriptionsAggregate | String | True |
The customer's current subscriptions, if any. | |
| TaxAutomaticTax | String | True |
Surfaces if automatic tax computation is possible given the current customer location information. The allowed values are supported, not_collecting, unrecognized_location, failed. | |
| TaxIPAddress | String | False |
A recent IP address of the customer used for tax reporting and tax location inference. | |
| TaxCountry | String | True |
The customer's country as identified by Stripe Tax. | |
| TaxState | String | True |
The customer's state, county, province, or region as identified by Stripe Tax. | |
| TaxSource | String | True |
The data source used to infer the customer's location. | |
| InvoiceSettingsRenderingOptionsAmountTaxDisplay | String | False |
How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. The allowed values are exclude_tax, include_inclusive_tax. | |
| InvoiceSettingsRenderingOptionsTemplate | String | False |
The Id of the invoice rendering template to be used for this customer's invoices. If set, the template is used on all invoices for this customer unless a template is set directly on the invoice. | |
| CustomerAccount | String | True |
The Id of an account representing a customer. You can use this Id with any v1 API that accepts a customer_account parameter. | |
| BusinessName | String | False |
The customer's business name. | |
| IndividualName | String | False |
The customer's individual name. | |
| CashBalanceAggregate | String | False |
Settings controlling the behavior of the customer's cash balance. | |
| InvoiceCreditBalanceAggregate | String | True |
The current multi-currency balances, if any, that are stored on the customer. | |
| Object | String | True |
The string representing the object's type. Always 'customer'. | |
| DiscountSourceCoupon | String | True |
The Id of the coupon that is the source of this discount, if the discount originated from a coupon. | |
| DiscountSourceType | String | True |
The type of object that is the source of this discount, such as coupon. |
Pseudocolumns
Pseudocolumn fields are used in the WHERE clause of SELECT statements and offer more granular control over the data returned from the data source.
| Name | Type | Description |
| AccountId | String |
The Id of the connected account to get customers for. |
| TaxValidateLocation | String |
A flag that indicates when Stripe validates the customer tax location. Defaults to deferred. Use only for INSERT and UPDATE. The allowed values are deferred, immediately. |