# Get permanent deposit address for users

Each [App ID of the merchant](https://admin.ccpayment.com/developer/config) can obtain 1000 addresses via the interface. If you want more addresses available, please [contact customer service](https://t.me/CCPaymentSupportBot) for depth help.

## Get addresses that will not expire for users to deposit directly;

<mark style="color:green;">`POST`</mark> `https://admin.ccpayment.com/ccpayment/v1/payment/address/get`

#### Headers

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

#### Request Body

| Name                                       | Type   | Description                                                                                                                                                                                        |
| ------------------------------------------ | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| user\_id<mark style="color:red;">\*</mark> | string | <p>User ID, unique identification<br>3-64characters</p>                                                                                                                                            |
| chain<mark style="color:red;">\*</mark>    | string | <p>Blockchain network, unique identification</p><p><a href="https://docs.google.com/spreadsheets/d/1YKY-pxCdqer1IurgEkyNqW0xIj7EmtfX3rILoJqkKgw/edit#gid=0">Click here to check chain list</a></p> |
| notify\_url                                | string | The URL address will be notified via a POST request when the order status changes. Ensure the URL is accessible to receive notifications from the payment platform.                                |

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

#### **Response (Success 200)**

**Header**

**Body**

```json
{
	"code": 10000,
	"msg": "success",
	"data": {
		"address": "TYWnk1EGALQyYst2yFSd29QQQTEkuKMbyt",
		"memo": "",
	}
}
```

**Parameters**
{% endtab %}

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

#### **Response (Fail 200)**

```json
{
	"code": 224066,
	"msg": "Service error, pleaser try again",
	"data": null
}
```

<table><thead><tr><th>Name</th><th>Value</th><th width="108" data-type="checkbox">Required</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>code</td><td>224066</td><td>true</td><td>Number</td><td></td></tr><tr><td>msg</td><td>Service error, please try again</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></tbody></table>
{% endtab %}
{% endtabs %}
{% endtab %}
{% endtabs %}

#### Note: Each user only has one deposit address with each chain.

* **The deposit introduction:**

The system will scan the transaction on the blockchain when it receives the notice of deposit and credit the assets to the merchant’s account after checking success. And will send the deposit success notification to the webhook URL specified by the merchant.

{% hint style="danger" %}
The address obtained from the interface only receives [the token listed on CCPayment](https://bit.ly/CCsupportedcoins). Check the token list for details. Please do not deposit unlisted tokens to CCPayment to avoid asset loss.
{% endhint %}

### Webhook notification

CCPayment will notify merchants the final transaction results. [Go to Webhook Configuration Guide](https://docs.ccpayment.com/ccpayment-v1.0-api/webhook-notification/webhook-notification-tutorial).

> Once the merchant has processed the order, please return {http code: 200} and include a “success” string in the HTTP response body. <br>
>
> 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**

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

```php
$this->response->setString("success")
```

{% endtab %}

{% tab title="Java" %}

```java
this.response.setString("success");
```

{% endtab %}

{% tab title="Golong" %}

```go
this.response.SetString("success")
```

{% endtab %}

{% tab title="Python" %}

```python
self.response.set_string("success")
```

{% endtab %}

{% tab title="Node.js" %}

```javascript
this.response.setString("success");
```

{% endtab %}
{% endtabs %}

<figure><img src="https://760693906-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKH8CbFKQ8Cydt24cgg2C%2Fuploads%2FZBy5dGy78dZaMoIzia08%2Fimage.png?alt=media&#x26;token=21b0c951-0d67-41a4-aa3c-d04b54fa0946" alt=""><figcaption><p>Response Example</p></figcaption></figure>

{% content-ref url="../webhook-notification/withdraw-webhook-notification" %}
[withdraw-webhook-notification](https://docs.ccpayment.com/ccpayment-v1.0-api/webhook-notification/withdraw-webhook-notification)
{% endcontent-ref %}
