# Token ID Interface

CCPayment provides merchants with 100+ tokens on various blockchains.&#x20;

To simplify the management of token assets with the same symbol for both merchants and their customers, CCPayment consolidates balances of tokens with identical symbols.

For instance, when users receive USDT on the ETH chain, they can withdraw USDT from any supported chain.

You can view the complete list of supported tokens through the form below.  <https://bit.ly/CCsupportedcoins>

### Get Token ID

## Return supported Token ID configuration of “tokens for your business” in the merchant’s backend

<mark style="color:green;">`POST`</mark> `https://admin.ccpayment.com/ccpayment/v1/coin/all`

Return all Token IDs of selected tokens enabled by you. Return all Token IDs supported by CCPayment if you enabled All Tokens in your [Merchant Settings](https://admin.ccpayment.com/merchatsetting/settings).

#### Headers

| Name                                           | Type   | Description                                                                                                                                                                                                                   |
| ---------------------------------------------- | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Appid<mark style="color:red;">\*</mark>        | String | Merchant's unique credential. Find it on the [Developer page](https://admin.ccpayment.com/developer/config).                                                                                                                  |
| Timestamp<mark style="color:red;">\*</mark>    | String | Timestamp in seconds (10-digit). The request is valid for two minutes.                                                                                                                                                        |
| Sign<mark style="color:red;">\*</mark>         | String | SHA-256 (APPID + APP Secret +timestamp+<mark style="color:red;">**body (json string)**</mark>). [Signature guide](https://doc.ccpayment.com/~/changes/HSMg9pcC4k6HIczMjOvx/ccpayment-for-developer/to-get-started/signature). |
| Content-Type<mark style="color:red;">\*</mark> | String | application/json; charset=utf-8                                                                                                                                                                                               |

{% tabs %}
{% tab title="200: OK Success (200)/ Fail (200)" %}
{% tabs %}
{% tab title="Header" %}

{% endtab %}

{% tab title="Body" %}

```json
{
    "code": 10000,
    "msg": "success",
    "data": {
        "list": [
            {
                "symbol": "BTC",
                "crypto": "BTC",
                "name": "Bitcoin",
                "logo": "https://resource.cwallet.com/token/icon/btc.png",
                "min": "0.00008",
                "price": "29196.27",
                "precision":8,
                "coin_id": "f36ad1cf-222a-4933-9ad0-86df8069f916",
                "status": 1,
                "tokens": [
                    {
                        "token_id": "f36ad1cf-222a-4933-9ad0-86df8069f916",
                        "crypto": "BTC",
                        "logo": "https://resource.cwallet.com/token/icon/btc.png",
                        "name": "Bitcoin",
                        "is_support_memo": false,
                        "network": "Bitcoin",
                        "chain": "BTC",
                        "network_coin_id":"f36ad1cf-222a-4933-9ad0-86df8069f916",
                        "network_fee_crypto":"BTC",
                        "contract": "BTC",
                        "precision":8,
                        "chain_logo": "https://resource.cwallet.com/token/icon/btc.png",
                        "status": 1
                    }
                ]
            },
           
            {
                "symbol": "ETH",
                "crypto": "ETH",
                "name": "Ethereum",
                "logo": "https://resource.cwallet.com/token/icon/ETH.png",
                "min": "0",
                "price": "1902.84",
                "precision":18,
                "coin_id": "e8f64d3d-df5b-411d-897f-c6d8d30206b7",
                "status": 1,
                "tokens": [
                    {
                        "token_id": "1e614496-f9ce-4ec7-8e68-563733deacbf",
                        "crypto": "ETH",
                        "logo": "https://resource.cwallet.com/token/icon/ETH.png",
                        "name": "Binance Smart Chain",
                        "is_support_memo": false,
                        "network": "BEP20",
                        "chain": "BSC",
                        "network_coin_id":"e8f64d3d-df5b-411d-897f-c6d8d30206b7",
                        "network_fee_crypto":"ETH",
                        "contract": "0x2170ed0880ac9a755fd29b2688956bd959f933f8",
                        "precision":18,
                        "chain_logo": "https://resource.cwallet.com/token/icon/wbnb.png",
                        "status": 1
                    },
                    {
                        "token_id": "8addd19b-37df-4faf-bd74-e61e214b008a",
                        "crypto": "ETH",
                        "logo": "https://resource.cwallet.com/token/icon/ETH.png",
                        "name": "Ethereum",
                        "is_support_memo": false,
                        "network": "ERC20",
                        "network_coin_id":"e8f64d3d-df5b-411d-897f-c6d8d30206b7",
                        "network_fee_crypto":"ETH",
                        "chain": "ETH",
                        "contract": "1",
                        "precision":18,
                        "chain_logo": "https://resource.cwallet.com/token/icon/eth.png",
                        "status": 1
                    },
                    {
                        "token_id": "f36770ed-d8fd-4a21-8141-83478fa44e05",
                        "crypto": "ETH",
                        "logo": "https://resource.cwallet.com/token/icon/ETH.png",
                        "name": "Optimism",
                        "is_support_memo": false,
                        "network": "OPTIMISM",
                        "network_coin_id":"e8f64d3d-df5b-411d-897f-c6d8d30206b7",
                        "network_fee_crypto":"ETH",
                        "chain": "OPTIMISM",
                        "contract": "10",
                        "precision":18,
                        "chain_logo": "https://resource.cwallet.com/token/op.png",
                        "status": 1
                    }
                ]
            }
        ]
    }
}
```

{% endtab %}

{% tab title="Parameters" %}

<table data-full-width="false"><thead><tr><th>Name</th><th width="99">Type</th><th width="110" data-type="checkbox">Required</th><th>Description</th></tr></thead><tbody><tr><td>code</td><td>Integer</td><td>true</td><td></td></tr><tr><td>msg</td><td>String</td><td>true</td><td></td></tr><tr><td>data</td><td>Object</td><td>true</td><td></td></tr><tr><td>data.list</td><td>Array</td><td>true</td><td>Crypto coin list</td></tr><tr><td>data.list.coin_id</td><td>String</td><td>true</td><td>Identification of the crypto coin<br>''coin_id can be used to identify which coin is  transferring to Cwallet account''</td></tr><tr><td>data.list.symbol</td><td></td><td>false</td><td></td></tr><tr><td>data.list.crypto</td><td>String</td><td>true</td><td>Coin symbol</td></tr><tr><td>data.list.name</td><td>String</td><td>true</td><td>Coin fullname</td></tr><tr><td>data.list.precision</td><td>Integer</td><td>true</td><td>Precision of the coin</td></tr><tr><td>data.list.logo</td><td>String</td><td>true</td><td>Coin icon</td></tr><tr><td>data.list.min</td><td>String</td><td>true</td><td>Minimum trading amount</td></tr><tr><td>data.list.price</td><td>String</td><td>true</td><td>Current price (in USD)</td></tr><tr><td>data.list.status</td><td>Int</td><td>true</td><td><p>Status: 1, token can be used for payment, deposit and withdrawal. </p><p>Status: 2, token is under maintenance, the service of transfer and payment is suspended temporarily. </p><p>Status: 3, token is to be delisted, token cannot be used for transfer and payment, merchant can only withdraw it.</p></td></tr><tr><td>data.list.tokens</td><td>Array</td><td>true</td><td>The list of tokens on different networks</td></tr><tr><td>data.list.tokens.token_id</td><td>String</td><td>true</td><td>Tell CCPayment's server the information of the coin and its transaction network</td></tr><tr><td>data.list.tokens.crypto</td><td>String</td><td>true</td><td>Symbol of token, example: "ETH"</td></tr><tr><td>data.list.tokens.logo</td><td>String</td><td>true</td><td>Token icon</td></tr><tr><td>data.list.tokens.name</td><td>String</td><td>true</td><td>Full name of the chain, Example: "Optimism"</td></tr><tr><td>data.list.tokens.is_support_memo</td><td>Boolean</td><td>true</td><td>If the parameter value is true, it means that the token supports filling in memo or Tag</td></tr><tr><td>data.list.tokens.network</td><td>String</td><td>true</td><td>Token Protocol, Example: "ERC20"</td></tr><tr><td>data.list.tokens.network_coin_id</td><td>String</td><td>false</td><td>Coin ID for network fee crypto.</td></tr><tr><td>data.list.tokens.network_fee_crypto</td><td>String</td><td>false</td><td><a href="https://docs.google.com/spreadsheets/d/1Wbr11YMX8p093ucbDDehyAI0HIOxVHpzQCRnTwWgThA/edit#gid=0">Crypto</a> unit of network fee.</td></tr><tr><td>data.list.tokens.chain</td><td>String</td><td>true</td><td>Abbreviation of the chain name, Example: "OP"</td></tr><tr><td>data.list.tokens.contract</td><td>String</td><td>true</td><td>The identification of the token on the corresponding blockchain network</td></tr><tr><td>data.list.tokens.precision</td><td>Integr</td><td>true</td><td>Precision of the token</td></tr><tr><td>data.list.tokens.chain_logo</td><td>String</td><td>true</td><td>Icon of network</td></tr><tr><td>data.list.tokens.status</td><td>Int</td><td>true</td><td><p>Status: 1, token can be used for payment, deposit and withdrawal. </p><p>Status: 2, token is under maintenance, the service of transfer and payment is suspended temporarily. </p><p>Status: 3, token is to be delisted, token cannot be used for transfer and payment, merchant can only withdrawn it.</p></td></tr></tbody></table>
{% endtab %}

{% tab title="Remark" %}

#### Remark 1

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.

#### Remark 2

Usually, users must select a coin and network to allow the merchant's application to determine the token\_id for the checkout.
{% endtab %}

{% tab title="Fail (200)" %}

```json
{
    "code": 224066,
    "msg": "service err, please try again"
}
```

{% endtab %}
{% endtabs %}
{% endtab %}
{% endtabs %}

If you have any questions or concerns about managing integrated tokens, our [customer managers](https://t.me/CCPaymentSupportBot) are ready to assist you with any issues during the integration process.
