How to cancel a payment
General information
Payment cancellation can be done through the endpoint /v1/{payment-service}/{payment-product}/{paymentId}
using the HTTP method DELETE
.
See XS2A OpenAPI Reference for detailed information.
Rules
Payment cancellation in XS2A is done without SCA.
Payment cancellation is only possible if payment authorisation is not completed: payment status <>
ACTC
.
Please also take a look at the Bank's documentation to see if there are any additional rules or if the Bank generally supports cancellation.
Important Response Codes
This section shows the most important responses and their meaning.
Positive Response HTTP Status | Description |
---|---|
| If no content was returned, the cancelation was successful. |
| Negative answer that the cancellation was prohibited. A bank can return additional information of the cause, but does not have to. |
| Negative answer that the cancellation was prohibited, because of the state of the payment. A bank can return additional information of the cause, but does not have to. |