Skip to main content

Cancel

POST /cancel

This endpoint allows merchants to cancel an existing authorization. Cancelling an authorization releases the hold on the funds in the cardholder’s account, making it available for other purchases. This is particularly useful when the merchant no longer intends to capture the authorized amount, such as when an order is modified, canceled, or otherwise does not require payment.

info

If you’re unsure whether an authorization has been captured (i.e., the funds have already been taken from the cardholder), and you want to return the funds to the customer, consider using the Reverse action instead, which initiates a refund for the full amount.

Test URL​

The cancel request will be made to the following URL:

https://checkout-api.staging.straumur.is/api/v1/modification/cancel

This call will create an cancellation request for the intended authorization.

Live environment

On live, use the same path on https://greidslugatt.straumur.is. Headers, request and response are identical. See Live environment.

Request Example​

{
"reference": "9990QQAZ1221",
"payfacReference": "5215125152151259990QQAZ1"
}

Request Body Fields​

FieldTypeRequiredDescriptionExampleMin LengthMax Length
referenceStringRequiredMerchant reference to uniquely identify a payment.9990QQAZ1221-200
payfacReferenceStringRequiredStraumur reference to uniquely identify a payment.5215125152151259990QQAZ1-100

Example - Received Response​

info

Status "Received" means that the system has received your request and will process it.

After completion, you will receive a final response through a webhook.

The payfacReference in this response identifies the cancellation itself, not the original authorization. The outcome arrives as a Refund event — there is no separate event type for a cancel, carrying the same value as payfacReference and the authorization's reference as originalPayfacReference. See Reference fields.

{
"status": "Received",
"payfacReference": "ASDAKOS125152",
"responseDateTime": "2024-09-04T09:50:14.343503Z",
"responseIdentifier": "e3605f81-6b09-4ce1-83ad-5a8d49f3cd44"
}

Error Response​

Our error responses are standardised. Please see Errors.

You can also find a detailed overview of our HTTP Status Codes.