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

Manage Subscribers

List active subscribers, and control their subscriptions with pause, resume, cancel, and retry actions.

List subscribers

Retrieve all subscriptions with optional filters for status and plan.

GET/subscriptions

List all subscriptions for your merchant account.

Query parameters

NameTypeRequiredDescription
plan_idstringoptionalFilter by plan ID.
statusstringoptionalFilter by status: trialing, active, past_due, paused, canceled.
customer_idstringoptionalFilter by customer ID.
pageintegeroptionalPage number. Default: 1.
per_pageintegeroptionalResults per page (max 100). Default: 20.
curl https://wallet.e-mazad.store/api/v1/subscriptions?status=active \
  -H "Authorization: Bearer sk_sandbox_..."

Pause a subscription

Temporarily stop billing. The subscriber retains their enrollment but will not be charged until resumed.

POST/subscriptions/{id}/pause

Pause an active subscription. No charges will occur until resumed.

curl -X POST https://wallet.e-mazad.store/api/v1/subscriptions/sub_001/pause \
  -H "Authorization: Bearer sk_sandbox_..."

Pause limitations

Only subscriptions in active status can be paused. Attempting to pause a past_due or canceled subscription will return a 422 error.

Resume a subscription

Reactivate a paused subscription. The next billing date is recalculated from the resume date.

POST/subscriptions/{id}/resume

Resume a paused subscription and restart the billing cycle.

curl -X POST https://wallet.e-mazad.store/api/v1/subscriptions/sub_001/resume \
  -H "Authorization: Bearer sk_sandbox_..."

Cancel a subscription

Permanently end a subscription. This action cannot be undone. The subscriber will not be charged again.

POST/subscriptions/{id}/cancel

Cancel a subscription permanently. No further charges will occur.

Request body

NameTypeRequiredDescription
reasonstringoptionalOptional cancellation reason for your records.
cancel_at_period_endbooleanoptionalIf true, cancel at end of current cycle instead of immediately. Default: false.
curl -X POST https://wallet.e-mazad.store/api/v1/subscriptions/sub_001/cancel \
  -H "Authorization: Bearer sk_sandbox_..." \
  -H "Content-Type: application/json" \
  -d '{
    "reason": "Customer requested cancellation",
    "cancel_at_period_end": true
  }'

Immediate vs end-of-period cancellation

With cancel_at_period_end: false (default), the subscription is canceled immediately and access should be revoked. With true, the subscriber retains access until the current billing period ends.

Retry a failed payment

Manually trigger a payment retry for a subscription in past_due status, outside of the automatic retry schedule.

POST/subscriptions/{id}/retry

Manually retry a failed subscription payment.

curl -X POST https://wallet.e-mazad.store/api/v1/subscriptions/sub_001/retry \
  -H "Authorization: Bearer sk_sandbox_..."