Place Order
The merchant system first calls this API to generate a Transfer order in the BonusPay backend.
WithdrawOrderStatus
PENDING
In progress
COMPLETED
Completed
FAILED
Failed
Interface Address
Development Environment URL: http://api.testbonuspay.network/sgs/api/ccwithdraw/transfer
Production Environment URL:
https://api.bonuspay.network/sgs/api/ccwithdraw/transfer
Request Parameters
Http Header
Content-Language
Content-Language
Optional
String(10)
en
en-English (default)
Sign
sign
Required
String
-
Partner ID
Partner-Id
Required
String(12)
-
Http Body
Request Time
requestTime
Required
Timestamp(3)
1581493898000
Business Content
bizContent
Required
PlaceWithdrawRequest
-
Business Content
PlaceTransferRequest
Merchant Order No.
merchantOrderNo
Required
String(64)
-
Address
address
Required
String(200)
-
Expected Amount
expectedReceivedAmount
Optional(when refAmount is exist)
Money
"totalAmount":{ "currency":"ETH", "amount":1.01 }
The total amount of the order
Reference Amount
refAmount
Optional
"refAmount":{ "exchangeCurrencyCode":"[Order Currency]", "refAmount":{ "amount":[Original amount], "currency":"[Original Currency]" } }
"refAmount":{ "exchangeCurrencyCode":"USDT", "refAmount":{ "amount":100000, "currency":"INR" } }
The refAmount will convert to exchangeCurrency and amount to be the total amount of orders,eg: send 10000 INR and convert to USDT to accecpt
Network
network
Required
String(20)
-
The default is the merchant itself if not filled in
Backend Notification URL
notifyUrl
Optional
String(200)
-
The address where the merchant receives notifications
Request Example
Http Header
{
"Content-Language": "en",
"Content-Type": "application/json",
"sign": "IXJI/QicPQotIsIDBcSGIg6jtJUXs1rTuifQFZUNd3KDTl25GKmpYO7OrkaKkTV0shDRitLmkxJCe3Z60zHE2ZSeVczrhwrnmuMG+bX9N22Hw821H6MydsXetYHRnyf5dPbgpmVja582w49grA6jRlVFAVMYdxKJDPSCb2X/IpltvyrLQ1Wt+lqr+fnpYXvyON6/PIZIQIknC8BVddVahxJnaC6HEagvJf6gskz22/DFfPHT1mlMA9pg8qrbh4O7DYZahf8TB3nIzAPc/FHOUZkYYTT2c8m4eLL8740nJVK7D3IOSqSnBAU/iJ2omjPPFvRCCSqzz17pkGsT7AW91w==",
"Partner-Id": "200000000888"
}
Http Body
{
"bizContent":{
"address":"0x6c3103FFF34916Ef2df44CE952BcE610d7e23cB5",
// "expectedReceivedAmount":{
// "amount":100,
// "currency":"USDT"
"refAmount":{
"exchangeCurrencyCode":"USDT",
"refAmount":{
"amount":10000000,
"currency":"INR"
}
},
"merchantOrderNo":"81d420c6-aaab-48cd-846e-0a0eee95492a",
"network":"TRON",
"notifyUrl":"http://yoursite.com?orderId=123"
},
"requestTime":1682574418121
}
Response Parameters
Http Header
Sign
sign
Required
String
-
The body field in Http Body is only returned when applyStatus is SUCCESS and code is 0.
Http Body
Response Header
head
Required
ResponseHeader
-
Response Body
body
Optional
WithdrawResponseBody
-
TransferResponse
Order Information
withdrawOrder
Optional
WithdrawOrder
-
Response Example
Http Header
{
"sign": "JzWjVQ245trg3p0CyuwUUHN+Ck40q/HDaMvhqueHDP8YHqC/Uw3c9VWCw4gKsNbk+CRShjT+bvKkck8Fc3aAiRK8wIVQz6eu95sPkJgZp5A0P+tfMH/44F+3CrejtbEIkrHdSwhy98Tv9TYs9QFe7Yni/vEJ8P4OU6FZJOi8LGOMF6Nc8+S5qftc7qLA17cNJ7NJYC+EW8suGe/NmGA9c5NMK5BwHTHzXYOjXwXLx8mw4M3hiirl0wtVym3hrOmbkujYZCH56h8uOVF0FbHGu5uoq61NuniJitLLs9qyiEprQzUe8oWsJnHKXeGAgEr//fLXIXgYsRYb7AWoJzs6Eg=="
}
Http Body
{
"body":{
"withdrawOrder":{
"partnerFee":{
"currency":"USDT",
"amount":5
},
"createdTime":1680160281538,
"orderNo":"20230330000000101",
"status":"FAILURE",
"notifyUrl":"http://yoursite.com?orderId=123",
"address":"0x6c3103FFF34916Ef2df44CE952BcE610d7e23cB5",
"expectedReceivedAmount":{
"currency":"USDT",
"amount":5.12345678
},
"network":"ETH"
}
},
"head":{
"applyStatus":"SUCCESS",
"code":"0",
"msg":"SUCCESS",
"traceCode":"000000"
}
}
Last updated