Create Refund
Request Method and Path
POST /payin/v1/createRefund
Request Headers
| Field Name | Type | Required | Description |
|---|---|---|---|
| content-type | string | Yes | application/json |
| x-api-key | string | Yes | Provided by Paydify, same as appId |
| x-api-timestamp | string | Yes | Timestamp in milliseconds |
| x-api-signature | string | Yes | Signature, see Signature Algorithm |
Request Body
| Field Name | Type | Required | Description |
|---|---|---|---|
| mchTxnId | string(60) | Yes | Merchant order ID |
| paymentTxnId | string(30) | Yes | Payment order ID |
| txnHash | string(120) | Yes | Blockchain transaction hash |
| mchExtInfo | string(512) | No | Merchant extension information, JSON string |
Response Headers
| Field Name | Type | Required | Description |
|---|---|---|---|
| x-api-key | string | Yes | Provided by Paydify, same as appId |
| x-api-timestamp | string | Yes | Timestamp in milliseconds |
| x-api-signature | string | Yes | Signature, see Signature Algorithm |
Response
| Field Name | Type | Description |
|---|---|---|
| code | string | Response code, SYS_SUCCESS indicates success |
| message | string | Response message |
| messageDetail | string | Detailed response message |
| success | boolean | Whether the request was successful |
| data.refundTxnId | string | Paydify refund order ID |
| data.paymentTxnId | string | Associated payment order ID |
| data.state | string | Refund status, enum values see Refund Status |
| data.errorMsg | string | Refund failure reason description |
Example
shell
# Request
# Successful response
{
"code": "SYS_SUCCESS",
"message": null,
"messageDetail": null,
"data": {
"refundTxnId": "2209141130105863014",
"paymentTxnId": "2209141130105863014",
"state": "pending",
"errorMsg": "xxx"
},
"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": "2209141130105863014",
"paymentTxnId": "2209141130105863014",
"state": "pending",
"errorMsg": "xxx"
},
"success": true
}
# Failed response
{
"code": "SYS_ERROR",
"message": "System error",
"messageDetail": "Error details",
"data": null,
"success": false
}