Cancel invoice
/api/v3/projects/YOUR_PROJECT_ID/invoices/{invoiceId}/cancelDescription
Cancels an active invoice.
v4 signature payload: {invoice_id}{client_ip}
XML 2.9 description
Cancels an active invoice. XML request type: <CancelInvoiceRequest>.
Cancellation of the invoice issued by the merchant.
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/invoices/{invoiceId}/cancelPRODUCTIONcurl -X POST "https://pay-api.digitalspb.com/api/v3/projects/YOUR_PROJECT_ID/invoices/{invoiceId}/cancel" \ -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"}'{ "success": true, "data": { "invoice_id": "1624505c-0031-00cf-7d54-4cf1ce08cb30", "status": "cancelled" }}JSON v3 request fields
Invoices_Cancel| Request fields | Type | Req. | Description |
|---|---|---|---|
client_ip | string | optional | |
additional_parameters | object | optional | Arbitrary invoice parameters stored with the invoice, the JSON counterpart of the XML |
XML 2.9 request fields
cancelInvoice| Request fields | Type | Req. | Description |
|---|---|---|---|
CancelInvoiceRequest | 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). |
InvoiceInfo | object | required | +6 |
AdditionalParameters | object | optional | +3 |
Parameter | array<object> | optional | +2 |
name | string | required | |
value | string | required | |
InvoiceID | string | optional | |
MerchantOrderID | string | optional | Order ID in Merchant's system |
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. |
invoiceId | path | yes | Invoice UUID assigned by the platform. |
Responses
exampleFull error codes are in Error codes.