Pricing using a subscription management platform

The pricing for your Vertical Solution plays a decisive role in attracting customers. You may need to support different customer-friendly pricing plans. You can use subscription management software such as Zoho Subscriptions to build specialized pricing plans which are tailored to your needs. For example, you can create profile-based pricing which allow customers to buy licenses for specific profiles in an organization. You can take control of your product's pricing and subscriptions and centralize pricing to consolidate payments for multiple applications. Imagine that you have a real estate solution in which you have integrated a telephony application. In this case, you will need to manage payments for your solution and for the third-party vendor of the telephony app. You can combine these two processes into one which handles both payments.

To achieve this, you will need to construct a middleware or broker application to handle the communication between the Developer Console and your subscription management software. The broker application must have GUI for the user to create, modify, cancel, and view subscriptions.

The three main steps for setting up pricing and subscription management are:

  1. Create pricing plans in the Developer Console
    • Generate plan codes, add-on codes, subscription APIs, and ZAPIKEY.
    Click here for details.
  2. Setup in the subscription management software
    • Create plans and associated add-ons using the Plan and Add-on Codes.
    • Create webhooks to notify the broker application when subscriptions are created, modified, or canceled by customers.
    • Create a custom field for ZUID.
    Click here for details.
  3. Creating a Broker Application
    • Create a broker application for sending subscription details from your Subscription Management Software to Developer Console.
    • Use the subscription APIs to send Developer Console details for processing a subscription request (add, modify, or cancel).
    • Host the application and enter the URL of the landing page of the application in the Manage Subscription URL field.
    Click here for details.

Create Pricing Plans in Developer Console

  1. Log in to Zoho Developer Console and click Vertical Solutions.
  2. Create a new app.
  3. Click Pricing in the left pane.
  4. Click Create Plan for Subscription Management Platform.

    A pop-up will open with the details of the setup process for pricing and subscription management.
  5. In the New Plan page, do the following:
    • Enter a name in Specify Plan Name.
    • For Select Module, choose the modules you want to give the customers access to. Select the modules from the List of Modules list box and move it to the Selected Modules list box using the arrow button.
    • For Select Extension, select the checkbox of the Zoho App you want to include in this pricing plan.
    • Click Save.

You can check the details of the setup process for pricing and subscription management by clicking the progress indicator [] at top right hand corner of the page at any time.

The following details will be generated for the newly created plan:
Authtoken: The authentication token to be used by the Broker application for communicating with Zoho Subscriptions. Click the View Authtoken button in the top right hand corner to view this value.
Add Subscription*: The broker application needs to invoke this API when a new subscription plan is created. When the user creates a new subscription using the broker application, this API should be used to send details of the newly created subscription to Developer Console.
Modify Subscription: The broker application needs to invoke this API when a subscription plan is upgraded or downgraded. When the user upgrades or downgrades a subscription using the broker application, this API should be used to send details of the modified subscription to Developer Console.
Cancel Subscription: The broker application needs to invoke this API when a subscription plan is canceled. When the user cancels a subscription using the broker application, this API should be used to send details of the subscription cancellation to Developer Console.
Plan Code (Yearly): The identifier to use when creating a yearly plan for your product in your subscription management software. The format of the plan code is appdomain_planid_Y.
Plan Code (Monthly): The identifier to use when creating a monthly plan for your product in your subscription management software. The format of the plan code is appdomain_planid.
*The documentation for the above subscription APIs is given here.

The below values will be common for all plans:
ZAPIKEY: The key used to authenticate the response flow from the subscription management software to the broker application and the Developer Console.
Manage Subscription URL: The landing page URL of the broker application. This URL is for the GUI of your broker application where customers create, modify, cancel, and view subscriptions. Click the edit icon [], enter this URL, and click the save icon []. All the strips in the progress indicator will be highlighted after this value is entered.
Storage Add-on Monthly code: The identifier to use when creating a storage add-on for a monthly plan.
Storage Add-on Monthly cost: The price of a storage add-on for a monthly plan.
Storage Add-on Yearly code: The identifier to use when creating a storage add-on for a yearly plan.
Storage Add-on Yearly cost: The price of a storage add-on for a yearly plan.

Add new plans by clicking the Add Plan button. Modify details of a plan by clicking the edit [] icon next to the plan name. Delete a plan by clicking the [] icon next to the plan name.

Setup in Zoho Subscriptions

In Zoho Subscriptions, create the following:

  • Plans corresponding to the ones created in your vertical application
  • Add-ons for the plans
  • Webhooks
  • Custom field

Add plans in Zoho Subscriptions

  1. Log in to your Zoho Subscriptions account.
  2. Create a product.
    The product name must be the same as the app domain name.
  3. Select the product and click Add Plan.
  4. In the Add Plan form, add the following details and click Save:
    • A name in the Plan Name field.
    • Enter the code in the Plan Code field.
      This is the code generated after creating a plan for your Vertical solution. For a monthly plan, use the Plan Code (Monthly) code and for a yearly plan use Plan Code (Yearly).
    • Enter the Price.
    • In the Bill Every field, enter values for the billing interval and the interval frequency
    • In the Billing Cycles field, enter the number of times the customer needs to be charged.
      If you choose Auto renews until canceled, the customer will be charged until the subscription is canceled by the customer or you.
      If you choose Expires after a specified no. of billing cycles, you can specify the number of billing cycles after which the plan will expire.

Create add-ons

  1. Log in to your Zoho Subscriptions account.
  2. Click Products in the left pane.
  3. Select the plan you want to include the add-on for and click Add Addon in the top right corner.
  4. In the Add Addon page, enter the following details and click Save:
    • A name in Addon Name field.
    • The code in Addon Code field.
      This is the Storage Add-on code generated after creating a plan for your Vertical solution. For a monthly plan, use the Storage Add-on Monthly code and for a yearly plan use the Storage Add-on Yearly code.
    • A Unit Name to specify how to refer to one unit of the addon.
    • Select a value for Addon Type to indicate whether the customer is to be charged only once or on a recurring basis.
      If you select Recurring, the Pricing Interval field will be displayed.
    • For Pricing Interval, choose the frequency to charge the customer at for the add-on.
    • Select a Pricing Scheme.
    • The Price of the Add-on.
    • Select the Associated Plans to link the add-on to.
      By default, the All Plans checkbox will be selected. You can uncheck this and select only the plans you want to link the add-on to.

Create webhooks

Create webhooks in Zoho Subscriptions to notify the broker application when subscriptions are added, modified, or canceled by the customer.

  1. Log in to your Zoho Subscriptions account.
  2. Click the Settings icon [] in the top right corner and select Automation.
  3. In the Webhooks page, click New Webhook.
  4. In the New Webhook page do the following and then click Save:
    • Enter an identifier for the webhook in the Name field.
    • Select Subscriptions for the Module field.
    • In the Predefined Events section, select the checkbox for New Subscription. While creating or modifying a subscription, select Upgrade Subscription and Downgrade Subscription.
    • In the URL & Parameters field, enter the webhook URL.
    • In the Headers section, enter the key as zapikey and its value (obtained here) in the corresponding value field.

Add a custom field

You need to create a custom variable for the zuid or Zoho User ID, an ID that is used to uniquely identify a user.

  1. Log in to your Zoho Subscriptions account.
  2. Click the Settings icon [] in the top right corner and select Preferences.
  3. Select Customer in the left pane for Preferences.
  4. Go to the Custom Fields tab and click New Custom Field.
  5. In the New Custom Field overlay, provide the following details and click Save:
    • Set the Label Name as zuid.
    • Select Data Type as Text.
    • Select Yes for Show in Customer Portal/HostedPage field.
      Keep the remaining values as they are.

Create a Broker Application

You need to create a broker application to perform the following functions:

Provide a GUI for managing subscriptions

  • Provide a GUI for creating, modifying, canceling, and viewing subscriptions for your vertical solution. When the customer creates, modifies, or cancels subscriptions, the necessary API calls must be made to your subscription management software. For Zoho Subscriptions, the authtoken (created here) is used for making the API calls.
  • The landing page of the Broker application needs to be linked to the Subscription link (present in the user profile menu) in your Vertical Solution. Each time the broker application is accessed during a subscription purchase or updation, certain parameter values (shown below) will be sent to it from the Vertical Solution. These parameters need to be stored within the broker application for later use in the Subscription APIs.

    {
       "display_name":"display_name",
       "first_name":"first_name",
       "last_name":"last_name",
       "email":"email",
       "company_name":"company_name",
       "custom_fields":{
       "zgid":"zgid",
       "zuid":"zuid"
    },
    "subscription_id":"subscription_id",
    "hostedPageId":"hostedPageId"
    }

    AttributeDescription
    display_nameThe display name of the logged in user
    first_nameThe first name of the logged in user
    last_nameThe last name of the logged in user
    emailThe email address of the logged in user
    company_nameThe company to which the logged in user belongs
    zgidThe zgid of the logged in user
    zuidZoho User ID, an ID that is used to uniquely identify a user
    subscription_idThe ID associated with a subscription purchase. Hence this ID will be sent only when a purchase has been done.

Fetch the subscription details from the Subscription Management Software

  • Operations are carried out in the subscription management software based on the user's action (create, modify, or cancel) in the broker application. The output of these operations will be sent back to the Broker Application through the webHook URLs configured.

Send the subscription details to Developer Console

  • The broker application has to filter out the necessary information for processing the subscription request from the subscription details received from the subscription management software and send it to the Developer Console. The Subscription APIs are used for this purpose.

Subscription APIs

Add Subscription

Request URL

https://appdomain.zohoplatform.com/crm/v2/settings/subscription/{customer_zgid}/plan/{planid}?zapikey={zapikey}

Request JSON

AttributesData TypeMandatoryDescription
zuidStringYesZoho User ID, an ID that is used to uniquely identify an user.
no_of_usersStringYesThe number of subscription licenses bought by an user.
frequencyStringYesThe billing frequency for the subscription. It can have values 1 (Monthly) or 4 (Yearly).
subscription_idStringYesThe ID associated with a subscription purchase.
custom_pricing_jsonJSON ObjectNoUse this JSON object to send details about the subscription that are specific to your implementation.
storage_unitsStringYesEach storage_unit consists of 5GB/month for $4.

Request Method

POST

Sample Request:

https://pricingtesting.zohoplatform.com/crm/v2/settings/subscription/{customer_zgid}/plan/2641949000000395003?zapikey=1001XXX86aa83

Sample Input:

{
"zuid":"1083827331",
"no_of_users":"30",
"frequency":"1",
"subscription_id":"1028XXXX83832",
"custom_pricing_json":"{"SuperAdminLicense":"10","StandardLicense":"20"}",
"storage_units":"2"
}

Modify Subscription

Request URL

https://appdomain.zohoplatform.com/crm/v2/settings/subscription/{customer_zgid}/plan/{planid}?zapikey={zapikey}

Request JSON

AttributesData TypeMandatoryDescription
zuidStringYesZoho User ID, an ID that is used to uniquely identify an user.
no_of_usersStringYesThe number of subscription licenses modified by an user.
frequencyStringYesThe billing frequency for the subscription. It can have values 1 (Monthly) or 4 (Yearly).
subscription_idStringYesThe ID associated with a subscription that has been modified.
custom_pricing_jsonJSON ObjectNoUse this JSON object to send details about the subscription that are specific to your implementation.
storage_unitsStringYesEach storage_unit consists of 5GB/month for $4.

Request Method

PUT

Sample Request:

https://pricingtesting.zohoplatform.com/crm/v2/settings/subscription/{customer_zgid}/plan/2641949000000395003?zapikey=1001XXX86aa83

Sample Input:

{
"zuid":"1083827331",
"no_of_users":"30",
"frequency":"1",
"subscription_id":"1028XXXX83832",
"custom_pricing_json":"{"SuperAdminLicense":"10","StandardLicense":"20"}",
"storage_units":"2"
}

Cancel Subscription

Request URL

https://appdomain.zohoplatform.com/crm/v2/settings/subscription/{customer_zgid}/plan/{planid}?zapikey={zapikey}

Request JSON

AttributesData TypeMandatoryDescription
zuidStringYesZoho User ID, an ID that is used to uniquely identify an user.
subscription_idStringYesThe ID associated with a subscription purchase.
custom_pricing_jsonJSON ObjectNoUse this JSON object to send details about the subscription that are specific to your implementation.

Request Method

DELETE

Sample Request:

https://pricingtesting.zohoplatform.com/crm/v2/settings/subscription/{customer_zgid}/plan/2641949000000395003?zapikey=1001XXX86aa83

Sample Input:

{
"zuid":"1083827331",
"custom_pricing_json":"{"SuperAdminLicense":"2","StandardLicense":"1"}"
}

Response Formats

{
"Message":"Success"
}

{
"Message":"Failure"
}

The source code for a sample broker application can be found here.