# Withdrawal Order Information Interface

## Return order information

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

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

#### Request Body

| Name                                                   | Type  | Description                                                                                                                                   |
| ------------------------------------------------------ | ----- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| merchant\_order\_ids<mark style="color:red;">\*</mark> | Array | Merchant Order ID, max limit 100. Pass only one type of withdrawal order id. DO NOT pass both deposit and withdrawal order ids in one request |

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

#### API withdrawal order response

#### Header

#### Body

<pre><code>{
    "code":10000,
    "msg":"success",
    "data":[
        {
            "order_detail":{
                "merchant_order_id":"1698735528116569",
                "chain":"TRX",
                "contract":"TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t",
                "crypto":"USDT",
                "order_amount":"1",
                "token_rate":"1",
                "status":"Successful",
                "created":1698735530,
                "order_id":"202310310658501719247540351442944"
            },
            "trade_list":[
                {
                    "amount":"1",
                    "chain":"TRX",
                    "contract":"TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t",
                    "crypto":"USDT",
                    "service_fee":"0",
                    "network_fee":"0",
                    "network_coin_id":"217d4c3b-4f84-4416-bf1a-a1d15d7d2f50",
                    "network_fee_crypto":"TRX",
                    "network_fee_value":"0.85",
                    "txid":"",//No txid for internal transfers
                    "pay_time":1698735530,
                    "token_rate":"1",
                    "status":"Successful"
                }
            ]
        },
        {
            "order_detail":{
                "merchant_order_id":"po_2Y0Xr931AUUskX4azBtIzE6qHPX",
                "chain":"POLYGON",
                "contract":"0xc2132d05d31c914a87c6611c10748aeb04b58e8f",
                "crypto":"USDT",
                "order_amount":"0.001",
                "token_rate":"1",
                "status":"Successful",
                "created":1699663749,
                "order_id":"CP202311110049091723140772755197952"
            },
            "trade_list":[
                {
                    "amount":"0.001",
                    "chain":"POLYGON",
                    "contract":"0xc2132d05d31c914a87c6611c10748aeb04b58e8f",
                    "crypto":"USDT",
                    "service_fee":"0",
                    "network_fee":"0.046957",
<strong>                    "network_fee_crypto":"USDT",
</strong>                    "network_coin_id":"8e5741cf-6e51-4892-9d04-3d40e1dd0128",
                    "network_fee_value":"1.00",
                    "txid":"0xfdcb291148cf201a40afffcfd56fab4061ec90bdc54b7e1121405336003b2c29",
                    "pay_time":1699663875,
                    "token_rate":"1",
                    "status":"Successful"
                }
            ]
        }
    ]
}
</code></pre>

#### 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="182">Name</th><th width="133">Value</th><th width="84" data-type="checkbox">Required</th><th width="87">Type</th><th width="264">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>Array</td><td></td></tr><tr><td>data.order_detail</td><td></td><td>true</td><td>Object</td><td>detail of orders</td></tr><tr><td>data.order_detail.merchant_order_id</td><td>1234567890</td><td>true</td><td>String</td><td>Merchant order ID</td></tr><tr><td>data.order_detail.chain</td><td>ETH</td><td>true</td><td>String</td><td></td></tr><tr><td>data.order_detail.contract</td><td>0xdAC17F958D2ee523a2206206994597C13D831ec7</td><td>true</td><td>String</td><td>Contract</td></tr><tr><td>data.order_detail.crypto</td><td>USDT</td><td>true</td><td>String</td><td>Crypto symbol</td></tr><tr><td>data.order_detail.order_amount</td><td>0.09921</td><td>true</td><td>String</td><td>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</td></tr><tr><td>data.order_detail.token_rate</td><td>0.9921</td><td>true</td><td>String</td><td></td></tr><tr><td>data.order_detail.status</td><td>Successful</td><td>true</td><td>String</td><td><p>Pending、Processing: The withdrawal order is being processed on the blockchain. Please wait for the result.</p><p>Successful: Withdraw  successful.</p><p>Failed: Withdraw failed.</p></td></tr><tr><td>data.order_detail.created</td><td>1698735530</td><td>true</td><td>String</td><td></td></tr><tr><td>data.order_detail.order_id</td><td>202310310658501719247540351442944</td><td>true</td><td>String</td><td></td></tr><tr><td>data.trade_list</td><td></td><td>true</td><td>Array</td><td>In transaction list, withdrawals have only one transaction.</td></tr><tr><td>data.trade_list.amount</td><td>0.09921</td><td>true</td><td>String</td><td><p></p><p>The actual amount received from the withdrawal transaction. </p></td></tr><tr><td>data.trade_list.chain</td><td>ETH</td><td>true</td><td>String</td><td></td></tr><tr><td>data.trade_list.contract</td><td>0xdAC17F958D2ee523a2206206994597C13D831ec7</td><td>true</td><td>String</td><td>Contract</td></tr><tr><td>data.trade_list.crypto</td><td>USDT</td><td>true</td><td>String</td><td>Crypto symbol</td></tr><tr><td>data.trade_list.service_fee</td><td>0.0000</td><td>true</td><td>String</td><td></td></tr><tr><td>data.trade_list.network_fee</td><td>0.0128</td><td>true</td><td>String</td><td>The actual network fee for the withdrawal transaction.</td></tr><tr><td>data.trade_list.network_fee_crypto</td><td>USDT</td><td>false</td><td>String</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.trade_list.network_fee_value</td><td>0.89</td><td>false</td><td>String</td><td>Network fee value in usd.</td></tr><tr><td>data.trade_list.network_coin_id</td><td>8e5741cf-6e51-4892-9d04-3d40e1dd0128</td><td>false</td><td>String</td><td>Coin ID for network fee crypto.</td></tr><tr><td>data.trade_list.txid</td><td>0x5caafde27a8040547a169168c55f35806eb0ca68344b2d53894097b0e9d5fa89</td><td>true</td><td>String</td><td>On-chain transaction hash, no txid for internal transfers</td></tr><tr><td>data.trade_list.pay_time</td><td>1684727677</td><td>true</td><td>String</td><td></td></tr><tr><td>data.trade_list.token_rate</td><td>0.9921</td><td>true</td><td>String</td><td></td></tr><tr><td>data.trade_list.status</td><td>Successful</td><td>true</td><td>String</td><td><p>"Processing"</p><p>"Successful"</p><p>"Failed"</p></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**

```json
{
	"merchant_order_ids":["12345","23456"]
	//DO NOT pass both deposit and withdrawal order ids in one request
	//Max order limit: 100
}
```


---

# 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/withdrawal-api-integration/withdrawal-order-information-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.
