CData Python Connector for Stripe

Build 23.0.8839

Customers

Create, update, delete, and query the available Customers in Stripe.

Table Specific Information

Select

Server-Side Query Support

The connector 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 connector.

  • Id support the following operators: =.
  • Created support the following operators: <,>>=,<,<=,=.
  • Email support the following operators: =.
  • MetadataAggregate support the following operators: =.
  • Name support the following operators: =,!=,Contains.
  • Phone support the following operators: =,!=,Contains.
  • TestClock support the following operators: =.
  • AccountId support the following operators: =.

The provider supports the use of all columns as criteria in the WHERE clause of SELECT statements, 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 is 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'

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 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

Whether or not the latest charge for the latest invoice of the customer has failed.

CouponId String False

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.

Email String False

The email of the customer.

Livemode Boolean True

Whether 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 True

The shipping information associated with the customer.

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.

TaxIdsAggregate String False

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 invoice line item id that the discount's coupon was applied to if it was applied directly to a invoice line item.

DiscountPromotionCode String True

The promotion code applied to create this discount.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

The creation date.

DiscountCouponCurrency String True

If amount_off has been set, the three-letter ISO code for the currency of the amount to take off.

DiscountCouponName String True

Name of the coupon displayed to customers on, for instance, invoices or receipts.

DiscountCouponDuration String True

One of forever, once, and repeating. Describes how long a customer who applies this coupon will get the discount.

DiscountCouponDurationInMonths Integer True

the number of months the coupon applies.

DiscountCouponAmountOff Integer True

Amount (in the currency specified) that is taken off the subtotal of any invoices for this customer.

DiscountCouponPercentOff Integer True

Percent that will be 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 will make a $100 invoice $50 instead.

DiscountCouponValid Boolean True

Taking account of the above properties, whether this coupon can still be applied to a customer.

DiscountCouponMaxRedemptions Integer True

Maximum number of times this coupon can be redeemed, in total, before it is no longer valid.

DiscountCouponRedeemBy Datetime True

Date after which the coupon can no longer be redeemed.

DiscountCouponTimesRedeemed Integer True

Number of times this coupon has been applied to a customer.

DiscountCouponObject String True

String representing the object's type. Objects of the same type share the same value.

DiscountCouponLiveMode Boolean True

Has the value true if the object exists in live mode or the value false if the object exists in test mode.

DiscountCouponMetadataAggregate String True

Set of key-value pairs that you can attach to an object.

SourcesAggregate String True

The customer�s payment sources.

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

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.

TaxValidateLocation String

A flag that indicates when Stripe should validate the customer tax location. Defaults to deferred. Use only for INSERT and UPDATE.

The allowed values are deferred, immediately.

Copyright (c) 2024 CData Software, Inc. - All rights reserved.
Build 23.0.8839