Properties
| Name | Type | Required | Description |
|---|---|---|---|
| billing | str | ✅ | Determines the method of billing. Set to pay_automatically. |
| customer | str | ✅ | ID of the customer who pays for this subscription. String starting with cus_. |
| subscription_items | List[V1paymentssubscriptionsSubscriptionItems] | ✅ | Array of subscription items. Each item contains a plan (required) and a quantity |
| cancel_at_period_end | bool | ❌ | Determines the last date that charges accrue.<BR>_ true - Charges accrue until the end of the current billing period, then the subscription is canceled. When no trial period is set, after this parameter is set to true the subscription will not be renewed at the next interval. When a trial period is set after this parameter is set to true, the subscription will not begin.<BR>_ false - When the subscription is created, no end is defined. When Cancel Subscription is run, charges stop immediately and the subscription is canceled. |
| complete_payment_url | str | ❌ | URL where the customer is redirected when payment is successful, after returning from an external page such as a 3DS page. Does not support localhost URLs. |
| country | str | ❌ | The two-letter ISO 3166-1 ALPHA-2 code for the country. |
| coupon | str | ❌ | The ID of a coupon to apply a discount to the subscription. If the coupon defines a fixed monetary discount, it must use the same currency as the subscription. String starting with coupon_. |
| days_until_due | float | ❌ | Number of days from the invoice date for customer to complete the payment. |
| error_payment_url | str | ❌ | URL where the customer is redirected when payment is not successful, after returning from an external page, such as a 3DS page. Does not support localhost URLs. |
| language | str | ❌ | Determines the default language of the hosted page. For a list of values, see 'List Supported Languages'. <BR> _ When this parameter is null, the language of the user's browser is used. <BR> _ If the language of the user's browser cannot be determined, the default language is English. |
| metadata | dict | ❌ | A JSON object defined by the client. |
| merchant_main_button | str | ❌ | Defines the text for the call-to-action button on the subscription checkout page.<BR> * When there is no trial period, the values are: subscribe (default), purchase, pay <BR> When there is a trial period, the value is start_trial (default). |
| merchant_reference_id | str | ❌ | Identifier defined by the client for reference purposes. Limit: 45 characters. |
| page_expiration | float | ❌ | End of the time when the customer can use the hosted page, in Unix time. If page_expiration is not set, the hosted page expires 14 days after creation.<BR> Range: 1 minute to 30 days. |
| payment_fees | Fee | ❌ | |
| payment_fields | Payment | ❌ | Collects money from a payment method and deposits it into one or more Rapyd Wallets |
| payment_method | CheckoutSubscriptionsBodyPaymentMethod | ❌ | Payment Method object or ID. |
| tax_percent | float | ❌ | The percentage of tax that is applied to the entire amount of the invoice. |
| trial_end | float | ❌ | The date and time of the end of the customer's free trial period, in Unix time, or the string now. Takes precedence over trial_period_days. If trial_end is not set by the client, Rapyd calculates this date by adding trial_period_days to the date in created_at. <BR> Relevant when trial_period_days is not defined. |
| trial_from_plan | bool | ❌ | Determines whether a free trial period can be defined in a 'plan' object attached to the subscription.<BR> _ true - Free trials can be defined in plans that are attached to the subscription. <BR> _ false - Definitions of free trial in plans are ignored. |
| trial_period_days | float | ❌ | The number of days in the customer's free trial period. Integer. Range: 0-730. This value takes precedence over trial periods that are defined in a plan. Relevant when trial_end is not defined.The number of days in the customer's free trial period. |
Payment Method object or ID.