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

# Create a Customer

> Creates a new customer object to track payments, payment methods, and subscriptions.

Customer objects allow you to track multiple payments, invoices, and subscriptions that belong to the same person or organization.

***

### Request Body

**name** `string` *required*

The customer's full name or business entity name.

**email** `string` *required*

The customer's primary email address for sending receipts and invoices.

**phone** `string`

The customer's primary phone number in international E.164 format (e.g., `+237670000001`).

**description** `string`

An arbitrary string that you can attach to a customer object.

**metadata** `object`

Key-value pairs for storing arbitrary custom attributes (e.g., internal user ID, membership tier).

***

### Code Examples

```bash cURL theme={null}
curl -X POST https://api.viarosandbox.com/v1/customers \
  -u sk_test_uLsofsae3tB9Izwgeuy0Mxbh4JIxUPSG: \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Jane Doe",
    "email": "jane.doe@example.com",
    "phone": "+237670000001",
    "metadata": {
      "tier": "gold",
      "internal_user_id": "usr_90210"
    }
  }'
```

```python Python theme={null}
import requests

url = "https://api.viarosandbox.com/v1/customers"
auth = ("sk_test_uLsofsae3tB9Izwgeuy0Mxbh4JIxUPSG", "")

payload = {
    "name": "Jane Doe",
    "email": "jane.doe@example.com",
    "phone": "+237670000001",
    "metadata": {
        "tier": "gold",
        "internal_user_id": "usr_90210"
    }
}

response = requests.post(url, auth=auth, json=payload)
print(response.json())
```

```javascript Node.js theme={null}
const axios = require('axios');

async function createCustomer() {
  const response = await axios.post(
    'https://api.viarosandbox.com/v1/customers',
    {
      name: 'Jane Doe',
      email: 'jane.doe@example.com',
      phone: '+237670000001',
      metadata: {
        tier: 'gold',
        internal_user_id: 'usr_90210'
      }
    },
    {
      auth: {
        username: 'sk_test_uLsofsae3tB9Izwgeuy0Mxbh4JIxUPSG',
        password: ''
      }
    }
  );

  console.log(response.data);
}

createCustomer();
```

***

### Response

```json theme={null}
{
  "id": "cus_9f1a2b3c4d5e",
  "object": "customer",
  "name": "Jane Doe",
  "email": "jane.doe@example.com",
  "phone": "+237670000001",
  "currency": "XAF",
  "balance": 0,
  "delinquent": false,
  "metadata": {
    "tier": "gold",
    "internal_user_id": "usr_90210"
  },
  "created_at": "2026-11-06T12:00:00Z"
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.