One-time payments · Mobile

Phone binding and confirmation-free payments

Protocol: JSON v3 · XML 2.9OpenAPI

DCB binding: confirm the PIN once and charge the contract.

A binding (contract) keeps the customer phone after one PIN confirmation. Further invoices by this binding do not require the PIN again.

Step 1. Create a binding

Send customer.type = "mobile_phone" and msisdn. The response contains contract_id and authorization_type — for phones it is usually SMS_PIN.

POST/api/v3/projects/YOUR_PROJECT_ID/contractsPRODUCTIONReference ↗
Request
curl -X POST "https://pay-api.digitalspb.com/api/v3/projects/YOUR_PROJECT_ID/contracts" \  -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"  },  "merchant_contract_id": "1234567890"}'
Read-only example. Runnable examples are available in the Sandbox section.
201
{  "success": true,  "data": {    "contract_id": "16449203-0000-009b-a125-351b7bfbd207",    "authorization_type": "SMS_PIN",    "expires_at": "2025-03-29T20:00:08Z",    "merchant_contract_id": "1234567890",    "customer": {      "type": "mobile_phone",      "msisdn": "79600000000",      "country": "RU",      "network": {        "id": 3,        "name": "Beeline"      },      "operator": {        "id": 42,        "name": "Beeline"      }    }  }}

Step 2. Authorize the binding

The customer enters the SMS PIN. Authorize the binding with Contracts_Authorize (XML — AuthorizeCustomerContract).

POST/api/v3/projects/YOUR_PROJECT_ID/contracts/{contractId}/authorizePRODUCTIONReference ↗
Request
curl -X POST "https://pay-api.digitalspb.com/api/v3/projects/YOUR_PROJECT_ID/contracts/{contractId}/authorize" \  -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",  "pin_code": "987656"}'
Read-only example. Runnable examples are available in the Sandbox section.
200
{  "success": true,  "data": {    "contract_id": "16449203-0000-009b-a125-351b7bfbd207",    "status": "active"  }}

Step 3. Charge the binding

Create invoices with contract.merchant_contract_id or contract.contract_id. No repeated PIN is required while the binding is active. The expiry is in expires_at.