---
title: "Create Subscription"
method: POST
path: "/v1/subscriptions"
---

# Create Subscription

`POST /v1/subscriptions`

This API endpoint creates a subscription. A subscription is used to bill clients on a recurring basis.

## Request body

- object
  - `templateId` string — Unique ID of the invoice template to use. If provided, template values will be used for lineItems, memo, taxPercentage, and currency
  - `recipientId` string — Deprecated in favor of clientId and companyId.
  - `lineItems` object[] — Array of line items. Required if `templateId` is not provided.
    - `amount` integer — Amount in cents. Required if `priceId` not provided
    - `description` string — Description of the item, ignored if `priceId` is provided.
    - `quantity` number, float, required — Quantity of the item (supports decimals).
    - `priceId` string — Unique ID of the `price` object. Required if `amount` is not provided.
  - `memo` string — Arbitrary string attached to the invoice, often used for display
  - `daysUntilDue` integer, required — The number of days from when the subscription invoice is created until it is due. Max value is 30.
  - `taxPercentage` number, float — Tax percentage to apply to the invoice amount
  - `interval` string — Billing frequency. Required if line items don't include a recurring price. Values: `day`, `week`, `month`, `quarterly`, `yearly`
  - `intervalCount` integer — Number of intervals between billings. Default value = 1
  - `paymentMethodPreferences` object[], required — Array of preferences which specify which payment methods are allowed and how transaction fees are handled for each payment method
    - `type` string, required — Payment method type. Values are `creditCard` or `bankAccount`.
    - `feePaidByClient` boolean, required — When `true`, the transaction fee is paid by the client, otherwise is covered by your account.
  - `collectionMethod` string, required — Specify how to charge for an invoice values: `sendInvoice` , `chargeAutomatically`
  - `clientId` string — The ID of the client this subscription is assigned to. Leave empty if assigning to a company.
  - `companyId` string — The ID of the company this subscription is assigned to. This is required when assigning to a client with more than one company.

## Response `200`

200

- object
  - `id` string
  - `object` string
  - `createdAt` string
  - `collectionMethod` string
  - `status` string
  - `recipientId` string
  - `clientId` string
  - `companyId` string
  - `memo` string
  - `taxPercentage` number
  - `currency` string
  - `interval` string
  - `intervalCount` integer
  - `daysUntilDue` integer
  - `canceledAt` string
  - `paymentMethodPreferences` object[]
    - `type` string
    - `feePaidByClient` boolean
  - `lineItems` object[]
    - `priceId` string
    - `productId` string
    - `description` string
    - `quantity` integer
  - `updatedAt` string

## Other responses

- `400` — 400

---

[API](https://skmtc.net/assembly/apis/core-resources.md) · [All operations](https://skmtc.net/assembly/apis/core-resources/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/assembly/core-resources/versions/28a9e7d13a8c/schema)
