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.bepaid.by/transactions/voids with the following parameters:

object
parent_uid
required
string
A UID of the authorization transaction.
amount
required
bigInteger
A transaction amount to void in minimal currency units, for example 1000 for $10.00.
tracking_id
string (255)
The ID of your transaction or order. Please, use unique values in order to get the correct transaction information by query request. Otherwise, you will get an array of up to 10 recent transactions with the matching tracking_id. Can be multiple values separated with semicolons. For example, "cbe59142-90af-4aea-b5a5-5bf3f66cf3da;f7883cb9-0e26-43a7-beb7-4027cb55d1a6;4a6a89d5-6950-400f". If multiple values are sent in the request, the transaction search in the back office system can be performed by any of them. If tracking_id is not provided, the response returns the tracking_id of the corresponding authorization transaction, provided that it was included in the authorization request.
object
A section with additional transaction data.
referer
string
URL of the resource from which the transaction request is made. Contact the Tech Support Team to check if this parameter is required by your acquirer.
Example of the request
{
  "request": {
    "parent_uid": "1-310b0da80b",
    "amount": 50,
    "tracking_id": "tracking_id_1",
    "additional_data": {
      "referer": "https://example.com/server/cs_post/post.php?order_id=5304380&security=949247&currency=USD"
    }
  }
}
Response
object
uid
required
string
A UID of the processed transaction.
tracking_id
required
string
The tracking_id parameter value sent in the transaction request. If tracking_id was not provided in the void request but was provided in the corresponding authorization request, the response returns the tracking_id of the corresponding authorization transaction.
status
required
string
A status of the processed transaction.
code
required
string
Transaction processing code .
message
required
string
A processing result message corresponding to the processing code (code).
type
required
string
A transaction type.
object
A section of parameters of Smart Routing verification results.
status
string
Smart Routing check status for the transaction.
receipt_url
required
string
A transaction receipt URL.
object
message
string
A processing result message provided by the acquirer.
ref_id
string
A transaction reference ID provided by the acquirer.
rrn
string
A retrieval reference number. A transaction ID issued by the card processing service.
auth_code
string
An authorization code provided by the acquirer.
gateway_id
string
Gateway ID in the bePaid system.
status
string
A status of the processed transaction in the acquiring bank.
object
A section of detailed information about the transaction.
referer
string
URL of the resource from which the transaction request is made.
Example of the response
{
  "transaction": {
    "uid": "22e47158-6b75-4098-9fc1-6a2e60521002",
    "code": "S.0000",
    "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://merchant.bepaid.by/customer/transactions/22e47158-6b75-4098-9fc1-6a2e60521002/a203afa8029b646de18985b933b5dce75178c77b8d09a7e975ade07d5cab9e16?language=en",
    "status_code": null,
    "mute_notifications": null,
    "tracking_id": "tracking_id_1",
    "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"
    },
     "additional_data": {
          "referer": "https://example.com/server/cs_post/post.php?order_id=5304380&security=949247&currency=USD"
    }
  }
}