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
id
stringRequiredThe payment session's ID
created_at
DateRequiredThe date with timezone at which the resource was created.
updated_at
DateRequiredThe date with timezone at which the resource was updated.
cart_id
null | stringRequiredThe ID of the cart that the payment session was created for.
The details of the cart that the payment session was created for.
provider_id
stringRequiredThe ID of the Payment Provider that is responsible for the Payment Session
is_selected
null | booleanRequiredA flag to indicate if the Payment Session has been selected as the method that will be used to complete the purchase.
is_initiated
booleanRequiredA flag to indicate if a communication with the third party provider has been initiated.
Default: false
status
stringRequiredIndicates 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.data
Record<string, unknown>RequiredThe 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.
idempotency_key
stringRequiredRandomly generated key used to continue the completion of a cart in case of failure.
amount
numberRequiredThe amount that the Payment Session has been authorized for.
payment_authorized_at
DateRequiredThe date with timezone at which the Payment Session was authorized.
Was this section helpful?