Create a customer
Use customer context
PasscustomerId 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.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Create and manage merchant-owned customer records.
const response = await fetch("https://merchant.zahlo.eu/api/v1/customers", {
method: "POST",
headers: {
"Content-Type": "application/json",
"x-api-key": process.env.ZAHLO_API_KEY,
"Idempotency-Key": "customer-account-1001",
},
body: JSON.stringify({
email: "buyer@example.com",
name: "Example Buyer",
metadata: { accountId: "account_1001" },
}),
});
const customer = await response.json();
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.