Cancel payment
The Cancel
request allows you to cancel a reserved or initiated transaction.
A payment should be handled within the payment time limits.
Attempting to cancel an older payment will result in a HTTP 400 Bad Request
.
The payment flow can be aborted under certain circumstances:
- When the user cancels (rejects) the initiated payment in Vipps MobilePay.
- When the merchant cancels.
- Timeouts: If the user does not confirm.
- If the maximum amount of time for capturing the payment has passed.
After cancellation, the order gets a new status.
Cancel a pending order
To cancel a transaction before the customer confirms the payment,
you can send a cancel request while the transaction is in the INITIATE
stage.
This may be useful in face-to-face situations where a customer's phone runs out
of battery, or if the customer suddenly changes their mind and wants to buy
more and the amount for the payment increases.
This should not be considered a consistent or guaranteed operation,
as the cancel
request depends on actions taken by the user in the app.
If the cancel
request is successful, the payment state in the response will be: CANCELLED
.
If the user is already in a 3-D Secure session, the payment cannot be cancelled as described above.
Cancel a partially captured order
To cancel an order that you have partially captured, send a
cancel
request.
It usually takes 2-3 bank days until the money is in the customer's account, depending on the bank(s). It can take much longer, up to 10 days, and depends on the bank(s).
Partial capture has limited availability for MobilePay. You must inquire during onboarding or contact customer service.
Further reading
The following APIs have methods for cancelling a payment:
- ePayment API: Cancel a payment
- Recurring API: Cancel a charge
- eCom API (Vipps only and deprecated): Cancel a payment
If you have used Checkout API to create the payment, use either the ePayment or Recurring API to cancel payments.