API
Integrate Payzo directly: manage customers, subscriptions, plans, checkouts and discount codes from your own systems. Generate a key from Settings, API in your dashboard.
Integrate with AI
Overview
The Payzo API is a REST API. It accepts and returns JSON, uses standard HTTP response codes, and is served over HTTPS from:
https://payzo.cc/api/v1Every list, create, and update endpoint below is scoped to your organization automatically based on the API key you authenticate with, you never pass an organization id yourself.
Authentication
Pass your API key as a bearer token in the Authorization header on every request. Keys start with pz_ and are shown in full only once, at creation time, store it somewhere safe (a secrets manager, environment variable), not in client-side code.
curl https://payzo.cc/api/v1/customers \
-H "Authorization: Bearer pz_your_api_key"A missing or invalid key returns 401. Each key can make 120 requests per minute, after that you get a 429 until the minute is over. A key can also be limited to certain permissions, see Key permissions.
Errors & pagination
Errors are returned as JSON with an error field, and validation failures also include a details field:
{
"error": "Invalid input",
"details": { "fieldErrors": { "email": ["Invalid email"] } }
}Every list endpoint accepts limit (default 20, max 100) and offset query params, and returns them back alongside data:
{ "data": [ ... ], "limit": 20, "offset": 0 }Customers
A customer belongs to one of your connected merchant accounts. Creating one here records it in Payzo, it doesn't create anything on your processor.
List customers. Filter with ?email=... or ?accountId=...
Response
{
"data": [
{
"id": "cst_123",
"accountId": "acc_456",
"email": "jane@example.com",
"name": "Jane Doe",
"metadata": {},
"createdAt": "2026-08-01T12:00:00.000Z",
"updatedAt": "2026-08-01T12:00:00.000Z"
}
],
"limit": 20,
"offset": 0
}Create a customer under one of your merchant accounts.
Request body
{
"accountId": "acc_456",
"email": "jane@example.com",
"name": "Jane Doe",
"metadata": { "externalId": "usr_1" }
}Response
{ "data": { "id": "cst_123", "accountId": "acc_456", "email": "jane@example.com", "name": "Jane Doe", "metadata": { "externalId": "usr_1" }, "createdAt": "...", "updatedAt": "..." } }Retrieve a single customer.
Response
{ "data": { "id": "cst_123", "...": "..." } }Update a customer's email, name, or metadata.
Request body
{ "name": "Jane A. Doe" }Response
{ "data": { "id": "cst_123", "name": "Jane A. Doe", "...": "..." } }Subscriptions
Creating or updating a subscription through this API only records/updates the subscription, it never charges a card. Real charges only happen through a Payzo checkout, where the card is tokenized in the customer's browser.
List subscriptions. Filter with ?customerId=... or ?status=...
Response
{
"data": [
{
"id": "sub_123",
"accountId": "acc_456",
"customerId": "cst_123",
"priceId": "prc_789",
"status": "active",
"currency": "usd",
"unitAmount": 2900,
"interval": "month",
"intervalCount": 1,
"currentPeriodStart": null,
"currentPeriodEnd": null,
"cancelAtPeriodEnd": false,
"createdAt": "...",
"updatedAt": "..."
}
],
"limit": 20,
"offset": 0
}Record a subscription for an existing customer and plan.
Request body
{
"customerId": "cst_123",
"priceId": "prc_789",
"status": "active"
}Response
{ "data": { "id": "sub_123", "status": "active", "...": "..." } }Retrieve a single subscription.
Response
{ "data": { "id": "sub_123", "...": "..." } }Update status, cancellation flag/reason, e.g. cancel a subscription.
Request body
{ "status": "canceled", "cancellationReason": "Customer requested" }Response
{ "data": { "id": "sub_123", "status": "canceled", "...": "..." } }Plans
A plan is a price attached to a product under one of your merchant accounts.
List plans. Filter with ?accountId=... or ?active=true|false
Response
{
"data": [
{
"id": "prc_789",
"accountId": "acc_456",
"productId": "prd_111",
"productName": "Pro Membership",
"unitAmount": 2900,
"currency": "usd",
"interval": "month",
"intervalCount": 1,
"active": true,
"createdAt": "...",
"updatedAt": "..."
}
],
"limit": 20,
"offset": 0
}Create a new plan (and its underlying product) on one of your merchant accounts. Send interval: null for a one-time plan that is charged once and never rebilled. Leaving interval out defaults to monthly.
Request body
{
"accountId": "acc_456",
"name": "Pro Membership",
"unitAmount": 2900,
"currency": "usd",
"interval": "month",
"intervalCount": 1
}Response
{ "data": { "id": "prc_789", "productName": "Pro Membership", "...": "..." } }Retrieve a single plan.
Response
{ "data": { "id": "prc_789", "...": "..." } }Update a plan's active state or price.
Request body
{ "active": false }Response
{ "data": { "id": "prc_789", "active": false, "...": "..." } }Checkouts
A checkout is a hosted page your customers use to subscribe to a plan.
List checkouts.
Response
{
"data": [
{
"id": "cko_123",
"accountId": "acc_456",
"priceId": "prc_789",
"name": "Pro Membership Checkout",
"slug": "pro-membership",
"url": "https://payzo.cc/checkout/pro-membership",
"enabled": true,
"storeName": "Acme Inc",
"logoUrl": null,
"accentColor": "#f4552b",
"createdAt": "...",
"updatedAt": "..."
}
],
"limit": 20,
"offset": 0
}Create a new checkout page for an existing plan.
Request body
{
"priceId": "prc_789",
"name": "Pro Membership Checkout",
"slug": "pro-membership",
"storeName": "Acme Inc",
"accentColor": "#f4552b"
}Response
{ "data": { "id": "cko_123", "url": "https://payzo.cc/checkout/pro-membership", "...": "..." } }Retrieve a single checkout.
Response
{ "data": { "id": "cko_123", "...": "..." } }Update a checkout's name, enabled state, or branding.
Request body
{ "enabled": false }Response
{ "data": { "id": "cko_123", "enabled": false, "...": "..." } }Discounts
Discount codes customers enter at a Payzo checkout. Amounts are in the smallest currency unit, so 1000 is 10.00.
List discount codes. Filter with ?active=true|false
Response
{
"data": [
{
"id": "dsc_123",
"code": "SPRING25",
"percentOff": 25,
"amountOff": null,
"currency": null,
"duration": "once",
"maxRedemptions": 100,
"redeemedCount": 12,
"expiresAt": "2026-12-31T23:59:59.000Z",
"active": true,
"createdAt": "...",
"updatedAt": "..."
}
],
"limit": 20,
"offset": 0
}Create a code. Send either percentOff (1 to 100) or amountOff with a currency. duration is once for the first payment or forever for every payment. Codes are stored in capitals and are not case sensitive for customers.
Request body
{
"code": "SPRING25",
"percentOff": 25,
"duration": "once",
"maxRedemptions": 100,
"expiresAt": "2026-12-31T23:59:59.000Z"
}Response
{ "data": { "id": "dsc_123", "code": "SPRING25", "percentOff": 25, "...": "..." } }Retrieve a single discount code.
Response
{ "data": { "id": "dsc_123", "...": "..." } }Switch a code on or off, or change its maximum uses or expiry. The amount and duration cannot be changed, create a new code instead.
Request body
{ "active": false }Response
{ "data": { "id": "dsc_123", "active": false, "...": "..." } }Delete a code. Customers can no longer use it.
Response
{ "data": { "id": "dsc_123", "deleted": true } }Codes work on checkouts that charge through Stripe, which includes the Payzo Gateway. A code is counted as used once the payment goes through, and for a crypto payment once it is confirmed on the blockchain. Orders that come from a Shopify, WooCommerce or Shoppex store use the store's own total, so codes do not apply to them.
Key permissions
A key with no permissions selected can do everything. Select permissions to limit it.
read_checkouts write_checkouts
read_customers write_customers
read_discounts write_discounts
read_plans write_plans
read_subscriptions write_subscriptionsA request outside the key's permissions returns 403 with a message that names the missing permission.
Rebill and the gateway
Payzo has three levels: your own processor accounts, the Payzo Gateway, and the Payzo Gateway with rebill. The Payzo Gateway adds Payzo's MIDs next to your own accounts. Rebill adds bulk and single rebills, failed subscription recovery, retry strategies and the secure card vault. This API manages the same plans, checkouts, customers and subscriptions in every level. Cards entered at a checkout are collected with Stripe's own form, or with the card vault when your organization has rebill.
Creating a subscription here only records it, it never charges a card. A card is only charged through a Payzo checkout, where the customer enters it.