Reset sandbox wallet
Bearer ds_live_ / ds_test_/api/v1/merchant/sandbox/resetTops the sandbox wallet back up to its starting balance. Handy at the start of an automated test run. Only works with a ds_test_ key.
curl -X POST "https://finaldatasub.com/api/v1/merchant/sandbox/reset" \
-H "Authorization: Bearer ds_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"clear_transactions": true
}'Authentication
Send your secret API key in the header. Authorization: Token … and X-API-Key: … are also accepted.
| Header | Value | Required |
|---|---|---|
| Authorization | Bearer ds_live_YOUR_KEY | Yes |
| Content-Type | application/json | Yes |
| Accept | application/json | Recommended |
Authentication failures (401 UNAUTHORIZED, 403 IP_NOT_ALLOWED / ACCOUNT_SUSPENDED / API_ACCESS_NOT_APPROVED, 429 RATE_LIMITED) are listed in Authentication.
Parameters
Responses
200 OK — OK · 403 Forbidden — Live key
{
"status": "successful",
"message": "Sandbox wallet reset.",
"balance": "100000.00",
"currency": "NGN",
"sandbox": true
}Errors
Errors specific to this endpoint, in addition to the authentication and validation errors common to every request.
| Code | HTTP | When |
|---|---|---|
| SANDBOX_ONLY | 403 | The request used a live key. |
| SANDBOX_DISABLED | 403 | Sandbox testing is turned off on this platform. |