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
  1. CCPayment v1.0 API
  2. Webhook Notification

Invocie Webhook Notification

CCPayment will post the webhook notification when the merchant receives the Invoice payment.

PreviousDirect Deposit to Permanent Address Webhook NotificationNextWithdraw Webhook Notification

Last updated 1 year ago

Webhook notification

There are three transaction statuses in the webhook notification under the field name “pay_status”. CCPayment will credit assets if the pay_status is “success”, which is the one and only status you should consider as the confirmation of the transaction. The other two pay_status, “pending” and “processing”, can not be regarded as the confirmation of the transaction.

Name
Value
Required
Type
Description

Content-Type

Y

string

application/json; charset=utf-8

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

```json
{
  "pay_status": "success",
  "order_type": "Invoice",
  "record_id": "202307311012021***477271900160",
  "order_id": "202307310956071***952473421795328",
  "product_price": "18",
  "order_amount": "0.009637573687282151",
  "fiat_rate": "1",
  "denominated_currency": "USD",
  "paid_amount": "10",
  "credit_amount": "",
  "token_rate": "1867.69",
  "chain": "ETH",
  "contract": "0xdAC17F***206206994597C13D831ec7",
  "crypto": "USDT",
  "txid": "",
  "network_fee": "0",
  "service_fee": "0.003",
  "memo": "",
  "extend": {
    "invoice_id": "2023073109560***3384046592",
    "user_email": "b***ly@gmail.com"
  }
}
```
Name
Type
Description

pay_status

string

Payment status: pending, processing, success, failed pending: The transaction started, it is waiting to be sent out to the blockchain. processing: It’s being processed on the blockchain.

order_type

string

Invocie

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

product_price

string

Initial pricing (price submitted by merchant or invoice).

denominated_ currency

string

order_amount

string

If the denominated currency is crypto currency, order_amount = product_price; when the denominated 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

Used to record the blockchain from which the user deposits.

contract

string

Contract

crypto

string

crypto symbol

extend

object

extend.merchant_order_id

string

Merchant order ID, order_type is the Api type

custom_value

string

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

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.

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");
Response Example

Currency unit of the product price. Call to get all denominated_ currency.

the interface