ApiFinance
CheckoutSession
A checkout session represents a customer's session as they pay for one-time purchases or subscriptions through Stripe Checkout.
CheckoutSession
A checkout session represents a customer's session as they pay for one-time purchases or subscriptions through Stripe Checkout.
Properties
id(string): Unique identifier for the checkout session.object(string): String representing the object's type (always "checkout.session").afterExpiration(object): Configuration for behavior after session expiration.allowPromotionCodes(boolean): Whether promotion codes can be applied.amountSubtotal(number): Total of all items before discounts or taxes in cents.amountTotal(number): Total of all items after discounts and taxes in cents.automaticTax(object): Settings for automatic tax calculation.billingAddressCollection(string): Whether to collect billing address (auto, required).cancelUrl([[URL]]): URL to redirect when customer cancels.clientReferenceId(string): Unique string to reference the session.consent(object): Consent collection settings.consentCollection(object): Configuration for collecting consent.created(number): Time at which the object was created (Unix timestamp).currency(string): Three-letter ISO currency code.customer([[Customer]]): ID of the customer this checkout session is for.customerCreation(string): Whether to create a new customer (always, if_required).customerDetails(object): Customer details collected during checkout.customerEmail([[EmailAddress]]): Email address provided during checkout.expiresAt(number): Time when the session expires (Unix timestamp).invoice([[Invoice]]): ID of the invoice created by this session.invoiceCreation(object): Configuration for invoice creation.livemode(boolean): Whether in live mode or test mode.locale(string): Language for the checkout session.metadata(object): Set of key-value pairs for storing additional information.mode(string): Mode of the session (payment, setup, subscription).paymentIntent([[PaymentIntent]]): ID of the payment intent created by this session.paymentLink(string): ID of the payment link that created this session.paymentMethodCollection(string): Whether to collect payment method (always, if_required).paymentMethodOptions(object): Payment method-specific options.paymentMethodTypes(string[]): Payment method types accepted.paymentStatus(string): Payment status (paid, unpaid, no_payment_required).phoneNumberCollection(object): Phone number collection settings.recoveredFrom(string): ID of the session this was recovered from.setupIntent([[SetupIntent]]): ID of the setup intent created by this session.shippingAddressCollection(object): Shipping address collection settings.shippingCost(object): Shipping cost details.shippingDetails(object): Shipping details collected.shippingOptions(object[]): Shipping options provided.status(string): Status of the session (open, complete, expired).submitType(string): Submit button type (auto, book, donate, pay).subscription([[Subscription]]): ID of the subscription created by this session.successUrl([[URL]]): URL to redirect after successful payment.totalDetails(object): Tax and discount details.url([[URL]]): URL to redirect customers to start the checkout.
Actions
create
Create a new checkout session.
Input: [[CheckoutSession]]
Output: [[CheckoutSession]]
retrieve
Retrieve the details of a checkout session.
Input: [[CheckoutSession]]
Output: [[CheckoutSession]]
expire
Expire a checkout session.
Input: [[CheckoutSession]]
Output: [[CheckoutSession]]
list
Return a list of checkout sessions.
Input: [[ListRequest]]
Output: [[CheckoutSessionList]]
Events
asyncPaymentFailed: Triggered when an async payment fails.asyncPaymentSucceeded: Triggered when an async payment succeeds.completed: Triggered when a checkout session completes successfully.expired: Triggered when a checkout session expires.