record_settlement
Seals successful payments as signed, verifiable records: matches each to its intent, checks cap and expiry, and rejects conflicting facts unless a correction is supplied.
Instructions
Call this right after each payment succeeds, with the rail's own reference (a merchant calls it for each payment received, with direction inflow). Records the payment: sealed, matched to its intent, checked against its cap and expiry. The same payment again returns unchanged. Different facts for a payment already sealed return conflict and seal nothing, unless you give correction: { reason }.
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": {
"rail": "<rail>",
"source_id": "<source_id>",
"amount_minor": "<amount_minor>",
"currency": "<currency>",
"occurred_at": "<occurred_at>"
},
"name": "record_settlement"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| memo | No | ||
| rail | Yes | ||
| nonce | No | ||
| state | No | ||
| network | No | Optional: the network it settled on, such as base or solana | |
| receipt | No | Optional: where the receipt or invoice is kept, and its hash; never the receipt itself | |
| currency | Yes | ||
| order_id | No | Optional: the merchant's order ID for this payment, as the merchant shows it (on the receipt or order confirmation) | |
| buyer_key | No | The buyer's public key, to check buyer_intent | |
| direction | No | ||
| intent_id | No | ||
| source_id | Yes | The rail's own reference: transaction hash, charge ID | |
| correction | No | Only to correct a payment already sealed: the new version says why | |
| invoice_ref | No | Optional: the invoice or bill number this payment paid, as given to check_payment | |
| occurred_at | Yes | When the rail says the payment was made, in ISO 8601 with its offset (2026-10-28T19:00:00Z or 2026-10-28T12:00:00-07:00) | |
| amount_minor | Yes | ||
| buyer_intent | No | For a merchant recording a payment it received: the buyer's own sealed intent ({ payload, seal }) as the buyer's agent presented it at checkout. It must check with buyer_key; the record keeps its hash and whether the payment was inside it | |
| counterparty | No | ||
| evidence_type | No | Optional: onchain for a blockchain transaction, provider_reference for a payment provider's reference | |
| counterparty_id | No | Optional: how the payee is identified, as scheme:value, such as domain:data.example or wallet:0x… | |
| counterparty_type | No | Optional: organization, person, service or agent | |
| settlement_provider | No | Optional: who settled the payment, such as the x402 facilitator | |
| buyer_authentication | No | Optional: how the buyer proved it was them at checkout. Never the evidence itself | |
| processor_transaction_id | No | Optional: the payment processor's own transaction ID (Stripe, Adyen, the acquirer), where it differs from source_id. Both can be added later to a record already sealed |