Refund

Last changes: 07-02-2020

Full Amount

In the example below, the full amount charged to the payment option is refunded, using the "uniqueReference" persisted from a previously captured payment.

Refund request

Path:

POST {Base URL}/payment/BNkk4BRkQEufPSvgf9lDwA/refund

Header:

Content-Type: application/json
Accept-Language: en-US
X-Auth-Token: H4sIAAAAAAA{partial omission for brevity}EAN2bJ/6l2XX+A5kJqdP+MwAA

{
   "partnerReference": "DEV-SVR001-DE_CUSTID-KD97TH2FP6_CARTID-PYQRTGMCMQ_PMGT97KL3N",

   "refundUsage": "Product not as described.",

   "localDate": "2018-10-15",
   "localTime": "165107"
}

Refund response

Status Code:

200 (OK)

Header:

Content-Type: application/json
Accept-Language: en-US

{
   "partnerReference": "DEV-SVR001-DE_CUSTID-KD97TH2FP6_CARTID-PYQRTGMCMQ_PMGT97KL3N",

   "initiatorAccno": "98765432",
   "accno": [ "12345678" ],

   "uniqueReference": "BNkk4BRkQEufPSvgf9lDwA", 
   "refundAmount": 3.99,
   "refundCurrCode": "EUR",
   "processedAmount": 3.99,
   "processedCurrCode": "EUR",

   "statusCode": "CAPTURED",
   "statusReason": "",

   "localDate": "2018-10-15",
   "localTime": "165107",
   "sysDate": "2018-10-15",
   "sysTime": "155107",

   "responseCode": "0000",
   "responseDescription": "Successful execution."
}

Partial Amount

In the example below, only part of the full amount charged to the payment option is refunded, using the "uniqueReference" persisted from a previously captured payment.

An example for creating a Partial Refund is when only some of the purchased items are returned.

Refund request

Path:

POST {Base URL}/payment/BNkk4BRkQEufPSvgf9lDwA/refund

Header:

Content-Type: application/json
Accept-Language: en-US
X-Auth-Token: H4sIAAAAAAA{partial omission for brevity}EAN2bJ/6l2XX+A5kJqdP+MwAA

{
   "partnerReference": "DEV-SVR001-DE_CUSTID-KD97TH2FP6_CARTID-PYQRTGMCMQ_PMGT97KL3N",

   "refundAmount": 1.25,
   "refundCurrCode": "EUR",

   "refundUsage": "Partial Refund of Purchase.",

   "localDate": "2018-10-15",
   "localTime": "165107"
}

Refund response

Status Code:

200 (OK)

Header:

Content-Type: application/json
Accept-Language: en-US

{
   "partnerReference": "DEV-SVR001-DE_CUSTID-KD97TH2FP6_CARTID-PYQRTGMCMQ_PMGT97KL3N",

   "initiatorAccno": "98765432",
   "accno": [ "12345678" ],

   "uniqueReference": "BNkk4BRkQEufPSvgf9lDwA", 
   "refundAmount": 1.25,
   "refundCurrCode": "EUR",
   "processedAmount": 1.25,
   "processedCurrCode": "EUR",

   "statusCode": "CAPTURED",
   "statusReason": "",

   "localDate": "2018-10-15",
   "localTime": "165107",
   "sysDate": "2018-10-15",
   "sysTime": "155107",

   "responseCode": "0000",
   "responseDescription": "Successful execution."
}

Additional Information

In case of using the "PayU" Payment Option - If the 1.75 Refund response returns responseCode = 0006 and additionalInformation.processingStatus = Pending you can proceed to call 1.41 Get Payment Status or wait for a callback if configured.

The Callback will return the following JSON structure to the integrating party:

Callback Response

{
    "notificationType": "CaptureFeedback",
    "processingStatus": "Status of transaction processing: 'Success' or 'Failed'",
    "processingReason": "Description of the transaction processing status",
    "transactionStatus": "AUTHORIZED or CAPTURED",
    "uniqueReference": "Unique reference of the transaction",
    "relatedTransactionReferences": [{
        Array of transaction references of dependent transactions which are updated,
        if available.Otherwise, the array is empty.
    }]
}