Guides
Testing
The sandbox runs the same code as live on Arc testnet. Test every path below with a sk_test_ key before you go live.
Set up
- Sign in to the sandbox console and create a test key.
- Point your server at
https://sandbox.api.saphra.one/v1. - Fund a test wallet from the Circle faucet (Arc Testnet, USDC or EURC).
- For local development,
http://localhostredirect URLs are accepted with test keys.
Scenarios to run
| Scenario | How | Expect |
|---|---|---|
| Happy path | Pay the full amount with a wallet. | complete / paid, redirect to success_url with the id filled in. |
| SaphraONE account | Choose “Pay with my SaphraONE account”, sign in, send. | Return link back to the checkout, then complete. |
| Partial payment | Send less than the amount. | open / partially_paid; pay the rest to complete. |
| Overpayment | Send more than the amount. | complete with overpayment above 0. |
| Abandoned | Create a session and don’t pay. | expired after expires_in_minutes (min 30). |
| Expire from server | POST /checkout/sessions/{id}/expire. | expired; paying is no longer possible. |
| Retry safety | Repeat a create with the same Idempotency-Key. | Same session id both times. |
| Closed tab | Pay, then close the tab before the redirect. | Your reconcile job finds it complete. |
| Bad input | Send amount as a number, or line items that don’t add up. | 400 parameter_invalid with param. |
| Wrong key | Use the test key against the live API. | 401 api_key_wrong_mode. |
