Endpoint
POST /settlements with header X-Fiscal402-Key when the operator has issued a merchant key. Optional Idempotency-Key replays the original response; a reused key with a different body returns 409 IDEMPOTENCY_CONFLICT. Duplicate (network, txHash) returns the existing record.
Body
| Field | Required | Notes |
|---|---|---|
| amountUsdc | yes | Decimal string, at most 6 fractional digits |
| txHash | yes | Already-settled transaction |
| timestamp | yes | ISO-8601, used as FX as-of |
| payerWallet | yes | Payment identity, not a legal person |
| receiverWallet | yes | x402 payTo |
| network | yes | e.g. eip155:1 |
| asset | no | Defaults to USDC |
| scheme | no | Defaults to exact |
| consumerCountry | no | ISO 3166-1 alpha-2, EU-27 for classification |
| consumerVatNumber | no | For B2B / VIES |
| ipCountry / walletCountry | no | Location signals, not proof of establishment |
POST /settlements
POST https://api.fiscal402.com/settlements
Content-Type: application/json
X-Fiscal402-Key: $FISCAL402_API_KEY
{
"amountUsdc": "1.00",
"txHash": "0xYOUR_SETTLED_TX",
"timestamp": "2026-09-10T12:00:00.000Z",
"payerWallet": "0xPAYER",
"receiverWallet": "0xPAY_TO",
"network": "eip155:1",
"asset": "USDC",
"scheme": "exact",
"consumerCountry": "DE"
}After ingest
GET /settlements/:id— public fiscal record (no UBL XML body).GET /settlements/:id/ubl—application/xml.GET /v1/receipts/rcpt_<id>— signed receipt. Receipt ids arercpt_plus the settlement id.
A PAYMENT-RESPONSE on a merchant route can be observed after the handler returns. That path still does not generate HTTP 402 or settle funds. There is no published Express package on npm.