Create Subscription

Create a new Subscription.

Subscriptions are applied to specific Customers, identified by the customerId field, and are instances of a specific frequency of a specific Plan, identified by the planFrequencyId below.

A plan and plan frequency must be set up in the catalog using the Admin UI before a subscription can be created. The subscriptionOverride object will change the name and description of the subscription, as it appears on the Customer's invoice. Creating a Subscription will include all the default or included Products in the associated Plan in the newly created Subscription. You can edit the Subscription if you wish to modify aspects of the Products.

See the Update Subscription page for more details.

Upon success, a new subscription with a unique id will be returned. It will have a status of Draft when created.

See the Activate Subscription page for details.

Coupons can also be provided when creating the subscription using the couponCodes value. The minimum request key-value pairs for a successful request include fields customerID and PlanFrequencyID. A good starting payload can be generated by using Read Plan and the view with value subscription


This endpoint returns the full Subscription object for the newly created Subscription. To include the full invoice in the response, include the parameter ?view=sideeffects.

Query Params
string
enum

When included and set to sideeffects the response will include a sideeffects object showing a resulting draft invoice.

Allowed:
boolean
Defaults to false

If true, no subscription will be created. Instead a preview subscription will be returned containing an invoicePreview object

string

3 Character ISO Code. If preview is set to true and no CustomerId is supplied in the body, this can be used to preview the invoice in a specified currency specified. The currency must be configured for your Stax Bill account.

Body Params
int32
required

Customer to create the subscription on. Typically required unless preview=true.

int32
required

Defines the plan and frequency to be used to create the subscription.

taxationAddress
object

Can be optionally provided for the purpose of calculating taxes when a customer has no address.

subscriptionOverride
object

This is an override of the name and description of this subscription if it differs from the plan

date

It will accept a scheduled date in the future identifying when to Activate Subscription if it is placed into "Provisioning" Status. The submitted DateTime will automatically be interpreted in your account timezone. This field should be omited if the subscription should not be scheduled to activate in the future.

int32

Number of billing intervals that can iterate before the subscription status is set to "Expired".

int32

Number of billing intervals that are added to the Remaining interval counter whenever the expiry pushout button is pressed by the customer via the Self-Service-Portal

string

This will appear as the 3rd line item in the main subscription header on an invoice [Max Length: 255 characters]

date

This is the string of the contract start date returned in subscription reports

date

This is the string of the contract end date returned in subscription reports

int32

The unique id of an existing billing period on the customer that the subscription should be assigned to

int32

The unique id of an existing billing period definition on the customer that the subscription should be assigned to.

int32

Tells the system to create a billing period that cycles on the specified day and assign this subscription to it. You can only specify an invoice day if the invoice rule "Prompt" (called 'Ask me each time' in the UI) is being used.

int32

Tells the system to create a billing period that cycles on the specified day and month and assign this subscription to it. This parameter can only be used for subscriptions with an annual frequency. You can only specify an invoice month if the invoice rule "Prompt" (called 'Ask me each time' in the UI) is being used.

string

Tells the system to create a billing period that cycles on the specified day of the week and assign this subscription to it..

couponCodes
array of strings

Can hold a list of couponCodes's code to be automatically applied to the subscription at time of creation, Coupons can be pre-configured to apply specific discounts to specific subscription products on the subscription

couponCodes
subscriptionProducts
array of objects

Specifying a list of subscription product objects allows upfront overrides of certain plan product fields. This would not allow a means of providing additional products not specified as available in the underlying plan. Not providing this list means the collection of subscription products will have default settings.

subscriptionProducts
int32
string
enum

In a hierarchy, set whether this subscription's subscription products generate their charges on this customer (InvoiceThisCustomer) or the immediate parent customer (InvoiceParent) or to follow system default behavior (null).

Allowed:
boolean
string
int32
int32
geotabConfiguration
object

If using the Geotab Integration, populating this object will create the subscription in the Standing Order status, and with any of the additional values populated. A subscription in the "Standing Order" status is used as a device subscription template for creating additional device subscriptions from Geotab MyAdmin.

Responses

Language
Credentials
Header
LoadingLoading…
Response
Choose an example:
application/json