Sandbox
Sandbox
Test the same API with sandbox keys. Nothing is sent on-chain, and your live Naira balance never changes.
Unlock Dashboard → API access with your security PIN and copy the sandbox public key and sandbox secret. Send them as X-Public-Key and X-Secret-Key. Every JSON response then includes sandbox: true, mode: "sandbox", and test_data: true.
Create customers, read wallets, quote a rate, and simulate a deposit with these keys. Deposit addresses look like sbx1… and is_blockchain_enabled is false. Do not send real crypto to them.
GET /balance returns the sandbox Naira balance, which starts at 0. A credited test deposit adds the example net amount. POST /sandbox/reset clears test customers, test deposits, and that balance.
Quotes and rates still return a realistic market price for checkout math. The simulated deposit uses a flat example rate of 1500 and a 1% fee so the webhook is easy to assert. It is not a live settlement.
- 1Copy the sandbox keysDashboard → API access → View. Sandbox public keys start with vst_test_pub_. Sandbox secrets start with vst_test_sec_.
- 2Save a webhook URLThe same dashboard page. HTTPS only. Test deposits are signed with your webhook secret and sent with X-Vastel-Mode: sandbox.
- 3Create a test customerPOST /users with the sandbox keys. Repeat the same external_user_id and you get the same test customer. Live customers are a separate list.
- 4Simulate a paymentPOST /sandbox/deposits. outcome credited increases the sandbox balance and delivers deposit.credited. outcome underpaid does not credit the balance.
- 5Go liveSwap the headers for vst_pub_ and vst_sec_. Live responses omit sandbox / mode / test_data. Fulfill an order only when those fields are absent and the deposit is paid.
Sandbox keys vs live keys
| Sandbox | Live | |
|---|---|---|
| Public key | vst_test_pub_… | vst_pub_… |
| Secret key | vst_test_sec_… | vst_sec_… |
| Customers and addresses | Stored for tests. Address starts with sbx1 | Real deposit address |
| GET /balance | Sandbox Naira balance | Live Naira balance |
| POST /sandbox/deposits | Delivers a signed test webhook | 403 |
| Payouts / banks/resolve | 403 | Real NGN payout |
| Webhooks | sandbox + mode + test_data flags; X-Vastel-Mode: sandbox | No sandbox flags |
Fulfill a real order only when the webhook has no sandbox flag. An underpaid sandbox event is the short-payment path. Sandbox deposits never touch your live wallet.
curl -s https://api.vastel.io/api/v1/balance \
-H "X-Public-Key: vst_test_pub_xxxxxxxx" \
-H "X-Secret-Key: vst_test_sec_xxxxxxxx"