{ "opencollection": "1.0.0", "info": { "name": "Stripe Accounts Account Upcoming API", "version": "2023-10-16" }, "items": [ { "info": { "name": "Upcoming", "type": "folder" }, "items": [ { "info": { "name": "Stripe Get Invoices Upcoming", "type": "http" }, "http": { "method": "GET", "url": "https://api.stripe.com/v1/invoices/upcoming", "params": [ { "name": "automatic_tax", "value": "", "type": "query", "description": "Settings for automatic tax lookup for this invoice preview." }, { "name": "coupon", "value": "", "type": "query", "description": "The code of the coupon to apply. If `subscription` or `subscription_items` is provided, the invoice returned will preview updating or creating a subscription with that coupon. Otherwise, it will preview applying that coupon to the customer for the next upcoming invoice from among the customer's subscriptions. The invoice can be previewed without a coupon by passing this value as an empty string." }, { "name": "currency", "value": "", "type": "query", "description": "The currency to preview this invoice in. Defaults to that of `customer` if not specified." }, { "name": "customer", "value": "", "type": "query", "description": "The identifier of the customer whose upcoming invoice you'd like to retrieve. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set." }, { "name": "customer_details", "value": "", "type": "query", "description": "Details about the customer you want to invoice or overrides for an existing customer. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set." }, { "name": "discounts", "value": "", "type": "query", "description": "The coupons to redeem into discounts for the invoice preview. If not specified, inherits the discount from the customer or subscription. This only works for coupons directly applied to the invoice. To apply a coupon to a subscription, you must use the `coupon` parameter instead. Pass an empty string to avoid inheriting any discounts. To preview the upcoming invoice for a subscription that hasn't been created, use `coupon` instead." }, { "name": "expand", "value": "", "type": "query", "description": "Specifies which fields in the response should be expanded." }, { "name": "invoice_items", "value": "", "type": "query", "description": "List of invoice items to add or update in the upcoming invoice preview." }, { "name": "schedule", "value": "", "type": "query", "description": "The identifier of the schedule whose upcoming invoice you'd like to retrieve. Cannot be used with subscription or subscription fields." }, { "name": "subscription", "value": "", "type": "query", "description": "The identifier of the subscription for which you'd like to retrieve the upcoming invoice. If not provided, but a `subscription_items` is provided, you will preview creating a subscription with those items. If neither `subscription` nor `subscription_items` is provided, you will retrieve the next upcoming invoice from among the customer's subscriptions." }, { "name": "subscription_billing_cycle_anchor", "value": "", "type": "query", "description": "For new subscriptions, a future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. For existing subscriptions, the value can only be set to `now` or `unchanged`." }, { "name": "subscription_cancel_at", "value": "", "type": "query", "description": "A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period." }, { "name": "subscription_cancel_at_period_end", "value": "", "type": "query", "description": "Boolean indicating whether this subscription should cancel at the end of the current period." }, { "name": "subscription_cancel_now", "value": "", "type": "query", "description": "This simulates the subscription being canceled or expired immediately." }, { "name": "subscription_default_tax_rates", "value": "", "type": "query", "description": "If provided, the invoice returned will preview updating or creating a subscription with these default tax rates. The default tax rates will apply to any line item that does not have `tax_rates` set." }, { "name": "subscription_items", "value": "", "type": "query", "description": "A list of up to 20 subscription items, each with an attached price." }, { "name": "subscription_proration_behavior", "value": "", "type": "query", "description": "Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`." }, { "name": "subscription_proration_date", "value": "", "type": "query", "description": "If previewing an update to a subscription, and doing proration, `subscription_proration_date` forces the proration to be calculated as though the update was done at the specified time. The time given must be within the current subscription period and within the current phase of the schedule backing this subscription, if the schedule exists. If set, `subscription`, and one of `subscription_items`, or `subscription_trial_end` are required. Also, `subscription_proration_behavior` cannot be set to 'none'." }, { "name": "subscription_resume_at", "value": "", "type": "query", "description": "For paused subscriptions, setting `subscription_resume_at` to `now` will preview the invoice that will be generated if the subscription is resumed." }, { "name": "subscription_start_date", "value": "", "type": "query", "description": "Date a subscription is intended to start (can be future or past)." }, { "name": "subscription_trial_end", "value": "", "type": "query", "description": "If provided, the invoice returned will preview updating or creating a subscription with that trial end. If set, one of `subscription_items` or `subscription` is required." }, { "name": "subscription_trial_from_plan", "value": "", "type": "query", "description": "Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `subscription_trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `subscription_trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more." } ], "body": { "type": "form-urlencoded", "data": [] } }, "docs": "

At any time, you can preview the upcoming invoice for a customer. This will show you all the charges that are pending, including subscription renewal charges, invoice item charges, etc. It will also show you any discounts that are applicable to the invoice.

\n\n

Note that when you are viewing an upcoming invoice, you are simply viewing a preview – the invoice has not yet been created. As such, the upcoming invoice will not show up in invoice listing calls, and you cannot use the API to pay" }, { "info": { "name": "Stripe Get Invoices Upcoming Lines", "type": "http" }, "http": { "method": "GET", "url": "https://api.stripe.com/v1/invoices/upcoming/lines", "params": [ { "name": "automatic_tax", "value": "", "type": "query", "description": "Settings for automatic tax lookup for this invoice preview." }, { "name": "coupon", "value": "", "type": "query", "description": "The code of the coupon to apply. If `subscription` or `subscription_items` is provided, the invoice returned will preview updating or creating a subscription with that coupon. Otherwise, it will preview applying that coupon to the customer for the next upcoming invoice from among the customer's subscriptions. The invoice can be previewed without a coupon by passing this value as an empty string." }, { "name": "currency", "value": "", "type": "query", "description": "The currency to preview this invoice in. Defaults to that of `customer` if not specified." }, { "name": "customer", "value": "", "type": "query", "description": "The identifier of the customer whose upcoming invoice you'd like to retrieve. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set." }, { "name": "customer_details", "value": "", "type": "query", "description": "Details about the customer you want to invoice or overrides for an existing customer. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set." }, { "name": "discounts", "value": "", "type": "query", "description": "The coupons to redeem into discounts for the invoice preview. If not specified, inherits the discount from the customer or subscription. This only works for coupons directly applied to the invoice. To apply a coupon to a subscription, you must use the `coupon` parameter instead. Pass an empty string to avoid inheriting any discounts. To preview the upcoming invoice for a subscription that hasn't been created, use `coupon` instead." }, { "name": "ending_before", "value": "", "type": "query", "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list." }, { "name": "expand", "value": "", "type": "query", "description": "Specifies which fields in the response should be expanded." }, { "name": "invoice_items", "value": "", "type": "query", "description": "List of invoice items to add or update in the upcoming invoice preview." }, { "name": "limit", "value": "", "type": "query", "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10." }, { "name": "schedule", "value": "", "type": "query", "description": "The identifier of the schedule whose upcoming invoice you'd like to retrieve. Cannot be used with subscription or subscription fields." }, { "name": "starting_after", "value": "", "type": "query", "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list." }, { "name": "subscription", "value": "", "type": "query", "description": "The identifier of the subscription for which you'd like to retrieve the upcoming invoice. If not provided, but a `subscription_items` is provided, you will preview creating a subscription with those items. If neither `subscription` nor `subscription_items` is provided, you will retrieve the next upcoming invoice from among the customer's subscriptions." }, { "name": "subscription_billing_cycle_anchor", "value": "", "type": "query", "description": "For new subscriptions, a future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. For existing subscriptions, the value can only be set to `now` or `unchanged`." }, { "name": "subscription_cancel_at", "value": "", "type": "query", "description": "A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period." }, { "name": "subscription_cancel_at_period_end", "value": "", "type": "query", "description": "Boolean indicating whether this subscription should cancel at the end of the current period." }, { "name": "subscription_cancel_now", "value": "", "type": "query", "description": "This simulates the subscription being canceled or expired immediately." }, { "name": "subscription_default_tax_rates", "value": "", "type": "query", "description": "If provided, the invoice returned will preview updating or creating a subscription with these default tax rates. The default tax rates will apply to any line item that does not have `tax_rates` set." }, { "name": "subscription_items", "value": "", "type": "query", "description": "A list of up to 20 subscription items, each with an attached price." }, { "name": "subscription_proration_behavior", "value": "", "type": "query", "description": "Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`." }, { "name": "subscription_proration_date", "value": "", "type": "query", "description": "If previewing an update to a subscription, and doing proration, `subscription_proration_date` forces the proration to be calculated as though the update was done at the specified time. The time given must be within the current subscription period and within the current phase of the schedule backing this subscription, if the schedule exists. If set, `subscription`, and one of `subscription_items`, or `subscription_trial_end` are required. Also, `subscription_proration_behavior` cannot be set to 'none'." }, { "name": "subscription_resume_at", "value": "", "type": "query", "description": "For paused subscriptions, setting `subscription_resume_at` to `now` will preview the invoice that will be generated if the subscription is resumed." }, { "name": "subscription_start_date", "value": "", "type": "query", "description": "Date a subscription is intended to start (can be future or past)." }, { "name": "subscription_trial_end", "value": "", "type": "query", "description": "If provided, the invoice returned will preview updating or creating a subscription with that trial end. If set, one of `subscription_items` or `subscription` is required." }, { "name": "subscription_trial_from_plan", "value": "", "type": "query", "description": "Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `subscription_trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `subscription_trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more." } ], "body": { "type": "form-urlencoded", "data": [] } }, "docs": "

When retrieving an upcoming invoice, you’ll get a lines property containing the total count of line items and the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.

" } ] } ], "bundled": true }