Create and manage recurring pricing tiers, duration cycles, features, and payment gateway plan synchronization.
The Plans API enables you to define SaaS pricing tiers, membership levels, recurring billing cycles, and sync them automatically with downstream payment providers like Stripe and Razorpay.
Retrieve all active subscription plans configured for your account. This endpoint can be queried directly from your frontend pricing page.
https://payapi.zezo.in/api/v1/plans| Parameter | Type | Required | Description |
|---|---|---|---|
x-public-key | string | Required | Your Public Key. |
Content-Type | string | Required | Payload encoding format. Default: application/json |
curl -X GET "https://payapi.zezo.in/api/v1/plans" \
-H "x-public-key: zp_pub_xxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json"[
{
"id": "66d3a12b4e89",
"name": "Pro Monthly",
"description": "Unlimited access to all premium features with priority support.",
"price": 2999,
"currency": "INR",
"duration_days": 30,
"duration_label": "Monthly",
"features": [
"Unlimited API access",
"Priority 24/7 support",
"Custom webhooks",
"Advanced analytics"
],
"is_popular": true,
"in_app_purchase": {
"enabled": true,
"android_sku_id": "com.zezo.pro.monthly",
"ios_sku_id": "com.zezo.pro.monthly"
}
}
]Create a new recurring subscription plan.
https://payapi.zezo.in/api/v1/plans/manage| Parameter | Type | Required | Description |
|---|---|---|---|
x-public-key | string | Required | Your Public Key. |
x-secret-key | string | Required | Your Secret Key. |
Content-Type | string | Required | Payload encoding format. Default: application/json |
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | Required | Display name of the plan (e.g. `Pro Plan`). |
description | string | Optional | Detailed description of features and entitlements. |
price | number | Required | Plan price in major units. |
currency | string | Optional | ISO 3-letter currency code. Default: INR |
duration_days | number | Required | Duration period in days (e.g. 30 for monthly, 365 for yearly). |
duration_label | string | Required | Display label for interval (e.g. `Monthly`, `Yearly`). |
features | array<string> | Optional | Array of feature string highlights. |
is_popular | boolean | Optional | Highlight this plan as featured or popular. Default: false |
status | string | Optional | Plan visibility: `public`, `private`, `draft`, `archived`. Default: public |
import axios from "axios";
const response = await axios.post(
"https://payapi.zezo.in/api/v1/plans/manage",
{
name: "Pro Monthly",
description: "Full access to all features",
price: 2999,
currency: "INR",
duration_days: 30,
duration_label: "Monthly",
features: ["Unlimited API Calls", "24/7 Support"],
is_popular: true,
status: "public",
},
{
headers: {
"x-public-key": process.env.ZEZOPAY_PUBLIC_KEY,
"x-secret-key": process.env.ZEZOPAY_SECRET_KEY,
"Content-Type": "application/json",
},
}
);
console.log("Plan created:", response.data);{
"message": "Plan created successfully",
"id": "66d3a12b4e89"
}Register and link your local plan IDs directly with Stripe or Razorpay recurring plans.
https://payapi.zezo.in/api/v1/plans/manage/sync{
"message": "Plans synchronized successfully with payment gateways"
}