# 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.

<Note>
  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.
</Note>

## Attributes

<ParamField body="checkout_session" type="string">
  The unique identifier of the checkout session (MAX 64; MIN 36).

  Example: 9104911d-5df9-429e-8488-ad41abea1a4b
</ParamField>

<ParamField body="customer_id" type="string">
  The unique identifier of the customer (MAX 64; MIN 36).

  Example: 9104911d-5df9-429e-8488-ad41abea1a4b
</ParamField>

<ParamField body="merchant_order_id" type="string">
  The unique identifier of the customer's order (MAX 255; MIN 3).

  Example: 1234
</ParamField>

<ParamField body="payment_description" type="string">
  The description of the payment (MAX 255; MIN 3).

  Example: Purchase in Pepito market
</ParamField>

<ParamField body="callback_url" type="string">
  The URL where to redirect the customer after the payment (MAX 526; MIN 3).

  Example: https://www.company.com/customer_1231324
</ParamField>

<ParamField body="country" type="enum">
  Country where the transaction must be processed (MAX 2; MIN 2; <a href="https://en.wikipedia.org/wiki/ISO_3166-1">ISO 3166-1</a> ).

  Possible enum values: Check the <a href="/reference/country-reference">Country reference</a>.
</ParamField>

<ParamField body="created_at" type="timestamp">
  Checkout Session creation date and time (MAX 27; MIN 27; <a href="https://en.wikipedia.org/wiki/ISO_8601">ISO 8601</a> ).

  Example: 2022-05-09T20:46:54.786342Z
</ParamField>

<ParamField body="amount" type="object">
  Specifies the payment amount object, with the value and currency.

  <Expandable title="properties">

    <ParamField body="currency" type="enum">
      The currency used to make the payment (MAX 3; MIN 3; <a href="https://en.wikipedia.org/wiki/ISO_4217">ISO 4217</a> ).

      Possible enum values: Check the <a href="/reference/country-reference">Country reference</a>.
    </ParamField>

    <ParamField body="value" type="float">
      The payment amount (multiple of 0.0001).

      Example: 23.5676
    </ParamField>

  </Expandable>
</ParamField>

<ParamField body="metadata" type="array 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.

  <Expandable title="properties">

    <ParamField body="metadata object" type="object">
      Specifies a metadata key and the respective value.

      <Expandable title="properties">

        <ParamField body="key" type="string">
          Specifies one metadata key (MAX 48).

          Example: age
        </ParamField>

        <ParamField body="value" type="string">
          Specifies the value for the defined metadata key (MAX 512).

          Example: 28
        </ParamField>

      </Expandable>
    </ParamField>

  </Expandable>
</ParamField>

<ParamField body="installments" type="array 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.

  <Expandable title="properties">

    <ParamField body="plan_id" type="string">
      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).
    </ParamField>

    <ParamField body="plan" type="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.

      <Expandable title="properties">

        <ParamField body="installment object" type="object">
          Specifies an installment available for the checkout session.

          <Expandable title="properties">

            <ParamField body="installment" type="int">
              The number of monthly installments shoppers can choose

              Example: 3
            </ParamField>

            <ParamField body="rate" type="float">
              The rate the end user sees at checkout.

              Example: 1.5
            </ParamField>

          </Expandable>
        </ParamField>

      </Expandable>
    </ParamField>

  </Expandable>
</ParamField>

<ParamField body="wallet_card_acceptance" type="object">
  [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](/docs/wallets/apple-pay/apple-pay-sdk-integration#filter-eligible-cards).

  <Expandable title="properties">

    <ParamField body="supported_countries" type="array of strings">
      Countries that issued the card (<a href="https://en.wikipedia.org/wiki/ISO_3166-1">ISO 3166-1</a> alpha-2, uppercase). This is the card's issuing country, not the customer's location.

      Example: ["BR"]
    </ParamField>

    <ParamField body="supported_networks" type="array of strings">
      Card networks the customer can select, in uppercase. Replaces the default list.

      Example: ["VISA", "MASTERCARD"]
    </ParamField>

    <ParamField body="supported_funding_types" type="array of enum">
      Funding types the customer can select.

      Possible enum values: `CREDIT`, `DEBIT`.
    </ParamField>

  </Expandable>
</ParamField>