The Checkout Session Object

Attributes

Field Name

Data Type

Description

id

string

Unique identifier for the object.

type

string

The resource type of the return object. The value is "charge".

cancel_url

string

the url we redirects user to if user opts-out from the checkout session

return_url

string

the url we redirects user to after user completed checkout

live_mode

enum

"test" / "live"

locale

string

put "auto" if you don't have one specified, otherwise, follow https://en.wikipedia.org/wiki/IETF_language_tag to put your locale value

metadata

JSON

metadata attached to the order

mode

enum

"payment" / "vault"

payment_method_types

array of strings

one or many from "apple_pay", "google_pay", "card"

payment_status

enum

the status of payment. "unpaid" / "paid" / "no_payment_required"

status

enum

the status of the session, "active" / "expired" / "completed"

client_reference_id

string

your client reference id

customer_email

string

customer's email address

external_customer_id

string

your customer reference id

expired_at

integer

the timestamp when the session would expire

shipping_address

string

shipping address if there is any

customer_id

string

elements' customer reference id

charge_id

string

elements' charge reference id

payment_method_id

string

elements' payment method reference id

line_items

array of objects

array of line_items to included in the order, this can include products, tax, discounts, etc.

url

string

the URL tied to the checkout session created