Create Payment
Request Method and Path
POST /payin/v1/createPayment
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, maximum 64 characters |
| txnAmount | string(20) | Yes | Order amount, e.g., 100.23 |
| currency | string(8) | Yes | Payment currency, e.g., USDT, see Supported Blockchains and Currencies |
| checkoutMode | string(20) | Yes | Checkout mode, fixed value: MERCHANT (merchant-specified payment amount) |
| payMethod1 | string(20) | No | Payment wallet, enum values see Supported Blockchains and Currencies |
| payMethod2 | string(20) | No | Payment blockchain, enum values see Supported Blockchains and Currencies |
| notificationUrl | string(120) | Yes | Payment result callback URL to merchant, only supports http and https |
| successReturnUrl | string(120) | No | Redirect URL after successful payment |
| failReturnUrl | string(120) | No | Redirect URL after failed payment |
| pendingReturnUrl | string(120) | No | Redirect URL during pending payment |
| source | string(20) | No | Order source tag |
| txnTitle | string(30) | No | Payment title, defaults to merchant name provided during merchant registration |
| txnDesc | string(60) | No | Payment description |
| accountInfo | object | No | Receiving account information, e.g., {"toAddress":"0xttttttt22222"} |
| payerInfo | object | No | Payer information, e.g., {"uid":"123456"} |
| mchExtInfo | string(512) | No | Merchant extension information, JSON string, this field is only passed through and will be returned in callbacks |
| lifetime | int | No | Order timeout period in milliseconds, default 30 minutes |
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.txnId | string | Paydify order ID |
| data.mchTxnId | string | Merchant order ID |
| data.state | string | Payment status, enum values see Payment Status |
| data.errorMsg | string | Payment failure reason description |
| data.qrCode | string | Payment link QR code base64 data |
| data.deeplink | string | Native payment link |
| data.httplink | string | HTTP payment link |
Example
shell
# Request
# Successful response
{
"code": "SYS_SUCCESS",
"message": null,
"messageDetail": null,
"data": {
"txnId": "P1167515578018041857",
"mchTxnId": "MCH_TXN_987_1756287002",
"state": "init",
"errorMsg": "",
"qrCode": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAL4AAACoCAYAAABe+//hGBxxxxxxxxxx",
"deeplink": "bitkeep://pay?txnId=P20250827173005906",
"httplink": "https://payrouter.paydify-sit.com/en/pay/middle?txnId=P1167515578018041857&_needChain=base"
},
"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": {
"txnId": "P1167515578018041857",
"mchTxnId": "MCH_TXN_987_1756287002",
"state": "init",
"errorMsg": "",
"qrCode": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAL4AAACoCAYAAABe+//hGBxxxxxxxxxx",
"deeplink": "bitkeep://pay?txnId=P20250827173005906",
"httplink": "https://payrouter.paydify-sit.com/en/pay/middle?txnId=P1167515578018041857&_needChain=base"
},
"success": true
}
# Failed response
{
"code": "SYS_ERROR",
"message": "System error",
"messageDetail": "Error details",
"data": null,
"success": false
}