← Pipedream + Zoho Subscriptions integrations

Create Subscription with Zoho Subscriptions API on New Scheduled Tasks from Pipedream API

Pipedream makes it easy to connect APIs for Zoho Subscriptions, Pipedream and 2,200+ other apps remarkably fast.

Trigger workflow on
New Scheduled Tasks from the Pipedream API
Next, do this
Create Subscription with the Zoho Subscriptions API
No credit card required
Intro to Pipedream
Watch us build a workflow
Watch us build a workflow
8 min
Watch now ➜

Trusted by 1,000,000+ developers from startups to Fortune 500 companies

Adyen logo
Appcues logo
Bandwidth logo
Checkr logo
ChartMogul logo
Dataminr logo
Gopuff logo
Gorgias logo
LinkedIn logo
Logitech logo
Replicated logo
Rudderstack logo
SAS logo
Scale AI logo
Webflow logo
Warner Bros. logo
Adyen logo
Appcues logo
Bandwidth logo
Checkr logo
ChartMogul logo
Dataminr logo
Gopuff logo
Gorgias logo
LinkedIn logo
Logitech logo
Replicated logo
Rudderstack logo
SAS logo
Scale AI logo
Webflow logo
Warner Bros. logo

Developers Pipedream

Getting Started

This integration creates a workflow with a Pipedream trigger and Zoho Subscriptions action. When you configure and deploy the workflow, it will run on Pipedream's servers 24x7 for free.

  1. Select this integration
  2. Configure the New Scheduled Tasks trigger
    1. Connect your Pipedream account
    2. Optional- Configure Secret
  3. Configure the Create Subscription action
    1. Connect your Zoho Subscriptions account
    2. Select a Organization Id
    3. Optional- Configure Add To Unbilled Charges
    4. Select a Customer Id
    5. Optional- Configure Payment Terms
    6. Optional- Configure Payment Terms Label
    7. Optional- Configure Custom Fields
    8. Optional- Select one or more Contact Person Id
    9. Optional- Select a Card Id
    10. Optional- Configure Starts At
    11. Optional- Configure Exchange Rate
    12. Optional- Configure Place Of Supply
    13. Select a Plan Code
    14. Optional- Configure Plan Description
    15. Optional- Configure Price
    16. Optional- Configure Setup Fee
    17. Optional- Configure Setup Fee Tax Id
    18. Optional- Configure Item Custom Fields
    19. Optional- Configure Quantity
    20. Optional- Configure Tax Id
    21. Optional- Configure Tax Exemption Id
    22. Optional- Configure Tax Exemption Code
    23. Optional- Configure TDS Tax Id
    24. Optional- Configure Sat Item Key Code
    25. Optional- Configure Unit Key Code
    26. Optional- Configure Setup Fee Tax Exemption Id
    27. Optional- Configure Setup Fee Tax Exemption Code
    28. Optional- Configure Exclude Trial
    29. Optional- Configure Exclude Setup Fee
    30. Optional- Configure Billing Cycles
    31. Optional- Configure Trial Days
    32. Optional- Configure Addons
    33. Optional- Configure Coupon Code
    34. Configure Auto Collect
    35. Optional- Configure Reference Id
    36. Optional- Configure Sales Person Name
    37. Optional- Select one or more Payment Gateways
    38. Optional- Configure Create Backdated Invoice
    39. Optional- Configure Can Charge Setup Fee Immediately
    40. Optional- Configure Template Id
    41. Optional- Select a CFDI Usage
    42. Optional- Configure Allow Partial Payments
    43. Optional- Configure Account Id
  4. Deploy the workflow
  5. Send a test event to validate your setup
  6. Turn on the trigger

Details

This integration uses pre-built, source-available components from Pipedream's GitHub repo. These components are developed by Pipedream and the community, and verified and maintained by Pipedream.

To contribute an update to an existing component or create a new component, create a PR on GitHub. If you're new to Pipedream component development, you can start with quickstarts for trigger span and action development, and then review the component API reference.

Trigger

Description:Exposes an HTTP API for scheduling messages to be emitted at a future time
Version:0.3.1
Key:pipedream-new-scheduled-tasks

Pipedream Overview

Pipedream is an API that allows you to build applications that can connect to
various data sources and processes them in real-time. You can use Pipedream to
create applications that can perform ETL (Extract, Transform, and Load) tasks,
as well as to create data-driven workflows.

Some examples of applications you can build using the Pipedream API include:

  • An application that can extract data from a database, transform it, and then
    load it into another database.
  • An application that can monitor a data source for changes, and then trigger a
    workflow in response to those changes.
  • An application that can poll an API for new data, and then process that data
    in real-time.

Trigger Code

import pipedream from "../../pipedream.app.mjs";
import sampleEmit from "./test-event.mjs";
import { uuid } from "uuidv4";

export default {
  key: "pipedream-new-scheduled-tasks",
  name: "New Scheduled Tasks",
  type: "source",
  description:
    "Exposes an HTTP API for scheduling messages to be emitted at a future time",
  version: "0.3.1",
  dedupe: "unique", // Dedupe on a UUID generated for every scheduled task
  props: {
    pipedream,
    secret: {
      type: "string",
      secret: true,
      label: "Secret",
      optional: true,
      description:
        "**Optional but recommended**: if you enter a secret here, you must pass this value in the `x-pd-secret` HTTP header when making requests",
    },
    http: {
      label: "Endpoint",
      description: "The endpoint where you'll send task scheduler requests",
      type: "$.interface.http",
      customResponse: true,
    },
    db: "$.service.db",
  },
  methods: {
    // To schedule future emits, we emit to the selfChannel of the component
    selfChannel() {
      return "self";
    },
    // Queue for future emits that haven't yet been delivered
    queuedEventsChannel() {
      return "$in";
    },
    httpRespond({
      status, body,
    }) {
      this.http.respond({
        headers: {
          "content-type": "application/json",
        },
        status,
        body,
      });
    },
    async selfSubscribe() {
      // Subscribe the component to itself. We do this here because even in
      // the activate hook, the component isn't available to take subscriptions.
      // Scheduled tasks are sent to the self channel, which emits the message at
      // the specified delivery_ts to this component.
      const isSubscribedToSelf = this.db.get("isSubscribedToSelf");
      if (!isSubscribedToSelf) {
        const componentId = process.env.PD_COMPONENT;
        const selfChannel = this.selfChannel();
        console.log(`Subscribing to ${selfChannel} channel for event source`);
        console.log(
          await this.pipedream.subscribe(componentId, componentId, selfChannel),
        );
        this.db.set("isSubscribedToSelf", true);
      }
    },
    validateEventBody(event, operation) {
      const errors = [];

      // Secrets are optional, so we first check if the user configured
      // a secret, then check its value against the prop (validation below)
      if (this.secret && event.headers["x-pd-secret"] !== this.secret) {
        errors.push(
          "Secret on incoming request doesn't match the configured secret",
        );
      }

      if (operation === "schedule") {
        const {
          timestamp,
          message,
        } = event.body;
        // timestamp should be an ISO 8601 string. Parse and check for validity below.
        const epoch = Date.parse(timestamp);

        if (!timestamp) {
          errors.push(
            "No timestamp included in payload. Please provide an ISO8601 timestamp in the 'timestamp' field",
          );
        }
        if (timestamp && !epoch) {
          errors.push("Timestamp isn't a valid ISO 8601 string");
        }
        if (!message) {
          errors.push("No message passed in payload");
        }
      }

      return errors;
    },
    scheduleTask(event) {
      const errors = this.validateEventBody(event, "schedule");
      let status, body;

      if (errors.length) {
        console.log(errors);
        status = 400;
        body = {
          errors,
        };
      } else {
        const id = this.emitScheduleEvent(event.body, event.body.timestamp);
        status = 200;
        body = {
          msg: "Successfully scheduled task",
          id,
        };
      }

      this.httpRespond({
        status,
        body,
      });
    },
    emitScheduleEvent(event, timestamp) {
      const selfChannel = this.selfChannel();
      const epoch = Date.parse(timestamp);
      const $id = uuid();

      console.log(`Scheduled event to emit on: ${new Date(epoch)}`);

      this.$emit(
        {
          ...event,
          $channel: selfChannel,
          $id,
        },
        {
          name: selfChannel,
          id: $id,
          delivery_ts: epoch,
        },
      );

      return $id;
    },
    async cancelTask(event) {
      const errors = this.validateEventBody(event, "cancel");
      let status, msg;

      if (errors.length) {
        console.log(errors);
        status = 400;
        msg = "Secret on incoming request doesn't match the configured secret";
      } else {
        try {
          const id = event.body.id;
          const isCanceled = await this.deleteEvent(event);
          if (isCanceled) {
            status = 200;
            msg = `Cancelled scheduled task for event ${id}`;
          } else {
            status = 404;
            msg = `No event with ${id} found`;
          }
        } catch (error) {
          console.log(error);
          status = 500;
          msg = "Failed to schedule task. Please see the logs";
        }
      }

      this.httpRespond({
        status,
        body: {
          msg,
        },
      });
    },
    async deleteEvent(event) {
      const componentId = process.env.PD_COMPONENT;
      const inChannel = this.queuedEventsChannel();

      // The user must pass a scheduled event UUID they'd like to cancel
      // We lookup the event by ID and delete it
      const { id } = event.body;

      // List events in the $in channel - the queue of scheduled events, to be emitted in the future
      const events = await this.pipedream.listEvents(
        componentId,
        inChannel,
      );
      console.log("Events: ", events);

      // Find the event in the list by id
      const eventToCancel = events.data.find((e) => {
        const { metadata } = e;
        return metadata.id === id;
      });

      console.log("Event to cancel: ", eventToCancel);

      if (!eventToCancel) {
        console.log(`No event with ${id} found`);
        return false;
      }

      // Delete the event
      await this.pipedream.deleteEvent(
        componentId,
        eventToCancel.id,
        inChannel,
      );
      return true;
    },
    emitEvent(event, summary) {
      // Delete the channel name and id from the incoming event, which were used only as metadata
      const id = event.$id;
      delete event.$channel;
      delete event.$id;

      this.$emit(event, {
        summary: summary ?? JSON.stringify(event),
        id,
        ts: +new Date(),
      });
    },
  },
  async run(event) {
    await this.selfSubscribe();

    const { path } = event;
    if (path === "/schedule") {
      this.scheduleTask(event);
    } else if (path === "/cancel") {
      await this.cancelTask(event);
    } else if (event.$channel === this.selfChannel()) {
      this.emitEvent(event);
    }
  },
  sampleEmit,
};

Trigger Configuration

This component may be configured based on the props defined in the component code. Pipedream automatically prompts for input values in the UI and CLI.
LabelPropTypeDescription
PipedreampipedreamappThis component uses the Pipedream app.
Secretsecretstring

Optional but recommended: if you enter a secret here, you must pass this value in the x-pd-secret HTTP header when making requests

N/Ahttp$.interface.httpThis component uses $.interface.http to generate a unique URL when the component is first instantiated. Each request to the URL will trigger the run() method of the component.
N/Adb$.service.dbThis component uses $.service.db to maintain state between executions.

Trigger Authentication

Pipedream uses API keys for authentication. When you connect your Pipedream account, Pipedream securely stores the keys so you can easily authenticate to Pipedream APIs in both code and no-code steps.

About Pipedream

Integration platform for developers

Action

Description:Create a new subscription. [See the documentation](https://www.zoho.com/subscriptions/api/v1/subscription/#create-a-subscription)
Version:0.0.1
Key:zoho_subscriptions-create-subscription

Zoho Subscriptions Overview

The Zoho Subscriptions API allows you to manage various aspects of subscription-based billing services. With this API, you can automate tasks such as creating subscriptions, handling customer billing info, and managing invoices. In Pipedream, you can harness this API to build workflows that respond to events in Zoho Subscriptions or to perform actions based on triggers from other apps. This enables seamless automation of billing operations and integration with your broader app ecosystem.

Action Code

import { ConfigurationError } from "@pipedream/platform";
import zohoSubscriptions from "../../zoho_subscriptions.app.mjs";

export default {
  key: "zoho_subscriptions-create-subscription",
  name: "Create Subscription",
  version: "0.0.1",
  description: "Create a new subscription. [See the documentation](https://www.zoho.com/subscriptions/api/v1/subscription/#create-a-subscription)",
  type: "action",
  props: {
    zohoSubscriptions,
    organizationId: {
      propDefinition: [
        zohoSubscriptions,
        "organizationId",
      ],
    },
    addToUnbilledCharges: {
      type: "boolean",
      label: "Add To Unbilled Charges",
      description: "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: true,
    },
    customerId: {
      propDefinition: [
        zohoSubscriptions,
        "customerId",
        ({ organizationId }) => ({
          organizationId,
        }),
      ],
    },
    paymentTerms: {
      propDefinition: [
        zohoSubscriptions,
        "paymentTerms",
      ],
      optional: true,
    },
    paymentTermsLabel: {
      propDefinition: [
        zohoSubscriptions,
        "paymentTermsLabel",
      ],
      optional: true,
    },
    customFields: {
      propDefinition: [
        zohoSubscriptions,
        "customFields",
      ],
      optional: true,
    },
    contactpersons: {
      propDefinition: [
        zohoSubscriptions,
        "contactPersonId",
        ({
          customerId, organizationId,
        }) => ({
          customerId,
          organizationId,
        }),
      ],
      type: "string[]",
      optional: true,
    },
    cardId: {
      propDefinition: [
        zohoSubscriptions,
        "cardId",
        ({
          customerId, organizationId,
        }) => ({
          customerId,
          organizationId,
        }),
      ],
      optional: true,
    },
    startsAt: {
      type: "string",
      label: "Starts At",
      description: "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: true,
    },
    exchangeRate: {
      type: "string",
      label: "Exchange Rate",
      description: "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: true,
    },
    placeOfSupply: {
      type: "string",
      label: "Place Of Supply",
      description: "Place of Supply for the customer's subscription. **India GST only**.",
      optional: true,
    },
    planCode: {
      propDefinition: [
        zohoSubscriptions,
        "planCode",
        ({ organizationId }) => ({
          organizationId,
        }),
      ],
    },
    planDescription: {
      type: "string",
      label: "Plan Description",
      description: "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: true,
    },
    price: {
      type: "string",
      label: "Price",
      description: "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: true,
    },
    setupFee: {
      type: "string",
      label: "Setup Fee",
      description: "Setup fee for the plan.",
      optional: true,
    },
    setupFeeTaxId: {
      type: "string",
      label: "Setup Fee Tax Id",
      description: "Unique ID for tax of setup fee. `Setup Fee Tax Id` must be empty for applying tax Exemption.",
      optional: true,
    },
    itemCustomFields: {
      type: "object",
      label: "Item Custom Fields",
      description: "Custom fields for an item.",
      optional: true,
    },
    quantity: {
      type: "integer",
      label: "Quantity",
      description: "Required quantity of the chosen plan.",
      optional: true,
    },
    taxId: {
      type: "string",
      label: "Tax Id",
      description: "Unique ID of Tax or Tax Group that must be associated with the plan. `tax_id` must be empty for applying tax Exemption.",
      optional: true,
    },
    taxExemptionId: {
      type: "string",
      label: "Tax Exemption Id",
      description: "Unique ID of the tax exemption. **GST only**",
      optional: true,
    },
    taxExemptionCode: {
      type: "string",
      label: "Tax Exemption Code",
      description: "Unique code of the tax exemption. **GST only**",
      optional: true,
    },
    tdsTaxId: {
      type: "string",
      label: "TDS Tax Id",
      description: "ID of the TDS tax. **Mexico only**",
      optional: true,
    },
    satItemKeyCode: {
      type: "string",
      label: "Sat Item Key Code",
      description: "Add SAT Item Key Code for your goods/services. Download the [CFDI Catalogs](http://omawww.sat.gob.mx/tramitesyservicios/Paginas/documentos/catCFDI_V_4_07122022.xls). **Mexico only**",
      optional: true,
    },
    unitkeyCode: {
      type: "string",
      label: "Unit Key Code",
      description: "Add SAT Unit Key Code for your goods/services. Download the [CFDI Catalogs](http://omawww.sat.gob.mx/tramitesyservicios/Paginas/documentos/catCFDI_V_4_07122022.xls). **Mexico only**",
      optional: true,
    },
    setupFeeTaxExemptionId: {
      type: "string",
      label: "Setup Fee Tax Exemption Id",
      description: "Unique Tax Exemption ID that must be applied to setup fee. **GST only**",
      optional: true,
    },
    setupFeeTaxExemptionCode: {
      type: "string",
      label: "Setup Fee Tax Exemption Code",
      description: "Unique code of the tax exemption that must be applied to setup fee. **GST only**",
      optional: true,
    },
    excludeTrial: {
      type: "boolean",
      label: "Exclude Trial",
      description: "This is set to true if the respective plan's trial period needs to be excluded for this subscription.",
      optional: true,
    },
    excludeSetupFee: {
      type: "boolean",
      label: "Exclude Setup Fee",
      description: "This is set to true if the respective plan's setup fee needs to be excluded for this subscription.",
      optional: true,
    },
    billingCycles: {
      type: "integer",
      label: "Billing Cycles",
      description: "`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: true,
    },
    trialDays: {
      type: "integer",
      label: "Trial Days",
      description: "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: true,
    },
    addons: {
      type: "string[]",
      label: "Addons",
      description: "List of addon objects which are to be included in the subscription.",
      optional: true,
    },
    couponCode: {
      type: "string",
      label: "Coupon Code",
      description: "The coupon code of the coupon which is to be applied to the subscription.",
      optional: true,
    },
    autoCollect: {
      type: "boolean",
      label: "Auto Collect",
      description: "`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`.",
      default: false,
    },
    referenceId: {
      type: "string",
      label: "Reference Id",
      description: "A string of your choice is required to easily identify and keep track of your subscriptions.",
      optional: true,
    },
    salespersonName: {
      type: "string",
      label: "Sales Person Name",
      description: "Name of the sales person assigned for the subscription.",
      optional: true,
    },
    paymentGateways: {
      type: "string[]",
      label: "Payment Gateways",
      description: "Payment gateway associated with the subscription.",
      options: [
        "test_gateway",
        "payflow_pro",
        "stripe",
        "2checkout",
        "authorize_net",
        "payments_pro",
        "forte",
        "worldpay",
        "wepay",
      ],
      optional: true,
    },
    createBackdatedInvoice: {
      type: "boolean",
      label: "Create Backdated Invoice",
      description: "To allow creation of invoice for current billing cycle for back dated subscriptions.",
      optional: true,
    },
    canChargeSetupFeeImmediately: {
      type: "boolean",
      label: "Can Charge Setup Fee Immediately",
      description: "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: true,
    },
    templateId: {
      type: "string",
      label: "Template Id",
      description: "Default Invoice Template ID for all the invoices created from the subscription.",
      optional: true,
    },
    cfdiUsage: {
      type: "string",
      label: "CFDI Usage",
      description: "Choose CFDI Usage. **Mexico only**",
      options: [
        "acquisition_of_merchandise",
        "return_discount_bonus",
        "general_expense",
        "buildings",
        "furniture_office_equipment",
        "transport_equipment",
        "computer_equipmentdye_molds_tools",
        "telephone_communication",
        "satellite_communication",
        "other_machinery_equipment",
        "hospital_expense",
        "medical_expense_disability",
        "funeral_expense",
        "donation",
        "interest_mortage_loans",
        "contribution_sar",
        "medical_expense_insurance_pormium",
        "school_transportation_expense",
        "deposit_saving_account",
        "payment_educational_service",
        "no_tax_effect",
        "payment",
        "payroll",
      ],
      optional: true,
    },
    allowPartialPayments: {
      type: "boolean",
      label: "Allow Partial Payments",
      description: "Boolean to check if partial payments are allowed for the contact. **Mexico only**",
      optional: true,
    },
    accountId: {
      type: "string",
      label: "Account Id",
      description: "Account ID of the bank account from which payment is made by the customer.",
      optional: true,
    },
  },
  async run({ $ }) {
    const {
      zohoSubscriptions,
      organizationId,
      addToUnbilledCharges,
      customerId,
      paymentTerms,
      paymentTermsLabel,
      customFields,
      contactpersons,
      cardId,
      startsAt,
      exchangeRate,
      placeOfSupply,
      planCode,
      planDescription,
      price,
      setupFee,
      setupFeeTaxId,
      itemCustomFields,
      quantity,
      taxId,
      taxExemptionId,
      taxExemptionCode,
      tdsTaxId,
      satItemKeyCode,
      unitkeyCode,
      setupFeeTaxExemptionId,
      setupFeeTaxExemptionCode,
      excludeTrial,
      excludeSetupFee,
      billingCycles,
      trialDays,
      addons,
      couponCode,
      autoCollect,
      referenceId,
      salespersonName,
      paymentGateways,
      createBackdatedInvoice,
      canChargeSetupFeeImmediately,
      templateId,
      cfdiUsage,
      allowPartialPayments,
      accountId,
    } = this;

    if (autoCollect && !cardId) {
      throw new ConfigurationError("By setting Auto-Collect to `true`, you must to fill in the card Id.");
    }

    if (autoCollect && !accountId) {
      throw new ConfigurationError("By setting Auto-Collect to `true`, you must to fill in the Account Id.");
    }

    let exchangeRateFloat = null;
    if (exchangeRate) {
      try {
        exchangeRateFloat = parseFloat(exchangeRate);
      } catch (e) {
        throw new ConfigurationError("Exchange Rate must be a double.");
      }
    }

    let priceFloat = null;
    if (price) {
      try {
        priceFloat = parseFloat(price);
      } catch (e) {
        throw new ConfigurationError("Plan price must be a double.");
      }
    }

    let setupFeeFLoat = null;
    if (setupFee) {
      try {
        setupFeeFLoat = parseFloat(setupFee);
      } catch (e) {
        throw new ConfigurationError("Setup Fee must be a double.");
      }
    }

    const response = await zohoSubscriptions.createSubscription({
      $,
      organizationId,
      data: {
        add_to_unbilled_charges: addToUnbilledCharges,
        customer_id: customerId,
        payment_terms: paymentTerms,
        payment_terms_label: paymentTermsLabel,
        custom_fields: customFields && Object.entries(customFields).map(([
          key,
          value,
        ]) => ({
          label: key,
          value: value,
        })),
        contactpersons: contactpersons && contactpersons.map((item) => ({
          contactperson_id: item,
        })),
        card_id: cardId,
        starts_at: startsAt,
        exchange_rate: exchangeRateFloat,
        place_of_supply: placeOfSupply,
        plan: {
          plan_code: planCode,
          plan_description: planDescription,
          price: priceFloat,
          setup_fee: setupFeeFLoat,
          setup_fee_tax_id: setupFeeTaxId,
          item_custom_fields: itemCustomFields && Object.entries(itemCustomFields).map(([
            key,
            value,
          ]) => ({
            label: key,
            value: value,
          })),
          quantity,
          tax_id: taxId,
          tax_exemption_id: taxExemptionId,
          tax_exemption_code: taxExemptionCode,
          tds_tax_id: tdsTaxId,
          sat_item_key_code: satItemKeyCode,
          unitkey_code: unitkeyCode,
          setup_fee_tax_exemption_id: setupFeeTaxExemptionId,
          setup_fee_tax_exemption_code: setupFeeTaxExemptionCode,
          exclude_trial: excludeTrial,
          exclude_setup_fee: excludeSetupFee,
          billing_cycles: billingCycles,
          trial_days: excludeTrial
            ? 0
            : trialDays,
        },
        addons,
        coupon_code: couponCode,
        reference_id: referenceId,
        salesperson_name: salespersonName,
        payment_gateways: paymentGateways && paymentGateways.map((item) => ({
          payment_gateway: item,
        })),
        create_backdated_invoice: createBackdatedInvoice,
        can_charge_setup_fee_immediately: canChargeSetupFeeImmediately,
        template_id: templateId,
        cfdi_usage: cfdiUsage,
        allow_partial_payments: allowPartialPayments,
        account_id: accountId,
      },
    });

    $.export("$summary", `A new subscription with Id: ${response.subscription?.subscription_id} was successfully created!`);
    return response;
  },
};

Action Configuration

This component may be configured based on the props defined in the component code. Pipedream automatically prompts for input values in the UI.

LabelPropTypeDescription
Zoho SubscriptionszohoSubscriptionsappThis component uses the Zoho Subscriptions app.
Organization IdorganizationIdstringSelect a value from the drop down menu.
Add To Unbilled ChargesaddToUnbilledChargesboolean

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 IdcustomerIdstringSelect a value from the drop down menu.
Payment TermspaymentTermsinteger

Payment Due details for the invoices.

Payment Terms LabelpaymentTermsLabelstring

Label for the paymet due details.

Custom FieldscustomFieldsobject

Additional fields for the invoices.

Contact Person Idcontactpersonsstring[]Select a value from the drop down menu.
Card IdcardIdstringSelect a value from the drop down menu.
Starts AtstartsAtstring

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

Exchange RateexchangeRatestring

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 SupplyplaceOfSupplystring

Place of Supply for the customer's subscription. India GST only.

Plan CodeplanCodestringSelect a value from the drop down menu.
Plan DescriptionplanDescriptionstring

Description of the plan exclusive to this subscription. This will be displayed in place of the plan name in invoices generated for this subscription.

Pricepricestring

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 FeesetupFeestring

Setup fee for the plan.

Setup Fee Tax IdsetupFeeTaxIdstring

Unique ID for tax of setup fee. Setup Fee Tax Id must be empty for applying tax Exemption.

Item Custom FieldsitemCustomFieldsobject

Custom fields for an item.

Quantityquantityinteger

Required quantity of the chosen plan.

Tax IdtaxIdstring

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 IdtaxExemptionIdstring

Unique ID of the tax exemption. GST only

Tax Exemption CodetaxExemptionCodestring

Unique code of the tax exemption. GST only

TDS Tax IdtdsTaxIdstring

ID of the TDS tax. Mexico only

Sat Item Key CodesatItemKeyCodestring

Add SAT Item Key Code for your goods/services. Download the CFDI Catalogs. Mexico only

Unit Key CodeunitkeyCodestring

Add SAT Unit Key Code for your goods/services. Download the CFDI Catalogs. Mexico only

Setup Fee Tax Exemption IdsetupFeeTaxExemptionIdstring

Unique Tax Exemption ID that must be applied to setup fee. GST only

Setup Fee Tax Exemption CodesetupFeeTaxExemptionCodestring

Unique code of the tax exemption that must be applied to setup fee. GST only

Exclude TrialexcludeTrialboolean

This is set to true if the respective plan's trial period needs to be excluded for this subscription.

Exclude Setup FeeexcludeSetupFeeboolean

This is set to true if the respective plan's setup fee needs to be excluded for this subscription.

Billing CyclesbillingCyclesinteger

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 DaystrialDaysinteger

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

Addonsaddonsstring[]

List of addon objects which are to be included in the subscription.

Coupon CodecouponCodestring

The coupon code of the coupon which is to be applied to the subscription.

Auto CollectautoCollectboolean

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 IdreferenceIdstring

A string of your choice is required to easily identify and keep track of your subscriptions.

Sales Person NamesalespersonNamestring

Name of the sales person assigned for the subscription.

Payment GatewayspaymentGatewaysstring[]Select a value from the drop down menu:test_gatewaypayflow_prostripe2checkoutauthorize_netpayments_proforteworldpaywepay
Create Backdated InvoicecreateBackdatedInvoiceboolean

To allow creation of invoice for current billing cycle for back dated subscriptions.

Can Charge Setup Fee ImmediatelycanChargeSetupFeeImmediatelyboolean

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 IdtemplateIdstring

Default Invoice Template ID for all the invoices created from the subscription.

CFDI UsagecfdiUsagestringSelect a value from the drop down menu:acquisition_of_merchandisereturn_discount_bonusgeneral_expensebuildingsfurniture_office_equipmenttransport_equipmentcomputer_equipmentdye_molds_toolstelephone_communicationsatellite_communicationother_machinery_equipmenthospital_expensemedical_expense_disabilityfuneral_expensedonationinterest_mortage_loanscontribution_sarmedical_expense_insurance_pormiumschool_transportation_expensedeposit_saving_accountpayment_educational_serviceno_tax_effectpaymentpayroll
Allow Partial PaymentsallowPartialPaymentsboolean

Boolean to check if partial payments are allowed for the contact. Mexico only

Account IdaccountIdstring

Account ID of the bank account from which payment is made by the customer.

Action Authentication

Zoho Subscriptions uses OAuth authentication. When you connect your Zoho Subscriptions account, Pipedream will open a popup window where you can sign into Zoho Subscriptions and grant Pipedream permission to connect to your account. Pipedream securely stores and automatically refreshes the OAuth tokens so you can easily authenticate any Zoho Subscriptions API.

Pipedream requests the following authorization scopes when you connect your account:

ZohoSubscriptions.fullaccess.all

About Zoho Subscriptions

Subscription billing software, crafted for growing businesses.

More Ways to Connect Zoho Subscriptions + Pipedream

Create Customer with Zoho Subscriptions API on New Scheduled Tasks from Pipedream API
Pipedream + Zoho Subscriptions
 
Try it
Create a Subscription with Pipedream API on New Payment Failure from Zoho Subscriptions API
Zoho Subscriptions + Pipedream
 
Try it
Delete a Subscription with Pipedream API on New Payment Failure from Zoho Subscriptions API
Zoho Subscriptions + Pipedream
 
Try it
Get Component with Pipedream API on New Payment Failure from Zoho Subscriptions API
Zoho Subscriptions + Pipedream
 
Try it
Create a Subscription with Pipedream API on New Subscription Created from Zoho Subscriptions API
Zoho Subscriptions + Pipedream
 
Try it
New Scheduled Tasks from the Pipedream API

Exposes an HTTP API for scheduling messages to be emitted at a future time

 
Try it
New Upcoming Event Alert from the Pipedream API

Emit new event based on a time interval before an upcoming event in the calendar. This source uses Pipedream's Task Scheduler. See the documentation for more information and instructions for connecting your Pipedream account.

 
Try it
Card Due Date Reminder from the Pipedream API

Emit new event at a specified time before a card is due.

 
Try it
New Upcoming Calendar Event from the Pipedream API

Emit new event when a Calendar event is upcoming, this source is using reminderMinutesBeforeStart property of the event to determine the time it should emit.

 
Try it
New Payment Failure from the Zoho Subscriptions API

Emit new event when a payment fails to process.

 
Try it
Create a Subscription with the Pipedream API

Create a Subscription. See Doc

 
Try it
Delete a Subscription with the Pipedream API

Delete a Subscription. See Doc

 
Try it
Generate Component Code with the Pipedream API

Generate component code using AI.

 
Try it
Get Component with the Pipedream API

Get info for a published component. See docs

 
Try it
Create Customer with the Zoho Subscriptions API

Create a new customer. See the documentation

 
Try it

Explore Other Apps

1
-
24
of
2,200+
apps by most popular

HTTP / Webhook
HTTP / Webhook
Get a unique URL where you can send HTTP or webhook requests
Node
Node
Anything you can do with Node.js, you can do in a Pipedream workflow. This includes using most of npm's 400,000+ packages.
Python
Python
Anything you can do in Python can be done in a Pipedream Workflow. This includes using any of the 350,000+ PyPi packages available in your Python powered workflows.
OpenAI (ChatGPT)
OpenAI (ChatGPT)
OpenAI is an AI research and deployment company with the mission to ensure that artificial general intelligence benefits all of humanity. They are the makers of popular models like ChatGPT, DALL-E, and Whisper.
Premium
Salesforce
Salesforce
Web services API for interacting with Salesforce
Premium
HubSpot
HubSpot
HubSpot's CRM platform contains the marketing, sales, service, operations, and website-building software you need to grow your business.
Premium
Zoho CRM
Zoho CRM
Zoho CRM is an online Sales CRM software that manages your sales, marketing, and support in one CRM platform.
Premium
Stripe
Stripe
Stripe powers online and in-person payment processing and financial solutions for businesses of all sizes.
Shopify
Shopify
Shopify is a complete commerce platform that lets anyone start, manage, and grow a business. You can use Shopify to build an online store, manage sales, market to customers, and accept payments in digital and physical locations.
Premium
WooCommerce
WooCommerce
WooCommerce is the open-source ecommerce platform for WordPress.
Premium
Snowflake
Snowflake
A data warehouse built for the cloud
Premium
MongoDB
MongoDB
MongoDB is an open source NoSQL database management program.
Supabase
Supabase
Supabase is an open source Firebase alternative.
MySQL
MySQL
MySQL is an open-source relational database management system.
PostgreSQL
PostgreSQL
PostgreSQL is a free and open-source relational database management system emphasizing extensibility and SQL compliance.
Premium
AWS
AWS
Amazon Web Services (AWS) offers reliable, scalable, and inexpensive cloud computing services.
Premium
Twilio SendGrid
Twilio SendGrid
Send marketing and transactional email through the Twilio SendGrid platform with the Email API, proprietary mail transfer agent, and infrastructure for scalable delivery.
Amazon SES
Amazon SES
Amazon SES is a cloud-based email service provider that can integrate into any application for high volume email automation
Premium
Klaviyo
Klaviyo
Email Marketing and SMS Marketing Platform
Premium
Zendesk
Zendesk
Zendesk is award-winning customer service software trusted by 200K+ customers. Make customers happy via text, mobile, phone, email, live chat, social media.
Notion
Notion
Notion is a new tool that blends your everyday work apps into one. It's the all-in-one workspace for you and your team.
Slack
Slack
Slack is a channel-based messaging platform. With Slack, people can work together more effectively, connect all their software tools and services, and find the information they need to do their best work — all within a secure, enterprise-grade environment.
Microsoft Teams
Microsoft Teams
Microsoft Teams has communities, events, chats, channels, meetings, storage, tasks, and calendars in one place.
Schedule
Schedule
Trigger workflows on an interval or cron schedule.