Mandate uses a cryptographically signed proof-of-payment model. An agent generates a proof asserting its identity, the mandate it is drawing from, and the amount it intends to pay. A merchant verifies that proof and, once valid, the charge is recorded against the mandate’s budget. These two endpoints implement both sides of that handshake in the sandbox environment.Documentation Index
Fetch the complete documentation index at: https://docs.usemandate.io/llms.txt
Use this file to discover all available pages before exploring further.
Generate a sandbox proof
The agent generating this proof.
The mandate the agent is drawing from.
The payment amount as a decimal string, e.g.
"0.10". Must exactly match the expected_amount when the proof is verified.The currency for this proof. Currently
"USDC" only.The URL of the resource being purchased.
201
Example response
| Status | Detail | Cause |
|---|---|---|
400 | production_payments_not_supported | Request was made with a production API key. |
Verify a payment proof
requireKyaPayment()) calls this endpoint automatically when a merchant receives a request with an X-Payment-Proof header. You can also call it directly if you are implementing a custom verification flow.
Verification runs in this order:
- Proof timestamp within the 5-minute validity window
- Amount and currency match the expected values (exact string comparison)
- HMAC-SHA256 signature is valid
- Nonce has not been used before (replay protection)
- Nonce is marked as used in the database
- Mandate budget is incremented atomically
- Transaction record is created with
status: "paid" - Audit log event is written
Proofs are valid for exactly 5 minutes from their
timestamp. A proof with a timestamp older than 5 minutes returns verified: false with reason: "proof_expired". Generate a new proof and retry.The proof object returned by
POST /v1/payments/proof. Pass the entire object without modification.The domain of the merchant receiving the payment, e.g.
"api.example.com". Used to look up the merchant record on the transaction.The amount the merchant expects to receive. Must be an exact string match with
proof.amount.The currency the merchant expects. Must be an exact string match with
proof.currency.true when verification succeeds and the charge has been recorded.The ID of the
paid transaction record created for this charge.Example response — verified
false when any verification step fails.Machine-readable failure reason. Possible values:
proof_expired, amount_mismatch, invalid_signature, nonce_reused.Example response — not verified
| Reason | Cause |
|---|---|
proof_expired | Proof timestamp is more than 5 minutes old. |
amount_mismatch | proof.amount or proof.currency does not match the expected values. |
invalid_signature | HMAC-SHA256 signature does not match the recomputed value. |
nonce_reused | Proof nonce has already been consumed by a previous verification. |

