Create subscriptions with complete flexibility to meet your business needs.
It is mandatory to refer to a customer and a plan while creating a new subscription. To know more about customer, please refer to this section.
Subscription Creation via API
- Create a subscription via Create Subscription API.
$ curl -u access_id:secret_key \ https://payabbhi.com/api/v1/subscriptions \ -d plan_id=plan_tuOWN0Sc0uMB4s8E \ -d customer_id=cust_2WmsQoSRZMWWkcZg \ -d billing_cycle_count=5
You may set your preference for collecting payments during subscription creation.
If you want Payabbhi to take care of recurring payment collection from your customer, you need to set the
billing_method=recurringwhile creating subscription via API.
If you set the
billing_method=manualthen your customer has to pay the recurring invoices via integrated Payabbhi payment gateway.
Subscription Creation via Merchant Portal
Go to Portal > Subscription > New Subscription and follow the steps as mentioned below:
- Select a customer for the Subscription.
- Select a product for the Subscription. Products with associated pricing plans will be only available in the dropdown.
- Enter no. of billing cycle to indicate the duration of the billing period.
- Click on Save.
If you create a subscription via Merchant portal, then
billing_methodis always set to
manual. So your customer has to pay the recurring invoices via integrated Payabbhi payment gateway.
You may also set the number of days in the
Due By Daysfield, by which each recurring invoice should be paid by the customer.
The newly created subscription status is automatically set to Active.
Subscription with seat-based billing model
If you want to support the seat-based or user based billing model, then you need to pass the number of seats/users as quantity while creating a subscription via API or Merchant Portal.
$ curl -u access_id:secret_key \ https://payabbhi.com/api/v1/subscriptions \ -d plan_id=plan_tuOWN0Sc0uMB4s8E \ -d customer_id=cust_2WmsQoSRZMWWkcZg \ -d billing_cycle_count=5\ -d quantity=3
For example, if your plan is 100 INR/user/year and your customer wants to subscribe this for 10 users, then you should pass 10 as the quantity. So your customer would be charged 1000 INR on monthly basis.
Subscription with trial period
If you want to offer your subscription with a trial period, it can be easily enabled in Payabbhi for your convenience.
- Pass in the
trial_durationparameter while creating subscription via API.
$ curl -u access_id:secret_key \ https://payabbhi.com/api/v1/subscriptions \ -d plan_id=plan_Pk4ibW5Ev6cz0JfM \ -d customer_id=cust_kV8Zw0ZeiWocmrNG \ -d billing_cycle_count=4 \ -d trial_duration=2 \
TRIAL PERIOD (in days)while creating subscription via Merchant Portal.
The status of the newly created subscription is automatically set to In Trial.
No invoice would be generated for subscriptions in trial period.
The status of the subscription is automatically set to Active after the trial end date and the billing is automatically started for the active subscription.
Subscription with Upfront charges or Set up Fees
- If you want to include any upfront charge or set up fees while activating a subscription, you need to first create the upfront charge as an Invoice Item via API/Merchant Portal .
curl -u access_id:secret_key \ https://payabbhi.com/api/v1/invoiceitems \ -d customer_id=cust_kV8Zw0ZeiWocmrNG \ -d name="Upfront Charges" \ -d amount=1000 \ -d currency=INR
- The upfront charge / set up fees can be included as
upfront_itemswhile creating subscriptions via API.
curl -u access_id:secret_key \ https://payabbhi.com/api/v1/subscriptions \ -d plan_id=plan_Pk4ibW5Ev6cz0JfM \ -d customer_id=cust_kV8Zw0ZeiWocmrNG \ -d billing_cycle_count=5 \ -d customer_notification_by=platform \ -d upfront_items[id]=item_moQ51Hu6IHDjmAcj \ -d due_by_days=2
- This feature is currently supported via APIs.
Payabbhi allows you to manage your subscriptions easily on the go. Just access your account either programmatically via API or via Portal > Subscriptions.
Subscription Search and Filter
Subscription search and filter operations are available via Portal > Subscriptions as well as via API.
Business Benefit: This may help you in answering customer queries or getting business insights.
You may search subscriptions by
Subscription ID or
Plan ID or
You may filter subscriptions based on a particular criterion and view them together. A filter criterion can be formed on basis of the following business parameters.
- Billing Method
- Creation timestamp
As soon as you create a subscription or when you select a subscription, you’ll be able to see the subscription details screen. Subscription details screen displays an overview of the subscription with available actions.
You may check the recurring invoices generated for this subscription in this section.
Cancellation of a subscription can be initiated either programmatically via
Subscription Cancellation API or via Portal > Subscriptions.
Subscription Cancellation via API
Cancel a subscription via Cancel Subscription API.
$ curl -u access_id:secret_key -X POST \ https://payabbhi.com/api/v1/subscriptions/sub_luQ4QIXzaEIN0g5D/cancel
By default, the cancellation takes effect immediately and the subscription status is automatically set to Cancelled.
But, if you want to cancel the subscription at the end of the current billing cycle, you may pass
at_billing_cycle_end = true.
$ curl -u access_id:secret_key -X POST \ https://payabbhi.com/api/v1/subscriptions/sub_luQ4QIXzaEIN0g5D/cancel -d at_billing_cycle_end=true \
Subscription Cancellation via Merchant Portal
- Go to Portal > Subscriptions.
- Search subscriptions by any search criteria.
- Click on Cancel button for the subscription, which you would like to cancel.
- You may select the option for cancellation at the end of the billing cycle.
Please note that a subscription can not be cancelled when a subscription is in
If a subscription is in trial, then it is always cancelled immediately.
If the subscription is cancelled in
on_holdstate, all unpaid invoices for that subscription is automatically voided. This ensures that no automatic payment attempt of the invoice is made by Payabbhi.
If you want to charge your customers for any invoice item included as part the void invoice, you need to issue a new invoice and include the unpaid items as part of a new invoice.
This is the end state of the subscription. Once a subscription is cancelled, no further invoices are generated for that subscription.
If you want to reactivate the cancelled subscription, you have to create a new subscription with the same set of information of the cancelled subscription.
Customer Communication Management
Payabbhi allows you to have deeper control on customer communication throughout the customer lifecycle.
You may configure the customer communication via
customer_notification_by flag in the Create Subscription API.
This flag indicates who is responsible for sending notifications to the customers for important subscription life cycle events.
The value can be set as either
platform. The default value is
$ curl -u access_id:secret_key \ https://payabbhi.com/api/v1/subscriptions \ -d plan_id=plan_tuOWN0Sc0uMB4s8E \ -d customer_id=cust_2WmsQoSRZMWWkcZg \ -d billing_cycle_count=5 -d customer_notification_by=`platform`
If it is set as
platform, customers are notified via email on the following important lifecycle events:
- Creation of a new subscription.
- On cancellation of an active subscription.
- On completion of a subscription.
- When an offer for the trial period is going to end soon.
- When a recurring payment attempt for a billing period has been failed.
- When the payment attempt for a billing period is being retried by the platform.
- When a subscription is put on hold due to non payment of billing charges.
What's on this Page
- Subscription Creation
- Subscription Management
- Subscription Cancellation
- Customer Communication Management