Skip to content

Settlement ingest

Current payment protocol

Settlement ingest

POST /settlements accepts settlement evidence after payment has already settled.

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

FieldRequiredNotes
amountUsdcyesDecimal string, at most 6 fractional digits
txHashyesAlready-settled transaction
timestampyesISO-8601, used as FX as-of
payerWalletyesPayment identity, not a legal person
receiverWalletyesx402 payTo
networkyese.g. eip155:1
assetnoDefaults to USDC
schemenoDefaults to exact
consumerCountrynoISO 3166-1 alpha-2, EU-27 for classification
consumerVatNumbernoFor B2B / VIES
ipCountry / walletCountrynoLocation 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/ublapplication/xml.
  • GET /v1/receipts/rcpt_<id> — signed receipt. Receipt ids are rcpt_ 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.