Refund
The refund allows you to credit the customer, for example in case of returned goods or cancellation. To post a refund request, a valid transaction UID from a former Capture or Payment transaction is required. It is only possible to credit an amount less than or equal to the initial transaction using the same currency as with the original transaction. This feature also allows you to issue multiple partial refunds against an original transaction.
Request
To make a refund transaction, send a POST
to https://gateway.pay-cross.com/transactions/refunds
with the following parameters:
Parameter | Type | Description |
---|---|---|
parent_uid * required |
string | A UID of the payment or capture transaction. |
amount * required |
integer | An amount to refund in minimal currency units, for example 1000 for $10.00. |
reason * required |
string (255) | A note why a refund was made. |
duplicate_check | boolean | The boolean parameter controls whether the payment gateway will do duplicate check of received requests to refund the amount to a card. 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,
"reason":"Client request"
}
}
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":{
"refund":{
"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://admin.pay-cross.com/customer/transactions/2-310b0da80b/11443f39ae75aa1f955a9c9283cd5045bfb0413b65d666f834a9da4e7d3926b5",
"currency":"USD",
"reason":"Client request",
"type":"refund"
}
}