API Docs
/
No Results Found
Subscriptions

Subscriptions

A subscription enables you to charge customers at specified intervals for a plan of their choice.

End Points
Create a subscription
List all subscriptions
Update a subscription
Retrieve a subscription
Delete a subscription
Cancel a subscription
Reactivate subscription
View Scheduled Changes
Subscription Activities
Buy one-time addon
Associate a coupon
Remove a coupon
Update Card
Remove Card
Add Charge
Add contact person
Postpone renewal
Add/Edit description for a plan in line items list
Add/Edit description for a addon in line items list
Change to Online/Offline mode
Update Reference
Update Sales Person
Update Custom Fields
Add a note
Delete a note

Attribute

subscription_id
string
Unique ID generated for a subscription.
name
string
Name generated by concatenation of the product name and the selected plan.
status
string
The status of the subscription. It can be live, trial, dunning, unpaid, non_renewing, cancelled, creation_failed, cancelled_from_dunning, expired, trial_expired or future.
amount
double
The amount that needs to be charged for the subscription.
created_at
string
Date at which the subscription was created.
activated_at
string
Date at which the subscription was activated.
current_term_starts_at
string
Date on which the current term of the subscription started.
current_term_ends_at
string
Date on which the current term of the subscription ends.
last_billing_at
string
The date on which the customer was billed last.
next_billing_at
string
The date on which the customer will be billed next. This will also be the date on which the next term of the subscription starts.
expires_at
string
This is applicable only when billing_cycle is set for a plan. A subscription expires on the last day of the last billing cycle.
interval
string
Indicates the number of intervals between each billing. If interval=2, the customer would be billed every two months or years depending on the value for interval_unit.
interval_unit
string
It can be either months or years. For interval=2 and interval_unit=months, the customer is billed every two months.
auto_collect
boolean
auto_collect is set to true for creating an online subscription which will charge the customer’s card automatically on every renewal. To create an offline subscriptions, set auto_collect to false.
created_time
string
Time at which the subscription was created.
updated_time
string
Time at which the subscription details were last updated.
reference_id
string
A string of your choice is required to easily identify and keep track of your subscriptions.
place_of_supply
string
India GST only
Place of Supply for the customer's subscription.
salesperson_id
string
Unique Id of the sales person assigned for the subscription.
salesperson_name
string
Name of the sales person assigned for the subscription.
child_invoice_id
string
Invoice ID of the most recent invoice to which the subscription is associated with.
currency_code
string
Currency code of the currency in which the customer wants to pay. If currency_code is not specified here, the currency chosen in your Zoho Subscriptions organization will be used for billing. currency_id and currency_symbol are set automatically in accordance to the currency_code.
currency_symbol
string
Symbol of the customer's currency.
end_of_term
boolean
If there are any changes in the plan's subscriptions, those subscription changes can be made immediately if end_of_term is set to false. If end_of_term is set to true, the subscription changes take effect only after the current term of the subscription ends.
product_id
string
Product ID of the product to which the plan is associated with.
product_name
string
Name of the product which the plan belongs to.
plan
object
Plan object for which the subscription is to be created. This contains plan_code, name, price, quantity.
Show Sub-Attributes arrow
plan_code
string
Plan code of the plan that is to be subscribed to the customer.
name
string
Name generated by concatenation of the product name and the selected plan.
quantity
integer
Required quantity of the chosen plan.
price
double
Price of a plan for a particular subscription. If a value is provided here, the plan’s price for this subscription will be changed to the given value. If no value is provided, the plan’s price would be the same as what it was when it was created.
tags
array
Show Sub-Attributes arrow
tag_id
long
ID of the Tag
tag_option_id
long
Id of the Tag Option
item_custom_fields
array
Custom fields for a item.
Show Sub-Attributes arrow
label
string
Label of the Custom Field
value
string
Value of the Custom Field
discount
double
Discount amount applied for the plan.
total
double
Total amount for the plan.
setup_fee
double
, default is 0 only if exclude_setup_fee is true
Setup fee for the plan.
plan_description
string
Description of the plan exclusive to this subscription. This will be displayed in place of the plan name in invoices generated for this subscription.
tax_id
string
Unique ID of the tax or tax group that can be collected from the contact. Tax can be given only if is_taxable is true.
trial_days
integer
, default is 0 only if exclude_trial is true
Number of free trial days granted to a customer subscribed to this plan. Trial days for the subscription mentioned here will override the number of trial days provided at the time plan creation. This will be applicable even if exclude_trial=true.
addons
array
List of addon objects which are to be included in the subscription. Each object contains addon_code, name, price and quantity.
Show Sub-Attributes arrow
addon_code
string
Addon code of the addon.
name
Name of the addon.
addon_description
string
Description of the addon exclusive to this subscription. This will be displayed in place of the addon name in invoices generated for this subscription.
quantity
integer
Required quantity of the chosen addon.
tags
array
Show Sub-Attributes arrow
tag_id
long
ID of the Tag
tag_option_id
long
Id of the Tag Option
item_custom_fields
array
Custom fields for a item.
Show Sub-Attributes arrow
label
string
Label of the Custom Field
value
string
Value of the Custom Field
price
double
A value can be provided here if the per unit addon price has to be overridden for this subscription.
discount
Discount applied for the addon.
total
Total amount for the addon.
tax_id
Unique ID of the tax applied for the addon.
coupon
object
The object containing the details of the added coupon. coupon_code and discount_amount applied to the invoice total.
Show Sub-Attributes arrow
coupon_code
string
The coupon code of the coupon which is to be applied to the subscription.
discount_amount
double
The discount amount included in an invoice on applying a coupon.
card
object
Customer's card object. This contains payment_gateway, last_four_digits, expiry_month and expiry_year.
Show Sub-Attributes arrow
card_id
Customer's card ID.
last_four_digits
integer
Last four digits of the customer's card.
payment_gateway
string
Payment gateway through which payment needs to be made. Supported payment gateway values test_gateway, payflow_pro, stripe, 2checkout, authorize_net, payments_pro, forte, worldpay, wepay.
expiry_month
integer
Expiry month of the customer's card.
expiry_year
integer
Expiry year of the customer's card.
payment_terms
integer
Payment Due details for the invoices.
payment_terms_label
string
Label for the paymet due details.
can_add_bank_account
boolean
Set to true if Bank account can be added for the customer to perform ACH transactions.
customer
object
Customer object of the customer for whom you want to create a subscription. Each object contains display_name, company_name, first_name, last_name, email, fax, currency_code and billing_address.
Show Sub-Attributes arrow
customer_id
A unique ID generated by the server. This can be used as an identifier.
display_name
string
This will be name which will be displayed in the interface and invoices.
salutation
string
Salutation of the customer.
first_name
string
First name of the customer.
last_name
string
Last name of the customer.
email
string
Email address of the customer.
company_name
string
Registered name of the company the customer represents.
billing_address
object
Customer's billing address object. It contains attention, street, city, state,zip, country and fax.
Show Sub-Attributes arrow
attention
string
Attention of the customer's billing address.
street
string
Street of the customer's billing address.
city
string
City of the customer's billing address.
state
string
State of the customer's billing address.
country
string
Country of the customer's billing address.
zip
string
Zip code of the customer's billing address.
fax
string
Fax number for the customer's billing address.
shipping_address
object
Customer's shipping address object. It contains attention, street, city, state,zip, country and fax.
Show Sub-Attributes arrow
attention
string
Attention of the customer’s shipping address.
street
string
Street of the customer’s shipping address.
city
string
City of the customer’s shipping address.
state
string
State of the customer’s shipping address.
zip
string
Zip code of the customer’s shipping address.
country
string
Country of the customer’s shipping address.
fax
string
Fax number of the customer’s shipping address.
payment_terms
integer
Payment Due details for the invoices.
payment_terms_label
string
Label for the paymet due details.
custom_fields
array
Additional fields for the invoices.
Show Sub-Attributes arrow
index
integer
Index of the custom field. It can hold any value from 1 to 10.
label
string
Label of the Custom Field
value
string
Value of the Custom Field
data_type
string
Data type of the custom field.
taxes
array
Taxes associated wit the subscription.
Show Sub-Attributes arrow
tax_id
string
Unique ID of the tax or tax group that can be collected from the contact. Tax can be given only if is_taxable is true.
tax_name
string
Name of the tax to which subscription is associated.
tax_amount
string
Tax amount applied to the subscription.
contactpersons
array
List of contact person objects. Each object contains contactperson_id.
Show Sub-Attributes arrow
contactperson_id
string
Contact person ID of the customer’s contact person.
notes
array
List of objects containing note_id, description, commented_by and commented_time
Show Sub-Attributes arrow
note_id
string
Unique ID generated for a note.
description
string
Comments about the subscription made by the user.
commented_by
string
Name of the user who added the comment.
commented_time
string
Time at which the comment was added.
payment_gateways
array
List of payment gateways configured for the customer.
Show Sub-Attributes arrow
payment_gateway
Payment gateway associated with the subscription.Supported payment gateway values test_gateway, payflow_pro, stripe, 2checkout, authorize_net, payments_pro, forte, worldpay, wepay.
unbilled_charge_id
string
A unique ID if the subscription has any unbilled charges for the duration.
can_charge_setup_fee_immediately
boolean
If set to "true", a separate invoice will be raised for the setup fee as soon as the subscription's trial period starts. Set the value as "false", or remove this optional argument if you want the setup fee to be billed at the end of the trial period, along with the other subscription related charges.

Example

{ "subscription_id": "90300000079200", "name": "GatorHost-Basic", "status": "live", "amount": 50, "created_at": "2016-06-11", "activated_at": "2016-06-15", "current_term_starts_at": "2016-06-05", "current_term_ends_at": "2016-06-05", "last_billing_at": "2016-06-05", "next_billing_at": "2016-06-30", "expires_at": "2016-06-05", "interval": 1, "interval_unit": "months", "auto_collect": true, "created_time": "2016-06-11T17:57:13-0700", "updated_time": "2016-06-04T16:44:15-0700", "reference_id": "bowmanfurniture", "place_of_supply": "TN", "salesperson_id": "903000000058001", "salesperson_name": "Franklin", "child_invoice_id": "90300000079210", "currency_code": "USD", "currency_symbol": "$", "end_of_term": false, "product_id": "90300000079065", "product_name": "Bowman Furniture", "plan": { "plan_code": "basic-monthly", "name": "GatorHost-Basic", "quantity": 1, "price": 50, "tags": [ { "tag_id": 0, "tag_option_id": 0 } ], "item_custom_fields": [ { "label": "string", "value": "string" } ], "discount": 20, "total": 50, "setup_fee": 20, "plan_description": "Monthly Basic plan", "tax_id": "903000002345", "trial_days": 0 }, "addons": [ { "addon_code": "Email-basic", "name": "Monthly Addon", "addon_description": "Monthly addon.", "quantity": 1, "tags": [ { "tag_id": 0, "tag_option_id": 0 } ], "item_custom_fields": [ { "label": "string", "value": "string" } ], "price": 50, "discount": null, "total": null, "tax_id": null } ], "coupon": { "coupon_code": "Flat10", "discount_amount": 44 }, "card": { "card_id": "9030000079226", "last_four_digits": 2145, "payment_gateway": "payflow_pro", "expiry_month": 9, "expiry_year": 2030 }, "payment_terms": 1, "payment_terms_label": "Due On Receipt", "can_add_bank_account": true, "customer": { "customer_id": "903000000000099", "display_name": "Bowman Furniture", "salutation": "Mr.", "first_name": "Benjamin", "last_name": "George", "email": "benjamin.george@bowmanfurniture.com", "company_name": "Bowman Furniture", "billing_address": { "attention": "Benjamin George", "street": "Harrington Bay Street", "city": "Salt Lake City", "state": "CA", "country": "U.S.A", "zip": 92612, "fax": 4527389 }, "shipping_address": { "attention": "Benjamin George", "street": "Harrington Bay Street", "city": "Salt Lake City", "state": "CA", "zip": 92612, "country": "U.S.A", "fax": 4527389 }, "payment_terms": 1, "payment_terms_label": "Due On Receipt" }, "custom_fields": [ { "index": 1, "label": "string", "value": "string", "data_type": "text" } ], "taxes": [ { "tax_id": "903000002345", "tax_name": "GST", "tax_amount": "2.50" } ], "contactpersons": [ { "contactperson_id": "903000000000099" } ], "notes": [ { "note_id": "903000076543", "description": "", "commented_by": "Benjamin", "commented_time": "2016-06-11T17:57:13-0700" } ], "payment_gateways": [ { "payment_gateway": null } ], "unbilled_charge_id": "903000000000099", "can_charge_setup_fee_immediately": false }

Create a subscription

Create a new subscription. To create a subscription for a new customer, you have to pass the customer object. To create a subscription for a existing customer pass the customer_id of that customer.
oauthscope : ZohoSubscriptions.subscriptions.CREATE

Arguments

add_to_unbilled_charges
boolean
When the value is given as true, the subscription would be created and charges for the current billing cycle will be put as unbilled. This can be converted to invoice at any later point of time.
customer
object
(Required) for creating a subscription for new customer.
Customer object of the customer for whom you want to create a subscription. Each object contains display_name, company_name, first_name, last_name, email, fax, currency_code and billing_address.
Show Sub-Attributes arrow
display_name
string
(Required)
This will be name which will be displayed in the interface and invoices.
salutation
string
Salutation of the customer.
first_name
string
First name of the customer.
last_name
string
Last name of the customer.
email
string
(Required)
Email address of the customer.
company_name
string
Registered name of the company the customer represents.
billing_address
object
Customer's billing address object. It contains attention, street, city, state,zip, country and fax.
Show Sub-Attributes arrow
attention
string
Attention of the customer's billing address.
street
string
Street of the customer's billing address.
city
string
City of the customer's billing address.
state
string
State of the customer's billing address.
country
string
Country of the customer's billing address.
zip
string
Zip code of the customer's billing address.
fax
string
Fax number for the customer's billing address.
shipping_address
object
Customer's shipping address object. It contains attention, street, city, state,zip, country and fax.
Show Sub-Attributes arrow
attention
string
Attention of the customer’s shipping address.
street
string
Street of the customer’s shipping address.
city
string
City of the customer’s shipping address.
state
string
State of the customer’s shipping address.
zip
string
Zip code of the customer’s shipping address.
country
string
Country of the customer’s shipping address.
fax
string
Fax number of the customer’s shipping address.
payment_terms
integer
Payment Due details for the invoices.
payment_terms_label
string
Label for the paymet due details.
custom_fields
array
Additional fields for the invoices.
Show Sub-Attributes arrow
label
string
(Required)
Label of the Custom Field
value
string
(Required)
Value of the Custom Field
place_of_contact
string
India GST only
Customer's place of contact.
gst_no
string
India GST only
GSTIN Number for the customer.
gst_treatment
string
India GST only
GST Treatment for the customer.
Allowed values for gst_treatment :
business_gst, business_none, consumer, overseas
business_gst - For a GST Registered business owner.
business_none - For a GST unregistered business owner.
consumer - For a consumer.
overseas - Customer for whom you export your goods/services.
vat_treatment
string
VAT only
(Optional) VAT treatment for the invoices. VAT treatment denotes the location of the customer, if the customer resides in UK then the VAT treatment is uk. If the customer is in an EU country & VAT registered, you are resides in Northen Ireland and selling Goods then his VAT treatment is eu_vat_registered, if he resides outside of the UK then his VAT treatment is overseas (For Pre Brexit, this can be split as eu_vat_registered, eu_vat_not_registered and non_eu).
vat_reg_no
string
VAT only
VAT Registration number of a contact with length should be between 2 and 12 characters.
country_code
string
VAT only
Two letter country code of a contact with VAT treatment as eu_vat_registered. (This node is only available for EU VAT registered customers.)
is_taxable
string
Sales Tax GST only
Set to true if customer's transactions must be tax inclusive.
tax_id
string
(Required)
Unique ID of the tax or tax group that can be collected from the contact. Tax can be given only if is_taxable is true.
tax_authority_id
string
(Required) for applying Tax exemption to a customer.
Sales Tax only
Unique ID of the tax authority. Tax authority depends on the location of the customer. For example, if the customer is located in NY, then the tax authority is NY tax authority.
tax_authority_name
string
(Required) for applying Tax exemption to a customer.
Sales Tax only
Unique name of the tax authority. Either tax_authority_id or tax_authority_name can be given.
tax_exemption_id
string
Sales Tax GST only
Unique ID of the tax exemption.
tax_exemption_code
string
Sales Tax GST only
Unique code of the tax exemption.
customer_id
(Required) for creating a subscription for existing customer.
Customer ID of the customer for whom a subscription needs to be created.
payment_terms
integer
Payment Due details for the invoices.
payment_terms_label
string
Label for the paymet due details.
custom_fields
array
Additional fields for the invoices.
Show Sub-Attributes arrow
label
string
(Required)
Label of the Custom Field
value
string
(Required)
Value of the Custom Field
contactpersons
array
List of contact person objects. Each object contains contactperson_id.
Show Sub-Attributes arrow
contactperson_id
string
(Required)
Contact person ID of the customer’s contact person.
card_id
(Required) if auto_collect is true
Enter the card_id of the card which has to be updated.
starts_at
string
Generally the subscription will start on the day it is created. But, the date can also be a future or past date depending upon your usecase. For future dates, the subscription status would be Future till the starts_at date. And for past dates, the subscription status can be Trial, Live or Expired depending on the subscription interval that you have selected.
exchange_rate
double
, default is the exchange rate provided in settings.
This will be the exchange rate provided for the organization's currency and the customer's currency. The subscription fee would be the multiplicative product of the original price and the exchange rate.
place_of_supply
string
India GST only
Place of Supply for the customer's subscription.
plan
object
(Required)
Plan object for which the subscription is to be created. This contains plan_code, name, price, quantity.
Show Sub-Attributes arrow
plan_code
string
(Required)
Plan code of the plan that is to be subscribed to the customer.
plan_description
string
Description of the plan exclusive to this subscription. This will be displayed in place of the plan name in invoices generated for this subscription.
price
double
Price of a plan for a particular subscription. If a value is provided here, the plan’s price for this subscription will be changed to the given value. If no value is provided, the plan’s price would be the same as what it was when it was created.
setup_fee
double
, default is 0 only if exclude_setup_fee is true
Setup fee for the plan.
setup_fee_tax_id
string
Unique ID for tax of setup fee. setup_fee_tax_id must be empty for applying tax Exemption.
tags
array
Show Sub-Attributes arrow
tag_id
long
ID of the Tag
tag_option_id
long
Id of the Tag Option
item_custom_fields
array
Custom fields for a item.
Show Sub-Attributes arrow
label
string
(Required)
Label of the Custom Field
value
string
(Required)
Value of the Custom Field
quantity
integer
Required quantity of the chosen plan.
tax_id
(Required) for applying tax or tax exemption to a plan
Unique ID of Tax or Tax Group that must be associated with the plan. tax_id must be empty for applying tax Exemption.
tax_exemption_id
string
Sales Tax GST only
Unique ID of the tax exemption.
tax_exemption_code
string
Sales Tax GST only
Unique code of the tax exemption.
setup_fee_tax_exemption_id
string
Sales Tax GST only
Unique Tax Exemption ID that must be applied to setup fee.
setup_fee_tax_exemption_code
string
Sales Tax GST only
Unique code of the tax exemption that must be applied to setup fee.
exclude_trial
boolean
This is set to true if the respective plan's trial period needs to be excluded for this subscription.
exclude_setup_fee
boolean
This is set to true if the respective plan's setup fee needs to be excluded for this subscription.
billing_cycles
integer
billing_cycles specified at the time of creation of the plan would be the default value. If this needs to be overridden for this particular subscription, a value can be provided here.
trial_days
integer
, default is 0 only if exclude_trial is true
Number of free trial days granted to a customer subscribed to this plan. Trial days for the subscription mentioned here will override the number of trial days provided at the time plan creation. This will be applicable even if exclude_trial=true.
addons
array
List of addon objects which are to be included in the subscription. Each object contains addon_code, name, price and quantity.
Show Sub-Attributes arrow
addon_code
string
(Required)
Addon code of the addon.
addon_description
string
Description of the addon exclusive to this subscription. This will be displayed in place of the addon name in invoices generated for this subscription.
price
double
Price of a plan for a particular subscription. If a value is provided here, the plan’s price for this subscription will be changed to the given value. If no value is provided, the plan’s price would be the same as what it was when it was created.
quantity
Required quantity of the chosen addon.
tags
array
Show Sub-Attributes arrow
tag_id
long
ID of the Tag
tag_option_id
long
Id of the Tag Option
item_custom_fields
array
Custom fields for a item.
Show Sub-Attributes arrow
label
string
(Required)
Label of the Custom Field
value
string
(Required)
Value of the Custom Field
tax_id
(Required) for applying tax or tax exemption to a addon
Unique ID of Tax or Tax Group that must be associated with the addon. tax_id must be empty for applying tax Exemption.
tax_exemption_id
string
Sales Tax GST only
Unique ID of the tax exemption.
tax_exemption_code
string
Sales Tax GST only
Unique code of the tax exemption.
coupon_code
string
The coupon code of the coupon which is to be applied to the subscription.
auto_collect
boolean
auto_collect is set to true for creating an online subscription which will charge the customer’s card automatically on every renewal. To create an offline subscriptions, set auto_collect to false.
reference_id
string
A string of your choice is required to easily identify and keep track of your subscriptions.
salesperson_name
string
Name of the sales person assigned for the subscription.
payment_gateways
array
List of payment gateways configured for the customer.
Show Sub-Attributes arrow
payment_gateway
Payment gateway associated with the subscription.Supported payment gateway values test_gateway, payflow_pro, stripe, 2checkout, authorize_net, payments_pro, forte, worldpay, wepay.
create_backdated_invoice
boolean
To allow creation of invoice for current billing cycle for back dated subscriptions.
can_charge_setup_fee_immediately
boolean
If set to "true", a separate invoice will be raised for the setup fee as soon as the subscription's trial period starts. Set the value as "false", or remove this optional argument if you want the setup fee to be billed at the end of the trial period, along with the other subscription related charges.
template_id
string
Defaulte Invoice Template ID for all the invoices created from the subscription.

Request Example

Click to copy
$ curl https://subscriptions.zoho.com/api/v1/subscriptions -X POST -H "X-com-zoho-subscriptions-organizationid: 10234695" -H "Content-Type: application/json;charset=UTF-8" -H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f" -d '{"field":"value","field":"value"}'

Body Parameters

Click to copy
{ "add_to_unbilled_charges": true, "customer": { "display_name": "Bowman Furniture", "salutation": "Mr.", "first_name": "Benjamin", "last_name": "George", "email": "benjamin.george@bowmanfurniture.com", "company_name": "Bowman Furniture", "billing_address": { "attention": "Benjamin George", "street": "Harrington Bay Street", "city": "Salt Lake City", "state": "CA", "country": "U.S.A", "zip": 92612, "fax": 4527389 }, "shipping_address": { "attention": "Benjamin George", "street": "Harrington Bay Street", "city": "Salt Lake City", "state": "CA", "zip": 92612, "country": "U.S.A", "fax": 4527389 }, "payment_terms": 1, "payment_terms_label": "Due On Receipt", "custom_fields": [ { "label": "string", "value": "string" } ], "place_of_contact": "TN", "gst_no": "33AAAAA0000A1Z5", "gst_treatment": "business_gst", "vat_treatment": "overseas", "vat_reg_no": 51423456782, "country_code": "DE", "is_taxable": true, "tax_id": "903000002345", "tax_authority_id": "903000006345", "tax_authority_name": "ATO", "tax_exemption_id": "903000006345", "tax_exemption_code": "GST FREE" }, "customer_id": null, "payment_terms": 1, "payment_terms_label": "Due On Receipt", "custom_fields": [ { "label": "string", "value": "string" } ], "contactpersons": [ { "contactperson_id": "903000000000099" } ], "card_id": null, "starts_at": "2016-06-05", "exchange_rate": 2, "place_of_supply": "TN", "plan": { "plan_code": "basic-monthly", "plan_description": "Monthly Basic plan", "price": 50, "setup_fee": 20, "setup_fee_tax_id": "9030000123123", "tags": [ { "tag_id": 0, "tag_option_id": 0 } ], "item_custom_fields": [ { "label": "string", "value": "string" } ], "quantity": 1, "tax_id": null, "tax_exemption_id": "903000006345", "tax_exemption_code": "GST FREE", "setup_fee_tax_exemption_id": "9030000123098", "setup_fee_tax_exemption_code": "GST FREE", "exclude_trial": false, "exclude_setup_fee": false, "billing_cycles": -1, "trial_days": 0 }, "addons": [ { "addon_code": "Email-basic", "addon_description": "Monthly addon.", "price": 50, "quantity": null, "tags": [ { "tag_id": 0, "tag_option_id": 0 } ], "item_custom_fields": [ { "label": "string", "value": "string" } ], "tax_id": null, "tax_exemption_id": "903000006345", "tax_exemption_code": "GST FREE" } ], "coupon_code": "Flat10", "auto_collect": true, "reference_id": "bowmanfurniture", "salesperson_name": "Franklin", "payment_gateways": [ { "payment_gateway": null } ], "create_backdated_invoice": true, "can_charge_setup_fee_immediately": false, "template_id": 903000000063009 }

Response Example

{ "code": 0, "message": "Subscription has been created successfully.", "subscription": { "subscription_id": "90300000079200", "name": "GatorHost-Basic", "status": "live", "amount": 50, "created_at": "2016-06-11", "activated_at": "2016-06-15", "current_term_starts_at": "2016-06-05", "current_term_ends_at": "2016-06-05", "last_billing_at": "2016-06-05", "next_billing_at": "2016-06-30", "expires_at": "2016-06-05", "interval": 1, "interval_unit": "months", "auto_collect": true, "created_time": "2016-06-11T17:57:13-0700", "updated_time": "2016-06-04T16:44:15-0700", "reference_id": "bowmanfurniture", "place_of_supply": "TN", "salesperson_id": "903000000058001", "salesperson_name": "Franklin", "child_invoice_id": "90300000079210", "currency_code": "USD", "currency_symbol": "$", "end_of_term": false, "product_id": "90300000079065", "product_name": "Bowman Furniture", "plan": { "plan_code": "basic-monthly", "name": "GatorHost-Basic", "quantity": 1, "price": 50, "tags": [ { "tag_id": 0, "tag_option_id": 0 } ], "item_custom_fields": [ { "label": "string", "value": "string" } ], "discount": 20, "total": 50, "setup_fee": 20, "plan_description": "Monthly Basic plan", "tax_id": "903000002345", "trial_days": 0 }, "addons": [ { "addon_code": "Email-basic", "name": "Monthly Addon", "addon_description": "Monthly addon.", "quantity": 1, "tags": [ { "tag_id": 0, "tag_option_id": 0 } ], "item_custom_fields": [ { "label": "string", "value": "string" } ], "price": 50, "discount": null, "total": null, "tax_id": null } ], "coupon": { "coupon_code": "Flat10", "discount_amount": 44 }, "card": { "card_id": "9030000079226", "last_four_digits": 2145, "payment_gateway": "payflow_pro", "expiry_month": 9, "expiry_year": 2030 }, "payment_terms": 1, "payment_terms_label": "Due On Receipt", "can_add_bank_account": true, "customer": { "customer_id": "903000000000099", "display_name": "Bowman Furniture", "salutation": "Mr.", "first_name": "Benjamin", "last_name": "George", "email": "benjamin.george@bowmanfurniture.com", "company_name": "Bowman Furniture", "billing_address": { "attention": "Benjamin George", "street": "Harrington Bay Street", "city": "Salt Lake City", "state": "CA", "country": "U.S.A", "zip": 92612, "fax": 4527389 }, "shipping_address": { "attention": "Benjamin George", "street": "Harrington Bay Street", "city": "Salt Lake City", "state": "CA", "zip": 92612, "country": "U.S.A", "fax": 4527389 }, "payment_terms": 1, "payment_terms_label": "Due On Receipt" }, "custom_fields": [ { "index": 1, "label": "string", "value": "string", "data_type": "text" } ], "taxes": [ { "tax_id": "903000002345", "tax_name": "GST", "tax_amount": "2.50" } ], "contactpersons": [ { "contactperson_id": "903000000000099" } ], "notes": [ { "note_id": "903000076543", "description": "", "commented_by": "Benjamin", "commented_time": "2016-06-11T17:57:13-0700" } ], "payment_gateways": [ { "payment_gateway": null } ], "unbilled_charge_id": "903000000000099", "can_charge_setup_fee_immediately": false } }

List all subscriptions

List of subscriptions that match the given subscription status.

To list the subscriptions of a particular customer append a param customer_id={customer_id}.

To list subscriptions based on Reference#, append the param reference_contains={reference_value}.
oauthscope : ZohoSubscriptions.subscriptions.READ

Query Parameters

filter_by
The possible values for SubscriptionStatus are All, ACTIVE, LIVE, FUTURE, TRIAL, PAST_DUE, UNPAID, NON_RENEWING, CANCELLED_FROM_DUNNING, CANCELLED, EXPIRED, TRIAL_EXPIRED, CANCELLED_LAST_MONTH, CANCELLED_THIS_MONTH.

To list subscriptions based on Online/Offline, pass the filter_by param value as SubscriptionMode.ONLINE or SubscriptionMode.OFFLINE.

Request Example

Click to copy
$ curl https://subscriptions.zoho.com/api/v1/subscriptions -H "X-com-zoho-subscriptions-organizationid: 10234695" -H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f"

Response Example

{ "code": 0, "message": "success", "subscriptions": [ { "customer_id": "903000000000099", "customer_name": "Benjamin", "email": "benjamin.george@bowmanfurniture.com", "plan_name": "Basic Monthly", "subscription_id": "90300000079200", "name": "GatorHost-Basic", "status": "live", "amount": 50, "created_at": "2016-06-11", "activated_at": "2016-06-15", "current_term_ends_at": "2016-06-05", "current_term_starts_at": "2016-06-05", "last_billing_at": "2016-06-05", "next_billing_at": "2016-06-30", "expires_at": "2016-06-05", "interval": 1, "interval_unit": "months", "auto_collect": true, "created_time": "2016-06-11T17:57:13-0700", "updated_time": "2016-06-04T16:44:15-0700", "reference_id": "bowmanfurniture", "salesperson_id": "903000000058001", "salesperson_name": "Franklin", "currency_code": "USD", "currency_symbol": "$" }, {...}, {...} ] }

Update a subscription

Update details of an existing subscription.
oauthscope : ZohoSubscriptions.subscriptions.UPDATE

Arguments

card_id
(Required) if auto_collect is true.
Enter the card_id of the card which has to be updated.
exchange_rate
double
, default is the exchange rate provided in settings.
This will be the exchange rate provided for the organization's currency and the customer's currency. The subscription fee would be the multiplicative product of the original price and the exchange rate.
plan
object
(Required)
Plan object for which the subscription is to be created. This contains plan_code, name, price, quantity.
Show Sub-Attributes arrow
plan_code
string
(Required)
Plan code of the plan that is to be subscribed to the customer.
plan_description
string
Description of the plan exclusive to this subscription. This will be displayed in place of the plan name in invoices generated for this subscription.
price
double
Price of a plan for a particular subscription. If a value is provided here, the plan’s price for this subscription will be changed to the given value. If no value is provided, the plan’s price would be the same as what it was when it was created.
setup_fee
double
, default is 0 only if exclude_setup_fee is true
Setup fee for the plan.
quantity
integer
Required quantity of the chosen plan.
tags
array
Show Sub-Attributes arrow
tag_id
long
ID of the Tag
tag_option_id
long
Id of the Tag Option
item_custom_fields
array
Custom fields for a item.
Show Sub-Attributes arrow
label
string
Label of the Custom Field
value
string
Value of the Custom Field
tax_id
(Required) for applying tax or tax exemption to a plan
Unique ID of Tax or Tax Group that must be associated with the plan. tax_id must be empty for applying tax Exemption.
tax_exemption_id
string
Sales Tax GST only
Unique ID of the tax exemption.
tax_exemption_code
string
Sales Tax GST only
Unique code of the tax exemption.
setup_fee_tax_exemption_id
string
Sales Tax GST only
Unique Tax Exemption ID that must be applied to setup fee.
setup_fee_tax_exemption_code
string
Sales Tax GST only
Unique code of the tax exemption that must be applied to setup fee.
exclude_trial
boolean
This is set to true if the respective plan's trial period needs to be excluded for this subscription.
exclude_setup_fee
boolean
This is set to true if the respective plan's setup fee needs to be excluded for this subscription.
billing_cycles
integer
billing_cycles specified at the time of creation of the plan would be the default value. If this needs to be overridden for this particular subscription, a value can be provided here.
trial_days
integer
, default is 0 only if exclude_trial is true
Number of free trial days granted to a customer subscribed to this plan. Trial days for the subscription mentioned here will override the number of trial days provided at the time plan creation. This will be applicable even if exclude_trial=true.
addons
array
List of addon objects which are to be included in the subscription. Each object contains addon_code, name, price and quantity.
Show Sub-Attributes arrow
addon_code
string
(Required)
Addon code of the addon.
addon_description
string
Description of the addon exclusive to this subscription. This will be displayed in place of the addon name in invoices generated for this subscription.
price
double
Price of a plan for a particular subscription. If a value is provided here, the plan’s price for this subscription will be changed to the given value. If no value is provided, the plan’s price would be the same as what it was when it was created.
quantity
Required quantity of the chosen addon.
tags
array
Show Sub-Attributes arrow
tag_id
long
ID of the Tag
tag_option_id
long
Id of the Tag Option
item_custom_fields
array
Custom fields for a item.
Show Sub-Attributes arrow
label
string
Label of the Custom Field
value
string
Value of the Custom Field
tax_id
(Required) for applying tax or tax exemption to a addon
Unique ID of Tax or Tax Group that must be associated with the addon. tax_id must be empty for applying tax Exemption.
tax_exemption_id
string
Sales Tax GST only
Unique ID of the tax exemption.
tax_exemption_code
string
Sales Tax GST only
Unique code of the tax exemption.
auto_collect
boolean
auto_collect is set to true for creating an online subscription which will charge the customer’s card automatically on every renewal. To create an offline subscriptions, set auto_collect to false.
coupon_code
string
The coupon code of the coupon which is to be applied to the subscription.
reference_id
string
A string of your choice is required to easily identify and keep track of your subscriptions.
salesperson_id
string
Unique Id of the sales person assigned for the subscription.
salesperson_name
string
Name of the sales person assigned for the subscription.
end_of_term
boolean
If there are any changes in the plan's subscriptions, those subscription changes can be made immediately if end_of_term is set to false. If end_of_term is set to true, the subscription changes take effect only after the current term of the subscription ends.
contactpersons
array
List of contact person objects. Each object contains contactperson_id.
Show Sub-Attributes arrow
contactperson_id
string
(Required)
Contact person ID of the customer’s contact person.
payment_terms
integer
Payment Due details for the invoices.
payment_terms_label
string
Label for the paymet due details.
payment_gateways
array
List of payment gateways configured for the customer.
Show Sub-Attributes arrow
payment_gateway
Payment gateway associated with the subscription.Supported payment gateway values test_gateway, payflow_pro, stripe, 2checkout, authorize_net, payments_pro, forte, worldpay, wepay.
custom_fields
array
Additional fields for the invoices.
Show Sub-Attributes arrow
index
integer
Index of the custom field. It can hold any value from 1 to 10.
label
string
Label of the Custom Field
value
string
Value of the Custom Field
data_type
string
Data type of the custom field.
template_id
string
Defaulte Invoice Template ID for all the invoices created from the subscription.
can_charge_setup_fee_immediately
boolean
If set to "true", a separate invoice will be raised for the setup fee as soon as the subscription's trial period starts. Set the value as "false", or remove this optional argument if you want the setup fee to be billed at the end of the trial period, along with the other subscription related charges.

Request Example

Click to copy
$ curl https://subscriptions.zoho.com/api/v1/subscriptions/{subscription_id} -X PUT -H "X-com-zoho-subscriptions-organizationid: 10234695" -H "Content-Type: application/json;charset=UTF-8" -H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f" -d '{"field":"value","field":"value"}'

Body Parameters

Click to copy
{ "card_id": null, "exchange_rate": 2, "plan": { "plan_code": "basic-monthly", "plan_description": "Monthly Basic plan", "price": 50, "setup_fee": 20, "quantity": 1, "tags": [ { "tag_id": 0, "tag_option_id": 0 } ], "item_custom_fields": [ { "label": "string", "value": "string" } ], "tax_id": null, "tax_exemption_id": "903000006345", "tax_exemption_code": "GST FREE", "setup_fee_tax_exemption_id": "9030000123098", "setup_fee_tax_exemption_code": "GST FREE", "exclude_trial": false, "exclude_setup_fee": false, "billing_cycles": -1, "trial_days": 0 }, "addons": [ { "addon_code": "Email-basic", "addon_description": "Monthly addon.", "price": 50, "quantity": null, "tags": [ { "tag_id": 0, "tag_option_id": 0 } ], "item_custom_fields": [ { "label": "string", "value": "string" } ], "tax_id": null, "tax_exemption_id": "903000006345", "tax_exemption_code": "GST FREE" } ], "auto_collect": true, "coupon_code": "Flat10", "reference_id": "bowmanfurniture", "salesperson_id": "903000000058001", "salesperson_name": "Franklin", "end_of_term": false, "contactpersons": [ { "contactperson_id": "903000000000099" } ], "payment_terms": 1, "payment_terms_label": "Due On Receipt", "payment_gateways": [ { "payment_gateway": null } ], "custom_fields": [ { "index": 1, "label": "string", "value": "string", "data_type": "text" } ], "template_id": 903000000063009, "can_charge_setup_fee_immediately": false }

Response Example

{ "code": 0, "message": "Subscription has been updated successfully.", "subscription": { "subscription_id": "90300000079200", "name": "GatorHost-Basic", "status": "live", "amount": 50, "created_at": "2016-06-11", "activated_at": "2016-06-15", "current_term_starts_at": "2016-06-05", "current_term_ends_at": "2016-06-05", "last_billing_at": "2016-06-05", "next_billing_at": "2016-06-30", "expires_at": "2016-06-05", "interval": 1, "interval_unit": "months", "auto_collect": true, "created_time": "2016-06-11T17:57:13-0700", "updated_time": "2016-06-04T16:44:15-0700", "reference_id": "bowmanfurniture", "salesperson_id": "903000000058001", "salesperson_name": "Franklin", "child_invoice_id": "90300000079210", "currency_code": "USD", "currency_symbol": "$", "end_of_term": false, "product_id": "90300000079065", "product_name": "Bowman Furniture", "plan": { "plan_code": "basic-monthly", "name": "GatorHost-Basic", "quantity": 1, "price": 50, "tags": [ { "tag_id": 0, "tag_option_id": 0 } ], "item_custom_fields": [ { "label": "string", "value": "string" } ], "discount": 20, "total": 50, "setup_fee": 20, "plan_description": "Monthly Basic plan", "tax_id": "903000002345", "trial_days": 0 }, "addons": [ { "addon_code": "Email-basic", "name": "Monthly Addon", "addon_description": "Monthly addon.", "quantity": 1, "tags": [ { "tag_id": 0, "tag_option_id": 0 } ], "item_custom_fields": [ { "label": "string", "value": "string" } ], "price": 10, "discount": null, "total": null, "tax_id": null } ], "coupon": { "coupon_code": "Flat10", "discount_amount": 44 }, "card": { "card_id": "90300000079226", "last_four_digits": 2145, "payment_gateway": "payflow_pro", "expiry_month": 9, "expiry_year": 2030 }, "payment_terms": 1, "payment_terms_label": "Due On Receipt", "can_add_bank_account": true, "customer": { "display_name": "Bowman Furniture", "salutation": "Mr.", "first_name": "Benjamin", "last_name": "George", "email": "benjamin.george@bowmanfurniture.com", "company_name": "Bowman Furniture", "billing_address": { "attention": "Benjamin George", "street": "Harrington Bay Street", "city": "Salt Lake City", "state": "CA", "country": "U.S.A", "zip": 92612, "fax": 4527389 }, "shipping_address": { "attention": "Benjamin George", "street": "Harrington Bay Street", "city": "Salt Lake City", "state": "CA", "zip": 92612, "country": "U.S.A", "fax": 4527389 }, "payment_terms": 1, "payment_terms_label": "Due On Receipt" }, "custom_fields": [ { "index": 1, "label": "string", "value": "string", "data_type": "text" } ], "taxes": [ { "tax_id": "903000002345", "tax_name": "GST", "tax_amount": "2.50" } ], "contactpersons": [ { "contactperson_id": "903000000000099" } ], "notes": [ { "note_id": "903000076543", "description": "", "commented_by": "Benjamin", "commented_time": "2016-06-11T17:57:13-0700" } ], "payment_gateways": [ { "payment_gateway": null } ], "can_charge_setup_fee_immediately": false } }

Retrieve a subscription

Details of an existing subscription.
oauthscope : ZohoSubscriptions.subscriptions.READ

Request Example

Click to copy
$ curl https://subscriptions.zoho.com/api/v1/subscriptions/{subscription_id} -H "X-com-zoho-subscriptions-organizationid: 10234695" -H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f"

Response Example

{ "code": 0, "message": "success", "subscription": { "subscription_id": "90300000079200", "unbilled_charge_id": "903000000000099", "name": "GatorHost-Basic", "status": "live", "amount": 50, "created_at": "2016-06-11", "activated_at": "2016-06-15", "current_term_starts_at": "2016-06-05", "current_term_ends_at": "2016-06-05", "last_billing_at": "2016-06-05", "next_billing_at": "2016-06-30", "expires_at": "2016-06-05", "interval": 1, "interval_unit": "months", "auto_collect": true, "created_time": "2016-06-11T17:57:13-0700", "updated_time": "2016-06-04T16:44:15-0700", "reference_id": "bowmanfurniture", "salesperson_id": "903000000058001", "salesperson_name": "Franklin", "child_invoice_id": "90300000079210", "currency_code": "USD", "currency_symbol": "$", "end_of_term": false, "product_id": "90300000079065", "product_name": "Bowman Furniture", "plan": { "plan_code": "basic-monthly", "name": "GatorHost-Basic", "quantity": 1, "item_custom_fields": [ { "label": "string", "value": "string" } ], "price": 50, "tags": [ { "tag_id": 0, "tag_option_id": 0 } ], "discount": 20, "total": 50, "setup_fee": 20, "plan_description": "Monthly Basic plan", "tax_id": "903000002345", "trial_days": 0 }, "addons": [ { "addon_code": "Email-basic", "name": "Monthly Addon", "addon_description": "Monthly addon.", "quantity": 1, "tags": [ { "tag_id": 0, "tag_option_id": 0 } ], "item_custom_fields": [ { "label": "string", "value": "string" } ], "price": 10, "discount": null, "total": null, "tax_id": null } ], "coupon": { "coupon_code": "Flat10", "discount_amount": 44 }, "card": { "card_id": "90300000079226", "last_four_digits": 2145, "payment_gateway": "payflow_pro", "expiry_month": 9, "expiry_year": 2030 }, "payment_terms": 1, "payment_terms_label": "Due On Receipt", "can_add_bank_account": true, "customer": { "customer_id": "903000000000099", "display_name": "Bowman Furniture", "first_name": "Benjamin", "last_name": "George", "email": "benjamin.george@bowmanfurniture.com", "company_name": "Bowman Furniture", "billing_address": { "attention": "Benjamin George", "street": "Harrington Bay Street", "city": "Salt Lake City", "state": "CA", "country": "U.S.A", "zip": 92612, "fax": 4527389 }, "shipping_address": { "attention": "Benjamin George", "street": "Harrington Bay Street", "city": "Salt Lake City", "state": "CA", "zip": 92612, "country": "U.S.A", "fax": 4527389 }, "payment_terms": 1, "payment_terms_label": "Due On Receipt" }, "custom_fields": [ { "index": 1, "label": "string", "value": "string", "data_type": "text" } ], "taxes": [ { "tax_id": "903000002345", "tax_name": "GST", "tax_amount": "2.50" } ], "contactpersons": [ { "contactperson_id": "903000000000099" } ], "notes": [ { "note_id": "903000076543", "description": "", "commented_by": "Benjamin", "commented_time": "2016-06-11T17:57:13-0700" } ], "payment_gateways": [ { "payment_gateway": null } ] } }

Delete a subscription

Delete an existing subscription.
oauthscope : ZohoSubscriptions.subscriptions.DELETE

Request Example

Click to copy
$ curl https://subscriptions.zoho.com/api/v1/subscriptions/{subscription_id} -X DELETE -H "X-com-zoho-subscriptions-organizationid: 10234695" -H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f"

Response Example

{ "code": 0, "message": "The subscription has been deleted." }

Cancel a subscription

Your subscription can be either cancelled immediately or at the end of the current term based on the value of `cancel_at_end`.
oauthscope : ZohoSubscriptions.subscriptions.CREATE

Query Parameters

cancel_at_end
If `cancel_at_end` is set to true then the `status` of the subscription is changed to non_renewing and if it is false, the `status` would be cancelled.

Request Example

Click to copy
$ curl https://subscriptions.zoho.com/api/v1/subscriptions/{subscription_id}/cancel -X POST -H "X-com-zoho-subscriptions-organizationid: 10234695" -H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f"

Response Example

{ "code": 0, "message": "Your subscription will be canceled at the end of this term.", "subscription": { "subscription_id": "90300000079200", "name": "GatorHost-Basic", "status": "live", "amount": 50, "created_at": "2016-06-11", "activated_at": "2016-06-15", "current_term_starts_at": "2016-06-05", "current_term_ends_at": "2016-06-05", "last_billing_at": "2016-06-05", "next_billing_at": "2016-06-30", "expires_at": "2016-06-05", "interval": 1, "interval_unit": "months", "auto_collect": true, "created_time": "2016-06-11T17:57:13-0700", "updated_time": "2016-06-04T16:44:15-0700", "reference_id": "bowmanfurniture", "salesperson_id": "903000000058001", "salesperson_name": "Franklin", "child_invoice_id": "90300000079210", "currency_code": "USD", "currency_symbol": "$", "end_of_term": false, "product_id": "90300000079065", "product_name": "Bowman Furniture", "plan": { "plan_code": "basic-monthly", "name": "GatorHost-Basic", "quantity": 1, "price": 50, "discount": 20, "total": 50, "setup_fee": 20, "plan_description": "Monthly Basic plan", "tax_id": "903000002345", "trial_days": 0 }, "addons": [ { "addon_code": "Email-basic", "name": "Monthly Addon", "addon_description": "Monthly addon.", "quantity": 1, "price": 10, "discount": null, "total": null, "tax_id": null } ], "coupon": { "coupon_code": "Flat10", "discount_amount": 44 }, "card": { "card_id": "9030000079226", "last_four_digits": 2145, "payment_gateway": "payflow_pro", "expiry_month": 9, "expiry_year": 2030 }, "payment_terms": 1, "payment_terms_label": "Due On Receipt", "can_add_bank_account": true, "customer": { "customer_id": "903000000099", "display_name": "Bowman Furniture", "salutation": "Mr.", "first_name": "Benjamin", "last_name": "George", "email": "benjamin.george@bowmanfurniture.com", "company_name": "Bowman Furniture", "billing_address": { "attention": "Benjamin George", "street": "Harrington Bay Street", "city": "Salt Lake City", "state": "CA", "country": "U.S.A", "zip": 92612, "fax": 4527389 }, "shipping_address": { "attention": "Benjamin George", "street": "Harrington Bay Street", "city": "Salt Lake City", "state": "CA", "zip": 92612, "country": "U.S.A", "fax": 4527389 }, "payment_terms": 1, "payment_terms_label": "Due On Receipt" }, "custom_fields": [ { "index": 1, "label": "string", "value": "string", "data_type": "text" } ], "taxes": [ { "tax_id": "903000002345", "tax_name": "GST", "tax_amount": "2.50" } ], "contactpersons": [ { "contactperson_id": "903000000000099" } ], "notes": [ { "note_id": "903000076543", "description": "", "commented_by": "Benjamin", "commented_time": "2016-06-11T17:57:13-0700" } ], "payment_gateways": [ { "payment_gateway": null } ] } }

Reactivate subscription

Reactivate a subscription. You can reactivate a subscription only if the `status` of the subscription is non-renewing.
oauthscope : ZohoSubscriptions.subscriptions.CREATE

Request Example

Click to copy
$ curl https://subscriptions.zoho.com/api/v1/subscriptions/{subscription_id}/reactivate -X POST -H "X-com-zoho-subscriptions-organizationid: 10234695" -H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f"

Response Example

{ "code": 0, "message": "Subscription has been reactivated successfully.", "subscription": { "subscription_id": "90300000079200", "name": "GatorHost-Basic", "status": "live", "amount": 50, "created_at": "2016-06-11", "activated_at": "2016-06-15", "current_term_starts_at": "2016-06-05", "current_term_ends_at": "2016-06-05", "last_billing_at": "2016-06-05", "next_billing_at": "2016-06-30", "expires_at": "2016-06-05", "interval": 1, "interval_unit": "months", "auto_collect": true, "created_time": "2016-06-11T17:57:13-0700", "updated_time": "2016-06-04T16:44:15-0700", "reference_id": "bowmanfurniture", "salesperson_id": "903000000058001", "salesperson_name": "Franklin", "child_invoice_id": "90300000079210", "currency_code": "USD", "currency_symbol": "$", "end_of_term": false, "product_id": "90300000079065", "product_name": "Bowman Furniture", "plan": { "plan_code": "basic-monthly", "name": "GatorHost-Basic", "quantity": 1, "price": 50, "tags": [ { "tag_id": 0, "tag_option_id": 0 } ], "item_custom_fields": [ { "label": "string", "value": "string" } ], "discount": 20, "total": 50, "setup_fee": 20, "plan_description": "Monthly Basic plan", "billing_cycles": -1, "trial_days": 0 }, "addons": [ { "addon_code": "Email-basic", "name": "Monthly Addon", "addon_description": "Monthly addon.", "quantity": 1, "tags": [ { "tag_id": 0, "tag_option_id": 0 } ], "item_custom_fields": [ { "label": "string", "value": "string" } ], "price": 10, "discount": null, "total": null } ], "coupon": { "coupon_code": "Flat10", "discount_amount": 44 }, "card": { "card_id": "90300000079226", "last_four_digits": 2145, "payment_gateway": "payflow_pro", "expiry_month": 9, "expiry_year": 2030 }, "payment_terms": 1, "payment_terms_label": "Due On Receipt", "can_add_bank_account": true, "customer": { "customer_id": "903000000000099", "display_name": "Bowman Furniture", "first_name": "Benjamin", "last_name": "George", "email": "benjamin.george@bowmanfurniture.com", "company_name": "Bowman Furniture", "billing_address": { "attention": "Benjamin George", "street": "Harrington Bay Street", "city": "Salt Lake City", "state": "CA", "country": "U.S.A", "zip": 92612, "fax": 4527389 }, "shipping_address": { "attention": "Benjamin George", "street": "Harrington Bay Street", "city": "Salt Lake City", "state": "CA", "zip": 92612, "country": "U.S.A", "fax": 4527389 }, "payment_terms": 1, "payment_terms_label": "Due On Receipt" }, "custom_fields": [ { "index": 1, "label": "string", "value": "string", "data_type": "text" } ], "taxes": [ { "tax_id": "903000002345", "tax_name": "GST", "tax_amount": "2.50" } ], "contactpersons": [ { "contactperson_id": "903000000000099" } ], "notes": [ { "note_id": "903000076543", "description": "string", "commented_by": "Benjamin", "commented_time": "2016-06-11T17:57:13-0700" } ], "payment_gateways": [ { "payment_gateway": null } ] } }

View Scheduled Changes

To view the End of Term changes.
oauthscope : ZohoSubscriptions.subscriptions.READ

Request Example

Click to copy
$ curl https://subscriptions.zoho.com/api/v1/subscriptions/{subscription_id}/scheduledchanges -H "X-com-zoho-subscriptions-organizationid: 10234695" -H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f"

Response Example

{ "code": 0, "message": "success", "subscription": { "subscription_id": "90300000079200", "name": "GatorHost-Basic", "status": "live", "amount": 50, "created_at": "2016-06-11", "activated_at": "2016-06-15", "current_term_ends_at": "2016-06-05", "current_term_starts_at": "2016-06-05", "last_billing_at": "2016-06-05", "next_billing_at": "2016-06-30", "expires_at": "2016-06-05", "interval": 1, "interval_unit": "months", "auto_collect": true, "created_time": "2016-06-11T17:57:13-0700", "updated_time": "2016-06-04T16:44:15-0700", "reference_id": "bowmanfurniture", "salesperson_id": "903000000058001", "salesperson_name": "Franklin", "currency_code": "USD", "currency_symbol": "$", "product_id": "90300000079065", "plan": { "plan_code": "basic-monthly", "name": "GatorHost-Basic", "quantity": 1, "price": 50, "discount": 20, "total": 50, "setup_fee": 20, "plan_description": "Monthly Basic plan", "tax_id": "903000002345", "trial_days": 0 }, "addons": [ { "addon_code": "Email-basic", "name": "Monthly Addon", "addon_description": "Monthly addon.", "quantity": 1, "price": 10, "discount": null, "total": null, "tax_id": null } ], "taxes": [ { "tax_id": "903000002345", "tax_name": "GST", "tax_amount": "2.50" } ], "coupon": { "coupon_code": "Flat10", "discount_amount": 44 }, "tax_id": "903000002345" } }

Subscription Activities

List of all the recent activities associated to a subscription.
oauthscope : ZohoSubscriptions.subscriptions.READ

Request Example

Click to copy
$ curl https://subscriptions.zoho.com/api/v1/subscriptions/{subscription_id}/recentactivities -H "X-com-zoho-subscriptions-organizationid: 10234695" -H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f"

Response Example

{ "code": 0, "message": "success", "activities": [ { "activity_id": "90300000745213", "description": "Invoice created - INV-000241", "activity_time": "2016-06-11T17:57:13-0700", "commented_by": "Zoho Subscriptions" }, {...}, {...} ] }

Buy one-time addon

Include a one-time addon in the subscription.
oauthscope : ZohoSubscriptions.subscriptions.CREATE

Arguments

addons
array
(Required)
List of addon objects which are to be included in the subscription. Each object contains addon_code, name, price and quantity.
Show Sub-Attributes arrow
addon_code
string
(Required)
Addon code of the addon.
quantity
integer
Required quantity of the chosen addon.
tags
array
Show Sub-Attributes arrow
tag_id
long
ID of the Tag
tag_option_id
long
Id of the Tag Option
item_custom_fields
array
Custom fields for a item.
Show Sub-Attributes arrow
label
string
Label of the Custom Field
value
string
Value of the Custom Field
price
double
A value can be provided here if the per unit addon price has to be overridden for this subscription.
tax_id
(Required) for applying tax or tax exemption to a addon
Unique ID of Tax or Tax Group that must be associated with the addon. tax_id must be empty for applying tax Exemption.
tax_exemption_id
Unique ID of the tax exemption applied for the addon. To apply tax exemption also include tax_id as empty string.
tax_exemption_code
Unique Code of the tax exemption applied for the addon. To apply tax exemption also include tax_id as empty string.
product_type
string
VAT only
Product type for UK Edition.
exchange_rate
double
, default is the exchange rate provided in settings.
This will be the exchange rate provided for the organization's currency and the customer's currency. The subscription fee would be the multiplicative product of the original price and the exchange rate.
coupon_code
The coupon code of the coupon which is to be applied to the one-time addon.
add_to_unbilled_charges
boolean
When the value is given as true, the charges for the add-on will be put as unbilled. If the subscription already has unbilled-charges, this will be added as another line item to it. The unbilled charge can be converted to invoice at any later point of time.

Request Example

Click to copy
$ curl https://subscriptions.zoho.com/api/v1/subscriptions/{subscription_id}/buyonetimeaddon -X POST -H "X-com-zoho-subscriptions-organizationid: 10234695" -H "Content-Type: application/json;charset=UTF-8" -H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f" -d '{"field":"value","field":"value"}'

Body Parameters

Click to copy
{ "addons": [ { "addon_code": "Email-basic", "quantity": 1, "tags": [ { "tag_id": 0, "tag_option_id": 0 } ], "item_custom_fields": [ { "label": "string", "value": "string" } ], "price": 10, "tax_id": null, "tax_exemption_id": null, "tax_exemption_code": null, "product_type": "goods" } ], "exchange_rate": 2, "coupon_code": null, "add_to_unbilled_charges": true }

Response Example

{ "code": 0, "message": "One-time addon has been purchased successfully.", "invoice": { "invoice_id": "9030000079426", "number": "INV-384", "status": "live", "invoice_date": "2016-06-15", "due_date": "2016-06-15", "payment_expected_date": "10-05-2016", "ach_payment_initiated": true, "invoice_items": [ { "item_id": "90300000079434", "name": "GatorHost-Basic", "description": "One time addon purchased", "code": "basic-monthly", "price": 50, "quantity": 1, "tags": [ { "tag_id": 0, "tag_option_id": 0 } ], "item_custom_fields": [ { "label": "string", "value": "string" } ], "discount_amount": 44, "item_total": 50 } ], "transaction_type": "invoice", "customer_id": "903000000000099", "customer_name": "Benjamin", "email": "benjamin.george@bowmanfurniture.com", "total": 50, "payment_made": 370, "balance": 0, "coupons": [ { "coupon_code": "Flat10", "coupon_name": "Flat 10", "discount_amount": 44 } ], "credits_applied": 0, "credits": [ { "creditnote_id": "9030000079876", "creditnotes_number": "CN-26", "credited_date": "2016-06-15", "credited_amount": 15 } ], "taxes": [ { "tax_id": "903000002345", "tax_name": "GST", "tax_amount": "2.50" } ], "custom_fields": [ { "index": 1, "label": "string", "value": "string", "data_type": "text" } ], "salesperson_id": "903000000058001", "salesperson_name": "Franklin", "write_off_amount": 0, "payments": [ { "payment_id": "90300000079467", "payment_mode": "autotransaction", "invoice_payment_id": "9030000079469", "gateway_transaction_id": "9030000056453", "description": "", "date": "2016-06-15", "reference_number": "INV-384", "amount": 50, "exchange_rate": 2 } ], "currency_code": "USD", "currency_symbol": "$", "created_time": "2016-06-11T17:57:13-0700", "updated_time": "2016-06-04T16:44:15-0700", "billing_address": { "attention": "Benjamin George", "street": "Harrington Bay Street", "city": "Salt Lake City", "state": "CA", "country": "U.S.A", "zip": 92612, "fax": 4527389 }, "shipping_address": { "attention": "Benjamin George", "street": "Harrington Bay Street", "city": "Salt Lake City", "state": "CA", "zip": 92612, "country": "U.S.A", "fax": 4527389 }, "comments": [ { "comment_id": "90300000003133", "description": "Invoice has been marked as void", "commented_by_id": "90300000002099", "commented_by": null, "comment_type": "system", "date": null, "time": "2016-06-11T17:57:13-0700", "operation_type": "add", "transaction_id": "9030000079467", "transaction_type": "invoice" } ] } }

Associate a coupon

Apply a coupon to a subscription which has been already created.
oauthscope : ZohoSubscriptions.subscriptions.CREATE

Request Example

Click to copy
$ curl https://subscriptions.zoho.com/api/v1/subscriptions/{subscription_id}/coupons/{coupon_code} -X POST -H "X-com-zoho-subscriptions-organizationid: 10234695" -H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f"

Response Example

{ "code": 0, "message": "The coupon has been added to the subscription." }

Remove a coupon

To remove coupon associated with a subscription.
oauthscope : ZohoSubscriptions.subscriptions.DELETE

Request Example

Click to copy
$ curl https://subscriptions.zoho.com/api/v1/subscriptions/{subscription_id}/coupons -X DELETE -H "X-com-zoho-subscriptions-organizationid: 10234695" -H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f"

Response Example

{ "code": 0, "message": "The coupon has been removed from the subscription." }

Update Card

Update the card details of a customer. Once updated, the past card will no longer be charged.
oauthscope : ZohoSubscriptions.subscriptions.CREATE

Arguments

card_id
string
(Required) if auto_collect node is true and any other payment method is not specified
Enter the card_id of the card which has to be updated.
auto_collect
boolean
auto_collect is set to true for creating an online subscription which will charge the customer’s card automatically on every renewal. To create an offline subscriptions, set auto_collect to false.

Request Example

Click to copy
$ curl https://subscriptions.zoho.com/api/v1/subscriptions/{subscription_id}/card -X POST -H "X-com-zoho-subscriptions-organizationid: 10234695" -H "Content-Type: application/json;charset=UTF-8" -H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f" -d '{"field":"value","field":"value"}'

Body Parameters

Click to copy
{ "card_id": "9030000079226", "auto_collect": true }

Response Example

{ "code": 0, "message": "Card has been updated successfully.", "subscription": { "subscription_id": "90300000079200", "name": "GatorHost-Basic", "status": "live", "amount": 50, "created_at": "2016-06-11", "activated_at": "2016-06-15", "current_term_starts_at": "2016-06-05", "current_term_ends_at": "2016-06-05", "last_billing_at": "2016-06-05", "next_billing_at": "2016-06-30", "expires_at": "2016-06-05", "interval": 1, "interval_unit": "months", "auto_collect": true, "created_time": "2016-06-11T17:57:13-0700", "updated_time": "2016-06-04T16:44:15-0700", "reference_id": "bowmanfurniture", "salesperson_id": "903000000058001", "salesperson_name": "Franklin", "child_invoice_id": "90300000079210", "currency_code": "USD", "currency_symbol": "$", "end_of_term": false, "product_id": "90300000079065", "product_name": "Bowman Furniture", "plan": { "plan_code": "basic-monthly", "name": "GatorHost-Basic", "quantity": 1, "price": 50, "discount": 20, "total": 50, "setup_fee": 20, "plan_description": "Monthly Basic plan", "tax_id": "903000002345", "trial_days": 0 }, "addons": [ { "addon_code": "Email-basic", "name": "Monthly Addon", "addon_description": "Monthly addon.", "quantity": 1, "price": 10, "discount": null, "total": null, "tax_id": null } ], "coupon": { "coupon_code": "Flat10", "discount_amount": 44 }, "card": { "card_id": "903000079226", "last_four_digits": 2145, "payment_gateway": "payflow_pro", "expiry_month": 9, "expiry_year": 2030 }, "payment_terms": 1, "payment_terms_label": "Due On Receipt", "can_add_bank_account": true, "customer": { "customer_id": "9030000000099", "display_name": "Bowman Furniture", "first_name": "Benjamin", "last_name": "George", "email": "benjamin.george@bowmanfurniture.com", "company_name": "Bowman Furniture", "billing_address": { "attention": "Benjamin George", "street": "Harrington Bay Street", "city": "Salt Lake City", "state": "CA", "country": "U.S.A", "zip": 92612, "fax": 4527389 }, "shipping_address": { "attention": "Benjamin George", "street": "Harrington Bay Street", "city": "Salt Lake City", "state": "CA", "zip": 92612, "country": "U.S.A", "fax": 4527389 }, "payment_terms": 1, "payment_terms_label": "Due On Receipt" }, "custom_fields": [ { "index": 1, "label": "string", "value": "string", "data_type": "text" } ], "contactpersons": [ { "contactperson_id": "903000000000099" } ], "notes": [ { "note_id": "903000076543", "description": "", "commented_by": "Benjamin", "commented_time": "2016-06-11T17:57:13-0700" } ], "payment_gateways": [ { "payment_gateway": null } ] } }

Remove Card

Delete a card associated with the subscription. The subscription will become an offline subscription.
oauthscope : ZohoSubscriptions.subscriptions.DELETE

Request Example

Click to copy
$ curl https://subscriptions.zoho.com/api/v1/subscriptions/{subscription_id}/card -X DELETE -H "X-com-zoho-subscriptions-organizationid: 10234695" -H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f"

Response Example

{ "code": 0, "message": "Card has been successfully removed from the subscription." }

Add Charge

Charge a one-time amount for the subscription.
oauthscope : ZohoSubscriptions.subscriptions.CREATE

Arguments

amount
double
(Required)
The amount that needs to be charged for the subscription.
description
Make a note of why the customer was charged so that if can be used for any future reference.
tags
array
Show Sub-Attributes arrow
tag_id
long
ID of the Tag
tag_option_id
long
Id of the Tag Option
item_custom_fields
array
Custom fields for a item.
Show Sub-Attributes arrow
label
string
Label of the Custom Field
value
string
Value of the Custom Field
account_id
string
Account ID which the add charge is associated.
add_to_unbilled_charges
boolean
When the value is given as true, the charges will be put as unbilled. If the subscription already has unbilled-charges, this will be added as another line item to it. The unbilled charge can be converted to invoice at any later point of time.

Request Example

Click to copy
$ curl https://subscriptions.zoho.com/api/v1/subscriptions/{subscription_id}/charge -X POST -H "X-com-zoho-subscriptions-organizationid: 10234695" -H "Content-Type: application/json;charset=UTF-8" -H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f" -d '{"field":"value","field":"value"}'

Body Parameters

Click to copy
{ "amount": 50, "description": "Charges for Additional usage", "tags": [ { "tag_id": 0, "tag_option_id": 0 } ], "item_custom_fields": [ { "label": "string", "value": "string" } ], "account_id": "90300000791111", "add_to_unbilled_charges": true }

Response Example

{ "code": 0, "message": "One time charge has been added successfully.", "invoice": { "invoice_id": "9030000079426", "number": "INV-384", "status": "live", "invoice_items": [ { "item_id": "90300000079434", "name": "One-time charge", "description": "Charges for Additional usage", "code": "basic-monthly", "price": 50, "quantity": 1, "tags": [ { "tag_id": 0, "tag_option_id": 0 } ], "item_custom_fields": [ { "label": "string", "value": "string" } ], "item_total": 50, "account_id": "90300000791111", "account_name": "General Income" } ], "invoice_date": "2016-06-15", "due_date": "2016-06-15", "payment_expected_date": "10-05-2016", "ach_payment_initiated": true, "transaction_type": "invoice", "customer_id": "903000000000099", "customer_name": "Benjamin", "email": "benjamin.george@bowmanfurniture.com", "total": 50, "payment_made": 50, "balance": 0, "credits_applied": 0, "write_off_amount": 0, "payments": [ { "payment_id": "90300000079467", "payment_mode": "autotransaction", "invoice_payment_id": "9030000079469", "gateway_transaction_id": "9030000056453", "description": "", "date": "2016-06-15", "reference_number": "INV-384", "amount": 50, "exchange_rate": 2 } ], "currency_code": "USD", "currency_symbol": "$", "created_time": "2016-06-11T17:57:13-0700", "updated_time": "2016-06-04T16:44:15-0700", "billing_address": { "attention": "Benjamin George", "street": "Harrington Bay Street", "city": "Salt Lake City", "state": "CA", "country": "U.S.A", "zip": 92612, "fax": 4527389 }, "comments": [ { "comment_id": "90300000003133", "description": "Invoice created from subscription - GatorHost-Basic.", "commented_by_id": "90300000002099", "commented_by": null, "comment_type": "system", "date": null, "time": "2016-06-11T17:57:13-0700", "operation_type": "add", "transaction_id": "9030000079467", "transaction_type": "invoice" } ] } }

Add contact person

Associate a contact person with the subscription. Only an existing contact person can be associated.
oauthscope : ZohoSubscriptions.subscriptions.CREATE

Arguments

contactpersons
array
(Required)
List of contact person objects. Each object contains contactperson_id.
Show Sub-Attributes arrow
contactperson_id
string
(Required)
Contact person ID of the customer’s contact person.

Request Example

Click to copy
$ curl https://subscriptions.zoho.com/api/v1/subscriptions/{subscription_id}/contactpersons -X POST -H "X-com-zoho-subscriptions-organizationid: 10234695" -H "Content-Type: application/json;charset=UTF-8" -H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f" -d '{"field":"value","field":"value"}'

Body Parameters

Click to copy
{ "contactpersons": [ { "contactperson_id": "903000000000099" } ] }

Response Example

{ "code": 0, "message": "The contact person's information has been added.", "subscription": { "subscription_id": "90300000079200", "name": "GatorHost-Basic", "status": "live", "amount": 50, "created_at": "2016-06-11", "activated_at": "2016-06-15", "current_term_starts_at": "2016-06-05", "current_term_ends_at": "2016-06-05", "last_billing_at": "2016-06-05", "next_billing_at": "2016-06-30", "expires_at": "2016-06-05", "interval": 1, "interval_unit": "months", "auto_collect": true, "created_time": "2016-06-11T17:57:13-0700", "updated_time": "2016-06-04T16:44:15-0700", "reference_id": "bowmanfurniture", "salesperson_id": "903000000058001", "salesperson_name": "Franklin", "child_invoice_id": "90300000079210", "currency_code": "USD", "currency_symbol": "$", "end_of_term": false, "product_id": "90300000079065", "product_name": "Bowman Furniture", "plan": { "plan_code": "basic-monthly", "name": "GatorHost-Basic", "quantity": 1, "price": 50, "discount": 20, "total": 50, "setup_fee": 20, "plan_description": "Monthly Basic plan", "tax_id": "903000002345", "trial_days": 0 }, "addons": [ { "addon_code": "Email-basic", "name": "Monthly Addon", "addon_description": "Monthly addon.", "quantity": 1, "price": 50, "discount": null, "total": null, "tax_id": null } ], "coupon": { "coupon_code": "Flat10", "discount_amount": 44 }, "card": { "card_id": "9030000079226", "last_four_digits": 2145, "payment_gateway": "payflow_pro", "expiry_month": 9, "expiry_year": 2030 }, "payment_terms": 1, "payment_terms_label": "Due On Receipt", "can_add_bank_account": true, "customer": { "customer_id": "9030000000099", "display_name": "Bowman Furniture", "first_name": "Benjamin", "last_name": "George", "email": "benjamin.george@bowmanfurniture.com", "company_name": "Bowman Furniture", "billing_address": { "attention": "Benjamin George", "street": "Harrington Bay Street", "city": "Salt Lake City", "state": "CA", "country": "U.S.A", "zip": 92612, "fax": 4527389 }, "shipping_address": { "attention": "Benjamin George", "street": "Harrington Bay Street", "city": "Salt Lake City", "state": "CA", "zip": 92612, "country": "U.S.A", "fax": 4527389 }, "payment_terms": 1, "payment_terms_label": "Due On Receipt" }, "custom_fields": [ { "index": 1, "label": "string", "value": "string", "data_type": "text" } ], "taxes": [ { "tax_id": "903000002345", "tax_name": "GST", "tax_amount": "2.50" } ], "contactpersons": [ { "contactperson_id": "903000000000099" } ], "notes": [ { "note_id": "903000076543", "description": "", "commented_by": "Benjamin", "commented_time": "2016-06-11T17:57:13-0700" } ], "payment_gateways": [ { "payment_gateway": null } ] } }

Postpone renewal

A subscription renewal date (billing date) can be postponed thereby extending the subscription term. Also, subscription renewal can only be postponed and not preponed.
oauthscope : ZohoSubscriptions.subscriptions.CREATE

Arguments

renewal_at
string
(Required)
Enter the future date to which the subscription renewal has to be postponed.

Request Example

Click to copy
$ curl https://subscriptions.zoho.com/api/v1/subscriptions/{subscription_id}/postpone -X POST -H "X-com-zoho-subscriptions-organizationid: 10234695" -H "Content-Type: application/json;charset=UTF-8" -H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f" -d '{"field":"value","field":"value"}'

Body Parameters

Click to copy
{ "renewal_at": "2016-06-24" }

Response Example

{ "code": 0, "message": "Billing date of the subscription has been changed.", "subscription": { "subscription_id": "90300000079200", "name": "GatorHost-Basic", "status": "live", "amount": 50, "created_at": "2016-06-11", "activated_at": "2016-06-15", "current_term_starts_at": "2016-06-05", "current_term_ends_at": "2016-06-05", "last_billing_at": "2016-06-05", "next_billing_at": "2016-06-30", "expires_at": "2016-06-05", "interval": 1, "interval_unit": "months", "auto_collect": true, "created_time": "2016-06-11T17:57:13-0700", "updated_time": "2016-06-04T16:44:15-0700", "reference_id": "bowmanfurniture", "salesperson_id": "903000000058001", "salesperson_name": "Franklin", "child_invoice_id": "90300000079210", "currency_code": "USD", "currency_symbol": "$", "end_of_term": false, "product_id": "90300000079065", "product_name": "Bowman Furniture", "plan": { "plan_code": "basic-monthly", "name": "GatorHost-Basic", "quantity": 1, "price": 50, "discount": 20, "total": 50, "setup_fee": 20, "plan_description": "Monthly Basic plan", "tax_id": "903000002345", "trial_days": 0 }, "addons": [ { "addon_code": "Email-basic", "name": "Monthly Addon", "addon_description": "Monthly addon.", "quantity": 1, "price": 10, "discount": null, "total": null, "tax_id": null } ], "coupon": { "coupon_code": "Flat10", "discount_amount": 44 }, "card": { "card_id": "90300000079226", "last_four_digits": 2145, "payment_gateway": "payflow_pro", "expiry_month": 9, "expiry_year": 2030 }, "payment_terms": 1, "payment_terms_label": "Due On Receipt", "can_add_bank_account": true, "customer": { "customer_id": "903000000099", "display_name": "Bowman Furniture", "first_name": "Benjamin", "last_name": "George", "email": "benjamin.george@bowmanfurniture.com", "company_name": "Bowman Furniture", "billing_address": { "attention": "Benjamin George", "street": "Harrington Bay Street", "city": "Salt Lake City", "state": "CA", "country": "U.S.A", "zip": 92612, "fax": 4527389 }, "shipping_address": { "attention": "Benjamin George", "street": "Harrington Bay Street", "city": "Salt Lake City", "state": "CA", "zip": 92612, "country": "U.S.A", "fax": 4527389 }, "payment_terms": 1, "payment_terms_label": "Due On Receipt" }, "custom_fields": [ { "index": 1, "label": "string", "value": "string", "data_type": "text" } ], "taxes": [ { "tax_id": "903000002345", "tax_name": "GST", "tax_amount": "2.50" } ], "contactpersons": [ { "contactperson_id": "903000000000099" } ], "notes": [ { "note_id": "903000076543", "description": "", "commented_by": "Benjamin", "commented_time": "2016-06-11T17:57:13-0700" } ], "payment_gateways": [ { "payment_gateway": null } ] } }

Add/Edit description for a plan in line items list

Add/Edit description to a particular plan in the line items list.
oauthscope : ZohoSubscriptions.subscriptions.CREATE

Arguments

description
(Required)
Make a note of why the customer was charged so that if can be used for any future reference.

Request Example

Click to copy
$ curl https://subscriptions.zoho.com/api/v1/subscriptions/{subscription_id}/lineitems/{plan_code} -X POST -H "X-com-zoho-subscriptions-organizationid: 10234695" -H "Content-Type: application/json;charset=UTF-8" -H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f" -d '{"field":"value","field":"value"}'

Body Parameters

Click to copy
{ "description": "" }

Response Example

{ "code": 0, "message": "Item description has been updated successfully." }

Add/Edit description for a addon in line items list

Add/Edit description to a particular addon in the line items list.
oauthscope : ZohoSubscriptions.subscriptions.CREATE

Arguments

description
string
(Required)
Make a note of why the customer was charged so that if can be used for any future reference.

Request Example

Click to copy
$ curl https://subscriptions.zoho.com/api/v1/subscriptions/{subscription_id}/lineitems/{addon_code} -X POST -H "X-com-zoho-subscriptions-organizationid: 10234695" -H "Content-Type: application/json;charset=UTF-8" -H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f" -d '{"field":"value","field":"value"}'

Body Parameters

Click to copy
{ "description": "" }

Response Example

{ "code": 0, "message": "Item description has been updated successfully." }

Change to Online/Offline mode

Change the status of a particular subscription to Online/Offline mode. If auto_collect is false, the subscription is in Offline mode. If auto_collect is true, the subscription is in Online mode.
oauthscope : ZohoSubscriptions.subscriptions.CREATE

Arguments

auto_collect
(Required)
auto_collect is set to true for creating an online subscription which will charge the customer’s card automatically on every renewal. To create an offline subscriptions, set auto_collect to false.

Request Example

Click to copy
$ curl https://subscriptions.zoho.com/api/v1/subscriptions/{subscription_id}/autocollect -X POST -H "X-com-zoho-subscriptions-organizationid: 10234695" -H "Content-Type: application/json;charset=UTF-8" -H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f" -d '{"field":"value","field":"value"}'

Body Parameters

Click to copy
{ "auto_collect": true }

Response Example

{ "code": 0, "message": "Auto charge Status has been changed successfully.", "subscription": { "subscription_id": "90300000079200", "name": "GatorHost-Basic", "status": "live", "amount": 50, "created_at": "2016-06-11", "activated_at": "2016-06-15", "current_term_starts_at": "2016-06-05", "current_term_ends_at": "2016-06-05", "last_billing_at": "2016-06-05", "next_billing_at": "2016-06-30", "expires_at": "2016-06-05", "interval": 1, "interval_unit": "months", "auto_collect": true, "created_time": "2016-06-11T17:57:13-0700", "updated_time": "2016-06-04T16:44:15-0700", "reference_id": "bowmanfurniture", "salesperson_id": "903000000058001", "salesperson_name": "Franklin", "child_invoice_id": "90300000079210", "currency_code": "USD", "currency_symbol": "$", "end_of_term": false, "product_id": "90300000079065", "product_name": "Bowman Furniture", "plan": { "plan_code": "basic-monthly", "name": "GatorHost-Basic", "quantity": 1, "price": 50, "discount": 20, "total": 50, "setup_fee": 20, "plan_description": "Monthly Basic plan", "tax_id": "903000002345", "trial_days": 0 }, "addons": [ { "addon_code": "Email-basic", "name": "Monthly Addon", "addon_description": "Monthly addon.", "quantity": 1, "price": 10, "discount": null, "total": null, "tax_id": null } ], "coupon": { "coupon_code": "Flat10", "discount_amount": 44 }, "card": { "card_id": "90300000079226", "last_four_digits": 2145, "payment_gateway": "payflow_pro", "expiry_month": 9, "expiry_year": 2030 }, "payment_terms": 1, "payment_terms_label": "Due On Receipt", "can_add_bank_account": true, "customer": { "customer_id": "903000000000099", "display_name": "Bowman Furniture", "first_name": "Benjamin", "last_name": "George", "email": "benjamin.george@bowmanfurniture.com", "company_name": "Bowman Furniture", "billing_address": { "attention": "Benjamin George", "street": "Harrington Bay Street", "city": "Salt Lake City", "state": "CA", "country": "U.S.A", "zip": 92612, "fax": 4527389 }, "shipping_address": { "attention": "Benjamin George", "street": "Harrington Bay Street", "city": "Salt Lake City", "state": "CA", "zip": 92612, "country": "U.S.A", "fax": 4527389 }, "payment_terms": 1, "payment_terms_label": "Due On Receipt" }, "custom_fields": [ { "index": 1, "label": "string", "value": "string", "data_type": "text" } ], "taxes": [ { "tax_id": "903000002345", "tax_name": "GST", "tax_amount": "2.50" } ], "contactpersons": [ { "contactperson_id": "903000000000099" } ], "notes": [ { "note_id": "903000076543", "description": "string", "commented_by": "Benjamin", "commented_time": "2016-06-11T17:57:13-0700" } ], "payment_gateways": [ { "payment_gateway": null } ] } }

Update Reference

Update reference id to easily identify and keep track of your subscription.
oauthscope : ZohoSubscriptions.subscriptions.CREATE

Arguments

reference_id
(Required)
A string of your choice is required to easily identify and keep track of your subscriptions.

Request Example

Click to copy
$ curl https://subscriptions.zoho.com/api/v1/subscriptions/{subscription_id}/reference -X POST -H "X-com-zoho-subscriptions-organizationid: 10234695" -H "Content-Type: application/json;charset=UTF-8" -H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f" -d '{"field":"value","field":"value"}'

Body Parameters

Click to copy
{ "reference_id": "bowmanfurniture" }

Response Example

{ "code": 0, "message": "Subscription has been updated successfully.", "subscription": { "subscription_id": "90300000079200", "name": "GatorHost-Basic", "status": "live", "amount": 50, "created_at": "2016-06-11", "activated_at": "2016-06-15", "current_term_starts_at": "2016-06-05", "current_term_ends_at": "2016-06-05", "last_billing_at": "2016-06-05", "next_billing_at": "2016-06-30", "expires_at": "2016-06-05", "interval": 1, "interval_unit": "months", "auto_collect": true, "created_time": "2016-06-11T17:57:13-0700", "updated_time": "2016-06-04T16:44:15-0700", "reference_id": "bowmanfurniture", "salesperson_id": "903000000058001", "salesperson_name": "Franklin", "child_invoice_id": "90300000079210", "currency_code": "USD", "currency_symbol": "$", "end_of_term": false, "product_id": "90300000079065", "product_name": "Bowman Furniture", "plan": { "plan_code": "basic-monthly", "name": "GatorHost-Basic", "quantity": 1, "price": 50, "discount": 20, "total": 50, "setup_fee": 20, "plan_description": "Monthly Basic plan", "tax_id": "903000002345", "trial_days": 0 }, "addons": [ { "addon_code": "Email-basic", "name": "Monthly Addon", "addon_description": "Monthly addon.", "quantity": 1, "price": 10, "discount": null, "total": null, "tax_id": null } ], "coupon": { "coupon_code": "Flat10", "discount_amount": 44 }, "card": { "card_id": "90300000079226", "last_four_digits": 2145, "payment_gateway": "payflow_pro", "expiry_month": 9, "expiry_year": 2030 }, "payment_terms": 1, "payment_terms_label": "Due On Receipt", "can_add_bank_account": true, "customer": { "customer_id": "903000000000099", "display_name": "Bowman Furniture", "first_name": "Benjamin", "last_name": "George", "email": "benjamin.george@bowmanfurniture.com", "company_name": "Bowman Furniture", "billing_address": { "attention": "Benjamin George", "street": "Harrington Bay Street", "city": "Salt Lake City", "state": "CA", "country": "U.S.A", "zip": 92612, "fax": 4527389 }, "shipping_address": { "attention": "Benjamin George", "street": "Harrington Bay Street", "city": "Salt Lake City", "state": "CA", "zip": 92612, "country": "U.S.A", "fax": 4527389 }, "payment_terms": 1, "payment_terms_label": "Due On Receipt" }, "custom_fields": [ { "index": 1, "label": "string", "value": "string", "data_type": "text" } ], "taxes": [ { "tax_id": "903000002345", "tax_name": "GST", "tax_amount": "2.50" } ], "contactpersons": [ { "contactperson_id": "903000000000099" } ], "notes": [ { "note_id": "903000076543", "description": "string", "commented_by": "Benjamin", "commented_time": "2016-06-11T17:57:13-0700" } ], "payment_gateways": [ { "payment_gateway": null } ] } }

Update Sales Person

Update a sales person associated with a particular subscription.
oauthscope : ZohoSubscriptions.subscriptions.CREATE

Arguments

salesperson_id
(Required)
Unique Id of the sales person assigned for the subscription.
salesperson_name
string
(Required)
Name of the sales person assigned for the subscription.

Request Example

Click to copy
$ curl https://subscriptions.zoho.com/api/v1/subscriptions/{subscription_id}/salesperson -X POST -H "X-com-zoho-subscriptions-organizationid: 10234695" -H "Content-Type: application/json;charset=UTF-8" -H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f" -d '{"field":"value","field":"value"}'

Body Parameters

Click to copy
{ "salesperson_id": "", "salesperson_name": "Franklin" }

Response Example

{ "code": 0, "message": "Sales Person has been updated successfully.", "subscription": { "subscription_id": "90300000079200", "name": "GatorHost-Basic", "status": "live", "amount": 50, "created_at": "2016-06-11", "activated_at": "2016-06-15", "current_term_starts_at": "2016-06-05", "current_term_ends_at": "2016-06-05", "last_billing_at": "2016-06-05", "next_billing_at": "2016-06-30", "expires_at": "2016-06-05", "interval": 1, "interval_unit": "months", "auto_collect": true, "created_time": "2016-06-11T17:57:13-0700", "updated_time": "2016-06-04T16:44:15-0700", "reference_id": "bowmanfurniture", "salesperson_id": "903000000058001", "salesperson_name": "Franklin", "child_invoice_id": "90300000079210", "currency_code": "USD", "currency_symbol": "$", "end_of_term": false, "product_id": "90300000079065", "product_name": "Bowman Furniture", "plan": { "plan_code": "basic-monthly", "name": "GatorHost-Basic", "quantity": 1, "price": 50, "discount": 20, "total": 50, "setup_fee": 20, "plan_description": "Monthly Basic plan", "tax_id": "903000002345", "trial_days": 0 }, "addons": [ { "addon_code": "Email-basic", "name": "Monthly Addon", "addon_description": "Monthly addon.", "quantity": 1, "price": 10, "discount": null, "total": null, "tax_id": null } ], "coupon": { "coupon_code": "Flat10", "discount_amount": 44 }, "card": { "card_id": "90300000079226", "last_four_digits": 2145, "payment_gateway": "payflow_pro", "expiry_month": 9, "expiry_year": 2030 }, "payment_terms": 1, "payment_terms_label": "Due On Receipt", "can_add_bank_account": true, "customer": { "customer_id": "903000000000099", "display_name": "Bowman Furniture", "first_name": "Benjamin", "last_name": "George", "email": "benjamin.george@bowmanfurniture.com", "company_name": "Bowman Furniture", "billing_address": { "attention": "Benjamin George", "street": "Harrington Bay Street", "city": "Salt Lake City", "state": "CA", "country": "U.S.A", "zip": 92612, "fax": 4527389 }, "shipping_address": { "attention": "Benjamin George", "street": "Harrington Bay Street", "city": "Salt Lake City", "state": "CA", "zip": 92612, "country": "U.S.A", "fax": 4527389 }, "payment_terms": 1, "payment_terms_label": "Due On Receipt" }, "custom_fields": [ { "index": 1, "label": "string", "value": "string", "data_type": "text" } ], "taxes": [ { "tax_id": "903000002345", "tax_name": "GST", "tax_amount": "2.50" } ], "contactpersons": [ { "contactperson_id": "903000000000099" } ], "notes": [ { "note_id": "903000076543", "description": "string", "commented_by": "Benjamin", "commented_time": "2016-06-11T17:57:13-0700" } ], "payment_gateways": [ { "payment_gateway": null } ] } }

Update Custom Fields

Update the custom fields associated with a particular subscription.
oauthscope : ZohoSubscriptions.subscriptions.CREATE

Arguments

custom_fields
array
(Required)
Additional fields for the invoices.
Show Sub-Attributes arrow
label
string
(Required)
Label of the Custom Field
value
string
(Required)
Value of the Custom Field

Request Example

Click to copy
$ curl https://subscriptions.zoho.com/api/v1/subscriptions/{subscription_id}/customfields -X POST -H "X-com-zoho-subscriptions-organizationid: 10234695" -H "Content-Type: application/json;charset=UTF-8" -H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f" -d '{"field":"value","field":"value"}'

Body Parameters

Click to copy
{ "custom_fields": [ { "label": "string", "value": "string" } ] }

Response Example

{ "code": 0, "message": "Custom Fields Updated Successfully.", "data": { "index": 1, "value": "string", "label": "string", "data_type": "text", "customfield_id": "9030000089798" } }

Add a note

Notes related to the subscription can be added by the user at anytime.
oauthscope : ZohoSubscriptions.subscriptions.CREATE

Arguments

description
Small description about the note.

Request Example

Click to copy
$ curl https://subscriptions.zoho.com/api/v1/subscriptions/{subscription_id}/notes -X POST -H "X-com-zoho-subscriptions-organizationid: 10234695" -H "Content-Type: application/json;charset=UTF-8" -H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f" -d '{"field":"value","field":"value"}'

Body Parameters

Click to copy
{ "description": null }

Response Example

{ "code": 0, "message": "Notes added.", "note": { "notes": [ { "note_id": "903000076543", "description": "", "commented_by": "Benjamin", "commented_time": "2016-06-11T17:57:13-0700" } ] } }

Delete a note

Delete a specific note.
oauthscope : ZohoSubscriptions.subscriptions.DELETE

Request Example

Click to copy
$ curl https://subscriptions.zoho.com/api/v1/subscriptions/{subscription_id}/notes/{note_id} -X DELETE -H "X-com-zoho-subscriptions-organizationid: 10234695" -H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f"

Response Example

{ "code": 0, "message": "The note has been deleted." }