preview_checkout
Preview the complete order summary before payment. Advances the session to ready-for-payment state. If you only need the price, call quote_checkout instead: it computes the same total without advancing the session or opening an approval.
PREFER THE CART CARD: if there is an interactive card for this cart, let it compute and show the summary instead of calling this tool yourself — it keeps the flow in one card. Checkout guide: read the MCP resource trusteed://guides/checkout. CREDENTIAL: this store needs one. Call the create_sandbox_key tool first (it is in this tool list and needs no credential), then pass the key you get back as the agent_key argument — or as an Authorization: Bearer header if your client can set headers. Do not ask a person to log in: there is no human login for this store.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cart_id | Yes | Cart session ID returned by create_cart | |
| agent_key | No | Sandbox credential from `create_sandbox_key`. Use this when your client cannot set an `Authorization: Bearer` header. | |
| payment_mandate | No | Payment mandate issued by the platform for this cart: the compact JWS you receive after the approval opened by `preview_checkout` is granted (its `exp` is Unix seconds and `aud` is this store's slug). Forward it as received; a mandate you write yourself is not accepted here. The approval is bound to your agent credential and does not verify that a person was present. Use this when your client cannot set an `X-Payment-Mandate` header. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| items | Yes | ||
| status | Yes | ||
| currency | Yes | ||
| next_step | No | ||
| tax_cents | Yes | ||
| expires_at | No | ||
| store_name | Yes | ||
| tax_status | Yes | ||
| total_note | Yes | ||
| approval_id | No | ||
| total_cents | Yes | ||
| approval_url | No | ||
| discount_cents | Yes | ||
| shipping_cents | Yes | ||
| shipping_title | No | ||
| subtotal_cents | Yes | ||
| total_is_final | Yes | ||
| payment_options | No | ||
| shipping_source | No | ||
| next_step_message | No | ||
| expires_in_seconds | No | Whole seconds left on this checkout SESSION at response time (0 when already past). It is not a stock reservation and not a price guarantee. | |
| approval_status_url | No | ||
| checkout_session_id | Yes | ||
| shipping_authoritative | No |