Sandbox
Use sandbox workspaces to create test balances and simulate terminal pay-in and payout outcomes.
Sandbox
Sandbox endpoints are available only to sandbox workspace API keys. They let you create deterministic test balances and move existing sandbox pay-ins or payouts to terminal states without moving real funds.
Prerequisites
- Create a sandbox workspace in Swipelux at https://swipelux.app.
- Issue an API key from that workspace. Sandbox keys are marked with
sbx. - Use normal API endpoints to create the customer, wallet, pay-in, or payout before calling simulation endpoints.
Send the sandbox key in the same X-API-Key header used by production requests:
Live keys receive 403 on /v1/sandbox/* endpoints.
Test Balances
Use POST /v1/sandbox/topup to credit a custodial sandbox wallet with test funds. The response is a completed wallet_to_wallet transfer record. The returned explorer-style URLs are for testing only and are not proof of a real transaction.
Top-ups complete synchronously with state: "completed". The target wallet must belong to a sandbox customer.
Simulate Pay-in Settlement
Use POST /v1/sandbox/payins/simulate after creating a sandbox pay-in through the normal pay-in flow.
status can be completed or failed. Completed simulations credit the sandbox wallet and emit the same pay-in and transfer webhook families as a real settlement. Failed simulations emit the normal failure webhook family. amount is optional; when omitted, the original pay-in amount is used.
The customer-scoped alias is also available:
Simulate Payout Settlement
Use POST /v1/sandbox/payouts/simulate after creating a sandbox payout through the normal payout flow.
status can be completed or failed. The endpoint emits the same payout and transfer webhook families that production payouts use while keeping the activity inside the sandbox workspace.
API Reference
| Operation | Use it for |
|---|---|
POST /v1/sandbox/topup | Credit a sandbox wallet with test funds. |
POST /v1/sandbox/payins/simulate | Move a sandbox pay-in to completed or failed. |
POST /v1/sandbox/payouts/simulate | Move a sandbox payout to completed or failed. |
POST /v1/customers/{id}/simulate-transactions | Customer-scoped pay-in simulation alias. |