x402 payment receipt: decode the payment you sent API
Decodes the x402 v2 PAYMENT-SIGNATURE header sent with the request into a readable receipt: x402 version, scheme, CAIP-2 network and chain name, resource URL, the copied payment requirements, payer, recipient, value in atomic units and USD, USDC contract, nonce, validity window in ISO-8601 with seconds to expiry, signature length and prefix, extension keys, and pass/fail diagnostics. Computed locally, no upstream source.
$0.002 per call USDC over x402 v2 on Base, Polygon, Arbitrum, Avalanche or Sei. No signup, no API key. Requests that fail or match nothing are not charged.
Endpoint
GET https://api.kit-rx.com/v1/x402/receipt
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
echo | string | no | Optional text up to 200 characters, returned verbatim in the response for request correlation. e.g. test-run-001 |
Example request
https://api.kit-rx.com/v1/x402/receipt?echo=test-run-001
Without payment the server answers 402 Payment Required with the price (2000 atomic USDC) in the PAYMENT-REQUIRED header. Any x402 v2 client pays and retries automatically. A request with no parameters runs this example.
curl -i "https://api.kit-rx.com/v1/x402/receipt?echo=test-run-001"
Pay from an agent
AgentCash: fetch the URL. OpenDexter MCP: x402_fetch. Kit Rx MCP server: https://api.kit-rx.com/mcp. Code:
import { x402Client } from "@x402/core/client";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { wrapFetchWithPayment } from "@x402/fetch";
import { privateKeyToAccount } from "viem/accounts";
const client = new x402Client();
registerExactEvmScheme(client, { signer: privateKeyToAccount(process.env.BUYER_KEY) });
const pay = wrapFetchWithPayment(fetch, client);
const res = await pay("https://api.kit-rx.com/v1/x402/receipt?echo=test-run-001");
console.log(await res.json());
Example response
{
"query": {
"echo": "test-run-001"
},
"result": {
"payment_header_present": true,
"header_used": "payment-signature",
"header_bytes": 7308,
"decoded": true,
"encoding": "base64",
"error": null,
"payment": {
"x402_version": 2,
"scheme": "exact",
"network": "eip155:8453",
"network_caip2": "eip155:8453",
"network_name": "Base",
"resource": {
"url": "https://api.kit-rx.com/v1/x402/receipt",
"description": "Decodes the x402 v2 PAYMENT-SIGNATURE header sent with the request into a readable receipt: x402 version, scheme, CAIP-2 network and chain name, resource URL, the copied payment requirements, payer, recipient, value in atomic units and USD, USDC contract, nonce, validity window in ISO-8601 with seconds to expiry, signature length and prefix, extension keys, and pass/fail diagnostics. Computed locally, no upstream source.",
"mimeType": "application/json"
},
"accepted": {
"scheme": "exact",
"network": "eip155:8453",
"amount": "2000",
"amount_usd": "0.002",
"asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"payTo": "0xAf8E0A8a8A0A8f65831b2dD0FFe0c1B804698D70",
"maxTimeoutSeconds": 300,
"extra": {
"name": "USD Coin",
"version": "2"
}
},
"transfer_method": "eip3009",
"payer": "0x3f1D5e8a1B2c7b0E9F4d6A8c2E5b7D9f1A3c5E7b",
"to": "0xAf8E0A8a8A0A8f65831b2dD0FFe0c1B804698D70",
"value_atomic": "2000",
"value_usd": "0.002",
"value_usd_basis": "known Base USDC contract, 6 decimals",
"asset": {
"address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"symbol": "USDC",
"decimals": 6
},
"nonce": "0x9b7e2c4d61a0f3e85d2b47c91e06fa3b8c5d17e29f40b6a3c8e1d5f7a2b4c6e8",
"valid_after": {
"field": "authorization.validAfter",
"unix": 0,
"iso": "1970-01-01T00:00:00.000Z"
},
"valid_before": {
"field": "authorization.validBefore",
"unix": 1794603900,
"iso": "2026-11-13T21:05:00.000Z",
"seconds_until_expiry": 296,
"expired": false
},
"signature": {
"length_chars": 132,
"bytes": 65,
"prefix": "0x5c1f3a9e",
"kind": "ecdsa_65_bytes"
},
"extension_keys": [
"bazaar"
],
"top_level_keys": [
"x402Version",
"payload",
"extensions",
"resource",
"accepted"
],
"payload_keys": [
"authorization",
"signature"
]
},
"diagnostics": [
{
"id": "to_matches_payTo",
"check": "authorization.to equals accepted.payTo",
"status": "pass",
"detail": "Both are 0xAf8E0A8a8A0A8f65831b2dD0FFe0c1B804698D70."
},
{
"id": "value_matches_amount",
"check": "Signed value equals accepted.amount",
"status": "pass",
"detail": "Both are 2000 atomic units."
},
{
"id": "valid_before_future",
"check": "validBefore is in the future",
"status": "pass",
"detail": "Expires in 296 s."
},
{
"id": "valid_after_reached",
"check": "validAfter is not in the future",
"status": "pass",
"detail": "The authorization window has opened."
},
{
"id": "network_recognized",
"check": "Network is a recognized x402 USDC network",
"status": "pass",
"detail": "eip155:8453 is Base."
}
],
"diagnostics_summary": {
"pass": 5,
"fail": 0,
"skipped": 0
},
"server_time": "2026-11-13T21:00:04.512Z",
"echo": "test-run-001",
"settlement_note": "On-chain settlement happens after this body is produced: the facilitator submits the signed transfer once the handler returns 200. The transaction hash arrives in this same response's PAYMENT-RESPONSE header (base64 JSON with success, transaction, network and payer)."
},
"sources": [],
"attribution": [
"No third-party data: computed from this request's own payment header. Network names and USDC contract addresses follow the default asset table of the x402 reference implementation (@x402/evm, Apache-2.0)."
],
"generated_at": "2026-11-13T21:00:04.513Z"
}
Kit Rx: Composed public-data reports for AI agents, paid per call in USDC over x402. Machine-readable: OpenAPI, llms.txt, /.well-known/x402, agent skills.