Create Refund
Request Method and Request Path
POST /payment/payin/v1/createRefund
Request Header
Field | Data Type | Mandatory | Description |
---|---|---|---|
content-type | string | Yes | Hard code with application/json |
x-api-key | string | Yes | Provided by Paydify , equals to appId |
x-api-timestamp | string | Yes | Current timestamp with millisecond |
x-api-signature | string | Yes | See Signature Mechanism |
Request Body
Field | Data Type | Mandatory | Description |
---|---|---|---|
appId | string(20) | Yes | Merchant app ID, Provided by Paydify |
paymentTxnId | string(30) | Yes | Payment unique order ID |
mchTxnId | string(60) | Yes | Merchant unique order ID |
txnHash | string(120) | Yes | Transaction hash on-chain |
mchExtInfo | string(512) | No | Additional extended information, JSON string |
Response Header
Field | Data Type | Mandatory | Description |
---|---|---|---|
x-api-key | string | Yes | Provided by Paydify , equals to appId |
x-api-timestamp | string | Yes | Current timestamp with millisecond |
x-api-signature | string | Yes | See Signature Mechanism |
Response Body
Field | Data Type | Description |
---|---|---|
status | int | Error status, 0 indicates success, non-0 indicates failure, see Error Status |
msg | string | Error description |
data.txnId | string | Refund unique order ID generated by Paydify |
data.mchTxnId | string | Merchant refund order ID |
data.state | string | Refund status, see Refund Status |
data.errorMsg | string | Reason of failure |
Example
shell
# CURL
# Response Example of Success
{
"status": 0,
"msg": "success",
"data": {
"refundTxnId": "2209141130105863014",
"paymentTxnId": "2209141130105863014",
"state": "pending",
"errorMsg": "xxx"
}
}
# Response Example of Failure
{
"status": 9999,
"msg": "system error",
"data": null
}
# CURL
# Response Example of Success
{
"status": 0,
"msg": "success",
"data": {
"refundTxnId": "2209141130105863014",
"paymentTxnId": "2209141130105863014",
"state": "pending",
"errorMsg": "xxx"
}
}
# Response Example of Failure
{
"status": 9999,
"msg": "system error",
"data": null
}