API Docs
Customers
API ReferenceCustomersCreate

Create Customer

Create a new customer record.

POST /customers

Body Parameters

ParameterTypeRequiredDescription
customer_idstringNoYour 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.
emailstringNoCustomer's email address.
namestringNoCustomer's full name.
phonestringNoCustomer's phone number.
phone_country_codestringNoPhone country code (e.g., +1).
descriptionstringNoDescription of the customer for internal use.
addressobjectNoCustomer's default address. Used as the default billing address on payments unless overridden. See address.
metadataobjectNoUp to 50 key-value pairs (key max 40 chars, value max 500 chars) for your own bookkeeping.

address

ParameterTypeDescription
line1stringAddress line 1.
line2stringAddress line 2.
citystringCity.
statestringState or province.
zipstringPostal or ZIP code.
countrystringTwo-letter ISO country code (e.g., US).
first_namestringFirst name on the address.
last_namestringLast 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"
}