Test API Mode
API checkout mode can be exercised in sandbox exactly like production — the same IP gate, offer selection, and status polling apply, only the settlement is simulated.
Setup
- Add your test server's IP to the gateway's allowlist — every API-mode call (create, read, select, expire, sandbox simulate) is source-IP gated (
403off-allowlist). - Create with
checkoutMode: "API",isSandbox: true, awebhookUrl, and nocallbackUrl.
What to test
- Create returns the inlined
paymentobject withoffers[]— render your picker from it. - Select an offer: handle
200 ASSIGNED(deposit address returned) and202 PENDING(re-call afterretryAfterMs) with a retry loop. - Status poll with
?statusOnly=truereturns the slim payload and never flipsisVerified. - IP gate: a call from a non-allowlisted IP returns
403with the observed IP echoed. - Drive the outcome with
sandbox/simulate(also IP-gated for API-mode payments), then confirm the webhook fires and you fulfil only from verify.
curl -X POST https://api-staging.finomesh.com/api/v1/public/payments/{paymentId}/sandbox/simulate \
-H "Content-Type: application/json" \
-d '{ "outcome": "success", "offerId": "{offerId}" }'