Vatly
Api Reference

Customers

On this page, we'll dive into the different customer endpoints you can use to manage your Vatly customers programmatically.

The Customer API Resource

Below you'll find all properties for the Vatly Customer API resource.

Properties

NameTypeDescription
idstringUnique identifier for the customer (starts with customer_).
resourcestringThe resource type. Always customer.
testmodebooleanWhether this resource is in test mode.
emailstringThe email address for the customer.
namestring | nullThe customer's display / account-holder name. An identity field used for communication (dunning emails, dashboard) — distinct from, and with no effect on, the billing name on invoices.
createdAtstringWhen this customer was created (ISO 8601 format).
metadataobject | nullArbitrary key-value metadata for your application. Up to 50 keys, with key names up to 40 characters and values up to 500 characters.
linksobjectHATEOAS links to related resources. Contains self link.

List all customers

GET /v1/customers

This endpoint allows you to retrieve a paginated list of all your customers. By default, a maximum of ten customers are shown per page.

Optional attributes

NameTypeDescription
limitintegerThe number of customers to return (default: 10, max: 100).
startingAfterstringA cursor for use in pagination. Returns results after this customer ID.
endingBeforestringA cursor for use in pagination. Returns results before this customer ID.
curl -G https://api.vatly.com/v1/customers \
  -H "Authorization: Bearer live_your_api_key_here" \
  -d limit=10

Create a customer

POST /v1/customers

This endpoint allows you to add a new customer to Vatly. To add a customer, you must provide their email address.

Customers are uniquely identified by email within each testmode. Creating a customer with an email that already exists will return a validation error.

Required attributes

NameTypeDescription
emailstringThe email address for the customer. Must be unique within the merchant's account for the given testmode.

Optional attributes

NameTypeDescription
namestringThe customer's display / account-holder name (max 255 characters).
metadataobjectArbitrary key-value metadata for your application.
curl https://api.vatly.com/v1/customers \
  -H "Authorization: Bearer live_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{"email": "customer@example.com", "metadata": {"userId": "user_Qp8kNvBxKw7RjTgYcZaE"}}'

Retrieve a customer

GET /v1/customers/:id

This endpoint allows you to retrieve a customer by providing their Vatly id. Refer to the list at the top of this page to see which properties are included with customer objects.

curl https://api.vatly.com/v1/customers/customer_7kBmRtPvXw2NjLhYcZaE \
  -H "Authorization: Bearer live_your_api_key_here"

Update a customer

PATCH /v1/customers/:id

Updates a customer's identity fields. Only name and email may be changed here, and both are optional — send whichever you want to update.

Billing-address details (company name, tax ID, street, city, country, etc.) are not supported by this endpoint and are ignored. Amend those through the hosted billing-update flow, which validates tax-relevant data centrally so invoices stay accurate.

Optional attributes

NameTypeDescription
namestring | nullThe customer's display / account-holder name (max 255 characters).
emailstringThe customer's email address. Must be unique within the merchant's account for the given testmode.
curl -X PATCH https://api.vatly.com/v1/customers/customer_7kBmRtPvXw2NjLhYcZaE \
  -H "Authorization: Bearer live_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{"name": "John Doe", "email": "new.email@example.com"}'
Copyright © 2026