Skip to content

complete_checkout

Charge and fulfil, re-checking availability first.

Anonymous, or a Bearer token for viewer tools

Endpoint

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

When to use it

  • Once the buyer is set and, for a paid checkout, a Stripe payment method is attached.

  • Expect it to refuse rather than mis-sell: it re-checks availability and price first.

Parameters

idstringrequired

Checkout session id.

checkoutobjectoptional

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 completed checkout and its order — or a message explaining why it could not complete, such as a session that filled up or a code that expired since it was priced.

Example

POST this to the endpoint above.

JSON-RPC
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "complete_checkout",
    "arguments": {
      "id": "checkout_abc123",
      "meta": {
        "idempotency-key": "<uuid>"
      }
    }
  }
}
content
checkout_abc123 · status: completed
Order: order_def456 · charged $24.00

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.

complete_checkout
Charge and fulfil the checkout. Re-checks availability and price first, so a session that filled up or a code that expired produces a message rather than a bad order. Paid checkouts need a Stripe payment-method token in checkout.payment.instruments[].credential; free ones do not. On success the response carries order. Safe to retry — completing an already-complete session returns the same order without charging again.

See also