Skip to main content

SubscriptionsSubscriptionIdBody

Properties

NameTypeRequiredDescription
billingstrDetermines the method of billing. Set to pay_automatically.
billing_cycle_anchorstrDetermines the start of the next billing cycle, as defined in the plan described in the 'items'. Value must be timestamp in Unix time.
cancel_at_period_endboolTerminates the subscription at the end of the current billing period.
couponstrThe ID of a discount coupon that applies to all subscription items associated with this subscription. If the coupon defines a fixed monetary discount, it must use the same currency as the subscription's plan.
days_until_duefloatNumber of days from the invoice date for customer to complete the payment.
metadatadictA JSON object defined by the client.
payment_fieldsPaymentOptionsA payment method type is a type of payment method that any customer can use, for example, eemastercard_card, Mastercard for Estonia. When it is added to a customer profile, it becomes a payment method that is specific to that one customer. The name of the payment method type starts with a prefix for the country, the 2-letter ISO 3166-1 alpha-2 code. If the payment method is valid in multiple countries, the prefix is xx. The payment method type has a suffix with one of the following values - _bank - Bank transfer or bank redirect _card - Credit card, debit card or other card _cash - Cash _ewallet - Local eWallet
payment_methodSubscriptionsSubscriptionIdBodyPaymentMethodPayment Method object or ID.
simultaneous_invoiceboolDetermines whether each upcoming subscription invoice is issued immediately. When true, the invoice is issued when the subscription is created. When false (the default), the invoice is issued an hour after the subscription is created.
subscription_itemsList[str]Array of subscription items. Each item contains a plan (required) and a quantity
tax_percentfloatThe percentage of tax that is applied to the entire amount of the invoice.
trial_endfloatThe time of the end of the customer's free trial period. If trial_from_plan is set, leave this parameter unset.
trial_from_planboolDetermines whether a free trial period can be defined in a 'plan' object attached to the subscription. If trial_end is set, leave this parameter unset.
trial_period_daysfloatThe number of days in the customer's free trial period.

SubscriptionsSubscriptionIdBodyPaymentMethod

Payment Method object or ID.

Build Your Own SDKs with  liblab

Build developer friendly SDKs in minutes from your APIs

Start for Free →