Relayer API
The optional, stateless relayer: every endpoint, request and response.
The relayer submits signed payments to Whitechain and pays the gas. It is optional: everything it does, anyone can do by sending the same calldata. It is stateless, keeps no database and does not log invoice contents.
Endpoints
| Method | Path | Body | Response |
|---|---|---|---|
| GET | /health | – | { ok, relayer, paymentModule, approverAccountFactory, revocationList, mandateModule } |
| POST | /pay | { account, auth, approvers[], signatures[] } | { txHash, deployTxs? } |
| POST | /pay/calldata | same as /pay | { to, data }: submit it yourself |
| POST | /payrun | { account, auths[1..50], approvers[], signatures[] } | { txHash, paymentModule, deployTxs } |
| POST | /approver | { signer }: 84-byte passkey id or 20-byte address | { account, txHash | null } |
| POST | /revoke | { account, target, admin, deadline, sig, list? } | { txHash } |
| POST | /mandate | { mandate: { account, payee, capPerPeriod, period, expiry, nonce }, approvers[], signatures[] } | { txHash } |
| POST | /pull | { mandateId, amount } | { txHash } |
| POST | /rpc | JSON-RPC: pm_getPaymasterStubData, pm_getPaymasterData (ERC-7677) | paymaster fields and suggested gas |
| POST | /userop | { userOp }: EntryPoint v0.8 user operation | { txHash } |
The InvoiceAuth object
Payments carry the EIP-712 InvoiceAuth each approver signed:
{
"invoiceHash": "0x…32 bytes",
"account": "0x…buyer company account",
"payee": "0x…",
"amount": "1250500000", // USDT base units (6 decimals), decimal or 0x string
"expiry": "1801353600", // unix seconds
"nonce": "0x…" // uint256
}approvers are approver account addresses and signatures their approvals, in the same order. An approval for an approver account that isn't deployed yet may be ERC-6492-wrapped; the relayer deploys it first and returns those transactions in deployTxs.
Behaviour
- Every write is simulated first. A revert returns 422 with the reason, and nothing is sent.
- Malformed input returns 400. A relayer without a key returns 503, with
{ to, data }where possible so you can send it yourself. - Transactions are signed by the relayer's own key and sent one at a time.
/revokeuses the v1 revocation list unlesslistnames the v2 one./rpconly sponsors approver accounts bound to a verified WB Soul, within a daily quota per soul; it refuses others before anyone signs.- CORS is open, so the static app can call it from
taz0r.eth.limo.
Choose which relayer this device uses in Security & settings.