Sandbox mode — Use https://wallet.e-mazad.store/api/v1 as your base URL
SubscriptionsPlans

Subscription Plans

Plans define the pricing, billing interval, and rules for your subscriptions. Create plans once and enroll as many subscribers as you need.

Create a plan

Define a new subscription plan with a name, amount, currency, and billing interval.

POST/subscriptions/plans

Create a new subscription plan.

Request body

NameTypeRequiredDescription
namestringrequiredDisplay name of the plan (e.g., "Pro Monthly").
amountintegerrequiredCharge amount in smallest currency unit (e.g., fils for IQD).
currencystringrequiredISO 4217 currency code. Supported: IQD, USD, EUR, GBP, AED, TRY.
intervalstringrequiredBilling interval: "daily", "weekly", "monthly", or "yearly".
trial_daysintegeroptionalNumber of free trial days before the first charge. Default: 0.
max_cyclesintegeroptionalMaximum billing cycles before auto-cancel. Null for unlimited.
grace_period_daysintegeroptionalDays to retry failed payments before canceling. Default: 7.
curl -X POST https://wallet.e-mazad.store/api/v1/subscriptions/plans \
  -H "Authorization: Bearer sk_sandbox_..." \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Pro Monthly",
    "amount": 15000,
    "currency": "IQD",
    "interval": "monthly",
    "trial_days": 14,
    "max_cycles": null,
    "grace_period_days": 7
  }'

Immutable pricing

Once a plan is created, the amount and currency cannot be changed. To update pricing, create a new plan and migrate subscribers.

List plans

Retrieve all subscription plans for your merchant account with optional filtering.

GET/subscriptions/plans

List all subscription plans. Supports pagination and filtering by status.

Query parameters

NameTypeRequiredDescription
statusstringoptionalFilter by plan status: "active" or "archived". Default: all.
pageintegeroptionalPage number for pagination. Default: 1.
per_pageintegeroptionalResults per page (max 100). Default: 20.
curl https://wallet.e-mazad.store/api/v1/subscriptions/plans?status=active \
  -H "Authorization: Bearer sk_sandbox_..."

Supported intervals

Choose the billing frequency that fits your business model.

IntervalBilling cycleExample use case
dailyEvery 24 hoursDaily access passes
weeklyEvery 7 daysWeekly deliveries or memberships
monthlySame day each monthSaaS subscriptions, gym memberships
yearlySame date each yearAnnual licenses, premium tiers

Monthly billing on the 31st

If a subscription starts on the 31st, months with fewer days will bill on the last available day (e.g., February 28th). The original anchor date is preserved for months that have 31 days.