Webhook Notification
Last updated
Last updated
Configure Webhook to receive notifications. CCPayment will notify merchant of the final transaction results. You can configure the Webhook URL on the Developer page
In case of an event sending failure, the Webhook will retry up to 6 times to resend the event.
E.g.
1) Notify merchants of the status of payments asynchronously: enter your asynchronous notification URL on the page Developer > Webhook URL and click the Check button.
Note: This URL is a POST request. Content-Type of the request header is application/json and please make sure to return {http code: 200}.
2) Receive notifications from CCPayment. You may choose SHA-256 to verify signature or choose RSA for decryption. The returned parameters include: merchant order ID(merchant_order_id), order status, token information. These parameters are used for updating the order status of merchants.
CCPayment uses SHA-256 signature
Merchants sign to ensure information safety. Once the merchant has processed the order, please return "Success" in the body of the HTTP response if the processing has been successful. If the process fails, CCPayment will attempt to send the order again and the Webhook will retry up to 6 times.
Name | Value | Required | Type | Description |
---|---|---|---|---|
Name | Type | Description |
---|---|---|
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))
pay_status
string
Payment status: success
order_type
string
Payment Types: Api, invoice
record_id
string
Trading record: one transaction generates one unique record_id which can be used to distinguish multiple transactions under one merchant_order_id
order_id
string
CCPayment order ID
origin_price
string
Will be discarded after 06/01/2023. Its new Name is "product_price"
product_price
string
Initial pricing (price submitted by merchant or invoice).
origin_amount
string
Will be discarded after 06/01/2023. Its new Name is "order_amount"
denominated_ currency
string
The currency for calculating the order price, it could be cryptocurrency or fiat currency
order_amount
string
If the pricing currency is cryptocurrency, order_amount = product_price; when the pricing currency is fiat currency, order_amount=product_price/fiat_rate/token_rate
paid_amount
string
Token amount actually paid
fiat_rate
string
Fiat tax rate (in USD by default)
token_rate
string
Token price (in USDT by default); Token value in USD = token_rate*paid_amount
chain
string
contract
string
Contract
crypto
string
crypto symbol
extend
object
extend.invoice_id
string
invoice id ,order_type is the invoice type
extend.user_email
string
Email address sent by invoice,order_type is the Invoice type
extend.merchant_order_id
string
Merchant order ID, order_type is the Api type