Sandbox
Test purchase
A simulated purchase with no money.
POST
https://merchant.dbdlobby.com/sandbox/purchase/{productId}sandbox-success → 201, sandbox-insufficient-balance → 402, sandbox-unavailable → 409, any other ID → 404 with a hint.
idempotencyKey and webhookUrl work as in the live API. A webhook is sent only for a successful order, signed with the same secret and containing "sandbox": true; up to 3 attempts.
Test orders are kept for 24 hours. The sandbox has its own, stricter rate limit.
Headers
| Name | Type | Description |
|---|---|---|
X-Entity-Keyrequired | string | Client access key. See “Authentication”. |
Content-Typerequired | string | application/json, otherwise 415. |
Path parameters
| Name | Type | Description |
|---|---|---|
productIdrequired | string | Sandbox product ID. Example: sandbox-success |
Request body
JSON object, up to 10 KB. All fields are optional — {} is valid.
| Name | Type | Description |
|---|---|---|
idempotencyKey | string | As in the live API, up to 128 characters. Example: order-7731 |
webhookUrl | string (URL) | Where to send the notification about the order outcome. https only, up to 2048 characters, no username/password in the URL, not localhost or internal addresses. Example: https://shop.example.com/hooks/merchant |
Responses
201 Created
{
"status": "success",
"order": {
"id": "sandbox_px8cqEgyiFCA",
"clientId": 7,
"productId": "sandbox-success",
"quantity": 1,
"idempotencyKey": "sb-1",
"price": 100,
"currency": "RUB",
"status": "completed",
"failureReason": null,
"webhookUrl": null,
"webhookStatus": null,
"webhookAttempts": 0,
"sandbox": true,
"createdAt": "2026-11-13T12:36:52.979Z",
"updatedAt": "2026-11-13T12:36:52.980Z"
}
}