Authorize binding
/api/v3/projects/YOUR_PROJECT_ID/contracts/{contractId}/authorizeDescription
Confirms a created contract using a PIN code sent to the customer via SMS.
v4 signature payload: {contract_id}{merchant_contract_id}{pin_code}{client_ip}
XML 2.9 description
Authorizes a customer contract using a PIN code. XML request type: <AuthorizeCustomerContractRequest>.
After creating a contract, the Platform sends an SMS to MSISDN with a PIN code. The Merchant's application should transfer this PIN code to authorize the contract. If the PIN code is correct, the contract becomes "alive" — until it expires, all subsequent payments will not require additional confirmations.
HTTP Headers:
Callisto-Protocol-Version: 2SignatureVersion: 3
Request and response
Examples come from OpenAPI and are read-only here. Run requests in the Sandbox section.
/api/v3/projects/YOUR_PROJECT_ID/contracts/{contractId}/authorizePRODUCTIONcurl -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"}'{ "success": true, "data": { "contract_id": "16449203-0000-009b-a125-351b7bfbd207", "status": "active" }}JSON v3 request fields
Contracts_Authorize| Request fields | Type | Req. | Description |
|---|---|---|---|
client_ip | string | optional | |
pin_code | string | optional |
XML 2.9 request fields
authorizeCustomerContract| Request fields | Type | Req. | Description |
|---|---|---|---|
AuthorizeCustomerContractRequest | object & object | required | |
ProjectID | integer (int32) | required | Project ID in the Platform system. Assigned during project setup. |
ClientIP | string | optional | IP address from which the client makes the request. Mandatory by default (configurable in project settings). |
CustomerContractInfo | object | required | Customer contract reference for authorize/cancel operations. |
ContractID | string | required | |
MerchantContractID | string | optional | The ID of the contract in the Merchant's system |
UndefinedMobilePhoneCustomer | object & object | optional | +2 |
NetworkID | integer (int32) | required | |
Email | string | optional | |
MobilePhoneCustomer | object & object | optional | Customer identification by mobile phone number. MSISDN is the primary identifier. |
MSISDN | string | required | Client's MSISDN (Mobile Subscriber Integrated Services Digital Number) in international format without '+' sign |
Email | string (email) | optional | Client's e-mail address |
BankCardCustomer | object & object | optional | Customer identification by bank card. Used for card payment scenarios. |
Email | string (email) | optional | Client's e-mail address |
Source | string | required | Source Name in Merchant's system (unique for Partner Service). Should be a unique identifier (e.g. resource/brand name) guaranteeing global uniqueness for parameters source+MerchantCustomerId in all systems. |
Country | string | required | Country code (ISO 3166-1 alpha-2, lowercase) |
MerchantCustomerId | string | required | Customer ID in Merchant's system (unique) |
UndefinedBankCardCustomer | object & object | optional | Bank card customer identification without full data set. Used for initial card payment when card details are not yet known. |
Source | string | optional | Source Name in Merchant's system (unique for Partner Service). Should guarantee global uniqueness for parameters source+MerchantCustomerId. |
Country | string | required | Country code (ISO 3166-1 alpha-2, lowercase) |
MerchantCustomerId | string | required | Customer ID in Merchant's system (unique) |
Email | string (email) | optional | Client's e-mail address |
UndefinedCustomer | object & object | optional | +2 |
Country | string | optional | |
Email | string | optional | |
AuthorizeInfo | object | required | Authorization data — PIN code entered by the subscriber to confirm the payment or contract. |
PinCode | string | required | PIN code entered by the subscriber to confirm the contract/invoice |
TestInfo | object | optional | Test information for authorization |
SuccessAuthorizationResult | boolean | required | |
Header | object | required | Request header with authentication. Included in every API request. |
Authentication | object | required | Request authentication data. All three fields are mandatory for every request. |
Login | string | required | Merchant Login assigned by the Platform |
NowUtc | string | required | Current UTC time in yyyyMMddHHmmss format. Must not differ from platform system time by more than 20 minutes. |
Signature | string | required | HMAC request signature. Calculated as: LOWERCASE(HMACSHA256(Password, Login + LOWERCASE(HMACSHA256(Password, NowUtc)))) |
RequestAttempt | integer (int32) | optional | Ordinal invoice request number (for idempotency). Starting from 0. |
Gateway | object | optional | +3 |
Signature | string | optional | |
ContractInfo | object | optional | +1 |
DesiredExpirationTimeUtc | string (date-time) | optional |
Parameters and headers
| Name | In | Required | Description |
|---|---|---|---|
projectId | path | yes | Project ID assigned by the platform during onboarding. |
contractId | path | yes | Contract UUID assigned by the platform. |
Responses
exampleFull error codes are in Error codes.