Create a product and price
zahlo call above represents your server-side API wrapper. It must send x-api-key, a timeout, and an idempotency key for creates.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Build one-time and recurring prices from reusable catalog records.
const product = await zahlo.post("/api/v1/products", {
name: "Team plan",
description: "Access for one team",
metadata: { sku: "team-plan" },
});
const price = await zahlo.post("/api/v1/prices", {
productId: product.id,
amountMinor: 1900,
currency: "EUR",
recurring: { interval: "month", intervalCount: 1 },
});
zahlo call above represents your server-side API wrapper. It must send x-api-key, a timeout, and an idempotency key for creates.
{
"mode": "hosted",
"lineItems": [
{ "priceId": "price_demo_1001", "quantity": 2 }
],
"amountMinor": 3800,
"currency": "EUR",
"metadata": { "orderId": "order_1001" }
}