POST
/
subscriptions

Authorizations

Authorization
string
header
required

Value for the Authorization header parameter.

Body

customer
any
required

The customer who owns the subscription.

periods
object[]
required

The contract period terms of the subscription.

billingGroup
string | null

The billing group of the subscription.

billingStart
string | null

The billing start date of the subscription. Fallback to the start date if not set.

customFields
object | null

Custom fields for the entity. The keys are the field names and the values are the field values. They need to be configured under "/custom-fields" in the API documentation. The input is validated against the configuration. For more details see Custom Fields Guide

endDate
string | null

The end date of the subscription. If not set, the subscription has no end date.

externalId
string | null

The external id of the subscription in the external system.

Maximum length: 255
invoiceAddress
string | null

The invoice address of the customer. If not set, the default invoice address of the customer is used.

name
string | null

The name of the subscription. If not set, an empty string is used.

Maximum length: 255
number
string | null

The number of the subscription. If not set, a unique number is generated. This number is used for the invoice and to display the subscription in the customer portal.

Maximum length: 255
paymentMethod
string | null

The payment method id to use for the subscription. If not set, the default payment method of the customer is used.

poNumber
string | null

The po number of the subscription.

Maximum length: 255
products
object[]

The product selections which defines the items of the subscription.

startDate
string | null

The start date of the subscription. If not set, the current date is used.

Response

201 - application/json
activatedAt
string | null

The date the subscription was activated.

billingGroup
object | null

The billing group defines the billing cycle of the subscription.

cancellationDate
string | null

The date the subscription will be cancelled.

cancellationReason
object | null

The reason why the subscription was cancelled.

cancelledAt
string | null

The date when the subscription was cancelled.

contractDetails
object

The contract details of the subscription.

createdAt
string

The date and time when the resource was created.

customer
object
customFields
object | null

Custom fields for the entity. The keys are the field names and the values are the field values. They need to be configured under "/custom-fields" in the API documentation. The input is validated against the configuration. For more details see Custom Fields Guide

defaultInvoiceAddress
boolean

The invoice address is null, we use the default invoice address of the customer.

defaultPaymentMethod
boolean

The payment method is null, we use the default payment method of the customer.

externalId
string | null
id
string
invoiceAddress
object | null

The invoice address of the subscription. If null, the default invoice address of the customer is used.

isCancellationPending
boolean

Indicates if the subscription is pending for cancellation. If true, the subscription will be cancelled in the future and the cancellation could be revoked.

items
object[]

The selected items of the subscription. Can be charges or addons.

lastBillingAt
string | null

The last billing date of the subscription.

name
string | null

The name of the subscription. Defaults to the name of the plan. This will be used in the invoice for the grouping headers.

nextBillingDate
string | null

The next billing date of the subscription.

nextPossibleCancellationDate
string[] | null
number
string

The number of the subscription.

partner
object | null

The partner of the customer.

paymentMethod
object | null

The payment method of the subscription. If null, the default payment method of the customer is used.

periods
object[]
plan
object | null

The plan this subscription is based on.

poNumber
string | null

The po number of the subscription.

status
any

The status of the subscription.

Possible values:

  • draft: The subscription is in draft mode and not active yet.
  • active: The subscription is active and will be billed.
  • paused: The subscription is paused and will not be billed.
  • cancelled: The subscription is cancelled and will not be billed anymore.
  • terminated: The subscription is terminated and will not be billed anymore.
  • offer: The subscription is an offer and waiting for acceptance.
trialEndsOn
string | null

The date the trial period ends.

updatedAt
string

The date and time when the resource was last updated.