eip155:84532) and small prices while you are validating behavior.
What to test first
Unpaid request
Call the protected route without a payment header. Confirm your API returns HTTP 402 with the expected scheme, price, network, asset, and
payTo.Paid retry
Use a 4Mica-capable buyer client to sign a guarantee with a unique request ID, retry the request, and receive the protected response.
Invalid payment
Retry with a missing, expired, malformed, or mismatched payment header. Confirm the paid handler does not run.
Delivery evidence
Confirm logs connect request ID, guarantee ID, payer, route, price, settlement result, and response hash or delivery marker.
Sandbox checklist
Before adding tiers, metering, or complex workflows, prove the smallest paid route end to end.| Check | What to confirm |
|---|---|
| Test wallets | You use separate seller and buyer wallets for sandbox. |
| Small price | The first route uses a low amount, such as $0.01. |
| One protected route | A simple route works before you add pricing complexity. |
| Server-side facilitator call | Your server, not browser code, talks to the facilitator. |
| Invalid attempts | Repeated bad payments trigger rate limits or alerts. |
| Support lookup | You can find a paid request from a guarantee ID or request ID. |
Abuse scenarios to simulate
- A buyer without enough collateral tries to pay.
- A buyer pays for a cheap route and reuses the header on an expensive route.
- A buyer changes request parameters after receiving a quote.
- A buyer sends many unpaid requests to force expensive pre-work.
- A buyer claims the agent failed after receiving a response.
- Another client tries to impersonate a known payer or agent.
When sandbox is done
Move toward production only after the payment flow is boring. You should be able to answer the same questions from logs, dashboard records, and application behavior.| Question | Where the answer should appear |
|---|---|
| What did the buyer pay for? | Route configuration, quote metadata, and request logs. |
| Which wallet paid? | Payment record and request logs. |
| Which seller address received the obligation? | Payment requirements and settlement records. |
| Which route and price were used? | HTTP 402 response, logs, and dashboard activity. |
| Did verification and settlement succeed? | Middleware result and facilitator records. |
| What did the agent return? | Response hash, delivery marker, or stored result metadata. |
| What happens if a net debtor does not settle? | Default-path test notes and clearing records. |