payment_required
Create a x402 payment request (HTTP 402) for a resource you sell to another agent. Returns a paymentId, the USDC amount in units, the destination address and the TraceaPayments contract to call. The paying agent must then call TraceaPayments.payX402(destination, amount, paymentId) on-chain — the contract enforces financial cap + whitelist on-chain. Deliver the resource only after payment_incoming confirms fulfilment.
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": {
"destination": "<destination>",
"amount_usdc": "<amount_usdc>"
},
"name": "payment_required"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| agent | No | Address of the paying agent, if known | |
| resource | No | Identifier/URL of the resource to unlock after payment | |
| amount_usdc | Yes | Amount in USDC, e.g. '0.50' or '2' | |
| destination | Yes | Address that receives the USDC payment (yours) | |
| ttl_seconds | No | Validity of the payment session (30-3600s, default 300) |