Sandbox

Go-live checklist

Protocol: JSON v3 · XML 2.9OpenAPI

Recommendations, common mistakes and checks before production.

Before launch, check not only the successful payment but also declines, retries, notifications and security.

Recommendations

WhatWhy
Treat callbacks as repeatable and deduplicate by event id (id, or event_id in the legacy envelope)One event may arrive several times; the id does not change between attempts
Do not treat the callback as the only source of stateAfter the seventh failed attempt delivery stops. State is always available via GET /invoices/{invoice_id}
Branch on error.code, not on the message textThe message text is not part of the contract and may change
Store both invoice_id and merchant_order_idThe first is the platform key, the second is yours; an invoice can be found by either
Keep the callback handler fastReply 2xx immediately and move heavy work to a queue: a timeout counts as failure
Close the invoice before creating the next one for the same customerWhile the previous one is open, a new order gets 409 with the existing id in error.details.invoice_id
Check both outcomes of recurring chargesSuccessSequencePayment and FailedSequencePayment let you test a contract decline without waiting for production
Drive outcomes and callback delay with test_info, and remove the whole block before productionexpected_billing_result and callback_delay_seconds provide success and decline without waiting
Expose your callback address only over https with a public IPPrivate addresses are rejected (400 TEST_CALLBACK_URL_REJECTED); at most 30 callbacks per minute per project
Do not send test requests in bursts, especially with demo credentialsAt most 10 requests with test_info per 60 seconds per project; demo credentials share one counter. Above the limit — 400 TEST_INFO_RATE_LIMITED and Retry-After
Never use demo credentials outside the sandboxThe demo login is shared by everyone who opens the docs: your test operations are visible to others, and theirs to you

Common integration mistakes

HTTP 200 but empty fields

Almost always a field is in the wrong place. The sandbox does not validate the request body: unknown keys are silently ignored and missing required fields are filled with empty values. The request looks successful, but the data is lost.

FieldWhere it belongs
merchant_order_idinside order in POST /invoices
merchant_contract_idat the top level in POST /contracts, but inside contract in POST /invoices
InvoiceID (XML)inside <InvoiceInfo>, not directly under the operation tag

A simple check: compare the response echo fields with what you sent. If merchant_order_id comes back empty, the field did not arrive and nothing downstream will find it.

GetInvoice does not change status

This is how the previous mistake shows up in XML. The billing-delay simulation looks for InvoiceID inside <InvoiceInfo>; if it is placed directly under <GetInvoiceRequest>, the response comes from the stub template and the status never changes.

Payment created but money did not arrive

The CreateInvoice response confirms acceptance, not the billing result. The outcome arrives later: in the sandbox after test_info.callback_delay_seconds (10 seconds by default; cards and SBP — 5 seconds after payment), and in XML GetInvoice switches to Processed / PAID six seconds after the first status request. Rely on status and payment_status, not on successful creation.

Signature error

CauseHow to check
Local time instead of UTCThe timestamp is always UTC, even if the server runs in another time zone
Timestamp format mixed up between protocolsXML — yyyyMMddHHmmss, JSON — ISO-8601. Sign the exact string you send
One timestamp signed, another sentDo not call “get current time” twice: compute it once and use it in both the signature and the request
base64 instead of hexBoth HMAC operations produce lowercase hex
Wrong concatenation orderlogin + inner, not the other way around
Server clock driftThe tolerance is ±20 minutes; a larger drift returns AUTH_INVALID_TIMESTAMP

Callback does not arrive

Check in order: whether the project callback URL is configured; whether test_info.callback_url or <CallbackUrl> is https with a public IP; whether the 30 callbacks per minute per project limit is exceeded; whether there is a 400 TEST_INFO_RATE_LIMITED; whether the first-delivery delay has passed; whether your handler returns 2xx; whether the address is blocked by a firewall on the sandbox side. Remember that XML only delivers payment notifications — refunds and contract events are not sent there.

Checklist

Checklist0/12