How Subscription Works
To use our subscription features, you will need to create a payment plan via our API or from your dashboard. Then, subscribe a customer to the plan by specifying the plan ID the first time you charge the customer. We’ll handle subsequent charges when the billing is due.Subscriptions are tied to a customer’s email address and cannot be changed afterwards. This means that if a customer changes their email address on your app, you’ll need to cancel any existing subscription and create a new one with the new email.
If we attempt to charge a customer and it fails three consecutive times, we’ll cancel the user’s subscription.
Creating a Payment Plan
To create a payment plan, you’ll need to specify these details:| Parameter | Meaning |
|---|---|
name | The name of the plan. This will be used on the email reminders we send customers. |
interval | This is the billing interval. Here are the supported values: hourly daily weekly monthly yearly quarterly bi-annually every x y (where x is a number and y is a period, e.g. “every five months”, “every 90 days”, “every one year”) |
amount (optional) | The amount to charge the customer each time. You can set the amount when creating the plan or collecting the first payment or both (see Dynamic amounts). |
currency (optional) | The currency to charge in. The default is “NGN”. |
duration (optional) | How long the subscription should last (in terms of the interval). For example, if the interval is monthly, a duration of 5 will charge the customer once a month for 5 months and then stop. If you don’t specify a duration, we’ll charge the customer indefinitely until they (or you) cancel. |
Adding a Customer to a Subscription
To add a customer to a subscription, specify the payment plan ID when charging the customer for the first time. This works regardless of how you’re charging your customers—Inline, Standard, HTML checkout, or direct card charge.The
currency you specify when charging the customer must be the same as the currency you specified when creating the payment plan.Dynamic Amounts
When you want to charge customers different amounts on the same plan, or charge a different amount for the first month (for example, as a launch promo), you can do this by setting theamount when charging the customer. Here are your options:
- To charge a different amount per customer: Don’t set
amountwhen creating the payment plan. Theamountyou set when charging the customer will be used for that customer’s subscription. - To charge the customer a different amount the first time, and a standard amount for subsequent payments: Specify the standard
amountwhen creating the payment plan, and specify the customamountwhen charging the customer. We’ll charge the customer the custom amount for the first payment, and the standard amount on the plan for subsequent payments.
Cancelling and Activating
Cancelling a subscription can happen in one of three ways:- A customer can cancel their subscription using the cancellation link in our email reminders. You can disable this in the Account Settings page of your dashboard.
- You can cancel an individual customer’s subscription, either from the Payment Plans page on your dashboard or via the cancel subscription endpoint.
- You can cancel an entire payment plan, which will cancel all associated subscriptions. You can also do this from the Payment Plans page on your dashboard or via the cancel payment plan endpoint.