Skip to content

Cancel the purchase

Available for: Cards, Blik and PayByLink

A cancellation is performed against a previous payment authorisation (AUTH), by referencing its transactionID and sending a POST request over HTTPS to the /payments/{transactionID}/cancellation endpoint.

When canceling a payment and if sent within the time-frame the authorisation is not captured yet, the cancellation causes an authorisation reversal request to be sent to the card issuer to clear the funds held against the authorisation.

It can be a full cancellation when the total amount of the authorisation is cancelled by the merchant , or a partial, when a subtotal of the total authorisation is cancelled by the merchant.

Generate the transaction:

POST https://stargate-cer.qly.site1.sibs.pt/api/v1/payments/{transactionID}/cancellation  

Here’s an example of a cancellation message:

Request Headers:
Autorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6I (...)
X-IBM-Client-Id: b4480347-9fc8-4790-b359-100a99c60ea3
Content-Type: application/json
  
 {
 "merchant": {
 "terminalId": 24,
 "channel": "web",
 "merchantTransactionId": "BO_Order Id: c9876bcasd"
 },
 "transaction": {
 "transactionTimestamp": "2022-05-29T18:23:41.367Z",
 "description": "This is a cancellation request",
 "amount": {
 "value": 5,
 "currency": "PLN"
 },
 "originalTransaction": {
 "id": "1ach2CGpZ2BAKUfqJ9Rp",
 "datetime": "2022-05-29T17:23:36.105Z"
 }
 }
 } }
}