preview_checkout
Preview the complete order summary before payment. Advances the session to ready-for-payment state.
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.
SKYFIRE TOKEN (optional): Pass a kya or kya-pay token in the skyfire-pay-id header to boost trust score. No token required — request proceeds normally if omitted. Checkout guide: https://trusteed.xyz/.well-known/agent-checkout-guide.json. 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 with `mandate_id`, `max_amount_cents` (integer, minor units), `currency` (3 letters, must match the cart's), `exp` (expiry as an INTEGER of Unix seconds — not an ISO 8601 date string), `sub` (the identity you authenticate as — it is compared against it) and `aud` (the store slug this mandate is for, e.g. the slug in the URL you are calling — not a domain). It is a spending cap you declare to limit yourself: it authorises nothing and does not prove the buyer's consent. 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 |