Withdrawal API Integration
Users can get instant payouts to their Cwallet account with 0 fees from your sites/apps. They can also withdraw to any other wallet with no minimum withdrawal amount limit.
Step 1: Create Withdrawal Order
Submit withdrawal order
POST https://admin.ccpayment.com/ccpayment/v1/withdraw
Return receiving address/QR code and order information
Headers
Timestamp*
String
Timestamp in seconds (10-digit) expires in 2 minutes
Request Body
merchant_order_id*
String
Order ID in Merchant's system. A unique ID for every order
address*
String
Case 1: Pass the Cwallet ID or Email address linked to Cwallet account If a user wants to withdraw to his Cwallet account
Case 2: Pass the receiving address if the user wants to withdraw to his Web3 wallet.
Note: SATS uses the invoice as a receiving address. Each invoice can only accept one payment.
token_id*
String
Tell CCPayment's server which coin and network should be used for the transaction. You can get the token_id by calling the interface or finding it on this sheet.
If the withdrawal is to Cwallet, any token_id of the coin will be ok.
If the withdrawal is to external addresses, only the corresponding token_id will work.
value*
String
Token quantity of withdrawal; Amount received by the user = withdrawal amount - network fee
memo
Integer
Pass memo parameter if the receiving address requires a memo. If a memo is required and it is not filled, or filled incorrectly, the asset may be lost
Response (Success 200)
Header
Appid
202302010636261620672405236006912
Y
String
Merchant's unique credential. Find it on the Developer page
Timestamp
1677152490
Y
String
Timestamp in seconds (10-digit) expires in 2 minutes
Sign
871f0223c66ea72435208d03603a0cb00b90f6ac4a4ba725d00164d967e291f6
Y
String
SHA-256(appId + appSecret + timestamp+body(json string))
Body
{
"code": 10000,
"msg": "success",
"data": {
"order_id": "202301090616511612332555323101184",
"network_fee": "0",
}
}Parameters
code
10000
Integer
msg
Success
String
data
Object
data.order_id
202301090616511612332555323101184
String
CCPayment order ID
data.network_fee
0
String
Network fee. Withdrawal to Cwallet address charges 0 network fee.
As a security measure, we will sign the returned data (and according to this only { code: 10000 } should be signed, but it's signing all the returned body.). Additionally, it will return Appid, Sign, Timestamp in the header of the response. The signature method SHA-256 (appid+appSecret+Timestamp+body).
Please use the data with caution if the signature verification fails. It indicates that the data has been tampered with.
Request Body Example
{
"token_id": "fdf0e8b0-ebf5-44f0-a335-21c121b73fc8",
"address": "rwyQp3eC5j6AumcptZhfmiXAykpeswZKeJ",
// Pass Cwallet id or Email address if the withdrawal is to Cwallet account
"merchant_order_id": "3735077979050379",
"value": "10"
"memo": "573049"// Pass memo parameter if the receiving address requires a memo
}The body of HTTP is a json string.
Add the content in body of HTTP to the signature. Ensure the body content matches the signature content. As soon as CCPayment receives the request, the body content will be read and the signature will be verified.
Withdrawal Diagram

Last updated