Skip to content

Query Refund Status

Request Method and Request Path

POST /payment/payin/v1/getRefundStatus

Request Header

FieldData TypeMandatoryDescription
content-typestringYesHard code with application/json
x-api-keystringYesProvided by Paydify, equals to appId
x-api-timestampstringYesCurrent timestamp with millisecond
x-api-signaturestringYesSee Signature Mechanism

Request Body

FieldData TypeMandatoryDescription
appIdstringYesMerchant app ID, provided by Paydify
mchTxnIdstringNoMerchant refund order ID, one of mchTxnId, refundTxnId, or paymentTxnId must be provided
refundTxnIdstringNoPaydify refund order ID, one of mchTxnId, refundTxnId, or paymentTxnId must be provided
paymentTxnIdstringNoPaydify payment order ID, one of mchTxnId, refundTxnId, or paymentTxnId must be provided

Response Header

FieldData TypeMandatoryDescription
x-api-keystringYesProvided by Paydify, equals to appId
x-api-timestampstringYesCurrent timestamp with millisecond
x-api-signaturestringYesSee Signature Mechanism

Response Body

FieldData TypeDescription
statusintError status, 0 indicates success, non-0 indicates failure, see Error Status
msgstringError description
data[i].refundTxnIdstringRefund unique order ID generated by Paydify
data[i].mchTxnIdstringMerchant order ID
data[i].paymentTxnIdstringRelated payment order ID
data[i].txnHashstringTransaction hash on-chain
data[i].txnAmountstringRefund order amount, e.g. 1.23
data[i].currencystringRefund currency
data[i].payMethod2stringNetwork code, see Supported Network and Currency
data[i].appIdstringProvided by Paydify
data[i].statestringRefund status, see Refund Status
data[i].mchExtInfostringAdditional extended information, a JSON string
data[i].errorMsgstringReason of failure
data[i].envTypestringlive or test
data[i].refundedTimeintDefault value is 0, a millisecond value is present only when the refund is validated
data[i].createdTimeintRefund order created Time in millisecond
data[i].updatedTimeintLatest modified Time in millisecond

Examples

shell
# CURL

# Response Example of Success
{
  "status": 0,
  "msg": "success",
  "data": [{
    "refundTxnId": "2209141130105863014",
    "mchTxnId":"xxkkkk",
    "txnHash":"xxx",
    "paymentTxnId": "220914xxx",
    "txnAmount": "1.00",
    "currency": "USDC",
    "payMethod2": "bnb",
    "appId": "A1111",
    "state": "pending",
    "mchExtInfo": "{JSON}",
    "errorMsg": "失败原因",
    "envType": "live",
    "refundedTime": 2222222, 
    "createdTime": 2222222, 
    "updatedTime": 2222222,
  }]
}


# Response Example of Failure
{
  "status": 9999,
  "msg": "system error",
  "data": null
}
# CURL

# Response Example of Success
{
  "status": 0,
  "msg": "success",
  "data": [{
    "refundTxnId": "2209141130105863014",
    "mchTxnId":"xxkkkk",
    "txnHash":"xxx",
    "paymentTxnId": "220914xxx",
    "txnAmount": "1.00",
    "currency": "USDC",
    "payMethod2": "bnb",
    "appId": "A1111",
    "state": "pending",
    "mchExtInfo": "{JSON}",
    "errorMsg": "失败原因",
    "envType": "live",
    "refundedTime": 2222222, 
    "createdTime": 2222222, 
    "updatedTime": 2222222,
  }]
}


# Response Example of Failure
{
  "status": 9999,
  "msg": "system error",
  "data": null
}