Subscriptions
Subscriptions let you set up recurring billing. You define a plan with an amount and interval, then customers subscribe to it. ZendFi automatically creates payments when they are due and sends webhook events so you can track the lifecycle.Subscription Plans
Create a Subscription Plan
Plan name shown to customers.
Plan description.
Recurring amount per billing cycle.
Currency code.
Billing interval:
daily, weekly, monthly, yearly.Number of intervals between billings. For example,
billing_interval: "monthly" with interval_count: 3 bills quarterly.Number of trial days before the first billing.
Maximum number of billing cycles. Omit for unlimited.
Arbitrary key-value pairs.
Example
Response
List Subscription Plans
Get a Subscription Plan
Customer Subscriptions
Create a Subscription
The subscription plan ID (UUID).
Customer’s Solana wallet address.
Customer email for notifications and receipts.
Arbitrary key-value pairs.
Example
Get a Subscription
Cancel a Subscription
Pay a Subscription
Subscription Lifecycle
| Status | Description |
|---|---|
active | Subscription is active and billing normally |
trialing | Subscription is in its trial period |
past_due | Most recent payment failed, retrying |
paused | Temporarily paused |
cancelled | Subscription has been cancelled |
expired | Subscription has expired |
Webhook Events
| Event | When |
|---|---|
SubscriptionCreated | New subscription created |
SubscriptionRenewed | Subscription renewed for next billing period |
SubscriptionCancelled | Subscription cancelled |
SubscriptionPaymentFailed | Recurring payment attempt failed |