POST
/
subscriptions

Authorizations

Authorization
string
header
required

API Keys can be issued in the Orb's web application.

Body

application/json
add_adjustments
object[] | null

Additional adjustments to be added to the subscription. (Only available for accounts that have migrated off of legacy subscription overrides)

add_prices
object[] | null

Additional prices to be added to the subscription. (Only available for accounts that have migrated off of legacy subscription overrides)

align_billing_with_subscription_start_date
boolean
default:
false
auto_collection
boolean | null

Determines whether issued invoices for this subscription will automatically be charged with the saved payment method on the due date. If not specified, this defaults to the behavior configured for this customer.

aws_region
string | null
deprecated
billing_cycle_anchor_configuration
object | null
coupon_redemption_code
string | null

Redemption code to be used for this subscription. If the coupon cannot be found by its redemption code, or cannot be redeemed, an error response will be returned and the subscription creation or plan change will not be scheduled.

credits_overage_rate
number | null
deprecated
customer_id
string | null
default_invoice_memo
string | null

Determines the default memo on this subscription's invoices. Note that if this is not provided, it is determined by the plan configuration.

end_date
string | null
external_customer_id
string | null
external_marketplace
enum<string> | null
deprecated
Available options:
google,
aws,
azure
external_marketplace_reporting_id
string | null
deprecated
external_plan_id
string | null

The external_plan_id of the plan that the given subscription should be switched to. Note that either this property or plan_id must be specified.

filter
string | null

An additional filter to apply to usage queries. This filter must be expressed as a boolean computed property. If null, usage queries will not include any additional filter.

initial_phase_order
integer | null

The phase of the plan to start with

invoicing_threshold
string | null

When this subscription's accrued usage reaches this threshold, an invoice will be issued for the subscription. If not specified, invoices will only be issued at the end of the billing period.

metadata
object | null

User-specified key/value pairs for the resource. Individual keys can be removed by setting the value to null, and the entire metadata mapping can be cleared by setting metadata to null.

net_terms
integer | null

The net terms determines the difference between the invoice date and the issue date for the invoice. If you intend the invoice to be due on issue, set this to 0. If not provided, this defaults to the value specified in the plan.

per_credit_overage_amount
number | null
deprecated
plan_id
string | null

The plan that the given subscription should be switched to. Note that either this property or external_plan_id must be specified.

plan_version_number
integer | null

Specifies which version of the plan to subscribe to. If null, the default version will be used.

price_overrides
any[] | null
deprecated

Optionally provide a list of overrides for prices on the plan

remove_adjustments
object[] | null

Plan adjustments to be removed from the subscription. (Only available for accounts that have migrated off of legacy subscription overrides)

remove_prices
object[] | null

Plan prices to be removed from the subscription. (Only available for accounts that have migrated off of legacy subscription overrides)

replace_adjustments
object[] | null

Plan adjustments to be replaced with additional adjustments on the subscription. (Only available for accounts that have migrated off of legacy subscription overrides)

replace_prices
object[] | null

Plan prices to be replaced with additional prices on the subscription. (Only available for accounts that have migrated off of legacy subscription overrides)

start_date
string | null
trial_duration_days
integer | null

The duration of the trial period in days. If not provided, this defaults to the value specified in the plan. If 0 is provided, the trial on the plan will be skipped.

Required range: x < 1000000

Response

201 - application/json
active_plan_phase_order
integer | null
required

The current plan phase that is active, only if the subscription's plan has phases.

adjustment_intervals
object[]
required

The adjustment intervals for this subscription.

auto_collection
boolean | null
required

Determines whether issued invoices for this subscription will automatically be charged with the saved payment method on the due date. This property defaults to the plan's behavior. If null, defaults to the customer's setting.

billing_cycle_anchor_configuration
object
required
billing_cycle_day
integer
required

The day of the month on which the billing cycle is anchored. If the maximum number of days in a month is greater than this value, the last day of the month is the billing cycle day (e.g. billing_cycle_day=31 for April means the billing period begins on the 30th.

Required range: 1 < x < 31
created_at
string
required
current_billing_period_end_date
string | null
required

The end of the current billing period. This is an exclusive timestamp, such that the instant returned is not part of the billing period. Set to null for subscriptions that are not currently active.

current_billing_period_start_date
string | null
required

The start date of the current billing period. This is an inclusive timestamp; the instant returned is exactly the beginning of the billing period. Set to null if the subscription is not currently active.

customer
object
required

A customer is a buyer of your products, and the other party to the billing relationship.

In Orb, customers are assigned system generated identifiers automatically, but it's often desirable to have these match existing identifiers in your system. To avoid having to denormalize Orb ID information, you can pass in an external_customer_id with your own identifier. See Customer ID Aliases for further information about how these aliases work in Orb.

In addition to having an identifier in your system, a customer may exist in a payment provider solution like Stripe. Use the payment_provider_id and the payment_provider enum field to express this mapping.

A customer also has a timezone (from the standard IANA timezone database), which defaults to your account's timezone. See Timezone localization for information on what this timezone parameter influences within Orb.

default_invoice_memo
string | null
required

Determines the default memo on this subscriptions' invoices. Note that if this is not provided, it is determined by the plan configuration.

discount_intervals
object[]
required

The discount intervals for this subscription.

end_date
string | null
required

The date Orb stops billing for this subscription.

fixed_fee_quantity_schedule
object[]
required
id
string
required
invoicing_threshold
string | null
required
maximum_intervals
object[]
required

The maximum intervals for this subscription.

metadata
object
required

User specified key-value pairs for the resource. If not present, this defaults to an empty dictionary. Individual keys can be removed by setting the value to null, and the entire metadata mapping can be cleared by setting metadata to null.

minimum_intervals
object[]
required

The minimum intervals for this subscription.

net_terms
integer
required

Determines the difference between the invoice issue date for subscription invoices as the date that they are due. A value of 0 here represents that the invoice is due on issue, whereas a value of 30 represents that the customer has a month to pay the invoice.

plan
object
required

The Plan resource represents a plan that can be subscribed to by a customer. Plans define the billing behavior of the subscription. You can see more about how to configure prices in the Price resource.

price_intervals
object[]
required

The price intervals for this subscription.

redeemed_coupon
object | null
required
start_date
string
required

The date Orb starts billing for this subscription.

status
enum<string>
required
Available options:
active,
ended,
upcoming
trial_info
object
required