CCPayment
Have Questions?TwitterMediumBlog
  • CCPayment - For Merchant
    • What is CCPayment
    • CCPayment API Introduction
    • Fees
    • Invoice
    • Contact Us
  • CCPayment v1.0 API
    • SDK Libraries
    • To Get Started
      • Signature
      • API Specification Common Rules
    • Payment API - CCPayment
      • Hosted Checkout Page Integration
      • Native Checkout Integration
      • API Deposit Order Information Interface
    • Wallet API - CCPayment
      • Get permanent deposit address for users
    • Withdrawal API Integration
      • Create a withdrawal order
      • Withdrawal Order Information Interface
    • Resources Document
      • Token ID Interface
      • Current Token Rate Interface
      • Asset Balance Interface
      • Network Fee Interface
      • Block Height Information Retrieval API
      • Check the Validity of Cwallet ID
      • List of Supported Coins
      • List of Denominated Currency for API Payment
      • Error Code
    • Webhook Notification
      • Webhook Notification Tutorial
      • API Deposit Webhook Notification
      • Direct Deposit to Permanent Address Webhook Notification
      • Invocie Webhook Notification
      • Withdraw Webhook Notification
      • Refund Webhook Notification
      • Resend Webhook Notification
  • Changes
    • Change Record
    • Upcoming Changes
  • FAQ
    • FAQ
    • Webhook Notification
      • How to receive the transaction notification
      • Why do some deposit transactions not include the “from address” in the webhook notification?
    • Payment
      • Why hasn't my transactions been confirmed?
      • Why hasn't my withdrawal arrived
      • Minimum amount of withdrawal and deposit
      • How to find out withdrawal fees for each cryptocurrency?
      • How does CCPayment charge the service fee
      • After payment has been paid, why does the order status not appear successful
      • What types of tokens do we accept for payment
      • How long does it take for a withdrawal to be processed
      • When a payment is not sufficiently made, can the user make it again and have it credited correctly
      • Is it possible to pay by credit card
      • What is token aggregation fee?
    • Security & Privacy
      • How to Secure My CCPayment Account
      • What information do you collect about my customers
      • Is my website required to be reviewed when using CCPayment API
      • Why can’t I get the email verification code?
      • Verify your site ownership
        • Verify your site ownership with HTML file
        • Verify your site ownership with HTML tag
    • Refund
      • How to cancel a pending refund request
      • How does the merchant issue a refund to the customer
      • What should you do if you entered a wrong memo/tag?
      • What should you do if you credited to CCPayment's unsupported tokens?
    • Others & Academy
      • How to manage multiple merchant account
      • How does the lock exchange rate of an order work and what happens when it is locked
      • What is the transaction under the category Other in the transaction records
      • Are there any regional restrictions on API use
      • What is a referral program?
      • CCPayment ETH Testnet Tutorial
      • What is auto-swap for deposit?
  • CCPAYMENT POLICY
    • CCPayment Privacy Policy
    • Disclaimer for Purchasers
    • Terms of Use
    • AML/CTF Policy
Powered by GitBook
On this page
  • Step 1: Create Payment Order
  • Submit payment order and receive payment address
  • Step 2: Get deposit result
  • Native checkout diagram
  • Order status of API deposit
  1. CCPayment v1.0 API
  2. Payment API - CCPayment

Native Checkout Integration

Obtain the receiving address, you can customize the checkout page on your Application/Web, using it to receive payment

Integrate with the Native Checkout API to build the checkout page for your sites/apps. Users complete the payment in your sites/apps and there's no need to skip to external pages. You can completely control 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

Name
Type
Description

Sign*

String

Timestamp*

String

Timestamp in seconds (10-digit). The request is valid for two minutes.

Appid*

String

Content-Type*

String

application/json; charset=utf-8

Request Body

Name
Type
Description

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

denominated_currency*

String

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).

custom_value

String

Merchant custom field - This custom value field will be returned in transaction status notification.

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.

Response (Success 200)

Header

Name
Value
Required
Type
Description

Appid

202302010636261620672405236006912

Y

String

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

{
	"code": 10000,
	"msg": "success",
	"data": {
		"amount": "0.5",//new parameter name: product_price
		"order_id": "202301090616511612332555323101184",
		"logo": "https://resource.cwallet.com/token/icon/usdt.png",
		"network": "TRC20",
		"pay_address": "TYWnk1EGALQyYst2yFSd29QQQTEkuKMbyt",
		"memo": "",
		"token_id": "0912e09a-d8e2-41d7-a0bc-a25530892988",
		"crypto": "USDT",
		"order_valid_period":823456
	}
}

Parameters

Name
Value
Required
Type
Description

code

10000

Integer

msg

Success

String

data

Object

data.amount

0.5

String

new parameter name: product_price; 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.token_id

0912e09a-d8e2-41d7-a0bc-a25530892988

String

Token to request

data.pay_address

TYWnk1EGALQyYst2yFSd29QQQTEkuKMbyt

String

The temporary payment address for current order,only effectivewithin the order validity period.

data.memo

String

Memo/tag, Uniquely identifies

data.crypto

USDT

String

Token symbol

data.order_valid_period

823456

Integer

Response (Fail 200)

{
	"code": 224066,
	"msg": "Service error, pleaser try again",
	"data": null
}
Name
Value
Required
Type
Description

code

224066

Number

msg

Service error, please try again

String

data

Object

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

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

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.

Step 2: Get deposit result

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.

Example

$this->response->setString("success")
this.response.setString("success");
this.response.SetString("success")
self.response.set_string("success")
this.response.setString("success");

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

Native checkout diagram

Order status of API deposit

Payment Info
Order Within Valid Period
Order status

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)

PreviousHosted Checkout Page IntegrationNextAPI Deposit Order Information Interface

Last updated 1 year ago

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

Merchant's unique credential. Find it on the

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

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

Merchant's unique credential. Find it on the

CCPayment will notify merchant of the final transaction result. .

Except for webhook notifications, you can get the order information via the Call The status of the API returned has a time lag with the webhook status maybe, Handle idempotency properly.

View order status in .

Go to Webhook Configuration Guide
API Deposit Webhook Notification
Order Information Interface.
API Deposit tab
Signature guide
Developer page
calling the interface
on this sheet
currency code
Developer page
https://resource.cwallet.com/token/icon/usdt.png
Response Example