Skip to content

Create Refund

Function Description

  • Initiate order refund

Flow Description

img

Create Refund API

Request URL

  • /orders/{ORDER_ID}/refunds
    • {ORDER_ID}:Your payment ID

Request Method

  • order.refund

HTTP Verb

  • POST

Request Parameters

The request parameters are as follows:

ParameterTypeRequiredDescriptionExample
amountstringYesOrder amount, floating point string, up to two decimal places"1.35", "99.10", "127"
reasonstringYesReason for refundReturn shipping fee
merchantRefundIdstringNoMerchant refund order ID"TEST934759263495634"

Response Parameters

The response parameters are as follows:

  • Response Body
ParameterTypeDescriptionExample
amountnumberOrder amount, note that this is a numeric type, floating point number, up to two decimal places3.23
statusstringRefund status:
pending: Refund in progress
success: Refund completed
fail: Refund failed
"pending"
idstringChargeback ID, globally unique"M948164T2023072607034709567189_R1"
orderIdstringThe order ID"M948164T2023072607034709567189"
paymentMethodstringPayment method:
stcpay
mastercard
applePay
tap
"mastercard"
merchantRefundIdstringMerchant refund order ID"TEST934759263495634"
merchantIdstringMerchant ID"M948164"
originTransactionIdstringOrder transaction ID"M948164T2023072607034709567189_1"
currencystringcurrency type currency type, three uppercase letters"SAR"
"KWD"
"BHD"
"AED"
"OMR"
"QAR"
createdAtstringCreation time"2023-07-26T04:06:33.227Z"
updatedAtstringUpdate time"2023-07-26T04:06:33.227Z"

Response Parameter Example

json
{
  "amount": 7, // order amount
  "status": "pending", // Refund status
  "id": "M948164T2023072607034709567189_R1", // Chargeback ID
  "orderId": "M948164T2023072607034709567189", // Order ID
  "paymentMethod": "mastercard", // payment method
  "merchantRefundId": "TEST934759263495634", // Merchant refund order ID
  "merchantId": "M948164", // Merchant ID
  "originTransactionId": "M948164T2023072607034709567189_1", // Order transaction ID
  "currency": "SAR", // currency type
  "updatedAt": "2023-07-26T04:06:33.227Z", // Creation time
  "createdAt": "2023-07-26T04:06:33.227Z" // Update time
}