Sandbox & simulator
On this page
/cash/v1/merchant/exchange/orders/{orderId}/simulate Auth: API key (Bearer)exchange:writeSandbox keys (ck_test_…) use the same exchange endpoints as live keys — quotes, orders and order reads — but nothing reaches a real provider.
Getting a sandbox key
Open Developers → API keys in the console (/home/developer/keys), click Create API key and leave the environment switch on Sandbox (it is the default). Keep exchange:read and exchange:write. Sandbox keys also require your own personal identity verification (KYC) to be approved. The key starts with ck_test_ and can be used right away in the Try it panels on these pages, or under Developers → Sandbox testing (/home/developer/sandbox), where each exchange endpoint can be called from the browser with the key kept only in that page's memory.
What the sandbox does
- Quotes come from a fixed synthetic rate table with a 0.5% service fee. They are real server-side quotes (5-minute expiry,
synthetic: true,environment: "sandbox"). - Orders are persisted and validated exactly like live orders (receiving address must be valid for the network,
Idempotency-Keyrequired), but no provider order is created and the deposit address is a placeholder such assandbox-CASH…-deposit. Nobody can pay it.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| orderId | path | string | yes | The sandbox order id (or order number) returned at creation. |
| event | body | string | yes | deposit | processing | sending | completed | failed | expired |
| actualToAmount | body | string | no | Optional receive amount to record as settled. |
{
"event": "completed"
}{
"ok": true,
"data": {
"simulated": true,
"event": "completed",
"changed": true,
"order": {
"orderId": "<uuid>",
"status": "completed",
"environment": "sandbox"
}
}
}Code samples
curl -X POST 'https://api.moin.cash/cash/v1/merchant/exchange/orders/<orderId>/simulate' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer ck_test_xxxxxxxxxxxxxxxx' \
-d '{ "event": "completed" }'