Skip to content

Void

The request lets you void a transaction that has been previously authorized and is still pending settlement. Voiding a transaction cancels the authorization process and prevents the transaction from being submitted to the processor for settlement.


Request

To initiate a void transaction, send a POST request to https://gateway.unonapay.com/transactions/voids with the following parameters:

Parameter Type Description
parent_uid * required
string A UID of the authorization transaction.
amount * required
bigInteger A transaction amount to capture in minimal currency units, for example 1000 for $10.00.
duplicate_check boolean The parameter controls whether the payment gateway will do a duplicate check of the received requests to void a previously authorized amount. By default, it is true and a duplicate request with the same parent_uid and amount sent within 30 seconds after the original request will be rejected.
Example of the request
{
    "request":{
    "parent_uid":"1-310b0da80b",
    "amount":50
   }
}
Response
Parameter Type Description
transaction object
uid * required
string A UID of the processed transaction.
status * required
string A status of the processed transaction.
message * required
string A processing result message.
type * required
string A transaction type.
receipt_url * required
string A transaction receipt URL.
Example of the response
{
  "transaction": {
    "uid": "22e47158-6b75-4098-9fc1-6a2e60521002",
    "status": "successful",
    "amount": 460,
    "currency": "EUR",
    "type": "void",
    "message": "Successfully processed",
    "test": true,
    "created_at": "2024-04-02T12:38:02.775Z",
    "updated_at": "2024-04-02T12:38:10.892Z",
    "paid_at": "2024-04-02T12:38:10.698Z",
    "manually_corrected_at": null,
    "parent_uid": "295b9b6d-444d-4636-b31c-a7e8b374805c",
    "receipt_url": "https://online.unonapay.com/customer/transactions/22e47158-6b75-4098-9fc1-6a2e60521002/a203afa8029b646de18985b933b5dce75178c77b8d09a7e975ade07d5cab9e16?language=en",
    "status_code": null,
    "mute_notifications": null,
    "id": "22e47158-6b75-4098-9fc1-6a2e60521002",
    "smart_routing_verification": {
      "status": "successful"
    },
    "void": {
      "message": "Void was approved",
      "ref_id": "8889913",
      "rrn": null,
      "auth_code": null,
      "bank_code": null,
      "gateway_id": 3208,
      "status": "successful"
    }
  }
}