Refund

Last changes: 04-12-2023

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 {baseURL}/payment/BNkk4BRkQEufPSvgf9lDwA/refund

Header:

Content-Type: application/json
Accept-Language: en-US
X-Auth-Token: eyJhbGciOiJSUzI1NiI{abbreviated}RW5kVG9rZW4=

{
   "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.",

    "additionalInformation": {
        "requestId": "aff2728481a181dc36daedc14055b516"
    }
}

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 {baseURL}/payment/BNkk4BRkQEufPSvgf9lDwA/refund

Header:

Content-Type: application/json
Accept-Language: en-US
X-Auth-Token: eyJhbGciOiJSUzI1NiI{abbreviated}RW5kVG9rZW4=

{
   "partnerReference": "DEV-SVR001-DE_CUSTID-KD97TH2FP6_CARTID-PYQRTGMCMQ_PMGT97KL3N",
   "refundAmount": 1.25,
   "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.",

    "additionalInformation": {
        "requestId": "aff2728481a181dc36daedc14055b516"
    }
}

Additional Information

In case of using a Payment Option via PaymentsOS - 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": "RefundFeedback",
    "processingStatus": "Status of transaction processing: 'Success' or 'Failed'",
    "processingReason": "Description of the transaction processing status",
    "transactionStatus": "CAPTURED",
    "uniqueReference": "Unique reference of the transaction",
    "paymentProviderRefundId": "Refund Identifier Value",
    "refundedTransactionReference": "Unique reference of the refunded transaction",
    "relatedTransactionReferences": [{
        Array of transaction references of dependent transactions which are updated,
        if available. Otherwise, the array is empty.
    }]
}