Cancel authorize

Cancel an authorization or charge.

Release the reserved money for the customer’s payment method. It is also possible to perform multiple cancellations for an authorization with partial amounts.

Total amount
If you cancel an authorization, the total amount of the payment is reduced by the amount reversed.
POST https://api.unzer.com/v1/payments/s-pay-1/authorize/cancels
{
  "amount" : "10.00"
}
curl https://api.unzer.com/v1/payments/s-pay-1/authorize/s-aut-1/cancels -X POST \
  -u s-priv-2a102ZMq3gV4I3zJ888J7RR6u75oqK3n: \
  -d amount=1.00
Cancel authorization supporting payment methods
Not every payment type supports cancel authorization. Check the following table to see which payment type does support cancel authorization:

Payment types supporting cancel authorize

Payment type Support authorize cancel
/types/card yes
(After authorization)
/types/invoice yes
(After authorization)
/types/invoice-secured yes
(After authorization)
/types/paypal yes
(After authorization)
/types/prepayment yes
(After authorization)

Request / Response

Cancel authorization calls are described in the API reference documentation.

{
    "id": "s-cnl-1",
    "isSuccess": true,
    "isPending": false,
    "isError": false,
    "message": {
        "code": "COR.000.100.112",
        "customer": "Request successfully processed in 'Merchant in Connector Test Mode'"
    },
    "amount": "50.0000",
    "currency": "EUR",
    "date": "2018-09-24 22:06:41",
    "resources": {
        "customerId": "s-cst-e769ddae5686",
        "paymentId": "s-pay-6986",
        "basketId": "",
        "metadataId": "",
        "typeId": "s-crd-qfisvuhm3jog"
    },
    "processing": {
        "uniqueId": "31HA07BC81AB33BC5F44A2659D5E80FC",
        "shortId": "4017.5320.1722"
    }
}

The parameters isSuccess, isPending, isError indicate the result of the payment. Only one of these three can be true.

Status parameter Description
isSuccess The cancellation call was executed successfully.
isPending Never happens.
isError Something went wrong. You’ll also find a news section that describes in more detail what the trouble was.
Name Format Description
id string ID of this cancellation transaction
isSuccess string If the transaction was successful the value is set to true.
isPending string If the transaction is pending, the value is set to true, for instance, if a redirect to an external system is required.
isError string If an error occurs, this value is set to true.
message object
message.code string Every error returns a unique id.
message.customer string Error message for the customer. Translated into the language specified in the Accept language header.
message.merchant string Error message for the merchant. This message always appears in English.
amount string The amount to be cancelled on the specified account. The amount is in decimal form, e.g. EUR 1.22.
currency string(3) ISO currency code: For a list of possible codes, see: Amounts and Currencies
returnUrl string Always empty, due to cancellation is not required to be redirected or confirmed payment.
date date Timestamp of this transaction.
resources object
resources.customerId string Customer ID used for this transaction.
resource.basketId string Basket ID used for this transaction.
resource.metadataId string Meta data ID used for this transaction.
resources.paymentId string ID of the payment object.
resources.typeId string ID of the types resource which was used for this transaction.
processing object
processing.uniqueId string Reference id of the cancellation transaction.
processing.shortId string User-friendly reference ID of the cancellation transaction.
processing.iban string Iban of the merchant in case of prepayment or invoice. In case of direct debit this value contains the customer IBAN.
processing.bic string Bic of the merchant for prepayment or invoice. In the case of a direct debit, this value contains the customer BIC.
processing.identification string This value returns the descriptor for invoice and prepayment.
processing.creatorId string This value returns your creditor id.