Cancel a payment

Release reserved money you won't capture, in full or in parts.

🚧

Early release

Online payments is in early development (MVP). This section may change.

Cancel (void) a payment that is authorised but not fully captured, so the reserved money is released to the shopper.

You can cancel payments for methods that authorise first, such as cards and some alternative payment methods. What works depends on your acquirer and and the payment methods you support.

When to cancel

  • The payment is authorised.
  • The money is reserved on the shopper's account.
  • You won't capture it, or not all of it.

If the payment is already fully captured, you can't cancel it. Refund it instead.

Cancel the full amount

Send the request without a body. Aera cancels the full remaining authorised amount.

POST /v1/{pspReference}/cancel

Cancel part of the amount

Send amountDetails with the amount to cancel, for example when an item is out of stock.

Example partial cancel request
{
  "amountDetails": { "amount": 3000, "currency": "NOK" },
  "reference": "Customer removed item from order"
}
FieldDescription
amountDetailsThe amount to cancel, in minor units. Leave out to cancel the full remaining amount.
referenceYour own text for this cancellation. Optional.
merchantReferenceThe merchantReference you sent when you created the payment. Optional.

You can cancel several parts, until the cancelled total equals the remaining authorised amount. After the last one, the payment is cancelled, and you can't capture the cancelled part. Whether partial and multiple partial cancels work depends on your acquirer and payment method.

Cancel with your own reference (fallback)

Normally you cancel with the pspReference. That is the most reliable way.

If you never got the pspReference, for example because of a timeout or network error, you can cancel with your own merchantReference instead. This works only for payments from the last 48 hours. Use it only for recovery.

POST /v1/cancel
Example cancel request with merchantReference
{
  "merchantReference": "order-1234",
  "reference": "No response from create session"
}

Good to know

  • You can cancel only while the payment is authorised.
  • Some payment methods don't support partial cancels.
  • Every cancel needs a new idempotency-key.
  • If the authorisation has expired, the cancel may fail.
  • If you never received a pspReference, cancel with merchantReference instead.

Did this page help you?