Skip to content

Create Payment

Request Method and Path

POST /payin/v1/createPayment

Request Headers

Field NameTypeRequiredDescription
content-typestringYesapplication/json
x-api-keystringYesProvided by Paydify, same as appId
x-api-timestampstringYesTimestamp in milliseconds
x-api-signaturestringYesSignature, see Signature Algorithm

Request Body

Field NameTypeRequiredDescription
mchTxnIdstring(60)YesMerchant order ID, maximum 64 characters
txnAmountstring(20)YesOrder amount, e.g., 100.23
currencystring(8)YesPayment currency, e.g., USDT, see Supported Blockchains and Currencies
checkoutModestring(20)YesCheckout mode, fixed value: MERCHANT (merchant-specified payment amount)
payMethod1string(20)NoPayment wallet, enum values see Supported Blockchains and Currencies
payMethod2string(20)NoPayment blockchain, enum values see Supported Blockchains and Currencies
notificationUrlstring(120)YesPayment result callback URL to merchant, only supports http and https
successReturnUrlstring(120)NoRedirect URL after successful payment
failReturnUrlstring(120)NoRedirect URL after failed payment
pendingReturnUrlstring(120)NoRedirect URL during pending payment
sourcestring(20)NoOrder source tag
txnTitlestring(30)NoPayment title, defaults to merchant name provided during merchant registration
txnDescstring(60)NoPayment description
accountInfoobjectNoReceiving account information, e.g., {"toAddress":"0xttttttt22222"}
payerInfoobjectNoPayer information, e.g., {"uid":"123456"}
mchExtInfostring(512)NoMerchant extension information, JSON string, this field is only passed through and will be returned in callbacks
lifetimeintNoOrder timeout period in milliseconds, default 30 minutes

Response Headers

Field NameTypeRequiredDescription
x-api-keystringYesProvided by Paydify, same as appId
x-api-timestampstringYesTimestamp in milliseconds
x-api-signaturestringYesSignature, see Signature Algorithm

Response

Field NameTypeDescription
codestringResponse code, SYS_SUCCESS indicates success
messagestringResponse message
messageDetailstringDetailed response message
successbooleanWhether the request was successful
data.txnIdstringPaydify order ID
data.mchTxnIdstringMerchant order ID
data.statestringPayment status, enum values see Payment Status
data.errorMsgstringPayment failure reason description
data.qrCodestringPayment link QR code base64 data
data.deeplinkstringNative payment link
data.httplinkstringHTTP 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
}