Void
Cancel an authorisation if it is not needed anymore
A void is used to cancel a successful authorisation to reverse its effects. The most common use cases for a void is when a cardholder changes their mind about a purchase shortly after a successful authorisation but before the transaction is captured by the merchant and the other case is a void initiated directly by the merchant if it notices the order cannot be fulfilled due to a reason, such as the underlying system returning an error during the order creation. The void removes the hold on the cardholder's balance and any transaction record the cardholder might see in their records is also dropped.
Initiating a Void
Void is initiated by just calling the void endpoint with the identifier of the transaction you are trying to void and a new unique identifier for the void operation. There are no additional properties to set for this operation since Cards Connect voids all of the remaining, uncaptured authorisation amount.
A void can be used as long as there's an unused authorisation amount on the transaction. So, you may use this operation to fully void a successful authorisation before capturing it or void the unused portion of the authorisation after a partial capture. On the other hand, if you want to return the funds back to a customer for the captured portion, you need to use the Refund operation.
Void Response
Void is handled in a way that is similar to a capture. Your void request is first validated to see if it complies with the API specifications as well as the business rules, then if these are passed Cards Connect returns a response with the "Accepted" as the outcome. You may treat this "Accepted" as a success for void and report it back to the merchant or the cardholder as such. Eventually this "Accepted" outcome gets updated with the value returned by the issuer. If your request fails to pass the respective Cards Connect validations, you receive an error message with the relevant information. You may check Error Codes to see what kind of errors you may receive.
Retrieving the Details of a Void
Cards Connect allows you to fetch the void details by providing the transactionId
as well as the voidId
. Depending on the internal state of the void operation in Cards Connect, you may receive "Accepted" as the outcome while the response code and description fields are null or you may receive the actual outcome provided by the issuer such as "Succeeded", with the corresponding response code and description. A sample response to retrieve the details of a void is illustrated below.
GET /transactions/b72805e2-9dcd-4962-a32f-25099e012e78/voids/10546f46-54c7-4cf4-bdbf-72a8c736b719
{
"transactionId": "b72805e2-9dcd-4962-a32f-25099e012e78",
"reconciliationId": "e8dd3707-0d8f-4dde-8691-dec639ba6f5e",
"void": {
"id": "10546f46-54c7-4cf4-bdbf-72a8c736b719",
"amount": 500,
"outcome": "Succeeded",
"responseCode": "00",
"responseDescription": "Approved or completed successfully",
"createdAt": "2024-06-18T03:09:16.1488927Z"
}
}
Updated 3 months ago