Merchant API
Checking…Sandbox
Sandbox

Test purchase

A simulated purchase with no money.

POSThttps://merchant.dbdlobby.com/sandbox/purchase/{productId}
X-Entity-Keyapplication/jsonMarkdown version

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

NameTypeDescription
X-Entity-KeyrequiredstringClient access key. See “Authentication”.
Content-Typerequiredstringapplication/json, otherwise 415.

Path parameters

NameTypeDescription
productIdrequiredstringSandbox product ID.
Example: sandbox-success

Request body

JSON object, up to 10 KB. All fields are optional — {} is valid.

NameTypeDescription
idempotencyKeystringAs in the live API, up to 128 characters.
Example: order-7731
webhookUrlstring (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

application/json
{
  "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"
  }
}