Hosted Checkout Page Integration
Receive payment via the checkout page provided by CCPayment
Without development, just call the interface to obtain the checkout page. You can display this page to your users. CCPayment will send the receiving notification to you after the user completes the payment order.
Step 1: Get checkout URL
Return a Checkout URL
POST
https://admin.ccpayment.com/ccpayment/v1/concise/url/get
Headers
Appid*
String
Timestamp*
String
Timestamp in seconds (10-digit). The request is valid for two minutes.
Sign*
String
Content-Type*
String
application/json; charset=utf-8
Request Body
order_valid_period
Integer
The valid duration for the order.
Time period in seconds (10 digits).
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).
product_price*
String
Amount should be paid for this order (in USD by default, no more than two digits after the dot)
merchant_order_id*
String
Order ID in Merchant's system
product_name*
String
Name of the product
return_url
String
Redirect users to this URL after user makes payment
notify_url
String
The URL address will be notified via a POST request when the order status changes. Ensure the URL is accessible to receive notifications from the payment platform.
custom_value
String
Merchant custom field - This custom value field will be returned in transaction status notification.
Response
Header
Appid
202302010636261620672405236006912
Y
string
Merchant's unique credential. Find it on the Developer page.
Timestamp
1677152490
Y
string
Timestamp in seconds (10-digit). The request is valid for two minutes.
Sign
871f0223c66ea72435208d03603a0cb00b90f6ac4a4ba725d00164d967e291f6
Y
string
SHA-256 (appId + appSecret + timestamp+body (json string))
Body
Parameters
code
10000
Integer
msg
Success
String
data
Object
data.payment_url
String
URL link of payment
Request Body Example
Step 2: Get deposit result
CCPayment will notify merchants the final transaction results. Go to Webhook Configuration Guide.
Once the merchant has processed the order, please return {http code: 200} and include a “success” string in the HTTP response body.
If CCPayment does not receive “success” as a response from the merchant, CCPayment will keep pushing the notification up to 6 times. Any response other than “success” will be regarded as a failure, and CCPayment will keep sending the notification.
✅ Now you have completed the entire integration process for hosted checkout page
Except for webhook notifications, you can get the order information via the Call Order Information Interface. The status of the API returned has a time lag with the webhook status maybe, Handle idempotency properly.
Hosted Checkout Diagram
Order status of API deposit
View order status in API Deposit tab.
Non-payment
Yes
Awaiting payment
Non-payment
No
Expired
Part-payment
Yes
Underpayment
Part-payment
No
Underpayment(Overdue)
Paid in full
Yes
Paid
Paid in full
No
Paid(Overdue)
Overpayment
Yes
Overpayment
Overpayment
No
Overpayment(Overdue)
Last updated