CheckoutSession
Creates and queries the customer's session as they pay for one-time purchases or subscriptions through Checkout or Payment Links.
Table Specific Information
Select
The connector uses the Stripe API to filter the results by the following columns and operators:
- Id supports the following operator: =.
- CustomerId supports the following operator: =.
- CustomerDetailsEmail supports the following operator: =.
- PaymentIntentId supports the following operator: =.
- PaymentLinkId supports the following operator: =.
- Status supports the following operator: =.
- SubscriptionId supports the following operator: =.
- AccountId supports the following operator: =.
The rest of the filter is executed client-side within the connector.
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 the PaymentMethods:
SELECT * FROM CheckoutSession SELECT * FROM CheckoutSession WHERE Id = '123124' SELECT * FROM CheckoutSession WHERE CustomerId = 'cus_N8rO0qc7j1SJJ9' SELECT * FROM CheckoutSession WHERE CustomerDetailsEmail = '[email protected]' SELECT * FROM CheckoutSession WHERE PaymentIntentId = 'pi_sfuniew' SELECT * FROM CheckoutSession WHERE PaymentLinkId = 'plink_1MHJbZSC4snQ4WkOqF4MChgG' SELECT * FROM CheckoutSession WHERE SubscriptionId = 'sub_A9WZGVTbvgBJ4t'
Insert
To create a new CheckoutSession, at a minimum Mode and SuccessUrl are required. If mode is payment or subscription, LineItemsAggregate is also required. We do not support recurring prices currently.
INSERT INTO CheckoutSession (Mode, SuccessUrl,LineItemsAggregate) VALUES ('payment', 'https://example.com/success','[{\"price\":\"price_1OPuMb2eZvKYlo2CVkxTmqYN\",\"quantity\":\"23\"}]') INSERT INTO CheckoutSession (Mode, SuccessUrl, Currency, CustomerId) VALUES ('setup', 'https://example.com/success', 'usd', 'cus_N8rO0qc7j1SJJ9')
Columns
Name | Type | ReadOnly | References | Description |
Id [KEY] | String | True |
The Id of the Checkout session. | |
AfterExpirationRecoveryAllowPromotionCodes | Boolean | False |
When set, provides configuration for actions to take if this Checkout Session expires. Enables user redeemable promotion codes on the recovered Checkout Sessions. Defaults to false | |
AfterExpirationRecoveryEnabled | Boolean | False |
When set, provides configuration for actions to take if this Checkout Session expires. If true, a recovery url will be generated to recover this Checkout Session if it expires before a transaction is completed. It will be attached to the Checkout Session object upon expiration. | |
AfterExpirationRecoveryExpiresAt | Datetime | True |
When set, provides configuration for actions to take if this Checkout Session expires. The timestamp at which the recovery URL will expire. | |
AfterExpirationRecoveryUrl | String | True |
When set, provides configuration for actions to take if this Checkout Session expires. URL that creates a new Checkout Session when clicked that is a copy of this expired Checkout Session. | |
AllowPromotionCodes | Boolean | False |
Enables user redeemable promotion codes. | |
AmountSubtotal | Integer | True |
Total of all items before discounts or taxes are applied. | |
AmountTotal | Integer | True |
Total of all items after discounts and taxes are applied. | |
AutomaticTaxEnabled | Boolean | False |
Indicates whether automatic tax is enabled for the session. | |
AutomaticTaxStatus | String | True |
The status of the most recent automated tax calculation for this session. | |
BillingAddressCollection | String | False |
Describes whether Checkout should collect the customer's billing address. The allowed values are auto, required. | |
CancelUrl | String | False |
If set, Checkout displays a back button and customers are directed to this URL if they decide to cancel payment and return to your website. | |
ClientReferenceId | String | False |
A unique string to reference the Checkout Session. This can be a customer Id, a cart Id, or something similar, and you can use it to reconcile the Session with your internal systems. | |
ClientSecret | String | True |
Client secret to be used when initializing Stripe.js embedded checkout. | |
ConsentPromotions | String | True |
Results of consent_collection for this session. If opt_in, the customer consents to receiving promotional communications from the merchant about this Checkout Session. The allowed values are opt_in, opt_out. | |
ConsentTermsOfService | String | True |
Results of consent_collection for this session. If accepted, the customer in this Checkout Session has agreed to the merchant’s terms of service. The allowed values are accepted. | |
ConsentCollection | String | True |
When set, provides configuration for the Checkout Session to gather active consent from customers. | |
Created | Datetime | True |
The time at which the object was created. Measured in seconds since the Unix epoch. | |
Currency | String | False |
A three-letter ISO currency code. | |
CurrencyConversion | String | True |
Currency conversion details for automatic currency conversion sessions. | |
CustomFields | String | False |
Collects additional information from your customer using custom fields. Up to two fields are supported. | |
CustomTextAfterSubmitMessage | String | False |
Custom text that should be displayed after the payment confirmation button. | |
CustomTextShippingAddressMessage | String | False |
Custom text that should be displayed alongside shipping address collection. | |
CustomTextSubmitMessage | String | False |
Custom text that should be displayed alongside the payment confirmation button. | |
CustomTextTermsOfAcceptanceMessage | String | False |
Custom text that should be displayed in place of the default terms of service agreement text. | |
CustomerId | String | False |
The Id of the customer for this Session. | |
CustomerCreation | String | False |
Configures whether a Checkout Session creates a Customer when the Checkout Session completes. The allowed values are always, if_required. | |
CustomerDetailsAddress | String | True |
The customer's address after a completed Checkout Session. | |
CustomerDetailsEmail | String | True |
The email associated with the Customer. | |
CustomerDetailsName | String | True |
The customer's name after a completed Checkout Session. | |
CustomerDetailsPhone | String | True |
The customer's phone number after a completed Checkout Session. | |
CustomerDetailsTaxExempt | String | True |
The customer's tax exempt status after a completed Checkout Session. | |
CustomerDetailsTaxIds | String | True |
The customer's tax Ids after a completed Checkout Session. | |
CustomerEmail | String | False |
The email of the customer. | |
ExpiresAt | Datetime | False |
The timestamp at which the Checkout Session expires. | |
InvoiceId | String | True |
The Id of the invoice created by the Checkout Session. | |
InvoiceCreation | String | True |
Details on the state of invoice creation for the Checkout Session. | |
Livemode | Boolean | True |
true if the object is in live mode andfalse if in test mode. | |
Locale | String | False |
The IETF language tag of the locale Checkout is displayed in. | |
Metadata | String | False |
The set of key/value pairs that you can attach to a value list object. | |
Mode | String | False |
The mode of the Checkout Session. | |
Object | String | True |
String representing the object's type. Objects of the same type share the same value. | |
PaymentIntentId | String | True |
The Id of the PaymentIntent for Checkout Sessions in payment mode. | |
PaymentLinkId | String | True |
The Id of the Payment Link that created this Session. | |
PaymentMethodCollection | String | False |
Configures whether a Checkout Session should collect a payment method. | |
PaymentMethodTypes | String | False |
A list of the types of payment methods (e.g. card) this Checkout Session is allowed to accept. | |
PaymentStatus | String | True |
The payment status of the Checkout Session, one of paid, unpaid, or no_payment_required. The allowed values are no_payment_required, paid, unpaid. | |
PhoneNumberCollectionEnabled | Boolean | False |
Indicates whether phone number collection is enabled for the session. | |
RecoveredFrom | String | True |
The Id of the original expired Checkout Session that triggered the recovery flow. | |
Redaction | String | True |
Redactions for the session. | |
SetupIntent | String | False |
The Id of the SetupIntent for Checkout Sessions in setup mode. | |
ShippingAddressCollectionAllowedCountries | String | False |
When set, provides configuration for Checkout to collect a shipping address from a customer. | |
ShippingCost | String | True |
The details of the customer cost of shipping, including the customer-chosen ShippingRate. | |
ShippingDetails | String | True |
Shipping information for this Checkout Session. | |
ShippingOptions | String | True |
The shipping rate options applied to this Session. | |
Status | String | True |
The status of the Checkout Session, one of open, complete, or expired. | |
SubmitType | String | False |
Describes the type of transaction being performed by Checkout in order to customize relevant text on the page, such as the submit button. submit_type can only be specified on Checkout Sessions in payment mode, but not Checkout Sessions in subscription or setup mode. | |
SubscriptionId | String | True |
The Id of the subscription for Checkout Sessions in subscription mode. | |
SuccessUrl | String | False |
The URL the customer is directed to after the payment or subscription creation is successful. | |
TotalDetails | String | True |
Tax and discount details for the computed total amount. | |
UiMode | String | False |
The UI mode of the Session. Can be hosted (default) or embedded. The allowed values are hosted, embedded. | |
Url | String | True |
The URL to the Checkout Session. | |
ReturnUrl | String | False |
The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method’s app or site. This parameter is required if ui_mode is embedded and redirect-based payment methods are enabled on the session. | |
LineItemsAggregate | String | False |
The line items purchased by the customer. |
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 checkout session for. |