API · Bindings (contracts)

Authorize binding

Protocol: JSON v3 · XML 2.9POST/api/v3/projects/YOUR_PROJECT_ID/contracts/{contractId}/authorize
← All operations

Description

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: 2
  • SignatureVersion: 3

Request and response

Examples come from OpenAPI and are read-only here. Run requests in the Sandbox section.

POST/api/v3/projects/YOUR_PROJECT_ID/contracts/{contractId}/authorizePRODUCTION
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"  }}

JSON v3 request fields

Contracts_Authorize
Request fieldsTypeReq.Description
client_ipstringoptional
pin_codestringoptional

XML 2.9 request fields

authorizeCustomerContract
Request fieldsTypeReq.Description
AuthorizeCustomerContractRequestobject & objectrequired
ProjectIDinteger (int32)required

Project ID in the Platform system. Assigned during project setup.

ClientIPstringoptional

IP address from which the client makes the request. Mandatory by default (configurable in project settings).

CustomerContractInfoobjectrequired

Customer contract reference for authorize/cancel operations.

+21
AuthorizeInfoobjectrequired

Authorization data — PIN code entered by the subscriber to confirm the payment or contract.

+1
TestInfoobjectoptional

Test information for authorization

+1
Headerobjectrequired

Request header with authentication. Included in every API request.

Authenticationobjectrequired

Request authentication data. All three fields are mandatory for every request.

+3
RequestAttemptinteger (int32)optional

Ordinal invoice request number (for idempotency). Starting from 0.

Gatewayobjectoptional+3

Parameters and headers

NameInRequiredDescription
projectIdpathyesProject ID assigned by the platform during onboarding.
contractIdpathyesContract UUID assigned by the platform.

Responses

200
Contract authorizedexample
400
401
403
500
503

Full error codes are in Error codes.