> ## Documentation Index
> Fetch the complete documentation index at: https://apidocs.paylias.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Manage your customers

> Learn how to use the Paylias Customer APIs to manage your issued aliases

The Customers API allows you to issue and manage payment aliases for both individual and business users. Once created, each customer is uniquely identified by an alias within your namespace and becomes eligible to send and receive payments on the Paylias network provided they are enabled.

Customers can be created directly via API and managed over time using the [Update Customer](/api-reference/customers/patch-customer) and [Delete Customer](/api-reference/customers/delete-customer) endpoints. While the assigned alias is permanent and cannot be changed, you can update other attributes such as the customer's first name, middle name, nickname, and their active status (enabled or disabled).

## Creating a Customer

You can register a new customer by calling the [Create Customer](/api-reference/customers/create-customer) endpoint. This is the canonical way to issue a new alias within your namespace and associate it with an individual or business. By default, customers are created in a **DISABLED** state until explicitly enabled.

<CodeGroup>
  ```bash Create an Individual Customer theme={null}
  curl --request POST \
       --url https://sandbox.paylias.xyz/gateway/api/v1/csp/customer \
       --header 'accept: application/json' \
       --header 'content-type: application/json' \
       --header 'x-paylias-api-key: <API-KEY>' \
       --header 'x-org-id: <Org-ID>' \
       --header 'x-partner-id: <Partner-ID>' \
       --header 'idempotency-key: <uuid>' \
       --data '
  {
    "type": "Individual",
    "first_name": "Ziyad",
    "last_name": "Parekh",
    "middle_name": "",
    "payment_address": "ziyadparekh@safepay",
    "phone_number": "+16461234567",
    "email": "ziyad@gmail.com",
    "status": "ENABLED"
  }'
  ```

  ```bash Create a Business Customer theme={null}
  curl --request POST \
    --url https://sandbox.paylias.xyz/gateway/api/v1/csp/customer \
    --header 'Content-Type: application/json' \
    --header 'X-PAYLIAS-API-KEY: <api-key>' \
    --header 'idempotency-key: <idempotency-key>' \
    --header 'x-org-id: <x-org-id>' \
    --header 'x-partner-id: <x-partner-id>' \
    --data '
  {
    "type": "Business",
    "business_legal_name": "Elfbar, Inc.",
    "business_website": "https://elfbar.com",
    "business_description": "the bar for elfs",
    "business_trade_name": "Elfbar",
    "business_industry": "45678",
    "email": "support@elfbar.com",
    "payment_address": "elfbar@safepay",
    "status": "ENABLED"
  }'
  ```
</CodeGroup>

Depending on the type of customer you're creating, you need to specify the right data to Paylias. The following table highlights which fields are applicable to which type of customer

| Property               | **Individual** | **Business** |
| ---------------------- | -------------- | ------------ |
| `type`                 | Y Required     | Y Required   |
| `payment_address`      | Y Required     | Y Required   |
| `phone_number`         | Y Required     | O Optional   |
| `email`                | Y Required     | Y Required   |
| `status`               | Y Required     | Y Required   |
| `first_name`           | Y Required     | N/A          |
| `middle_name`          | O Optional     | N/A          |
| `last_name`            | Y Required     | N/A          |
| `business_legal_name`  | N/A            | Y Required   |
| `business_trade_name`  | N/A            | Y Required   |
| `business_website`     | N/A            | Y Required   |
| `business_description` | N/A            | O Optional   |
| `business_industry`    | N/A            | Y Required   |

Once created and enabled, a customer can begin sending or receiving payments using their assigned alias.

## Updating a Customer

To update a customer's details such as their name, nickname, or active status use the [Update Customer](/api-reference/customers/patch-customer) endpoint. This is a partial update operation; only the fields included in the request body will be updated.

```bash Update a customer theme={null}
curl --request PATCH \
     --url https://sandbox.paylias.xyz/gateway/api/v1/csp/customer/{customer_id} \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --header 'x-paylias-api-key: <API-KEY>' \
     --header 'x-org-id: <Org-ID>' \
     --header 'x-partner-id: <Partner-ID>' \
     --header 'idempotency-key: <uuid>' \
     --data '
{
  "middle_name": "Zubair",
  "nick_name": "ziyadparekh"
}
'
```

Note that the customer's alias (`payment_address`) is immutable and cannot be changed once assigned. While the Update Customer endpoint is fairly flexible and allows easy updates to properties, we advise to use this endpoint with care. Switching a customer from an individual to business or vice versa frequently can be seen as a sign of fraud on the network. Similarly, frequent switching of the cusomter's `business_industry` code can also be flagged by network partipants.

## Deleting a Customer

If a customer no longer wishes to use Paylias or needs to be deactivated, you can perform a soft delete by calling the [Delete Customer](/api-reference/customers/delete-customer) endpoint.

```bash Archive a customer theme={null}
curl --request DELETE \
     --url https://sandbox.paylias.xyz/gateway/api/v1/csp/customer/{customer_id} \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --header 'x-paylias-api-key: <API-KEY>' \
     --header 'x-org-id: <Org-ID>' \
     --header 'x-partner-id: <Partner-ID>' \
     --header 'idempotency-key: <uuid>' \
```

<Warning>Deletes are final. Once a customer is deleted, their alias is sent back to the pool of available aliases under your namespace. Deleted customers cannot be restored.</Warning>

The Customers API is the foundation of identity on the Paylias network. It allows your platform to create and manage the individuals and businesses participating in your payment ecosystem—while keeping control over user lifecycle and compliance entirely within your infrastructure.
