Skip to content

Query Refund Status

Request Method and Path

POST /payin/v1/getRefundStatus

Request Headers

Field NameTypeRequiredDescription
content-typestringYesapplication/json
x-api-keystringYesProvided by Paydify, same as appId
x-api-timestampstringYesTimestamp in milliseconds
x-api-signaturestringYesSignature, see Signature Algorithm

Request Body

Field NameTypeRequiredDescription
mchTxnIdstringNoMerchant refund order ID, at least one of mchTxnId, refundTxnId, or paymentTxnId must be provided
refundTxnIdstringNoPaydify refund order ID, at least one of mchTxnId, refundTxnId, or paymentTxnId must be provided
paymentTxnIdstringNoAssociated Paydify payment order ID, at least one of mchTxnId, refundTxnId, or paymentTxnId must be provided

Response Headers

Field NameTypeRequiredDescription
x-api-keystringYesProvided by Paydify, same as appId
x-api-timestampstringYesTimestamp in milliseconds
x-api-signaturestringYesSignature, see Signature Algorithm

Response

Field NameTypeDescription
codestringResponse code, SYS_SUCCESS indicates success
messagestringResponse message
messageDetailstringDetailed response message
successbooleanWhether the request was successful
data[i].refundTxnIdstringPaydify refund order ID
data[i].mchTxnIdstringMerchant order ID
data[i].paymentTxnIdstringAssociated Paydify payment order ID
data[i].txnHashstringBlockchain transaction hash
data[i].txnAmountstringRefund order amount, if currency is USDT, then 1.23 means 1.23 USDT
data[i].currencystringRefund currency
data[i].payMethod2stringPayment blockchain, enum values see Supported Blockchains and Currencies
data[i].appIdstringProvided by Paydify
data[i].statestringRefund status, enum values see Refund Status
data[i].mchExtInfostringMerchant extension information, JSON string
data[i].errorMsgstringRefund failure reason description
data[i].envTypestringappId tag, indicates whether it belongs to production or testing
data[i].checkoutModeintCheckout mode, possible values: MERCHANT (merchant-specified payment amount), CUSTOMER (customer input payment amount)
data[i].refundedTimeintRefund success timestamp in milliseconds, only has value when refund is successful
data[i].createdTimeintPayment initiation timestamp in milliseconds
data[i].updatedTimeintLast update timestamp in milliseconds

Request Example

shell
# Request

# Successful response
{
  "code": "SYS_SUCCESS",
  "message": null,
  "messageDetail": null,
  "data": [{
    "refundTxnId": "R2209141130105863014",
    "txnHash": "0x123456789",
    "paymentTxnId": "P220914xxx",
    "txnAmount": "1.00",
    "currency": "USDC",
    "payMethod1": "bitkeep",
    "payMethod2": "bnb",
    "mchTxnId": "MCH_REFUND_123456",
    "appId": "A1111",
    "envType": "live",
    "mchExtInfo": "{\"orderId\":\"123\"}",
    "errorMsg": "",
    "state": "pending",
    "refundedTime": 1756725871000,
    "createdTime": 1756697092000,
    "updatedTime": 1756814549000
  }],
  "success": true
}


# Failed response
{
  "code": "SYS_ERROR",
  "message": "System error",
  "messageDetail": "Error details",
  "data": null,
  "success": false
}
# Request

# Successful response
{
  "code": "SYS_SUCCESS",
  "message": null,
  "messageDetail": null,
  "data": [{
    "refundTxnId": "R2209141130105863014",
    "txnHash": "0x123456789",
    "paymentTxnId": "P220914xxx",
    "txnAmount": "1.00",
    "currency": "USDC",
    "payMethod1": "bitkeep",
    "payMethod2": "bnb",
    "mchTxnId": "MCH_REFUND_123456",
    "appId": "A1111",
    "envType": "live",
    "mchExtInfo": "{\"orderId\":\"123\"}",
    "errorMsg": "",
    "state": "pending",
    "refundedTime": 1756725871000,
    "createdTime": 1756697092000,
    "updatedTime": 1756814549000
  }],
  "success": true
}


# Failed response
{
  "code": "SYS_ERROR",
  "message": "System error",
  "messageDetail": "Error details",
  "data": null,
  "success": false
}