Skip to content

update_checkout

Set the buyer or a code, and re-price.

Anonymous, or a Bearer token for viewer tools

Endpoint

endpoint
https://go.sessions.website/@<handle>/api/ucp/mcp

When to use it

  • To set the buyer before completing.

  • To apply a discount or gift-card code and see the re-priced total.

Parameters

idstringrequired

Checkout session id.

checkoutobjectrequired

A partial UCP checkout object. line_items takes exactly one entry, whose item.id is a Sessions global id (a product or a scheduled session).

metaobjectoptional

Request metadata: {"ucp-agent": "<your platform profile URI>", "idempotency-key": "<uuid>"}.

Returns

The re-priced checkout. Fields you omit keep their current value, so this is a patch rather than a replace.

Example

POST this to the endpoint above.

JSON-RPC
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "update_checkout",
    "arguments": {
      "id": "checkout_abc123",
      "checkout": {
        "buyer": {
          "email": "dana@example.com"
        }
      }
    }
  }
}
content
checkout_abc123 · status: ready_for_payment
Buyer: dana@example.com

What the agent is told

The description the model reads when deciding whether to call this. It is the only thing that decides whether the tool fires at the right moment, so it is worth knowing what it says.

update_checkout
Patch a checkout session — set or change the buyer, swap the line item, or apply a discount / gift-card code — and re-price it. Fields you omit keep their current value.

See also