# Network Fee Interface

## Return network fee of target token

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

#### 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                                | String | application/json; charset=utf-8                                                                                                                                                                                               |

#### Request Body

| Name                                        | Type   | Description                                                                                                                                                                                     |
| ------------------------------------------- | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| token\_id<mark style="color:red;">\*</mark> | string | Token ID for the target token. Get token id by [calling interface](/ccpayment-v1.0-api/resources-document/token-id-interface.md) or checking it [on the sheet](https://bit.ly/CCsupportedcoins) |
| address                                     | string | If this parameter is passed, CCPayment will tell whether it is an internal or external address. The network fee for an internal address is 0.                                                   |

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

#### Response

#### Header

#### Body

```json
{
	"code": 10000,
	"msg": "success",
	"data": {
		"token_id": "f137d42c-f3a6-4f23-9402-76f0395d0cfe",
		"crypto": "USDT",
		"fee":"0.0344"
	}
}
```

#### Parameters

{% endtab %}

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

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

{% endtab %}

{% tab title="Remarks" %}
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.
{% endtab %}
{% endtabs %}
{% endtab %}
{% endtabs %}

<table><thead><tr><th width="112">Name</th><th width="107">Value</th><th width="101" data-type="checkbox">Required</th><th width="87">Type</th><th width="160">Description</th></tr></thead><tbody><tr><td>code</td><td>10000</td><td>true</td><td>Integer</td><td></td></tr><tr><td>msg</td><td>Success</td><td>true</td><td>String</td><td></td></tr><tr><td>data</td><td></td><td>true</td><td>Object</td><td></td></tr><tr><td>data.token_id</td><td>f137d42c-f3a6-4f23-9402-76f0395d0cfe</td><td>true</td><td>String</td><td>Token ID for the target token. Get token id by <a href="/pages/w74ZGEfgyTo3BYvP4ebC">calling interface</a> or checking it <a href="https://bit.ly/CCsupportedcoins">on the sheet</a></td></tr><tr><td>data.crypto</td><td>USDT</td><td>true</td><td>String</td><td></td></tr><tr><td>data.fee</td><td>0.0344</td><td>true</td><td>string</td><td>Network fee</td></tr></tbody></table>

<table><thead><tr><th width="134">Name</th><th width="188">Value</th><th width="104" align="center">Required</th><th width="82">Type</th><th width="299">Description</th></tr></thead><tbody><tr><td>Appid</td><td>202302010636261620672405236006912</td><td align="center">Y</td><td>string</td><td>Merchant's unique credential. Find it on the Developer page.</td></tr><tr><td>Timestamp</td><td>1677152490</td><td align="center">Y</td><td>string</td><td>Timestamp in seconds (10-digit). The request is valid for two minutes.</td></tr><tr><td>Sign</td><td>871f0223c66ea72435208d03603a0cb00b90f6ac4a4ba725d00164d967e291f6</td><td align="center">Y</td><td>string</td><td>SHA-256 (appId + appSecret + timestamp+<mark style="color:red;"><strong>body (json string)</strong></mark>)</td></tr></tbody></table>

### Request Body Example

{% tabs %}
{% tab title="Body" %}

```json
{
	"token_id": "f137d42c-f3a6-4f23-9402-76f0395d0cfe",
	"address":""
}
```

{% endtab %}

{% tab title="Remarks" %}
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.
{% endtab %}
{% endtabs %}

###


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ccpayment.com/ccpayment-v1.0-api/resources-document/network-fee-interface.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
