Skip to Content

Create customer contract

POST /api/v3/projects/{projectId}/contracts

Initiates binding of a customer (typically mobile phone number) for repeat payments within the project.

v4 signature payload: {merchant_contract_id}{customerPayload}{pin_code}{client_ip}

Request parameters

FieldTypeRequiredDescription
projectIdinteger (int32)yes

Request body

FieldTypeRequiredDescription
client_ipstring—
customerobject—Polymorphic customer block. The actual subset of fields depends on type: - mobile_phone: msisdn, email - bank_card: source, country, merchant_customer_id, email, and — on the PCI DSS contour host only — bank_card with the card details - undefined_bank_card: same fields as bank_card, minus the card details Choosing between the two card types. They are different payment routes, so the type is always stated explicitly — it is never inferred from other fields: - undefined_bank_card — the payer enters the card on the payment page opened by authorization.url. The card is not bound, contracts are not supported. - bank_card — the card is bound to a contract and can be charged again later. Requires approved bank card settings for the project and the payer’s country; on the PCI DSS contour the card details are sent with the request.
customer.typemobile_phone · bank_card · undefined_bank_card—
customer.msisdnstring—Customer’s MSISDN in international E.164 format (no +). Required for mobile_phone.
customer.emailstring (email)—Customer’s email
customer.countrystring—Country code (ISO 3166-1 alpha-2). Required for bank_card.
customer.networkobject—
customer.network.idinteger (int32)—Network ID (see operators reference)
customer.network.namestring—
customer.operatorobject—
customer.operator.idinteger (int32)—Operator ID (see operators reference)
customer.operator.namestring—
customer.sourcestring—Source name in the merchant’s system (unique per partner). Required for bank_card.
customer.merchant_customer_idstring—Unique customer ID in the merchant’s system. Required for bank_card.
customer.bank_cardobject—
merchant_contract_idstring—Contract ID in the merchant’s system. Contract is created by the key customer + merchant_contract_id.
Request example — Mobile phone (DCB)
{ "client_ip": "10.20.30.40", "customer": { "type": "mobile_phone", "msisdn": "79600000000" }, "merchant_contract_id": "1234567890" }
Request example — Bank card with card details (PCI DSS contour host only)
{ "client_ip": "10.20.30.40", "customer": { "type": "bank_card", "source": "my_app", "country": "RU", "merchant_customer_id": "client_12345", "email": "test@test.com", "bank_card": { "pan": "4111111111111111", "expiration_month": "12", "expiration_year": "2030", "security_code": "123", "cardholder": "IVAN IVANOV" } }, "merchant_contract_id": "1234567890" }
Request example — Contracts_Create / duplicate (HTTP 409)
{ "client_ip": "127.0.0.1", "customer": { "type": "bank_card", "source": "app", "country": "RU", "merchant_customer_id": "CUSTOMER-000000001", "email": "test@test.com", "bank_card": { "pan": "1111222233334444", "expiration_month": "12", "expiration_year": "2030", "security_code": "123", "cardholder": "IVAN IVANOV" } }, "contract": { "merchant_contract_id": "CONTRACT-000000001" } }
Request example — Contracts_Create / mobile_phone (HTTP 201)
{ "merchant_contract_id": "CONTRACT-000000001", "customer": { "type": "mobile_phone", "msisdn": "79600000000" }, "client_ip": "127.0.0.1" }
Response example
{ "success": true, "data": { "contract_id": "0d0f3c58-9b1e-4a77-9a0c-000000000002", "authorization_type": "SMS_PIN", "expires_at": "2026-09-21T12:00:00Z", "merchant_contract_id": "CONTRACT-000000001", "customer": { "type": "mobile_phone", "msisdn": "79600000000" } } }

Response codes

CodeDescription
201Contract created
400Validation or business request error
401Authentication failed (missing/invalid signature or timestamp)
403Project access denied or IP not whitelisted
409Contract already exists or contract draft already exists
422Business validation error
500Unexpected platform error
503Service temporarily unavailable