Pricing Plans

Pricing Plan Creation

In Payabbhi, you can create a pricing plan via Merchant Portal or Create Plan API both.

Pricing Plan Creation via API

Pricing Plans have the following parameters:

  • product_id : The identifier of the product against which plan was created.
  • amount : The amount charged to the customer for every billing cycle of the subscription.
  • currency : Three-letter ISO currency code. Currently only INR is supported.
  • frequency : Frequency of billing cycle.
  • interval : Interval at which the subscription would be billed. This can be day(s), week(s), month(s) or year(s).

Create a plan via Create Plan API.

$ curl -u access_id:secret_key \
  https://payabbhi.com/api/v1/plans \
  -d product_id=prod_wJ6DyX5Bgg2LqAqt \
  -d amount=100 \
  -d currency=INR \
  -d frequency=2 \
  -d interval="month(s)"

Pricing Plan Creation via Merchant Portal

Go to Portal > Subscriptions > Products > Add Plan and follow the steps as mentioned below:

  1. Enter name, amount, frequency and interval of the plan.
  2. You might also optionally enter key-value pair in notes to store additional information about the product.
  3. Click on Save.
  • Amount is the price per unit of the product. Ex : 100 INR per piece of a furniture.
  • Billing Cycle : Combined value of frequency and interval determines how often you want to charge your customer for subscribing to the plan.

Some Examples of billing cycle :

  • If the billing cycle is once in 2 months, then frequency should be 2 and interval should be Month(s).
  • If the billing cycle is yearly, then frequency should be 1 and interval should be Year(s).

By default, the billing cycle is set as monthly, i.e your customer would be billed once in every month.

You can define minimum billing cycle as 1 week or 7 days and maximum billing cycle as 1 year at this moment.

Pricing Plan Management

Pricing plans are intrinsic part of a product. You may fetch the list of pricing plans associated with a particular product by invoking Get All Plans API or view the list of plans via Merchant Portal.

Get Plans via API

Get all plans via List all plans API.

$ curl -u access_id:secret_key \
  https://payabbhi.com/api/v1/plans?count=2

Update and deletion of pricing plans are currently not supported in Payabbhi. So if you want to update the pricing or billing cycle of a plan, you have to create a new plan with the updated information for your subscribers.

It is always recommended to create new pricing plans, as it would be easier for you to identify the customers, who have subscribed to this new plan.

Trial Period : If you want to offer a trial period for the pricing plan, then that can be set while creating a subscription for this plan.

Get customers subscribed to a pricing plan

Get customers via Merchant Portal

Go to Portal > Subscriptions and follow the steps as mentioned below:

  1. Select Plan ID in the Search option
  2. Enter the Plan ID for which you want to get the list of subscribing customers
  3. Search by the Plan ID

Get customers via API

Get customers for a particular plan via List all subscriptions API.

Plan ID needs to be passed as a parameter in the API call.

$ curl -u access_id:secret_key \
  https://payabbhi.com/api/v1/subscriptions?count=2