Query Payment Status
Request Method and Request Path
POST /payment/payin/v1/getPaymentStatus
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 | Yes | Merchant app ID, provided by Paydify |
mchTxnId | string(60) | No | Merchant order ID, either mchTxnId or txnId must be provided |
txnId | string(30) | No | Order ID, generated by Paydify . either mchTxnId or txnId must be provided |
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[i].txnId | string | Order ID, a unique ID that is generated by Paydify |
data[i].mchTxnId | string | Merchant order ID |
data[i].txnHash | string | Transaction hash on-chain |
data[i].txnAmount | string | Payment order amount, e.g. 1.23 |
data[i].paidAmount | string | Paid amount |
data[i].mchReceivedAmount | string | Merchant received amount |
data[i].mchFee | string | Paydify received amount |
data[i].mchFeeRate | string | Rate of Paydify service fee, 0.01 indicates 0.01% |
data[i].currency | string | Payment currency |
data[i].gasFee | string | Gas fee on-chain |
data[i].gasFeeCurrency | string | Currency of gas fee |
data[i].payMethod1 | string | Wallet code, see Supported Network and Currency |
data[i].payMethod2 | string | Network code, see Supported Network and Currency |
data[i].appId | string | Provided by Paydify |
data[i].state | string | Payment status, see Payment Status |
data[i].refundState | int | Refund tag, different from Refund Status |
data[i].mchExtInfo | string | Additional extended information |
data[i].errorMsg | string | Reason of failure |
data[i].envType | string | live or test |
data[i].fromAddress | string | Payer's address |
data[i].checkoutMode | int | Checkout mode, hard code with 1 |
data[i].paidTime | int | Default value is 0, a millisecond value is present only when the payment is successful |
data[i].failedTime | int | Default value is 0, a millisecond value is present only when the payment is failed |
data[i].expiredTime | int | A millisecond value indicates the expiration of payment |
data[i].createdTime | int | Payment order created Time in millisecond |
Examples
shell
# CURL
# Response Example of Success
{
"status": 0,
"msg": "success",
"data": [{
"txnId": "2209141130105863014",
"mchTxnId": "220914xxx",
"txnHash": "0xzzzz",
"txnAmount": "1.00",
"paidAmount": "1.00",
"mchReceivedAmount": "0.8",
"mchFee": "0.1",
"mchFeeRate": "0.01",
"currency": "USDC",
"gasFee": "0.1",
"gasFeeCurrency": "BNB",
"payMethod1": "CRYPTO",
"payMethod2": "bnb",
"appId": "A1111",
"state": "pending",
"refundState": "1",
"mchExtInfo": "{JSON}",
"errorMsg": "error message",
"envType": "live",
"fromAddress": "0xfghjkrty67xxxxxx",
"checkoutMode": 1,
"paidTime": 2222222,
"failedTime": 2222222,
"expiredTime": 2222222,
"createdTime": 2222222
}]
}
# Response Example of Failure
{
"status": 9999,
"msg": "system error",
"data": null
}
# CURL
# Response Example of Success
{
"status": 0,
"msg": "success",
"data": [{
"txnId": "2209141130105863014",
"mchTxnId": "220914xxx",
"txnHash": "0xzzzz",
"txnAmount": "1.00",
"paidAmount": "1.00",
"mchReceivedAmount": "0.8",
"mchFee": "0.1",
"mchFeeRate": "0.01",
"currency": "USDC",
"gasFee": "0.1",
"gasFeeCurrency": "BNB",
"payMethod1": "CRYPTO",
"payMethod2": "bnb",
"appId": "A1111",
"state": "pending",
"refundState": "1",
"mchExtInfo": "{JSON}",
"errorMsg": "error message",
"envType": "live",
"fromAddress": "0xfghjkrty67xxxxxx",
"checkoutMode": 1,
"paidTime": 2222222,
"failedTime": 2222222,
"expiredTime": 2222222,
"createdTime": 2222222
}]
}
# Response Example of Failure
{
"status": 9999,
"msg": "system error",
"data": null
}