Update Checkout Session

Update an existing checkout session with this endpoint. Only fields you send will be updated.

Updating a checkout session does not extend its expiry. The session still expires 2.5 hours after it was created (3.5 hours in sandbox). If the session has already expired, this endpoint returns CHECKOUT_SESSION_EXPIRED_TIME, and you must create a new checkout session.

PATCH/checkout/sessions/{checkout_session}

Path Parameters

checkout_sessionstringrequired

Body application/json

customer_idstring

The unique identifier of the customer, created using the Create Customer endpoint (UUID, 36 chars).

merchant_order_idstringrequired

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

payment_descriptionstringrequired

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

callback_urlstring

The URL where we will redirect your customer after making the purchase. Required for alternative payment methods with redirection. (MAX 526; MIN 3)

countrystringrequired

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

account_idstringrequired

The unique identifier of the account. You find this information on the WHITELABEL dashboard (UUID, 36 chars).

amountobject

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

Show amount properties
currencystringrequired

The currency used to make the payment. For a full list of currency codes, see Country reference (MAX 3; MIN 3; ISO 4217).

valuenumber<float>required

The payment amount (multiple of 0.0001).

alternative_amountobject

Alternative currency representation of the transaction amount.

Show alternative_amount properties
currencystringrequired

The alternative currency code. For a full list of currency codes, see Country reference (MAX 3; MIN 3; ISO 4217).

valuenumber<float>required

The alternative amount value (multiple of 0.0001).

metadataobject[]

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

Show metadata properties
keystringrequired

The metadata key (MAX 48)

valuestringrequired

The metadata key value (MAX 512)

workflow"SDK_CHECKOUT" | "CHECKOUT" | "SDK_SEAMLESS"

Checkout workflow type.

installmentsobject

The object to send the installment plan created in WHITELABEL 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.

Show installments properties
plan_idstring

Plan Id of the installment plan created in WHITELABEL

planobject[]

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.

Show plan properties
installmentinteger<int32>required

The number of monthly installments shoppers can choose

ratenumber<float>required

The rate applied to the final amount of the transaction by the payment provider after using installments. The value should be entered as a multiplier, not a percentage. For example, to apply a 20% rate, enter 1.20 instead of 20.

Response

200

merchant_order_idstring
checkout_sessionstring
countrystring
payment_descriptionstring
callback_urlany
amountobject
Show amount properties
currencystring
valueinteger
created_atstring
metadataany
workflowstring
installmentsobject
Show installments properties
plan_idany
planany
usedboolean

400

codestring
messagesstring[]

401

codestring
messagesstring[]

403

codestring
messagesstring[]
Request
curl -X PATCH "https://api-sandbox.whitelabel.com/v1/checkout/sessions/<checkout_session>" \
  -H "Content-Type: application/json" \
  -H "public-api-key: <public-api-key>" \
  -H "private-secret-key: <private-secret-key>" \
  -d '{
  "customer_id": "string",
  "merchant_order_id": "string",
  "payment_description": "string",
  "callback_url": "string",
  "country": "string",
  "account_id": "{{account_id}}",
  "amount": {
    "currency": "string",
    "value": 0
  },
  "alternative_amount": {
    "currency": "string",
    "value": 0
  },
  "metadata": [
    {
      "key": "string",
      "value": "string"
    }
  ],
  "workflow": "SDK_CHECKOUT",
  "installments": {
    "plan_id": "string",
    "plan": [
      {
        "installment": 0,
        "rate": 0
      }
    ]
  }
}'
Response
{
  "merchant_order_id": "007",
  "checkout_session": "c67ce158-6053-4661-a1de-aed5c945b935",
  "country": "BR",
  "payment_description": "Payment Test",
  "callback_url": null,
  "amount": {
    "currency": "ARS",
    "value": 100
  },
  "created_at": "2025-11-14T00:43:22.719648Z",
  "metadata": null,
  "workflow": "SDK_CHECKOUT",
  "installments": {
    "plan_id": null,
    "plan": null
  },
  "used": false
}