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.

Notes

  • Create a checkout session is only required for flow SDK_CHECKOUT
  • Only one payment is supported per each checkout session
  • The checkout session expires 5 hours after its creation

Attributes

checkout_session string
The unique identifier of the checkout session (MAX 64 ; MIN 36).
Example: 9104911d-5df9-429e-8488-ad41abea1a4b

customer_id string
The unique identifier of the customer (MAX 64 ; MIN 36).
Example: 9104911d-5df9-429e-8488-ad41abea1a4b

merchant_order_id string
The unique identifier of the customer's order (MAX 255; MIN 3).
Example: 1234

payment_description string
The description of the payment (MAX 255; MIN 3).
Example: Purchase in Pepito market

callback_url string
The URL where to redirect the customer after the payment (MAX 526; MIN 3).
Example: https://www.company.com/customer_1231324

country enum
Country where the transaction must be processed (MAX 2; MIN 2; ISO 3166-1).
Possible enum values: Check the Country reference.

created_at timestamp
Checkout Session creation date and time (MAX 27; MIN 27; ISO 8601).
Example: 2022-05-09T20:46:54.786342Z

amount object

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

currency enum
The currency used to make the payment (MAX 3; MIN 3; ISO 4217).
Possible enum values: Check the Country reference.

value float
The payment amount (multiple of 0.0001).
Example: 23.5676

metadata array of objects

Specifies a list of metadata objects. You can add up to 50 metadata objects.

metadata object object

Specifies a metadata key and the respective value.

key string
Specifies one metadata key.
Example: age

value string
Specifies the value for the defined metadata key.
Example: 28

installments array of objects

[Optional] The object to send the installment plan created in Yuno to show your 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, we will display the installment plan created for the account for each scenario, if any.

plan_id string
Specifies a plan id created in Yuno to show your customer in the checkout session. If not defined, we will use the ones created for the account, if applicable. (MAX 64 ; MIN 64).
Possible enum values: Check the Country reference.

plan array 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. if not sent, we will display the installment plan created for the account for each scenario, if any.

installment object object

Specifies an installment available for the checkout session.

installment int
The number of monthly installments shoppers can choose
Example: 3

rate float
The rate that will be applied to the final amount of the transaction by the payment provider after using installments.
Example: 1.5