Skip to content

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.unonapay.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.
code * required
string Transaction processing code .
friendly_message * required
string code description for the customer.
Example of the response
{
  "transaction": {
    "uid": "1cbf77cb-ed58-40f2-8bb4-0be10f12fda8",
    "status": "successful",
    "amount": 492,
    "currency": "EUR",
    "reason": "Client request",
    "type": "refund",
    "message": "Successfully processed",
    "test": true,
    "created_at": "2024-04-02T14:01:09.302Z",
    "updated_at": "2024-04-02T14:01:12.460Z",
    "paid_at": "2024-04-02T14:01:12.397Z",
    "closed_at": null,
    "settled_at": null,
    "manually_corrected_at": null,
    "parent_uid": "5e14b86f-1bb9-40ad-b42a-b925176aec63",
    "receipt_url": "https://online.unonapay.com/customer/transactions/1cbf77cb-ed58-40f2-8bb4-0be10f12fda8/30c0d33fdd4ad02356c73067aedcaddc228bcaca8be500ecf84edbd44ffb6b39?language=en",
    "status_code": null,
    "mute_notifications": null,
    "id": "1cbf77cb-ed58-40f2-8bb4-0be10f12fda8",
    "code": "S.0000",
    "friendly_message": "The operation is successful.",
    "smart_routing_verification": {
      "status": "successful"
    },
    "refund": {
      "message": "Refund was approved",
      "ref_id": "8889999",
      "rrn": null,
      "auth_code": null,
      "bank_code": "05",
      "gateway_id": 3483,
      "status": "successful"
    }
  }
}