# Create Customer — Zoho Billing

> Create a new customer. See the documentation

- Key: `zoho_subscriptions-create-customer`
- Type: Action (Write)
- Version: 0.0.3
- App: Zoho Billing (`zoho_subscriptions`) — https://pipedream.com/apps/zoho-subscriptions.md
- This page (HTML): https://pipedream.com/apps/zoho-subscriptions/actions/create-customer
- Hints: open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/zoho_subscriptions/actions/create-customer/create-customer.mjs

## Description

Create a new customer. [See the documentation](https://www.zoho.com/billing/api/v1/customers/#create-a-customer)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `organizationId` | `string` | Yes | The Id of the organization you want to manage. Options are loaded from the connected account. |
| `displayName` | `string` | Yes | Name of the customer which will be displayed in the interface and invoices. |
| `salutation` | `string` | No | Salutation of the customer. |
| `firstName` | `string` | No | First name of the customer. |
| `lastName` | `string` | No | Last name of the customer. |
| `email` | `string` | Yes | Email address of the customer. |
| `companyName` | `string` | No | Registered name of the company the customer represents. |
| `phone` | `string` | No | Customer's landline or fixed-line number. |
| `mobile` | `string` | No | Customer's mobile phone number. |
| `department` | `string` | No | Customer's department. |
| `designation` | `string` | No | Customer's designation. |
| `website` | `string` | No | Customer's website if any. |
| `billingAddressAttention` | `string` | No | Attention of the customer's billing address. |
| `billingAddressStreet` | `string` | No | Street of the customer's billing address. |
| `billingAddressCity` | `string` | No | City of the customer's billing address. |
| `billingAddressState` | `string` | No | State of the customer's billing address. |
| `billingAddressZip` | `string` | No | Zip of the customer's billing address. |
| `billingAddressCountry` | `string` | No | Country of the customer's billing address. |
| `billingAddressStateCode` | `string` | No | State Code of the customer's billing address. |
| `billingAddressFax` | `string` | No | Fax of the customer's billing address. |
| `shippingAddressAttention` | `string` | No | Attention of the customer's shipping address. |
| `shippingAddressStreet` | `string` | No | Street of the customer's shipping address. |
| `shippingAddressCity` | `string` | No | City of the customer's shipping address. |
| `shippingAddressState` | `string` | No | State of the customer's shipping address. |
| `shippingAddressZip` | `string` | No | Zip of the customer's shipping address. |
| `shippingAddressCountry` | `string` | No | Country of the customer's shipping address. |
| `shippingAddressStateCode` | `string` | No | State Code of the customer's shipping address. |
| `shippingAddressFax` | `string` | No | Fax of the customer's shipping address. |
| `paymentTerms` | `integer` | No | Net payment term for the customer. |
| `paymentTermsLabel` | `string` | No | Text field of payment terms. |
| `currencyCode` | `string` | No | Currency code of the currency in which the customer wants to pay. If Currency Code is not specified here, the currency chosen in your Zoho Subscriptions organization will be used for billing. |
| `achSupported` | `boolean` | No | Set to true if ACH payment is supported for the customer. Default is false |
| `twitter` | `string` | No | Twitter profile of the customer. |
| `facebook` | `string` | No | Facebook profile of the customer. |
| `skype` | `string` | No | Skype ID of the customer. |
| `notes` | `string` | No | A short note about the customer. |
| `isPortalEnabled` | `boolean` | No | Is Client portal enabled for the customer. |
| `gstNo` | `string` | No | GSTIN Number for the customer. India GTS only. |
| `gstTreatment` | `string` | No | GST Treatment for the customer. India GTS only. |
| `placeOfContact` | `string` | No | Customer's place of contact. India GTS only. |
| `vatTreatment` | `string` | No | VAT treatment of the contact. VAT only. |
| `taxRegNo` | `string` | No | 12 digit Tax Registration number of a contact with Tax treatment as home_country_mexico, border_region_mexico, non_mexico. Consumers generic RFC: XAXX010101000, Overseas generic RFC: XEXX010101000. Mexico only. |
| `tdsTaxId` | `string` | No | ID of the TDS tax. Mexico only. |
| `taxTreatment` | `string` | No | VAT treatment of the contact. Mexico only. |
| `taxRegime` | `string` | No | Tax Regime of the contact. Mexico only. |
| `isTdsRegistered` | `boolean` | No | Boolean to check if tax is registered. Mexico only. |
| `vatRegNo` | `string` | No | VAT Registration number of a contact with length should be between 2 and 12 characters. VAT only. |
| `isTaxable` | `boolean` | No | Set to true if customer's transactions must be tax inclusive. Sales Tax , GST only |
| `taxId` | `string` | No | Unique ID of the tax or tax group that can be collected from the contact. Tax can be given only if Is Taxable is true. |
| `taxAuthorityId` | `string` | No | Unique ID of the tax authority. Tax authority depends on the location of the customer. For example, if the customer is located in NY, then the tax authority is NY tax authority. |
| `taxAuthorityName` | `string` | No | Unique name of the tax authority. Either Tax Authority Id or Tax Authority Name can be given. |
| `taxExemptionId` | `string` | No | Unique ID of the tax exemption. Sales Tax , GST only |
| `taxExemptionCode` | `string` | No | Unique code of the tax exemption. Sales Tax , GST only |
| `invoiceTemplateId` | `string` | No | Unique Id used to denote the invoice template. |
| `creditnoteTemplateId` | `string` | No | Unique Id used to denote the credit note template. |
| `customFields` | `object` | No | Additional fields for customers. |

## Run it

**MCP**

```ts
import { Client } from "@modelcontextprotocol/sdk/client/index.js"
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js"
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 accessToken = await pd.rawAccessToken

const transport = new StreamableHTTPClientTransport(
  new URL("https://remote.mcp.pipedream.net/v3"),
  {
    requestInit: {
      headers: {
        Authorization: `Bearer ${accessToken}`,
        "x-pd-project-id": process.env.PIPEDREAM_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-customer",
  arguments: {
    organizationId: "Organization Id",
    displayName: "Display Name",
  },
})
```

**TypeScript**

```ts
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-customer",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    zoho_subscriptions: { authProvisionId: "apn_xxxxxxx" },
    organizationId: "Organization Id",
    displayName: "Display Name",
  },
})

console.log(result)
```

**cURL**

```bash
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-customer",
    "configured_props": {
      "zoho_subscriptions": { "authProvisionId": "apn_xxxxxxx" },
      "organizationId": "Organization Id",
      "displayName": "Display Name"
    }
  }'
```

---

- App: https://pipedream.com/apps/zoho-subscriptions.md · All apps: https://pipedream.com/apps
