# Create Collection

Collections are unique to each merchant. You can create collections through the LeanX Portal or by using API.

## Authentication

LeanX uses **Auth Token** to authenticate in each request's header.

{% hint style="info" %}
**Auth Token** can be retrieved in your portal dashboard under **API** page.
{% endhint %}

**Request Header**

{% code overflow="wrap" %}

```json
{
    "auth-token": "LP-0D7C06DE-MM|7394e58e-edee-4c42-9ca5-bcbc449f1b9f|2141df4a3cb633d5ce8683bb0c55067e5caebfbe07390dde277dc455bcc95c91723a81b5e565c7c02d68fb84e396722563016bf99e576a4b8cdbe4423fbf226b"
}
```

{% endcode %}

## Create a Collection

HTTP Method: <mark style="color:yellow;">POST</mark>

```
https://api.leanx.dev/api/v1/merchant/create-payment-collection
```

**Request Body**

```json
{
  "title": "Public API Collection Creation",
  "description": "This is public API collection description",
  "enable_billing_address": true
}
```

**Attributes**

<table><thead><tr><th width="277">Property</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>title<mark style="color:red;">*</mark></td><td>String</td><td>Title of your collection</td></tr><tr><td>description<mark style="color:red;">*</mark></td><td>String</td><td>Description of the collection</td></tr><tr><td>enable_billing_address<mark style="color:red;">*</mark></td><td>Boolean</td><td>Allow payer to enter billing address in payment page</td></tr></tbody></table>

**Response**

```json
{
  "response_code": 2000,
  "description": "SUCCESS",
  "app_version": "/api/v1",
  "talk_to_server_before": "2023-01-31T14:28:30.842232",
  "data": {
    "collection_uuid": "CL-C0D7F54A90-LNP"
  }
}
```
