Zoho Billing ACTION
Create Subscription
Create a new subscription. See the documentation
- Action
- Writes data
- OAuth
- SDK
- MCP
IMPLEMENTATION
Call this tool
Connect a user's Zoho Billing account once, then configure and run Create Subscription from your backend or agent.
import { PipedreamClient } from "@pipedream/sdk"
const pd = new PipedreamClient({
projectId: process.env.PIPEDREAM_PROJECT_ID!,
clientId: process.env.PIPEDREAM_CLIENT_ID!,
clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
projectEnvironment: "production",
})
const result = await pd.actions.run({
id: "zoho_subscriptions-create-subscription",
externalUserId: "{external_user_id}", // any stable ID for this user in your system
configuredProps: {
zoho_subscriptions: { authProvisionId: "apn_xxxxxxx" },
organizationId: "Organization Id",
addToUnbilledCharges: true,
},
})
console.log(result)curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \
-H "Content-Type: application/json" \
-H "X-PD-Environment: production" \
-H "Authorization: Bearer {access_token}" \
-d '{
"external_user_id": "{external_user_id}",
"id": "zoho_subscriptions-create-subscription",
"configured_props": {
"zoho_subscriptions": { "authProvisionId": "apn_xxxxxxx" },
"organizationId": "Organization Id",
"addToUnbilledCharges": true
}
}'// accessToken: mint a short-lived token with the Connect SDK — see the MCP guide
const transport = new StreamableHTTPClientTransport(
new URL("https://remote.mcp.pipedream.net/v3"),
{
requestInit: {
headers: {
Authorization: `Bearer ${accessToken}`,
"x-pd-project-id": "{project_id}",
"x-pd-environment": "production",
"x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
"x-pd-app-slug": "zoho_subscriptions",
},
},
},
)
const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)
const { tools } = await mcp.listTools()
// listTools() hands your model this tool's input schema, so it can
// fill the arguments itself:
const result = await mcp.callTool({
name: "zoho_subscriptions-create-subscription",
arguments: {
organizationId: "Organization Id",
addToUnbilledCharges: true,
},
})SCHEMA
Inputs
Pipedream supplies the connected account. Your application provides the operation-specific values below. Dynamic inputs are resolved against that user's account.
| Property | Type | Description |
|---|---|---|
organizationId Organization Id | string | The Id of the organization you want to manage. Required Dynamic |
addToUnbilledCharges 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. Optional |
customerId Customer Id | string | Customer ID of the customer for whom a subscription needs to be created. Required Dynamic |
paymentTerms Payment Terms | integer | Payment Due details for the invoices. Optional |
paymentTermsLabel Payment Terms Label | string | Label for the paymet due details. Optional |
customFields Custom Fields | object | Additional fields for the invoices. Optional |
contactpersons Contact Person Id | string[] | List of contact person Id. Optional Dynamic |
cardId Card Id | string | Enter the card Id of the card which is to be updated. Optional Dynamic |
startsAt 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. Format: 0000-00-00 Optional |
exchangeRate Exchange Rate | string | 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. Optional |
placeOfSupply Place Of Supply | string | Place of Supply for the customer's subscription. India GST only. Optional |
planCode Plan Code | string | Plan code of the plan that is to be subscribed to the customer. Required Dynamic |
planDescription 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. Optional |
price Price | string | 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. Optional |
setupFee Setup Fee | string | Setup fee for the plan. Optional |
setupFeeTaxId Setup Fee Tax Id | string | Unique ID for tax of setup fee. Setup Fee Tax Id must be empty for applying tax Exemption. Optional |
itemCustomFields Item Custom Fields | object | Custom fields for an item. Optional |
quantity Quantity | integer | Required quantity of the chosen plan. Optional |
taxId Tax Id | string | Unique ID of Tax or Tax Group that must be associated with the plan. tax_id must be empty for applying tax Exemption. Optional |
taxExemptionId Tax Exemption Id | string | Unique ID of the tax exemption. GST only Optional |
taxExemptionCode Tax Exemption Code | string | Unique code of the tax exemption. GST only Optional |
tdsTaxId TDS Tax Id | string | ID of the TDS tax. Mexico only Optional |
satItemKeyCode Sat Item Key Code | string | Add SAT Item Key Code for your goods/services. Download the CFDI Catalogs. Mexico only Optional |
unitkeyCode Unit Key Code | string | Add SAT Unit Key Code for your goods/services. Download the CFDI Catalogs. Mexico only Optional |
setupFeeTaxExemptionId Setup Fee Tax Exemption Id | string | Unique Tax Exemption ID that must be applied to setup fee. GST only Optional |
setupFeeTaxExemptionCode Setup Fee Tax Exemption Code | string | Unique code of the tax exemption that must be applied to setup fee. GST only Optional |
excludeTrial Exclude Trial | boolean | This is set to true if the respective plan's trial period needs to be excluded for this subscription. Optional |
excludeSetupFee Exclude Setup Fee | boolean | This is set to true if the respective plan's setup fee needs to be excluded for this subscription. Optional |
billingCycles 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. Optional |
trialDays Trial Days | integer | 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. Default is 0 only if Exclude Trial is true Optional |
addons Addons | string[] | List of addon objects which are to be included in the subscription. Optional |
couponCode Coupon Code | string | The coupon code of the coupon which is to be applied to the subscription. Optional |
autoCollect 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. Required |
referenceId Reference Id | string | A string of your choice is required to easily identify and keep track of your subscriptions. Optional |
salespersonName Sales Person Name | string | Name of the sales person assigned for the subscription. Optional |
paymentGateways Payment Gateways | string[] | Payment gateway associated with the subscription. Optional |
createBackdatedInvoice Create Backdated Invoice | boolean | To allow creation of invoice for current billing cycle for back dated subscriptions. Optional |
canChargeSetupFeeImmediately 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. Optional |
templateId Template Id | string | Default Invoice Template ID for all the invoices created from the subscription. Optional |
cfdiUsage CFDI Usage | string | Choose CFDI Usage. Mexico only Optional |
allowPartialPayments Allow Partial Payments | boolean | Boolean to check if partial payments are allowed for the contact. Mexico only Optional |
accountId Account Id | string | Account ID of the bank account from which payment is made by the customer. Optional |
REFERENCE
Tool details
Behavior hints are published with the component in the Pipedream registry and surface as MCP tool annotations, so an agent can reason about a tool before it calls it.
- Registry key
- zoho_subscriptions-create-subscription
- Version
- 0.0.3
- App
- Zoho Billing
- Authentication
- OAuth
- Read-only
- No
- Destructive
- No
- Open world
- Yes
- Source
- View on GitHub ↗