Skip to main content
Skip to main content

PaymentSession

A Payment Session is created when a Customer initilizes the checkout flow, and can be used to hold the state of a payment flow. Each Payment Session is controlled by a Payment Provider, which is responsible for the communication with external payment services. Authorized Payment Sessions will eventually get promoted to Payments to indicate that they are authorized for payment processing such as capture or refund. Payment sessions can also be used as part of payment collections.

Properties

amountnumberRequired
The amount that the Payment Session has been authorized for.
cartCartRequired
The details of the cart that the payment session was created for.
cart_idnull | stringRequired
The ID of the cart that the payment session was created for.
created_atDateRequired
The date with timezone at which the resource was created.
dataRecord<string, unknown>Required
The data required for the Payment Provider to identify, modify and process the Payment Session. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.
idstringRequired
The payment session's ID
idempotency_keystringRequired
Randomly generated key used to continue the completion of a cart in case of failure.
is_initiatedbooleanRequired
A flag to indicate if a communication with the third party provider has been initiated.

Default: false

is_selectednull | booleanRequired
A flag to indicate if the Payment Session has been selected as the method that will be used to complete the purchase.
payment_authorized_atDateRequired
The date with timezone at which the Payment Session was authorized.
provider_idstringRequired
The ID of the Payment Provider that is responsible for the Payment Session
statusstringRequired
Indicates the status of the Payment Session. Will default to pending, and will eventually become authorized. Payment Sessions may have the status of requires\_more to indicate that further actions are to be completed by the Customer.
updated_atDateRequired
The date with timezone at which the resource was updated.
Was this section helpful?