Webhook Notification
Payment Notification
Request Method
HTTP POST
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 | Description |
---|---|---|
appId | string | Provided by Paydify |
txnId | string | Unique order ID, generated by Paydify |
mchTxnId | string | Merchant unique order ID |
txnHash | string | Transaction hash on-chain |
txnAmount | string | Payment order amount, e.g. 1.23 |
paidAmount | string | Paid amount |
mchReceivedAmount | string | Merchant received amount |
mchFee | string | Amount of Paydify service fee |
currency | string | Payment currency |
state | string | Payment status, see Payment Status |
mchExtInfo | string | Additional extended information |
errorMsg | string | Reason of failure |
fromAddress | string | Payer's address |
paidTime | int | Default value is 0, a millisecond value is present only when the payment is successful |
failedTime | int | Default value is 0, a millisecond value is present only when the payment is failed |
createdTime | int | Payment order created Time in millisecond |
Response Body
The webhook service expects only two response values in TEXT, not JSON or others.
success
fail
If
fail
or other string is received, the webhook service will retry up to 10 times.
Example
shell
curl -X POST '{endpoint}' \
-H 'content-type: application/json' \
-H 'x-api-key: xxx' \
-H 'x-api-timestamp: 121212121' \
-H 'x-api-signature: xxxx' \
-d '{
"appId": "A4156085xx",
"createdTime": 1744698314883,
"currency": "USDT",
"errorMsg": "Timeout",
"failedTime": 1744700130191,
"fromAddress": "0xab5fB1426f20bAxx",
"mchExtInfo": "{"JSON":"string"}",
"mchTxnId": "17446983142083792",
"paidAmount": "0.00",
"paidTime": 0,
"state": "failed",
"txnAmount": "121.31",
"mchReceivedAmount": "121.30",
"mchFee": "0.01",
"payMethod1": "BGW",
"payMethod2": "bnb",
"txnHash": "",
"txnId": "P20250415142514"
}'
curl -X POST '{endpoint}' \
-H 'content-type: application/json' \
-H 'x-api-key: xxx' \
-H 'x-api-timestamp: 121212121' \
-H 'x-api-signature: xxxx' \
-d '{
"appId": "A4156085xx",
"createdTime": 1744698314883,
"currency": "USDT",
"errorMsg": "Timeout",
"failedTime": 1744700130191,
"fromAddress": "0xab5fB1426f20bAxx",
"mchExtInfo": "{"JSON":"string"}",
"mchTxnId": "17446983142083792",
"paidAmount": "0.00",
"paidTime": 0,
"state": "failed",
"txnAmount": "121.31",
"mchReceivedAmount": "121.30",
"mchFee": "0.01",
"payMethod1": "BGW",
"payMethod2": "bnb",
"txnHash": "",
"txnId": "P20250415142514"
}'
Retry Mechanism
If fail
or other string is received, the webhook service will retry up to 10 times with the following mechanism.
Request Sequence NO. | Time Interval | Description |
---|---|---|
0 | 0 | 1st notification, executes immediately with no delay |
1 | 15 seconds after the 1st request | 1st retry |
2 | 45 seconds after the 1st request | 2nd retry |
3 | 90 seconds after the 1st request | 3rd retry |
4 | 3 minutes after the 1st request | 4th retry |
5 | 10 minutes after the 1st request | 5th retry |
6 | 30 minutes after the 1st request | 6th retry |
7 | 1 hour after the 1st request | 7th retry |
8 | 3 hours after the 1st request | 8th retry |
9 | 6 hours after the 1st request | 9th retry |
10 | 12 hours after the 1st request | 10th retry |