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

FeatureWhat it needs from the customer
Card VaultingThe customer id, to store a card as a Customer Card Account.
InvoicingThe customer id, sent as customer.id on the invoice.
Recurring BillingThe customerId on the subscription, plus a vaulted card.
Recurring PaymentsThe customerId on an auto-charging subscription.
Payment LinksNothing 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, and zip.
  • address2 is optional within a complete address. Sending address2 on its own still counts as starting an address, so the other four become required.
  • addressName is a label (for example, Home) and does not count as an address field.
  • Updating a saved address with PUT /checkout/v3/customeraddress isn't checked this way. See Scenario 2.
Your request includesResult
No address fields201 Created
address1, city, state, and zip, with or without address2201 Created
Only some of them (for example, zip alone)400 ValidationError listing the missing fields
address2 alone400 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.

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)

Scenario 6: Keep your own data on the customer

(Store references from your system alongside the record)


Request reference

Fields for POST /checkout/v3/customer. The full schema is in the API Reference.

FieldRequiredDescription
merchantIdRecommendedYour 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.
customerTypeOptionalPerson or Business.
nameOptionalThe customer's full display name.
firstNameOptionalThe customer's first name.
lastNameOptionalThe customer's last name.
numberOptionalYour own customer number.
emailOptionalThe customer's email address.
mobileOptionalThe customer's mobile number.
phoneOptionalThe customer's home phone number.
addressNameOptionalA label for the address, for example Home. Not part of the address group.
address1ConditionalStreet address. Required if any other address field is sent.
address2OptionalApartment, suite, or department. Sending it makes address1, city, state, and zip required.
cityConditionalCity. Required if any other address field is sent.
stateConditionalState. Required if any other address field is sent.
zipConditionalZIP code. Required if any other address field is sent.
isTaxExemptOptionalWhether the customer is exempt from tax.
taxIdConditionalThe customer's SSN or EIN (9 digits). Required for tax-exempt customers.
activeStatusOptionalWhether the customer is active.
customFieldsOptionalValues for custom fields you've already defined.

For other customer validation messages, see API Error Handling.


Best practices

PracticeDescription
Create once, reuse the idLook 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 numberSet number to your system's identifier, so you can match records in both systems and search by it with filter.

Next steps

See also



Did this page help you?