The Checkout Session Object

This object represents a checkout session that can be created to make a payment. You can Create a Checkout Session using the id generated when the Customer resource was created.

Create a checkout session is only required for flow SDK_CHECKOUT.
Only one payment is supported per each checkout session. A checkout session expires 2.5 hours after it is created. The expiry cannot be changed through the API, and updating a checkout session does not extend it.
In the sandbox environment, a checkout session expires 3.5 hours after it is created.

Attributes

checkout_sessionstring

The unique identifier of the checkout session (MAX 64; MIN 36).

Example: 9104911d-5df9-429e-8488-ad41abea1a4b

customer_idstring

The unique identifier of the customer (MAX 64; MIN 36).

Example: 9104911d-5df9-429e-8488-ad41abea1a4b

merchant_order_idstring

The unique identifier of the customer’s order (MAX 255; MIN 3).

Example: 1234

payment_descriptionstring

The description of the payment (MAX 255; MIN 3).

Example: Purchase in Pepito market

callback_urlstring

The URL where to redirect the customer after the payment (MAX 526; MIN 3).

Example: https://www.company.com/customer_1231324

countryenum

Country where the transaction must be processed (MAX 2; MIN 2; ISO 3166-1 ).

Possible enum values: Check the Country reference.

created_attimestamp

Checkout Session creation date and time (MAX 27; MIN 27; ISO 8601 ).

Example: 2022-05-09T20:46:54.786342Z

amountobject

Specifies the payment amount object, with the value and currency.

Hide properties
currencyenum

The currency used to make the payment (MAX 3; MIN 3; ISO 4217 ).

Possible enum values: Check the Country reference.

valuefloat

The payment amount (multiple of 0.0001).

Example: 23.5676

metadataarray of objects

Specifies a list of metadata objects. You can add up to 50 metadata objects. To use metadata to drive routing logic, it must be set here at the Checkout Session level.

Hide properties
metadata objectobject

Specifies a metadata key and the respective value.

Hide properties
keystring

Specifies one metadata key (MAX 48).

Example: age

valuestring

Specifies the value for the defined metadata key (MAX 512).

Example: 28

installmentsarray of objects

[Optional] The object to send the installment plan created in WHITELABEL to show customers and let them choose from. This optional field is used in case a particular installments plan needs to be used in the session. If not sent, the installment plan created for the account is displayed for each scenario, if any.

Hide properties
plan_idstring

Specifies a plan id created in WHITELABEL to show your customer in the checkout session. If not defined, the ones created for the account are used, if applicable (MAX 64; MIN 64).

planarray of objects

Installments to show the customer in with the checkout_session. This optional struct is used in case a particular installments plan needs to be used in the session and does not have an installments plan created for it.

Hide properties
installment objectobject

Specifies an installment available for the checkout session.

Hide properties
installmentint

The number of monthly installments shoppers can choose

Example: 3

ratefloat

The rate the end user sees at checkout.

Example: 1.5

wallet_card_acceptanceobject

[Optional] Limits which cards the customer can select in the Apple Pay payment sheet. Cards that do not match are shown greyed out. Every field is optional; a field that is not sent keeps the default behaviour. It can only be set when the checkout session is created. See Filter eligible cards.

Hide properties
supported_countriesarray of strings

Countries that issued the card (ISO 3166-1 alpha-2, uppercase). This is the card’s issuing country, not the customer’s location.

Example: [“BR”]

supported_networksarray of strings

Card networks the customer can select, in uppercase. Replaces the default list.

Example: [“VISA”, “MASTERCARD”]

supported_funding_typesarray of enum

Funding types the customer can select.

Possible enum values: CREDIT, DEBIT.