Skip to main content

8.1.2 Create a legal currency payment order

#Brief description: Obtain cash (legal currency) payment (recharge) order

**Note: During the callback process for this type of order, the order may time out due to our platform's delay in receiving payment, resulting in a failed callback. But when the money arrives, the system will automatically reissue the callback successfully. Therefore, the merchant only needs to handle the status = "SUCCESS" (order successful) callback. **

Request parameters

Parameter nameTypeRequiredParameter meaningParameter description
keystringYesMerchant keyapiKey
localOrderIdstringYesMerchant platform local order numberMerchant platform generates unique order number locally
localUserIdstringNoMerchant platform local user IDMerchant platform local user ID
notifyUrlstringNoCallback addressAfter the order is successfully placed, the address of the merchant will be notified by API callback (callback details are at the bottom)
successRedirectUrlstringNoJump addressAutomatically jump to address after success
channelCodestringYesChannel codeGet the channel code (channelCode field) through the document 8.1.1 interface
currencystringYesCurrencyOrder pricing currency
amountnumberYesAmountOrder pricing amount
localUserRealNamestringNoLocal user’s real name
signstringYesSignatureSee Signature Algorithm for details
Request json sample
{
"key": "dNNTJZpgFVWlYrVv",
"localOrderId": "conantest344",
"localUserId": "conan",
"notifyUrl": "http://127.0.0.1:8080/merchant-demo/notify/test",
"isBlockchain": true,
"channelCode":"tencentest9",
"currency": "CNY",
"amount": "100",
"localUserRealName":"柯南",
"sign": "9662c0f104123b0ccac049108f174589"
}

Response json example

{
"code": 0,
"success": true,
"message": null,
"data": {
"orderId": 352950471221317,
"localOrderId": "conantest344",
"uiUrl": "http://im.topup.dianfus.dx.com/imserver/chat/Yy9kQ3IvVXNta3BwWE5sUzUvYVM3M2hHU0UrNjlnSzRjdVpGa1BHWmR1RUdLU0daa3pDNjZqbm1QOTRlUnRULzI5TmNyWFhjV2xJc3ZGZFVzdTFWY2tkWHF1Tk1yeUxDajFod01QRk83K2FrVnIvRm1YY0ZpUzBOK001NEZXbXhzd0ZxdzhPUVFlaGlaTCttbFdML04wb3VPZ3kvUDFkdHJISlhwVjlXVE1JPQ=="
}
}
Response data parameter description
Parameter nameTypeParameter meaning
orderIdlongOrder ID
localOrderIdstringMerchant platform local order number
uiUrlstringPayment link address

Callback details

**Note: When merchants with this type of order process callback notifications, our platform may delay receiving payment, causing the order collection to time out, thus triggering a callback notification of failed orders. When the money is actually received, the system will automatically call back the successful reissue. ** **Therefore, for such orders, merchants only need to process the callback with status = "SUCCESS" (order successful) as the final valid result. **

The callback method is: POST application/json
Example of jsonization of callback parameters
{
"amount":"100",
"currency":"CNY",
"localOrderId":"conantest344",
"merchantId":302992856974,
"merchantUserId":"conan",
"notifyTime":1757577957437,
"orderCreateTime":1757577574425,
"orderId":"352950471221317",
"paidAmount":"100",
"status":"SUCCESS",
"type":"PAYMENT",
"isReissue":"true",
"sign":"774720acbacafca99af62b98d72154d3",
"key":"9yUreYgTRtit39Dy"
}

Parameter nameTypeParticipating signatureParameter meaningParameter description
amountdecimalYesOrder Amount
currencystringYesCurrency
localOrderIdstringYesMerchant local order number
merchantIdstringYesMerchant ID
merchantUserIdstringYesMerchant platform local user ID
notifyTimelongYesCallback timeMilliseconds
orderCreateTimelongYesOrder Creation TimeMilliseconds
orderIdstringYesOrder number
paidAmountdecimalYesPayment amount
statusstringYesOrder StatusSUCCESS: Completed | FAIL: Failed
typestringYesOrder typePAYMENT payment, WITHDRAW withdrawal
isReissuebooleanYesReissuetrue Yes
signstringNomd5 signatureSee signature algorithm for details
keystringYesMerchant key

When you receive the callback notification, please directly return the string success after the processing is completed, indicating that the message has been successfully received and processed. After the system receives the success response, it will no longer send the callback repeatedly. If the expected response is not received (success is not returned or an exception is returned), the system will resend the callback notification according to the stepped retry mechanism, retrying up to 14 times. The current retry intervals are: 15s, 15s, 30s,180s, 600s, 1200s, 1800s, 1800s, 1800s,3600s,10800s,10800s,21600s, 21600s