Cancel contract
JSON API v3
POST /api/v3/projects/{projectId}/contracts/{contractId}/cancel
Cancels an existing customer contract.
v4 signature payload: {contract_id}{merchant_contract_id}{client_ip}
Request parameters
| Field | Type | Required | Description |
|---|---|---|---|
projectId | integer (int32) | yes | |
contractId | string (uuid) | yes |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
client_ip | string | — |
Request example
{}Response example
{
"success": true,
"data": {
"contract_id": "0d0f3c58-9b1e-4a77-9a0c-000000000002",
"status": "cancelled"
}
}Response codes
| Code | Description |
|---|---|
200 | Contract cancelled |
400 | Validation or business request error |
401 | Authentication failed (missing/invalid signature or timestamp) |
403 | Project access denied or IP not whitelisted |
404 | Contract not found |
422 | Business validation error |
500 | Unexpected platform error |
503 | Service temporarily unavailable |
XML API v2.9
POST /API/XML/InvoiceManagementService.ashx
Cancels an active customer contract. XML request type: <CancelCustomerContractRequest>.
Cancellation of the contract between Merchant and Client.
HTTP Headers:
Callisto-Protocol-Version: 2SignatureVersion: 3
Request parameters
| Field | Type | Required | Description |
|---|---|---|---|
Callisto-Protocol-Version | 2 | yes | Protocol version |
SignatureVersion | integer (int32, default 1) | — | Signature version number |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
CancelCustomerContractRequest | object | yes | |
CancelCustomerContractRequest. | integer (int32) | yes | Project ID in the Platform system. Assigned during project setup. |
CancelCustomerContractRequest. | string | — | IP address from which the client makes the request. Mandatory by default (configurable in project settings). |
CancelCustomerContractRequest. | object | yes | Customer contract reference for authorize/cancel operations. |
CancelCustomerContractRequest. | string (uuid) | yes | Unique Contract ID to be authorized or cancelled |
CancelCustomerContractRequest. | string | — | The ID of the contract in the Merchant’s system |
CancelCustomerContractRequest. | object | — | Platform customer type. The sandbox does not support it — use MobilePhoneCustomer. |
CancelCustomerContractRequest. | integer (int32) | yes | |
CancelCustomerContractRequest. | string | — | |
CancelCustomerContractRequest. | object | — | Customer identification by mobile phone number. MSISDN is the primary identifier. |
CancelCustomerContractRequest. | string | yes | Client’s MSISDN (Mobile Subscriber Integrated Services Digital Number) in international format without ’+’ sign |
CancelCustomerContractRequest. | string (email) | — | Client’s e-mail address |
CancelCustomerContractRequest. | object | — | Customer identification by bank card. Used for card payment scenarios. |
CancelCustomerContractRequest. | string (email) | — | Client’s e-mail address |
CancelCustomerContractRequest. | string | yes | 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. |
CancelCustomerContractRequest. | string | yes | Country code (ISO 3166-1 alpha-2, lowercase) |
CancelCustomerContractRequest. | string | yes | Customer ID in Merchant’s system (unique) |
CancelCustomerContractRequest. | object | — | Bank card customer identification without full data set. Used for initial card payment when card details are not yet known. |
CancelCustomerContractRequest. | string | — | Source Name in Merchant’s system (unique for Partner Service). Should guarantee global uniqueness for parameters source+MerchantCustomerId. |
CancelCustomerContractRequest. | string | yes | Country code (ISO 3166-1 alpha-2, lowercase) |
CancelCustomerContractRequest. | string | yes | Customer ID in Merchant’s system (unique) |
CancelCustomerContractRequest. | string (email) | — | Client’s e-mail address |
CancelCustomerContractRequest. | object | — | Platform customer type. The sandbox does not support it — use MobilePhoneCustomer, BankCardCustomer or UndefinedBankCardCustomer. |
CancelCustomerContractRequest. | string | — | |
CancelCustomerContractRequest. | string | — | |
Header | object | yes | Request header with authentication. Included in every API request. |
Header. | object | yes | Request authentication data. All three fields are mandatory for every request. |
Header. | string | yes | Merchant Login assigned by the Platform |
Header. | string | yes | Current UTC time in yyyyMMddHHmmss format. Must not differ from platform system time by more than 20 minutes. |
Header. | string | yes | HMAC request signature. Calculated as: LOWERCASE(HMACSHA256(Password, Login + LOWERCASE(HMACSHA256(Password, NowUtc)))) |
Header. | integer (int32) | — | Ordinal invoice request number (for idempotency). Starting from 0. |
Header. | object | — | Platform service block in the request header. The sandbox does not read it: the block is ignored and affects neither the signature nor processing. |
Header. | string | — | |
Header. | object | — | |
Header. | string (date-time) | — |
Request example
<?xml version="1.0" encoding="utf-8"?>
<Request>
<Header>
<Authentication>
<Login>demo_login</Login>
<NowUtc>20260921120000</NowUtc>
<Signature>0000000000000000000000000000000000000000000000000000000000000000</Signature>
<SignatureVersion>3</SignatureVersion>
</Authentication>
</Header>
<CancelCustomerContractRequest>
<ProjectID>1001</ProjectID>
<ClientIP>127.0.0.1</ClientIP>
<CustomerContractInfo>
<ContractID>0d0f3c58-9b1e-4a77-9a0c-000000000002</ContractID>
</CustomerContractInfo>
</CancelCustomerContractRequest>
</Request>Response example
<?xml version="1.0" encoding="utf-8"?>
<Response>
<CancelCustomerContractResponse />
<ResultCode>0</ResultCode>
<ResultDescription>OK</ResultDescription>
</Response>