Void
The request allows you to 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://processing.ecomcharge.com/transactions/voids
with the following parameters:
Parameter | Type | Description |
---|---|---|
parent_uid * required |
string | A UID of the authorization transaction. |
amount * required |
integer | 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 duplicate check of received requests to void a previously authorized amount. By default, it is true and requests with the same parent_uid and amount within 30 seconds 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. |
be_protected_verification | object | A section of parameters of the beProtected verification service. |
Example of the response
{
"transaction":{
"void":{
"message":"The operation was successfully processed.",
"ref_id":"8889999",
"gateway_id":152,
"status":"successful"
},
"uid":"2-310b0da80b",
"status":"successful",
"message":"Successfully processed",
"amount":50,
"parent_uid":"1-310b0da80b",
"receipt_url": "https://gateway.ecomcharge.com/customer/transactions/2-310b0da80b/11443f39ae75aa1f955a9c9283cd5045bfb0413b65d666f834a9da4e7d3926b5",
"currency":"USD",
"type":"void",
"test":false
}
}