Create a test invoice
create_invoiceCreate a Checkout invoice priced in USD and get its hosted payment URL. The customer pays in any supported token on any chain; you receive your settlement asset at your own address. Also returns the clientSecret for an embedded widget. reference (your order ID) is required and makes retries safe. A test key makes a test invoice; with a live key, pass mode: "live" to confirm a real payment request.
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": {
"amount": "<amount>",
"reference": "<reference>"
},
"name": "create_invoice"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | Must match your key's mode. With a live key, pass "live" to confirm a real payment request; omit it with a test key. | |
| amount | Yes | Price in USD, e.g. "49.00" | |
| metadata | No | ||
| cancelUrl | No | ||
| reference | Yes | Your order ID. Required: it is the idempotency key, so a retried call returns the same invoice instead of a second one | |
| successUrl | No | Where the customer goes after paying | |
| description | No | What the customer is paying for | |
| expiresInSec | No | ||
| customerEmail | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | ||
| mode | Yes | ||
| amount | Yes | ||
| status | Yes | ||
| invoice | Yes | ||
| summary | Yes | ||
| currency | Yes | ||
| expiresAt | Yes | ||
| invoiceId | Yes |