Skip to content

Refunds


Use Refunds to refund a payment that has been authorized, fulfilled and captured. The default refund amount and card number is the same as the captured amount and captured card number. To refund any amount up to the captured amount to a different card number, you must define the refund amount and card number in the request body.

Endpoints

POST /api/v2/merchants/{mid}/orders/{orderId}/refunds

Refunds an existing payment order.

Request parameters

Path parameter Requirement Description Type
mid Required The merchant account reference number. Number
orderId Required The reference to uniquely identify a payment. String
Body parameter Requirement Description Type
amount Optional The transaction amount. Number
currency Optional The ISO 4217 currency code. String
cardNumber Optional The shopper’s card account number. String
cardExpiryDate Optional The shopper’s card expiry month and year in the format MM/YY. String
iban Optional The International Bank Account Number. String
swiftBIC Optional The bank identifier code. String
token Optional The token value or name. String

Sample request

CURL
curl -X POST \
    -H 'Accept: application/json' \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer 573cec25a87526dcceacad786bbbba83b1a5172' \
    https://   /api/v2/merchants/1570616552/orders/order_example_1/refunds

Request body example

REST API
{
   "amount": {
      "amount": 10.50,
      "currency": "EUR"
   },
   "cardInfo": {
      "cardNumber": "5555555555554444",
      "cardExpiryDate": "06-2026"
   }
}
REST API
{
   "amount": {
      "amount": 10.50,
      "currency": "EUR"
   },
   "bankBillingInfo": {
      "iban": "SE123456",
      "swiftBIC": "ESSESESS"
   }
}
REST API
{
   "amount": {
      "amount": 10.50,
      "currency": "EUR"
   },
   "token": "9000037590314444"
}

Sample response

REST API
{
    "mid": 1570616552,
    "orderId": "order_example_1",
    "orderDetailDescription": "detailed desc",
    "orderDescription": "description",
    "orderAmount": 10.50,
    "fulfilmentAmount": 10.50,
    "capturedAmount": 10.50,
    "refundedAmount": 10.50,
    "currency": "EUR",
    "baseCurrency": "EUR",
    "baseOrderAmount": 10.50,
    "baseFulfilmentAmount": 10.50,
    "baseCapturedAmount": 10.50,
    "baseRefundedAmount": 10.50,
    "capturable": false,
    "cancelable": false,
    "refundable": false,
    "completable": false,
    "dccIndicator": false,
    "transactionReferences": [
        {
            "transactionId": 5986909909,
            "transactionTypeId": 5,
            "mid": 1570616552,
            "orderId": "order_example_1",
            "transactionType": "Credit",
            "transactionDate": "2019-10-04T14:41:38.157Z",
            "refTransactionId": 5986909904,
            "transactionDesc": "Transaction Accepted",
            "statusCode": 0,
            "status": "Processed",
            "amount": 10.50,
            "currency": "EUR",
            "baseAmount": 10.50,
            "baseCurrency": "EUR",
            "paymentMethod": "Visa",
            "paymentMethodId": 1001,
            "token":"9000037590314444",
            "maskedAccountNumber": "411111xxxxxx1111",
            "cardExpiryDate": "12-2024",
            "cvResponse": "",
            "cvAnswerCode": 4,
            "avsResponse": "",
            "avsAnswerCode": 4
        }
    ]
}
Back to top