Customers
API ReferenceCustomersCreate
Create Customer
Create a new customer record.
POST /customers
Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
customer_id | string | No | Your own unique customer identifier (max 64 chars). When omitted, the platform generates one and returns it in the response. Useful when reconciling against an existing customer ID in your database. |
email | string | No | Customer's email address. |
name | string | No | Customer's full name. |
phone | string | No | Customer's phone number. |
phone_country_code | string | No | Phone country code (e.g., +1). |
description | string | No | Description of the customer for internal use. |
address | object | No | Customer's default address. Used as the default billing address on payments unless overridden. See address. |
metadata | object | No | Up to 50 key-value pairs (key max 40 chars, value max 500 chars) for your own bookkeeping. |
address
| Parameter | Type | Description |
|---|---|---|
line1 | string | Address line 1. |
line2 | string | Address line 2. |
city | string | City. |
state | string | State or province. |
zip | string | Postal or ZIP code. |
country | string | Two-letter ISO country code (e.g., US). |
first_name | string | First name on the address. |
last_name | string | Last name on the address. |
Request Example
curl -X POST 'https://api.v2.paychtec.com/customers' \ -H "Content-Type: application/json" \ -H "api-key: snd_YOUR_API_KEY" \ -d '{ "customer_id": "cus_acme_42", "email": "john@example.com", "name": "John Doe", "phone": "6502530000", "phone_country_code": "+1", "description": "Premium customer", "address": { "line1": "1600 Amphitheatre Parkway", "city": "Mountain View", "state": "CA", "zip": "94043", "country": "US", "first_name": "John", "last_name": "Doe" }}'Response
{
"customer_id": "cus_1234567890abcdef",
"email": "john@example.com",
"name": "John Doe",
"phone": "6502530000",
"phone_country_code": "+1",
"description": "Premium customer",
"created": "2024-01-22T10:00:00Z"
}