Create Subscription

Time Status User Agent
Make a request to see history.

URL Expired

The URL for this request expired after 30 days.

Notes: Skip link to Notes:

Template Usage

When creating a subscription using a template (by specifying templateId), certain fields will be automatically populated from the template unless its not explicitly overridden in request:

Interval Configuration

The interval field is only required if any of the line items doesn't have a recurring price. When line items include a recurring price, the interval is automatically determined from that price.

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
array of objects
Array of line items. Required if templateId is not provided.

lineItems
ADD object

memo
string
Arbitrary string attached to the invoice, often used for display

daysUntilDue
int32
required
The number of days from when the subscription invoice is created until it is due. Max value is 30.

taxPercentage
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
int32
Defaults to 1
Number of intervals between billings. Default value = 1

paymentMethodPreferences
array of objects
required
Array of preferences which specify which payment methods are allowed and how transaction fees are handled for each payment method

paymentMethodPreferences
ADD object

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.

``200 200

``400 400


ShellNodeRubyPHPPython

xxxxxxxxxx

curl --request POST \
     --url https://api.assembly.com/v1/subscriptions \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '{"intervalCount":1}'

application/json

200 - Result

``400 - Result