A customer represents the person or account that owns payment history, invoices, subscriptions, and reusable payment methods. Keep your internal account ID in metadata and use the Zahlo customer ID as the foreign key in payment resources.

Create a customer

Use an idempotency key derived from your own account creation operation. Do not use email as the only identifier; customers can change it and one customer may own multiple orders or subscriptions.

Use customer context

Pass customerId when creating a payment intent, checkout session, subscription, or portal session. Retrieve the customer on the server before changing billing state and verify ownership in your application.

Privacy and deletion

Collect only fields needed for the stated payment or billing flow. Keep personal data out of metadata and logs. When an account is deleted, remove your local references according to your retention policy and revoke active portal or client sessions.