sudiptochoudhury / php-zoho-subscriptions
PHP Client Library to Consume Zoho Subscriptions REST API
Installs: 10 067
Dependents: 0
Suggesters: 0
Security: 0
Stars: 5
Watchers: 1
Forks: 6
Open Issues: 0
pkg:composer/sudiptochoudhury/php-zoho-subscriptions
Requires
- php: >=7.0.0
- sudiptochoudhury/php-api-client-forge: dev-master
Requires (Dev)
- mockery/mockery: ^1.1.0
- phpunit/phpunit: ^7.2.0
README
Zoho Subscriptions API Client for PHP
use SudiptoChoudhury\Zoho\Subscriptions\Api; ... $subscriptions = new Api([ 'oauthtoken' => '<<Zoho Subscriptions OAuth Token>>', // https://www.zoho.com/subscriptions/api/v1/#oauth 'zohoOrgId' => '<<Zoho Organization ID>>', ]); $resultJson = $subscriptions->addCustomer($data); // create a customer $resultJson = $subscriptions->addSubscription($data); // create a subscription
Auth Token (Will be deprecated soon), but you can still use it.
use SudiptoChoudhury\Zoho\Subscriptions\Api; ... $subscriptions = new Api([ 'authtoken' => '<<Zoho Subscriptions Auth Token>>', // https://accounts.zoho.com/apiauthtoken/nb/create 'zohoOrgId' => '<<Zoho Organization ID>>', ]); $resultJson = $subscriptions->addCustomer($data); // create a customer $resultJson = $subscriptions->addSubscription($data); // create a subscription
Installation
Requirements
- Any flavour of PHP 7.0+ should do
Install With Composer
You can install the library via Composer by adding the following line to the require block of your composer.json file (replace dev-master with latest stable version):
"sudiptochoudhury/php-zoho-subscriptions": "dev-master"
or run the following command:
composer require sudiptochoudhury/php-zoho-subscriptions
Setting up Authentication
Get Organization ID Before you start, read https://www.zoho.com/subscriptions/api/v1/#organization-id to know your Organization ID.
Setup OAuth and use oauth token
Follow instructions from https://www.zoho.com/subscriptions/api/v1/#oauth and get the oathtoken.
Pass the oauth token via the constructor.
use SudiptoChoudhury\Zoho\Subscriptions\Api; new Api([ 'oauthtoken' => '<<Zoho Subscriptions OAuth Token>>', // https://www.zoho.com/subscriptions/api/v1/#oauth 'zohoOrgId' => '<<Zoho Organization ID>>', ]);
Or Use AuthToken
will be deprecated soon
Crete and retrieve AuthToken from https://accounts.zoho.com/apiauthtoken/nb/create and set the AuthToken and Organization ID in the constructor.
use SudiptoChoudhury\Zoho\Subscriptions\Api; new Api([ 'authtoken' => '<<Zoho Subscriptions Auth Token>>', // https://accounts.zoho.com/apiauthtoken/nb/create 'zohoOrgId' => '<<Zoho Organization ID>>', ]);
How to use
Next, call the desired method from the table given below. In some methods you may need to pass parameters. The parameters are to be passed as an associative array. The required list of parameters can be found in the parameters column of the table or you may get more details going to the original Zoho Subscription API documentation.
Examples:
$resultJson = $subscriptions->getOrganizations(); $resultJson = $subscriptions->addCustomer(['display_name'=> 'Sudipto Choudhury', 'email'=> 'mail@sudipto.net']); // create a customer
Available API Methods
| Method & Endpoint | Parameters | Description |
|---|---|---|
getHostedpage(array)[GET] /hostedpages/{hostedpage_id} |
hostedpage_id |
Getting the details of a particular hosted page PlaceHolder to replace : hostedpage_idAPI DOC HELP DOC |
getHostedpages()[GET] /hostedpages |
[none] | Listing all the hostedpages API DOC HELP DOC |
addNewSubscriptionHostedpages(array)[POST] /hostedpages/newsubscription |
customer_idcontactpersonsplanaddonsstarts_atcustom_fieldscoupon_codereference_idadditional_paramredirect_url |
Creating a hosted page for a new subscription for an existing customer API DOC HELP DOC |
addNewCustomerNewSubscriptionHostedpages(array)[POST] /hostedpages/newsubscription |
planaddonsstarts_atcustom_fieldscoupon_codereference_idadditional_paramredirect_url |
Creating a hosted page for a new subscription for a new customer API DOC HELP DOC |
addUpdateCardHostedpages(array)[POST] /hostedpages/updatecard |
subscription_idadditional_paramredirect_url |
Creating a hosted page for updating a card linked to a specific subscription API DOC HELP DOC |
addOnetimeAddonHostedpages(array)[POST] /hostedpages/buyonetimeaddon |
subscription_idaddonsadditional_paramredirect_url |
Creating a hosted page for onetime addon purchase API DOC HELP DOC |
addUpdateSubscriptionHostedpages(array)[POST] /hostedpages/updatesubscription |
subscription_idcontactpersonsplanaddonsreference_idstarts_atadditional_paramredirect_url |
Creating a hosted page for updating an existing subscription API DOC HELP DOC |
getTransactions(array)[GET] /transactions?customer_id={customer_id}&filter_by={filter_by} |
customer_idfilter_by [default: TransactionType.ALL] |
List all transactions of a particular customer Allowed parameters and its allowed values : 1) filter_by : TransactionType.(All | INVOICE | PAYMENT | CREDIT | REFUND)2) customer_id : Customer ID of the customerPlaceHolder to replace : customer_idAPI DOC HELP DOC |
deleteCustomerComment(array)[DELETE] /customers/{customer_id}/comments/{comment_id} |
customer_idcomment_id |
Delete a particular customer comment. PlaceHolder to replace : customer_idcomment_id |
activateCustomers(array)[POST] /customers/markasactive?customer_ids={customer_ids} |
customer_ids |
Bulk marking multiple customers as active Placeholders to replace : customer_idscustomer_ids should be replaced by customer id's seperated by comma |
disableCustomerPaymentReminder(array)[POST] /customers/{customer_id}/paymentreminder/disable |
customer_id |
Disabling payment reminder for a particular customer Placeholders to replace : customer_id |
activateCustomer(array)[POST] /customers/{customer_id}/markasactive |
customer_id |
Marking a particular customer as active Placeholders to replace : customer_idAPI DOC HELP DOC |
getCustomers(array)[GET] /customers?filter_by={filter_by} |
filter_by [default: Status.All] |
Retrieving details of all the customers Allowed parameters and its allowed values : 1) filter_by : Status.(All | Active | Inactive | Gapps | Crm | NonSubscribers | PortalEnabled | PortalDisabled)API DOC HELP DOC |
getCustomer(array)[GET] /customers/{customer_id} |
customer_id |
Retrieving details of a particular customer PlaceHolder to replace : customer_idAPI DOC HELP DOC |
getCustomerComments(array)[GET] /customers/{customer_id}/comments |
customer_id |
Retrieving comments of a particular customer PlaceHolder to replace : customer_idHELP DOC |
updateCustomer(array)[PUT] /customers/{customer_id} |
customer_iddisplay_namesalutationfirst_namelast_nameemailcompany_namephonemobilewebsitetwitterfacebookbilling_addressshipping_addresscurrency_codenotespayment_termspayment_terms_labelach_supportedcustom_fieldsdefault_templates |
Updating the details of a particular customer PlaceHolder to replace : customer_idAPI DOC HELP DOC |
deleteCustomer(array)[DELETE] /customers/{customer_id} |
customer_id |
Delete a particular customer. PlaceHolder to replace : customer_idAPI DOC HELP DOC |
getCustomerUnusedCredits(array)[GET] /customers/{customer_id}/unusedcredits |
customer_id |
Unused credit of a particular customer PlaceHolder to replace : customer_idHELP DOC |
deactivateCustomers(array)[POST] /customers/markasinactive?customer_ids={customer_ids} |
customer_ids |
Bulk marking multiple customers as inactive Placeholders to replace : customer_idscustomer_ids should be replaced by customer id's seperated by comma |
addCustomer(array)[POST] /customers |
display_namesalutationfirst_namelast_nameemailcompany_namephonemobilewebsitetwitterfacebookbilling_addressshipping_addresscurrency_codenotespayment_termspayment_terms_labelach_supportedcustom_fieldsdefault_templates |
Creating a new customer API DOC HELP DOC |
deleteCustomers(array)[DELETE] /customers?customer_ids={customer_ids} |
customer_ids |
Bulk deleting customers PlaceHolders to replace : customer_idscustomer_ids should be passed as a param. Make sure that the customer_ids are seperated by ,(comma)Eg: customer_ids=112072000001700227,11207200001700228 HELP DOC |
deactivateCustomer(array)[POST] /customers/{customer_id}/markasinactive |
customer_id |
Marking a particular customer as inactive Placeholders to replace : customer_idAPI DOC HELP DOC |
enableCustomerPaymentReminder(array)[POST] /customers/{customer_id}/paymentreminder/enable |
customer_id |
Enabling payment reminder for a particular customer Placeholders to replace : customer_id |
deleteCustomerAddress(array)[DELETE] /customers/{customer_id}/address/{address_id} |
customer_idaddress_id |
Delete an existing customer's address. PlaceHolder to replace : customer_idaddress_id |
deleteCustomerPaypalAccount(array)[DELETE] /customers/{customer_id}/paypalaccounts/{paypal_id} |
customer_idpaypal_id |
To delete a particular PayPal account of a particular customer PlaceHolders to replace : customer_idpaypal_id |
deleteProduct(array)[DELETE] /products/{product_id} |
product_id |
Delete an existing product. PlaceHolder to replace : product_idAPI DOC HELP DOC |
updateProduct(array)[PUT] /products/{product_id} |
product_idnamedescriptionemail_idsredirect_url |
Updating the details of a particular product PlaceHolder to replace : product_idAPI DOC HELP DOC |
addProduct(array)[POST] /products |
namedescriptionemail_idsredirect_url |
Creating a new product API DOC HELP DOC |
getProduct(array)[GET] /products/{product_id}?showchild={showchild} |
product_idshowchild [default: true] |
Retreiving details of a product Placeholders to be replaced : product_idAllowed parameters and its allowed values : 1) show_child : true | falseIf show_child paramter is provided, all the plans, add-ons, couopons created under the product will be retreived. API DOC HELP DOC |
activateProduct(array)[POST] /products/{product_id}/markasactive |
product_id |
Marking a particular product as active Placeholders to replace : product_idAPI DOC HELP DOC |
getProducts(array)[GET] /products?filter_by={filter_by} |
filter_by [default: ProductStatus.All] |
List of all Products Allowed parameters and its allowed values : 1) filter_by : ProductStatus.(All | ACTIVE | INACTIVE | search)API DOC HELP DOC |
deactivateProduct(array)[POST] /products/{product_id}/markasinactive |
product_id |
Marking a particular product as inactive Placeholders to replace : product_idAPI DOC HELP DOC |
deleteSalesPerson(array)[DELETE] /salespersons/{salesperson_id} |
salesperson_id |
Delete an existing salesperson PlaceHolders to be replaced : salesperson_id |
deleteSalesPersons(array)[DELETE] /salespersons?salesperson_ids={salesperson_ids} |
salesperson_ids |
Bulk delete multiple sales persons **PlaceHolders to be replaced : ** salesperson_idssalesperson_ids should be replaced by sales person ids seperated by commas(,) |
getSalesPersons()[GET] /salespersons |
[none] | List details of all sales person |
deleteCreditnoteRefund(array)[DELETE] /creditnotes/{creditnote_id}/refunds/{refund_id} |
creditnote_idrefund_id |
Delete an existing credit note refund PlaceHolder to replace : creditnote_idrefund_id |
deleteCreditnote(array)[DELETE] /creditnotes/{creditnote_id} |
creditnote_id |
Delete an existing credit note PlaceHolder to replace : creditnote_idAPI DOC |
deleteCreditnoteComment(array)[DELETE] /creditnotes/{creditnote_id}/comments/{comment_id} |
creditnote_idcomment_id |
Delete a comment for a credit note PlaceHolder to replace : creditnote_idcomment_id |
getRefundCreditnote(array)[GET] /creditnotes/refunds/{refund_id} |
refund_id |
Details of an existing refund Placeholders to replace : refund_idAPI DOC |
addCreditnoteRefunds(array)[POST] /creditnotes/{creditnote_id}/refunds |
creditnote_idamountdescription |
Refund an existing credit note PlaceHolder to replace : creditnote_idHELP DOC |
deleteCreditnoteInvoice(array)[DELETE] /creditnotes/{creditnote_id}/invoices/{creditnote_invoice_id} |
creditnote_idcreditnote_invoice_id |
Delete the credits applied to invoices PlaceHolder to replace : creditnote_idcreditnote_invoice_id |
addCreditnoteInvoices(array)[POST] /creditnotes/{creditnote_id}/invoices |
creditnote_idinvoices |
Apply credits from credit note to invoices PlaceHolders to be replaced : creditnote_id |
addInvoiceEmail(array)[POST] /invoices/{creditnote_id}/email |
creditnote_idto_mail_idscc_mail_idssubjectbody |
Email a particular credit note Placeholders to replace : creditnote_id |
openVoidCreditnote(array)[POST] /creditnotes/{creditnote_id}/converttoopen |
creditnote_id |
Convert a voided credit note to open PlaceHolder to replace : creditnote_idAPI DOC |
voidCreditnote(array)[POST] /creditnotes/{creditnote_id}/void |
creditnote_id |
Void an existing credit note for a particular customer PlaceHolder to replace : creditnote_idAPI DOC |
getCreditnote(array)[GET] /creditnotes/{creditnotes_id} |
creditnotes_id |
Retrieve an existing credit note PlaceHolder to replace : creditnote_idAPI DOC |
addCreditnoteCustomFields(array)[POST] /creditnotes/{creditnote_id}/customfields |
creditnote_idcustom_fields |
Updating custom fields for a credit note You can update custom fields only if they are configured Placeholders to replace : creditnote_id |
addCreditnote(array)[POST] /creditnotes |
customer_idcontact_personscreditnote_numberignore_auto_number_generationreference_numberdateexchange_ratecreditnote_itemscustom_fieldsnotestermstemplate_id |
Creating a Credit note for particular customer API DOC HELP DOC |
deleteCreditnotes(array)[DELETE] /creditnotes?creditnote_ids={creditnote_ids} |
creditnote_ids |
Delete an existing credit note refund PlaceHolder to replace : creditnote_idscreditnote_ids should be replaced by credit note ids seperated by commas(,) |
getProductPlans(array)[GET] /plans?product_id={product_id}&filter_by={filter_by} |
product_idfilter_by [default: PlanStatus.All] |
Listing all the plans for a specific product Allowed parameters and its allowed values : 1) filter_by : PlanStatus.(All | ACTIVE | INACTIVE | search)2) product_id : Product ID of a product. Allows to list all plans under the product.3) search_text : Any text value. Allows to search plans matching the text provided.PlaceHolders to replace : product_idAPI DOC HELP DOC |
updatePlan(array)[PUT] /plans/{plan_code} |
plan_codenamerecurring_priceintervalinterval_unitbilling_cyclestrial_periodsetup_feeaddonsproduct_idaccount_idtax_iddescription |
Updating the details of a particular plan PlaceHolder to replace : plan_codeAPI DOC HELP DOC |
addPlan(array)[POST] /plans |
nameplan_codeproduct_iddescriptionintervalinterval_unitbilling_cyclessetup_pricetrial_periodrecurring_priceaccount_idtax_id |
Creating a new plan API DOC HELP DOC |
deactivatePlan(array)[POST] /plans/{plan_code}/markasinactive |
plan_code |
Marking a plan as inactive Place Holders to replace : plan_codeAPI DOC HELP DOC |
activatePlan(array)[POST] /plans/{plan_code}/markasactive |
plan_code |
Marking a plan as active Place Holders to replace : plan_codeAPI DOC HELP DOC |
getPlan(array)[GET] /plans/{plan_code} |
plan_code |
Retreiving details of a particular plan PlaceHolder to replace : plan_codeAPI DOC HELP DOC |
deletePlan(array)[DELETE] /plans/{plan_code} |
plan_code |
Delete an existing plan. A plan can only be deleted if it has no transactions associated with it. PlaceHolder to replace : plan_codeAPI DOC HELP DOC |
getPlans(array)[GET] /plans?filter_by={filter_by} |
filter_by [default: PlanStatus.All] |
Listing all the plans Allowed parameters and its allowed values : 1) filter_by : PlanStatus.(All | ACTIVE | INACTIVE | search)2) product_id : Product ID of a product. Allows to list all plans under the product.3) search_text : Any text value. Allows to search plans matching the text provided.API DOC HELP DOC |
addSubscriptionNotes(array)[POST] /subscriptions/{subscription_id}/notes |
subscription_iddescription |
Notes related to a particular subscription can be added by any user at any time PlaceHolder to replace : subscription_idAPI DOC HELP DOC |
reactivateSubscription(array)[POST] /subscriptions/{subscription_id}/reactivate |
subscription_id |
Reactivating a subscription Only a subscription which is in "non-renewing" status can be reactivated PlaceHolder to replace : subscription_idAPI DOC HELP DOC |
deleteSubscriptionNote(array)[DELETE] /subscriptions/{subscription_id}/notes/{note_id} |
subscription_idnote_id |
Delete a specific note associated to a particular subscription PlaceHolder to replace : subscription_idnote_idAPI DOC |
addSubscription(array)[POST] /subscriptions |
customer_idplanaddonscoupon_codepayment_termspayment_terms_labelstarts_atexchange_ratesalesperson_namereference_idcustom_fieldsauto_collectcardpayment_gateways |
Creating an online subscription for an already existing customer API DOC HELP DOC |
cancelSubscriptions(array)[POST] /subscriptions/bulkcancel?subscription_ids={subscription_ids} |
subscription_ids |
Bulk cancelling multiple subscriptions You can only cancel 25 subscriptions at a time PlaceHolder to replace : subscription_idsHELP DOC |
addSubscriptionLineItem(array)[POST] /subscriptions/{subscription_id}/lineitems/{plan_code} |
subscription_idplan_codedescription |
Add/Edit description to a particular plan in the line items list PlaceHolder to replace : subscription_idplan_codeAPI DOC HELP DOC |
deleteSubscriptionCard(array)[DELETE] /subscriptions/{subscription_id}/card |
subscription_id |
Delete a card associated with the subscription. Once removed, the subscription will become an offline subscription. PlaceHolder to replace : subscription_idAPI DOC |
updateSubscription(array)[PUT] /subscriptions/{subscription_id} |
subscription_id |
Updating the details of a particular subscription PlaceHolder to replace : subscription_idAPI DOC HELP DOC |
addSubscriptionBankAccount(array)[POST] /subscriptions/{subscription_id}/bankaccount |
subscription_idauto_collectaccount_id |
Associate an existing bank account/Update to an existing bank account with a subscription PlaceHolder to replace : subscription_idHELP DOC |
getSubscriptions(array)[GET] /subscriptions?filter_by={filter_by}&customer_id={customer_id} |
filter_by [default: SubscriptionStatus.All]customer_id |
Listing all the subscriptions Allowed parameters and its allowed values : 1) filter_by : SubscriptionStatus.(All | IN_PROGRESS | TRIAL | FUTURE | LIVE | UNPAID | PAST_DUE | NON_RENEWING | CANCELLED | CANCELLED_FROM_DUNNING | EXPIRED | CREATION_FAILED | TRIAL_EXPIRED | CANCELLED_THIS_MONTH | CANCELLED_LAST_MONTH | ACTIVE)SubscriptionMode.(ONLINE | OFFLINE)2) customer_id : Customer ID of a customer. Lists all invoices of a customer.API DOC HELP DOC |
setSubscriptionOnline(array)[POST] /subscriptions/{subscription_id}/autocollect |
subscription_idauto_collect [default: true] |
Change a particular subscription to online mode PlaceHolder to replace : subscription_idAPI DOC HELP DOC |
getSubscription(array)[GET] /subscriptions/{subscription_id} |
subscription_id |
Getting the details about a particular subscription PlaceHolder to replace : subscription_idAPI DOC HELP DOC |
addSubscriptionOnetimeAddon(array)[POST] /subscriptions/{subscription_id}/buyonetimeaddon |
subscription_idaddonsexchange_ratecoupon_code |
Include a one-time addon to a particular subscription PlaceHolder to replace : subscription_idAPI DOC HELP DOC |
addOfflineSubscription(array)[POST] /subscriptions |
customer_idplanaddonscoupon_codestarts_atexchange_ratepayment_termspayment_terms_labelsalesperson_namereference_idcustom_fieldsauto_collect [default: false]payment_gateways |
Creating an offline subscription for an already existing customer API DOC HELP DOC |
addSubscriptionCoupon(array)[POST] /subscriptions/{subscription_id}/coupons/{coupon_code} |
subscription_idcoupon_code |
Associating a coupon to a paricular subscription PlaceHolder to replace : subscription_idcoupon_codeAPI DOC HELP DOC |
deleteSubscription(array)[DELETE] /subscriptions/{subscription_id} |
subscription_id |
Deleting an existing subscription PlaceHolder to replace : subscription_idAPI DOC HELP DOC |
getSubscriptionScheduledChanges(array)[GET] /subscriptions/{subscription_id}/scheduledchanges |
subscription_id |
Retrieving the scheduled changes of a particular subscription PlaceHolder to replace : subscription_idAPI DOC HELP DOC |
addSubscriptionCard(array)[POST] /subscriptions/{subscription_id}/card |
subscription_idcard_idauto_collect |
Associate/Update card with an existing card for a particular subscription PlaceHolder to replace : subscription_idAPI DOC HELP DOC |
getSubscriptionRecentActivities(array)[GET] /subscriptions/{subscription_id}/recentactivities |
subscription_id |
Retrieving all activities of a particular subscription PlaceHolder to replace : subscription_idAPI DOC HELP DOC |
getSubscriptionNotes(array)[GET] /subscriptions/{subscription_id}/notes |
subscription_id |
Retrieving notes of a particular subscription PlaceHolder to replace : subscription_idHELP DOC |
deleteSubscriptionScheduledChanges(array)[DELETE] /subscriptions/{subscription_id}/scheduledchanges |
subscription_id |
Dropping the scheduled changes of a particular subscription PlaceHolder to replace : subscription_id |
addSubscriptionCustomFields(array)[POST] /subscriptions/{subscription_id}/customfields |
subscription_idcustom_fields |
Update custome fields for a particular subscription PlaceHolder to replace : subscription_idAPI DOC HELP DOC |
addSubscriptionNewBankAccount(array)[POST] /subscriptions/{subscription_id}/bankaccount |
subscription_idbank_accountauto_collect |
Associate/Update bank account with a new bank account for a particular subscription PlaceHolder to replace : subscription_idHELP DOC |
addSubscriptionsCompute(array)[POST] /subscriptions/compute |
subscription_idplanaddonscoupon_codestarts_atexchange_ratepayment_termspayment_terms_labelsalesperson_namereference_idcustom_fieldsauto_collectpayment_gateways |
Preview amount of the subscription and invoice. This can be called while both at time of creating a subscription/updating a subscription. For compute during update, you will have to pass the subscription_id node in the JSON body HELP DOC |
setSubscriptionOffline(array)[POST] /subscriptions/{subscription_id}/autocollect |
subscription_idauto_collect [default: false] |
Change a particular subscription to offline mode PlaceHolder to replace : subscription_idAPI DOC HELP DOC |
updateSubscriptionCard(array)[POST] /subscriptions/{subscription_id}/card |
subscription_idcardauto_collect |
Associate/Update card with a new card for a particular subscription PlaceHolder to replace : subscription_idAPI DOC HELP DOC |
addSubscriptionOnetimeCharge(array)[POST] /subscriptions/{subscription_id}/charge |
subscription_idamountdescription |
Charge a one-time amount for a subscription PlaceHolder to replace : subscription_idAPI DOC HELP DOC |
addNewCustomerSubscription(array)[POST] /subscriptions |
customercardstarts_atexchange_rateplanaddonscustom_fieldspayment_termspayment_terms_labelcoupon_codeauto_collectsalesperson_namereference_idpayment_gateways |
Creating a subscription for a new customer This works as a quick-create Customer while creating the subscription API DOC HELP DOC |
cancelSubscriptionNow(array)[POST] /subscriptions/{subscription_id}/cancel?cancel_at_end={cancel_at_end} |
subscription_idcancel_at_end [default: false] |
Cancelling the subscription immediately PlaceHolder to replace : subscription_idAPI DOC HELP DOC |
addSubscriptionPaypalAccount(array)[POST] /subscriptions/{subscription_id}/paypalaccount |
subscription_idpaypal_id |
Associate/Update PayPal account with an existing PayPal account for a particular subscription PlaceHolder to replace : subscription_idHELP DOC |
postponeSubscription(array)[POST] /subscriptions/{subscription_id}/postpone |
subscription_idrenewal_at |
Renewal date refers to the billing date of the subsequent term. You can postpone date of renewal of the subscription by specifying an appropriate date on which the customer should be billed. No prorated charges will be applied. Billing date for the subscription will be replaced by the date which you provide PlaceHolder to replace : subscription_idAPI DOC HELP DOC |
deleteSubscriptionBankAccount(array)[DELETE] /subscriptions/{subscription_id}/bankaccount |
subscription_id |
Delete a bank account associated with the subscription. Once removed, the subscription will become an offline subscription. PlaceHolder to replace : subscription_id |
addSubscriptionContactPersons(array)[POST] /subscriptions/{subscription_id}/contactpersons |
subscription_idcontactpersons |
Associate an existing contact person with a particular subscription PlaceHolder to replace : subscription_idAPI DOC HELP DOC |
addSubscriptionReference(array)[POST] /subscriptions/{subscription_id}/reference |
subscription_idreference_id |
Update reference id to easily identify and keep track of your subscription PlaceHolder to replace : subscription_idAPI DOC HELP DOC |
getCustomersSubscriptions(array)[GET] /subscriptions?filter_by={filter_by}&customer_id={customer_id} |
filter_by [default: SubscriptionStatus.All]customer_id |
Listing all the subscriptions Allowed parameters and its allowed values : 1) filter_by : SubscriptionStatus.(All | IN_PROGRESS | TRIAL | FUTURE | LIVE | UNPAID | PAST_DUE | NON_RENEWING | CANCELLED | CANCELLED_FROM_DUNNING | EXPIRED | CREATION_FAILED | TRIAL_EXPIRED | CANCELLED_THIS_MONTH | CANCELLED_LAST_MONTH | ACTIVE)SubscriptionMode.(ONLINE | OFFLINE)2) customer_id : Customer ID of a customer. Lists all invoices of a customer.PlaceHolder to be placed : customer_idAPI DOC HELP DOC |
addSubscriptionAddonLineItem(array)[POST] /subscriptions/{subscription_id}/lineitems/{addon_code} |
subscription_idaddon_codedescription |
Add/Edit description to a particular add-on in the line items list PlaceHolder to replace : subscription_idaddon_codeAPI DOC HELP DOC |
deleteSubscriptionCoupons(array)[DELETE] /subscriptions/{subscription_id}/coupons |
subscription_id |
To remove coupon associated with a subscription PlaceHolder to replace : subscription_idAPI DOC |
cancelSubscription(array)[POST] /subscriptions/{subscription_id}/cancel?cancel_at_end={cancel_at_end} |
subscription_idcancel_at_end [default: true] |
Cancelling the subscription at the end of term of subscription PlaceHolder to replace : subscription_idAPI DOC HELP DOC |
addSubscriptionSalesPerson(array)[POST] /subscriptions/{subscription_id}/salesperson |
subscription_idsalesperson_name |
Update sales person associated with a particular subscription PlaceHolder to replace : subscription_idAPI DOC HELP DOC |
getCustomerCard(array)[GET] /customers/{customer_id}/cards/{card_id} |
customer_idcard_id |
Retrieving details of a particular card for a particular customer Placeholders to replace : customer_idcard_idAPI DOC HELP DOC |
deleteCustomerCard(array)[DELETE] /customers/{customer_id}/cards/{card_id} |
customer_idcard_id |
To delete a particular credit card for a customer PlaceHolders to replace : customer_idcard_idAPI DOC |
addCustomerCards(array)[POST] /customers/{customer_id}/cards |
customer_idcard_numberexpiry_monthexpiry_yearcvv_numberfirst_namelast_namestreetcitystatecountryzippayment_gateway |
Creating a new card for an existing customer PlaceHolder to replace : customer_idAPI DOC |
getCustomerCards(array)[GET] /customers/{customer_id}/cards |
customer_id |
Retrieving details of all cards for a particular customer Placeholders to replace : customer_idAPI DOC HELP DOC |
updateCustomerCard(array)[PUT] /customers/{customer_id}/cards/{card_id} |
customer_idcard_idcard_numberexpiry_monthexpiry_yearcvv_numberfirst_namelast_namestreetcitystatecountryzippayment_gateway |
Editing the existing Credit card information for a customer PlaceHolders to be replaced : customer_idcard_idAPI DOC |
activateCoupon(array)[POST] /coupons/{coupon_code}/markasactive |
coupon_code |
Marking a coupon as active Place Holders to replace : coupon_codeAPI DOC HELP DOC |
deleteCoupon(array)[DELETE] /coupons/{coupon_code} |
coupon_code |
Delete an existing coupon. PlaceHolders to replace : coupon_codeAPI DOC HELP DOC |
updateCoupon(array)[PUT] /coupons/{coupon_code} |
coupon_codenamedescriptionmax_redemptionexpiry_at |
Updating the details of a particular coupon PlaceHolder to replace : coupon_codeAPI DOC HELP DOC |
deactivateCoupon(array)[POST] /coupons/{coupon_code}/markasinactive |
coupon_code |
Marking a coupon as inactive Place Holders to replace : coupon_codeAPI DOC HELP DOC |
addCoupon(array)[POST] /coupons |
coupon_codenamedescriptiontypediscount_bydiscount_valueproduct_idmax_redemptionexpiry_atapply_to_plansplansapply_to_addonsaddons |
Creating a new coupon API DOC HELP DOC |
getCoupons(array)[GET] /coupons?filter_by={filter_by}&product_id={product_id} |
filter_by [default: CouponStatus.All]product_id |
Retrieving details of all coupons Allowed parameters and its allowed values : 1) filter_by : CouponStatus.(All | ACTIVE | INACTIVE | EXPIRED),search2) product_id : Product ID of a product. Allows to list all coupons under the product.3) search_text : Any text value. Allows to search coupons matching the text providedAPI DOC HELP DOC |
getCoupon(array)[GET] /coupons/{coupon_code} |
coupon_code |
Retrieving details of a particular coupon PlaceHolder to replace : coupon_codeAPI DOC HELP DOC |
get()[GET] / |
[none] | Lists all resources API endpoint of Zoho Subscriptions |
getEvent(array)[GET] /events/{event_id} |
event_id |
Retrieving details of an existing event Placeholders to replace : event_idAPI DOC |
getEvents(array)[GET] /events?filter_by={filter_by} |
filter_by [default: EventTime.All] |
Retrieving list of all events Allowed parameters and its allowed values : 1) filter_by : EventTime.(All | LastMonth | LastWeek | Today | ThisWeek | ThisMonth | CustomDate)EventType.(All | subscription_created | subscription_upgraded | subscription_downgraded | subscription_renewed | subscription_cancelled | subscription_expiring | subscription_expired | onetimeaddon_purchased | subscription_activation | subscription_reactivated | invoice_notification | payment_thankyou | payment_declined | payment_refunded | trial_expiring | subscription_cancelling | card_expired | card_expiring | subscription_ahead | subscription_deleted | creditnote_added | creditnote_updated | creditnote_deleted | card_deleted | billing_date_changed)InvoiceDate.(ThisMonth | PreviousMonth)2) event_start_date : Custom start date in YYYY-MM-DD format.3) event_end_date : Custom end date in YYYY-MM-DD format.4) sort_column : event_time | event_id | notified_timeAPI DOC |
addPayment(array)[POST] /payments |
customer_idamountdatepayment_modedescriptionreference_numberinvoicesexchange_ratebank_chargestax_account_idaccount_idcustom_fields |
Recording a new offline payment for a customer API DOC HELP DOC |
getPayment(array)[GET] /payments/{payment_id} |
payment_id |
Retrieve details of a particular payment Placeholders to replace : payment_idAPI DOC |
addPaymentRefunds(array)[POST] /payments/{payment_id}/refunds |
payment_idamountdescription |
A new credit note is created for the amount to be refund. Refund is then made for the credit note. Placeholders to replace : payment_idHELP DOC |
deletePayment(array)[DELETE] /payments/{payment_id} |
payment_id |
Delete an existing payment. Placeholders to replace : payment_idAPI DOC HELP DOC |
addProductCustomFields(array)[POST] /products/{product_id}/customfields |
product_idcustom_fields |
Updating custom fields for a payment You can update custom fields only if they are configured Placeholders to replace : payment_id |
updatePayment(array)[PUT] /payments/{payment_id} |
payment_idcustomer_idamountdatepayment_modedescriptionreference_numberinvoicesexchange_ratebank_chargestax_account_idaccount_idcustom_fields |
Update an existing new payment Placeholders to replace : payment_idAPI DOC |
getWebhook(array)[GET] /webhooks/{webhook_id} |
webhook_id |
Retrieving details of a particular webhooks that has been triggered PlaceHolders to replace : webhook_id |
getWebhooks()[GET] /webhooks |
[none] | Retrieving details of all webhooks triggered Allowed parameters and its allowed values : 1) filter_by : WebhookInitiatedTime.(All | LastMonth | LastWeek | Today | ThisWeek | ThisMonth | CustomDate)2) status_filter : all | success | failure3) sort_column : last_updated_time | webhook_id4) webhook_initiated_start_date : Webhook Custom initiated start date. Needed if CustomDate option is chosen for filter_by param.5) webhook_initiated_end_date : Webhook Custom initiated end date. Needed if CustomDate option is chosen for filter_by param. |
updateCustomerContactPerson(array)[PUT] /customers/{customer_id}/contactpersons/{contactperson_id} |
customer_idcontactperson_idsalutationfirst_namelast_nameemailphonemobilefaxtwitterdesignationdepartment |
Updating a particular contact person for a particular customer Placeholders to replace : customer_idcontactperson_idAPI DOC HELP DOC |
addCustomerContactPersons(array)[POST] /customers/{customer_id}/contactpersons |
customer_idsalutationfirst_namelast_nameemailphonemobilefaxtwitterdesignationdepartment |
Creating a contact person for an existing customer Placeholders to replace : customer_idAPI DOC HELP DOC |
getCustomerContactPersons(array)[GET] /customers/{customer_id}/contactpersons |
customer_id |
List of all contact persons for a particular customer Placeholders to replace : customer_idAPI DOC HELP DOC |
addCustomerPrimaryContactPerson(array)[POST] /customers/{customer_id}/contactpersons/{contactperson_id}/primary |
customer_idcontactperson_idsalutationfirst_namelast_nameemailphonemobilefaxtwitterfacebook |
Mark a contact person as primary contact for a customer Placeholders to replace : customer_idcontactperson_id |
deleteCustomerContactPerson(array)[DELETE] /customers/{customer_id}/contactpersons/{contactperson_id} |
customer_idcontactperson_id |
Delete an existing contact person. Placeholders to replace : customer_idcontactperson_idAPI DOC HELP DOC |
getCustomerContactPerson(array)[GET] /customers/{customer_id}/contactpersons/{contactperson_id} |
customer_idcontactperson_id |
Retrieving details of a particular contact person for a particular customer Placeholders to replace : customer_idcontactperson_idAPI DOC HELP DOC |
deleteCustomerBankAccount(array)[DELETE] /customers/{customer_id}/bankaccounts/{account_id} |
customer_idaccount_id |
To delete a particular Bank account of a particular customer PlaceHolders to replace : customer_idaccount_id |
updateCustomerBankAccount(array)[PUT] /customers/{customer_id}/bankaccounts/{account_id} |
customer_idaccount_idaccount_numberrouting_numberaccount_typebank_namefirst_namelast_nameaccept_licenseauthorization_typepayment_gateway |
Editing the existing Bank Account information for a particular customer PlaceHolders to replace : customer_id account_id |
addCustomerBankAccounts(array)[POST] /customers/{customer_id}/bankaccounts |
customer_idaccount_numberaccount_typerouting_numberbank_namefirst_namelast_nameaccept_licenseauthorization_typepayment_gateway |
Creating a new bank account for a particular customer PlaceHolder to replace : customer_id |
getCustomerBankAccount(array)[GET] /customers/{customer_id}/bankaccounts/{account_id} |
customer_idaccount_id |
Retrieving details of a particular bank account for a particular customer Placeholders to replace : customer_id account_idAPI DOC HELP DOC |
activateAddon(array)[POST] /addons/{addon_code}/markasactive |
addon_code |
Marking an addon as active Place Holders to replace : addon_codeAPI DOC HELP DOC |
addAddon(array)[POST] /addons |
nameaddon_codedescriptionapplicable_to_all_plansplanstypeunit_namepricing_scheme [default: package]price_bracketsinterval_unitproduct_idaccount_idtax_id |
Creating a new addon of package pricing scheme. API DOC HELP DOC To know more about Pricing Scheme |
getAddon(array)[GET] /addons/{addon_code} |
addon_code |
Getting the Details of a particular add-on PlaceHolder to replace : addon_codeAPI DOC HELP DOC |
getAddons(array)[GET] /addons?filter_by={filter_by}&product_id={product_id}&plan_code={plan_code} |
filter_by [default: AddonStatus.All]product_idplan_code |
Listing all the add-ons Allowed parameters and its allowed values : 1) filter_by : AddonStatus.(All | ACTIVE | INACTIVE | ONETIME | RECURRING), search2) product_id : Product ID of a product. Allows to list all plans under the product.3) plan_code : Plan code. Filters add-ons associated to the provided plan code.4) search_text : Any text value. Allows to search add-ons matching the text providedAPI DOC HELP DOC |
getProductAddons(array)[GET] /addons?product_id={product_id}&filter_by={filter_by}&plan_code={plan_code} |
product_idfilter_by [default: AddonStatus.All]plan_code |
Listing all the add-ons of a particular product PlaceHolders to replace: product_idAllowed filter_by values 1) filter_by : AddonStatus.(All | ACTIVE | INACTIVE | ONETIME | RECURRING), search2) product_id : Product ID of a product. Allows to list all plans under the product.3) plan_code : Plan code. Filters add-ons associated to the provided plan code.4) search_text : Any text value. Allows to search add-ons matching the text providedHELP DOC |
addTireAddon(array)[POST] /addons |
nameaddon_codedescriptionapplicable_to_all_plansplanstypepricing_scheme [default: tire]unit_nameprice_bracketsinterval_unitproduct_idaccount_idtax_id |
Creating a new addon of tier pricing scheme. API DOC HELP DOC To know more about Pricing Scheme |
addUnitAddon(array)[POST] /addons |
nameaddon_codedescriptionapplicable_to_all_plansplanstypepricing_scheme [default: unit]unit_nameprice_bracketsinterval_unitproduct_idaccount_idtax_id |
Creating a new addon of unit pricing scheme. API DOC HELP DOC To know more about Pricing Scheme |
updateAddon(array)[PUT] /addons/{addon_code} |
addon_codenameunit_namepricing_schemeprice_bracketstypeinterval_unitapplicable_to_all_plansplansproduct_idaccount_iddescriptiontax_id |
Updating the details of a particular addon PlaceHolder to replace : addon_codeAPI DOC HELP DOC |
getPlanAddons(array)[GET] /addons?plan_code={plan_code}&filter_by={filter_by} |
plan_codefilter_by [default: AddonStatus.All] |
Listing all the add-ons associated to a particular plan PlaceHolders to replace: plan_codeAllowed filter_by values 1) filter_by : AddonStatus.(All | ACTIVE | INACTIVE | ONETIME | RECURRING), search2) product_id : Product ID of a product. Allows to list all plans under the product.3) plan_code : Plan code. Filters add-ons associated to the provided plan code.4) search_text : Any text value. Allows to search add-ons matching the text providedHELP DOC |
addVolumeAddon(array)[POST] /addons |
nameaddon_codedescriptionapplicable_to_all_plansplanstypepricing_scheme [default: volume]unit_nameprice_bracketsinterval_unitproduct_idaccount_idtax_id |
Creating a new addon of volume pricing scheme. API DOC HELP DOC To know more about Pricing Scheme |
deleteAddon(array)[DELETE] /addons/{addon_code} |
addon_code |
Deleting a particular addon PlaceHolder to replace : addon_codeAPI DOC HELP DOC |
deactivateAddon(array)[POST] /addons/{addon_code}/markasinactive |
addon_code |
Marking an addon as inactive Place Holders to replace : addon_codeAPI DOC HELP DOC |
addInvoiceCollect(array)[POST] /invoices/{invoice_id}/collect |
invoice_idcard_id |
Charge a customer for an invoice with an existing card Placeholders to replace : invoice_idAPI DOC |
updateInvoiceAddress(array)[PUT] /invoices/{invoice_id}/address |
invoice_idbilling_addressshipping_address |
Update shipping and billing address of an invoice Placeholders to replace : invoice_idAPI DOC |
getInvoice(array)[GET] /invoices/{invoice_id} |
invoice_id |
Retrieve details of an existing invoice Placeholders to replace : invoice_idAPI DOC |
downloadInvoiceAsPdf(array)[GET] /invoices/{invoice_id}?accept={accept} |
invoice_idaccept [default: pdf] |
Download a particular invoice as a pdf file Placeholders to replace : invoice_id |
setInvoicesAsSent(array)[POST] /invoices/sent?invoice_ids={invoice_ids} |
invoice_ids |
Bulk making invoices as Sent Placeholders to replace : invoice_ids |
getInvoices(array)[GET] /invoices?filter_by={filter_by} |
filter_by [default: Status.All] |
List of all invoices Allowed parameters and its allowed values : 1) filter_by : Status.(All | Sent | Draft | OverDue | Paid | Void | Unpaid | PartiallyPaid | Viewed)ACHPaymentInitiatedInvoiceDate.(ThisMonth | PreviousMonth)2) customer_id : Customer ID of a customer. Lists all invoices of a customer.3) subscription_id : Subscription ID of a subscription. Lists all invoices of a subscription.API DOC |
addInvoiceSalesPerson(array)[POST] /invoices/{invoice_id}/salesperson |
invoice_idsalesperson_name |
Update sales person for a particular invoice Placeholders to replace : invoice_idAPI DOC |
addInvoiceComments(array)[POST] /invoices/{invoice_id}/comments |
invoice_iddescription |
Add comments to an invoice Placeholders to replace : invoice_id |
enableInvoicePaymentReminder(array)[POST] /invoices/{invoice_id}/paymentreminder/enable |
invoice_id |
Enabling payment reminder for a particular invoice Placeholders to replace : invoice_id |
setInvoiceAsSent(array)[POST] /invoices/{invoice_id}/sent |
invoice_id |
Making a draft invoice as Sent Placeholders to replace : invoice_id |
openInvoice(array)[POST] /invoices/{invoice_id}/converttoopen |
invoice_id |
Change the status of an invoice to open Placeholders to replace : invoice_idAPI DOC |
getInvoiceRecentActivities(array)[GET] /invoices/{invoice_id}/recentactivities |
invoice_id |
Retrieving recent activities of a particular invoice Placeholders to replace : invoice_id |
emailInvoice(array)[POST] /invoices/{invoice_id}/email |
invoice_idto_mail_idscc_mail_idssubjectbody |
Email a particular invoice Placeholders to replace : invoice_id |
deleteInvoiceComment(array)[DELETE] /invoices/{invoice_id}/comments/{comment_id} |
invoice_idcomment_id |
Deleting a particular comment of an invoice Placeholders to replace : invoice_idcomment_id |
addInvoiceCustomFields(array)[POST] /invoices/{invoice_id}/customfields |
invoice_idcustom_fields |
Updating custom fields for an invoice You can update custom fields only if they are configured Placeholders to replace : invoice_idAPI DOC |
disableInvoicePaymentReminder(array)[POST] /invoices/{invoice_id}/paymentreminder/disable |
invoice_id |
Stop all payment reminder for a particular invoice Placeholders to replace : invoice_id |
getBankAccountPendingInvoices(array)[GET] /bankaccounts/{account_id}/pendinginvoices |
account_id |
Retrieving ACH pending invoices of a particular bank account Placeholders to replace : account_id |
getInvoiceComments(array)[GET] /invoices/{invoice_id}/comments |
invoice_id |
Retrieving comments of a particular invoice Placeholders to replace : invoice_id |
writeoffInvoice(array)[POST] /invoices/{invoice_id}/writeoff |
invoice_id |
Write off a particularinvoice Placeholders to replace : invoice_idAPI DOC |
cancelInvoiceWriteoff(array)[POST] /invoices/{invoice_id}/cancelwriteoff |
invoice_id |
Cancel write off for a particular invoice Placeholders to replace : invoice_idAPI DOC |
deleteInvoiceCreditsApplied(array)[DELETE] /invoices/{invoice_id}/creditsapplied/{creditnotes_invoice_id} |
invoice_idcreditnotes_invoice_id |
Deleting an existing credit applied to the invoice. Placeholders to replace : invoice_idcreditnotes_invoice_id |
deleteInvoice(array)[DELETE] /invoices/{invoice_id} |
invoice_id |
Deleting an existing invoice. Placeholders to replace : invoice_idHELP DOC |
addBankAccountCharge(array)[POST] /invoices/{invoice_id}/collect |
invoice_idaccount_id |
Charge a customer for an invoice with an existing bank account Placeholders to replace : invoice_idAPI DOC |
setInvoicePaymentDate(array)[POST] /invoices/{invoice_id}/paymentdate |
invoice_idpayment_expected_datestop_reminder_until_payment_expected_date |
Update expected payment date fop the invoice. Reminders won't be sent till the date specified Placeholders to replace : invoice_id |
voidInvoice(array)[POST] /invoices/{invoice_id}/void |
invoice_id |
Making an invoice as void Placeholders to replace : invoice_idAPI DOC |
addInvoiceCredits(array)[POST] /invoices/{invoice_id}/credits |
invoice_idapply_creditnotes |
Use the customer's open credits to the invoice PlaceHolders to be replaced : invoice_id |
addInvoiceLineItems(array)[POST] /invoices/{invoice_id}/lineitems |
invoice_idinvoice_items |
Add items to a pending invoice Placeholders to replace : invoice_idAPI DOC |
getPricebooks()[GET] /pricebooks |
[none] | Retreiving list of all pricebooks |
deleteOrganization(array)[DELETE] /organizations/{organization_id} |
organization_id |
Deleting a particular Organization PlaceHolders to be replaced : organization_id |
getOrganizations()[GET] /organizations |
[none] | Retrieving Details of all Organizations |