create_checkout_session
Create a per-customer checkout session: resolves (or provisions) the customer's own vault from your externalCustomerId, mints a payment request that settles into it, and returns checkoutUrl + x402Url. The paid webhook then carries customer identity. Price from productSlug or ad-hoc amountUsd.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"customer": "<customer>"
},
"name": "create_checkout_session"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chainId | No | Chain for ad-hoc sessions (default base-mainnet) | |
| customer | Yes | Your customer identity — vault is resolved per (namespace, externalId) | |
| metadata | No | Optional metadata object | |
| amountUsd | No | Ad-hoc price in USD (alternative to productSlug) | |
| reference | No | Your order/session id, echoed on every webhook | |
| description | No | Optional checkout note | |
| productSlug | No | Price from an existing payment product (SKU) | |
| idempotencyKey | No | Safe retries — same key returns the same session | |
| expiresInMinutes | No | Session TTL (default 60, product default wins if set) | |
| amountSmallestUnit | No | Ad-hoc USDC amount in smallest units |