# Check the Validity of Cwallet ID

## Check if the Cwallet User ID is correct and return the nickname

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

#### 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 |
| --------------------------------------- | ------ | ----------- |
| c\_id<mark style="color:red;">\*</mark> | string | Cwallet ID  |

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

#### Response

#### Header

#### Body

```json
{
	"code": 10000,
	"msg": "success",
	"data": {
		"c_id": "9454818",
		"nikename": "alvin"
	}
}
```

#### Parameter

{% endtab %}

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

```json
{
    'code': 224083,
    'reason': 'ToUserNotFound'
    'msg': 'users do not exist'
}
```

{% 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 %}

### Request Body Example

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

```json
{
	"c_id": "9454818"
}
```

{% 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 %}
