Customers
Create and manage the customer records that vaulted cards, invoices, and recurring plans attach to
A customer is the record for a person or business you take payments from. Saved cards and bank accounts, invoices, recurring plans, and payment history all attach to it. Create the customer once, keep its id, and pass that id wherever a feature asks for a customer.
Common use cases
- Save a card or bank account for a returning customer
- Send an invoice or start a recurring plan for a customer
- Look up a customer's details, addresses, and payment history
- Keep your own reference data on the record with a customer number, notes, or custom fields
Where customers are used
| Feature | What it needs from the customer |
|---|---|
| Card Vaulting | The customer id, to store a card as a Customer Card Account. |
| Invoicing | The customer id, sent as customer.id on the invoice. |
| Recurring Billing | The customerId on the subscription, plus a vaulted card. |
| Recurring Payments | The customerId on an auto-charging subscription. |
| Payment Links | Nothing up front. Paying through a link creates a customer record you can re-bill later. |
Create your first customer
Call POST /checkout/v3/customer with your merchantId and the customer's details. The address is optional, but if you send one it must be complete. See Address rules.
POST /checkout/v3/customer
Content-Type: application/json
x-api-key: YOUR_API_KEY
{
"merchantId": "1000157980",
"customerType": "Person",
"isTaxExempt": false,
"activeStatus": true,
"spendProfileOverride": false,
"address1": "2001 Westside Pkwy",
"city": "Alpharetta",
"state": "GA",
"zip": "30004",
"addressName": "Home",
"email": "[email protected]",
"mobile": "4049874985",
"firstName": "John",
"lastName": "Dokes",
"name": "John Dokes"
}A successful call returns 201 Created with the new customer. Store the id; it's the value every other customer call and feature uses.
{
"id": 10000001518666,
"created": "2025-11-04T14:40:51.337Z",
"email": "[email protected]",
"addressName": "Home",
"address1": "2001 Westside Pkwy",
"city": "Alpharetta",
"state": "GA",
"zip": "30004",
"customerType": "Person",
"hasPayments": false,
"hasContracts": false,
"hasInvoices": false,
"activeStatus": true
}Address rules
When you create or update a customer, the address fields work as one group: send either no address fields, or a complete address.
- A complete address is
address1,city,state, andzip. address2is optional within a complete address. Sendingaddress2on its own still counts as starting an address, so the other four become required.addressNameis a label (for example,Home) and does not count as an address field.- Updating a saved address with
PUT /checkout/v3/customeraddressisn't checked this way. See Scenario 2.
| Your request includes | Result |
|---|---|
| No address fields | 201 Created |
address1, city, state, and zip, with or without address2 | 201 Created |
Only some of them (for example, zip alone) | 400 ValidationError listing the missing fields |
address2 alone | 400 ValidationError listing address1, city, state, and zip |
If you don't have the full address yet, leave all address fields out and add the address later. A request that sends zip without the rest of the address returns:
{
"errorCode": "ValidationError",
"message": "Validation error happened",
"details": [
"address1 is required",
"city is required",
"state is required"
],
"responseCode": "e1gED16EcqbyJaNncsLYMyA"
}To fix it, either remove zip or send the missing fields named in details.
Scenarios
Scenario 1: Create a customer without an address
(You have a name and contact details, but no full address yet)
Leave every address field out. See Address rules for why a partial address fails.
POST /checkout/v3/customer
Content-Type: application/json
x-api-key: YOUR_API_KEY
{
"merchantId": "1000157980",
"customerType": "Person",
"email": "[email protected]",
"mobile": "4049874985",
"firstName": "John",
"lastName": "Dokes",
"name": "John Dokes"
}Scenario 2: Add a billing or shipping address
(Store more than one address on a customer)
Call POST /checkout/v3/customeraddress with the customer id as the id query parameter. Use name to label the address and isDefault to mark the default.
POST /checkout/v3/customeraddress?id={customerId}
Content-Type: application/json
x-api-key: YOUR_API_KEY
{
"name": "Billing",
"address1": "123 Main St",
"address2": "Suite 100",
"city": "Atlanta",
"state": "GA",
"zip": "30301",
"country": "US",
"isDefault": true
}List a customer's addresses with GET /checkout/v3/customeraddress/{customerId}. Change one with PUT /checkout/v3/customeraddress, passing the customer id and the address subId as query parameters. An update accepts a partial address, but send a complete one: an address with only address2 is saved but doesn't display in the merchant portal.
Scenario 3: Update a customer's details
(The customer changes their email, phone, or tax status)
Call PUT /checkout/v3/customer/{customerId} with your merchantId and the fields you're changing. To mark a customer tax exempt, set isTaxExempt to true and send their taxId. If your update includes any address field, send the complete address (address1, city, state, zip). A partial address returns the same 400 shown in Address rules.
PUT /checkout/v3/customer/{customerId}
Content-Type: application/json
x-api-key: YOUR_API_KEY
{
"merchantId": 1000157980,
"isTaxExempt": true,
"taxId": "123456789"
}Scenario 4: Save a card or bank account for the customer
(Charge the customer again without re-collecting payment details)
Stored payment methods always belong to a customer.
- Card: vault it during a sale or from an existing payment. See Card Vaulting.
- Bank account: add it with
POST/checkout/v3/customerbankaccount/{id}.
List a customer's saved cards with GET /checkout/v3/customercardaccount/{customerId}.
Scenario 5: Find a customer and their payment history
(Look up a returning customer or reconcile what they've paid)
- Search:
GET/checkout/v3/customer with yourmerchantId. Usefilterto search by name, customer number, email, city, state, or zip. - Get one customer:
GET/checkout/v3/customer/{id}. - Payment history:
GET/checkout/v3/customerpayment with the customeridand yourmerchantId.
Scenario 6: Keep your own data on the customer
(Store references from your system alongside the record)
- Customer number: send your own identifier in
numberwhen you create or update the customer. - Notes: add a note with
POST/checkout/v3/customernote and read them back withGET/checkout/v3/customernote. - Custom fields: define a field once for your merchant with
POST/checkout/v3/field, then set its value on each customer incustomFields. Read a customer's custom fields withGET/checkout/v3/customer/field.
Request reference
Fields for POST /checkout/v3/customer. The full schema is in the API Reference.
| Field | Required | Description |
|---|---|---|
merchantId | Recommended | Your merchant ID. If your API key has access to more than one merchant, always send it; otherwise the customer is assigned to a default merchant. |
customerType | Optional | Person or Business. |
name | Optional | The customer's full display name. |
firstName | Optional | The customer's first name. |
lastName | Optional | The customer's last name. |
number | Optional | Your own customer number. |
email | Optional | The customer's email address. |
mobile | Optional | The customer's mobile number. |
phone | Optional | The customer's home phone number. |
addressName | Optional | A label for the address, for example Home. Not part of the address group. |
address1 | Conditional | Street address. Required if any other address field is sent. |
address2 | Optional | Apartment, suite, or department. Sending it makes address1, city, state, and zip required. |
city | Conditional | City. Required if any other address field is sent. |
state | Conditional | State. Required if any other address field is sent. |
zip | Conditional | ZIP code. Required if any other address field is sent. |
isTaxExempt | Optional | Whether the customer is exempt from tax. |
taxId | Conditional | The customer's SSN or EIN (9 digits). Required for tax-exempt customers. |
activeStatus | Optional | Whether the customer is active. |
customFields | Optional | Values for custom fields you've already defined. |
For other customer validation messages, see API Error Handling.
Best practices
| Practice | Description |
|---|---|
Create once, reuse the id | Look up an existing customer before creating a new one, so a returning customer doesn't end up with duplicate records and split payment history. |
| Use your own customer number | Set number to your system's identifier, so you can match records in both systems and search by it with filter. |
Next steps
See also
- Card Vaulting: store a card against a customer
- Invoicing: send the customer an invoice
- Recurring Billing: bill the customer on a schedule
- Payment Links: get paid by link and re-bill the customer later
- API Error Handling: validation messages for customer requests
Updated 3 days ago