One-time payments
Quick start
Protocol: JSON v3 · XML 2.9OpenAPI
First invoice, confirmation and notification in four steps.
Below is the minimal mobile payment path. The examples show the production endpoint and placeholders for tokens and IDs; run them in the Sandbox section.
Step 1. Create an invoice
Send the customer phone, amount, order id and binding. For the first payment without a binding, omit the contract block.
curl -X POST "https://pay-api.digitalspb.com/api/v3/projects/YOUR_PROJECT_ID/invoices" \ -H "Content-Type: application/json" \ -H "X-Login: YOUR_LOGIN" \ -H "X-Timestamp: YOUR_TIMESTAMP" \ -H "X-Signature-Version: 3" \ -H "X-Signature: YOUR_SIGNATURE" \ -d '{ "client_ip": "10.20.30.40", "customer": { "type": "mobile_phone", "msisdn": "79600000000", "email": "test@test.com" }, "order": { "merchant_order_id": "order_123", "price": { "amount": "25.00", "currency": "RUB", "vat_included": true }, "description": "Premium subscription" }, "contract": { "create_if_not_exists": false, "merchant_contract_id": "1234567890" }, "application": { "name": "Game of Sultans" }, "product": { "name": "New Pack_1" }}'Read-only example. Runnable examples are available in the Sandbox section.
201
{ "success": true, "data": { "invoice_id": "1624505c-0031-00cf-7d54-4cf1ce08cb30", "status": "created", "payment_status": "NOT_PAID", "authorization": { "type": "BY_CONTRACT", "is_authorized": true }, "price": { "amount": "25.00", "currency": "RUB", "vat_included": true }, "merchant_order_id": "order_123", "created_at": "2025-03-29T20:00:10Z", "expires_at": "2025-03-29T22:00:10Z", "billing_channel": "CPA", "customer": { "type": "mobile_phone", "msisdn": "79600000000", "country": "RU", "network": { "id": 3, "name": "Beeline" }, "operator": { "id": 42, "name": "Beeline" } }, "contract": { "contract_id": "16449203-0000-009b-a125-351b7bfbd207", "authorization_type": "SMS_PIN", "expires_at": "2025-03-29T20:00:08Z", "merchant_contract_id": "1234567890" } }}Step 2. Confirm payment
If authorization.type is SMS_PIN, the customer receives a PIN and confirms with Invoices_Authorize (XML — AuthorizeInvoice).
Step 3. Receive a webhook
The result arrives as a payment.updated event. Verify the signature, read invoice.payment_status and respond 2xx.
Step 4. Check the status
If the webhook did not arrive, fetch the invoice by invoice_id or merchant order id.