Merchants can void (cancel) transactions during the short time window between submitting the transaction request and the moment Nuvei transfers the request. For example, in the best-case scenario, voiding a transaction might only be possible within 24 hours after submitting the transaction request.
To void a previous transaction using Nuvei REST API 2.0, merchants can send a POST request to one of the following endpoints using the paymentId
for the original payment transaction:
- To void a payment or an authorization:
/payments/{payment-id}/voids
- To void a settlement:
/payments/{payment-id}/settles/{settle-id}/voids
- To void a refund:
/payments/{payment-id}/refunds/{refund-id}/voids
Include the mandatory parameters for the request.
voidId
appears in the response. If the merchant needs to cancel a void transaction, attach /{void-id}/voids
to the appropriate endpoint. For example, to cancel a void transaction for a payment, send a POST request to /payments/{payment-id}/voids/{void-id}/voids
with its mandatory parameters.
Example payments/{payment-id}/voids
Request
{ "processingEntityId": "<your processingEntityId>" }
Example payments/{payment-id}/voids
Response
{ "voidId": "025291bf-24cc-4062-b2ab-58601b6ac5df", "transactionId": "7110000000002982066", "result": { "status": "approved" }, "authCode": "111218" }