Native Checkout Integration

Users can scan the QR code or copy the address on the checkout page built on your sites/apps to make the payments.

Integrate with Native Checkout API to build the checkout page for your sites/apps. Users pay in your sites/apps. No need to lead them to external pages. Take complete control of your users' checkout experience.

Step 1: Create Payment Order

Submit payment order and receive payment address

POST https://admin.ccpayment.com/ccpayment/v1/bill/create

Return receiving address/QR code and order information

Headers

NameTypeDescription

Sign*

String

SHA-256 (APPID + APP Secret +timestamp+body (json string)). Signature guide.

Timestamp*

String

Timestamp in seconds (10-digit) expires in 2 minutes

Appid*

String

Merchant's unique credential. Find it on the Developer page

Request Body

NameTypeDescription

remark

String

Remark

merchant_order_id*

String

Order ID in Merchant's system. A unique ID for every order

product_price*

String

Amount should be paid for this order (in USD by default, no more than two digits after the dot)

token_id*

String

Tells CCPayment's server which coin and which network should be used for the transaction. You can get the token_id by calling the interface or find it on this sheet

denominated_currency*

String

Currency for the order. Pass "token" if you want to show the price in crypto. Pass corresponding currency code if you want to show the price in fiat.

order_valid_period

Integer

The valid duration for the order.

The parameter passed by the merchant should be less than the order's valid period in Merchant's system. Cause on-chain transactions may need some time to proceed.

BTC will arrive within 24 hours and other tokens will usually arrive within 30 minutes.

Orders will be valid for 24 hrs by default. The max valid duration is 10 days (max valid duration for Satoshi is 2 hours).

Response (Success 200)

Header

NameValueRequiredTypeDescription

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": {
		"amount": "0.5",
		"order_id": "202301090616511612332555323101184",
		"logo": "https://resource.cwallet.com/token/icon/usdt.png",
		"network": "TRC20",
		"pay_address": "TYWnk1EGALQyYst2yFSd29QQQTEkuKMbyt",
		"crypto": "USDT",
		"order_valid_period":823456
	}
}

Parameters

NameValueRequired TypeDescription

code

10000

Integer

msg

Success

String

data

Object

data.product_price

0.5

String

Amount (in USD by default)

data.order_id

202301090616511612332555323101184

String

CCPayment order ID

data.logo

String

Token icon

data.network

TRC20

String

Pay on this Network

data.pay_address

TYWnk1EGALQyYst2yFSd29QQQTEkuKMbyt

String

Pay to this address

data.crypto

USDT

String

Token symbol

data.order_valid_period

823456

Integer

Request Body Example

{
  "remark": "",
  "token_id": "0912e09a-d8e2-41d7-a0bc-a25530892988",
  "product_price": "0.5",
  "merchant_order_id": "3735077979050379",
  "denominated_currency": "USD",
  "order_valid_period":823456
}

Step 2: Configure Webhook to receive payment notification

CCPayment will notify merchant of the final transaction result. Go to Webhook Configuration Guide.

✅ Now you have completed the entire integration process for native checkout!

Native checkout diagram

Last updated

#449: hosted checkout rewrite 5.31

Change request updated