{ "opencollection": "1.0.0", "info": { "name": "Stripe Accounts Account Invoices API", "version": "2023-10-16" }, "items": [ { "info": { "name": "Invoices", "type": "folder" }, "items": [ { "info": { "name": "GetInvoices", "type": "http" }, "http": { "method": "GET", "url": "https://api.stripe.com/v1/invoices", "params": [ { "name": "collection_method", "value": "", "type": "query", "description": "The collection method of the invoice to retrieve. Either `charge_automatically` or `send_invoice`." }, { "name": "created", "value": "", "type": "query" }, { "name": "customer", "value": "", "type": "query", "description": "Only return invoices for the customer specified by this customer ID." }, { "name": "due_date", "value": "", "type": "query" }, { "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": "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": "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": "status", "value": "", "type": "query", "description": "The status of the invoice, one of `draft`, `open`, `paid`, `uncollectible`, or `void`. [Learn more](https://stripe.com/docs/billing/invoices/workflow#workflow-overview)" }, { "name": "subscription", "value": "", "type": "query", "description": "Only return invoices for the subscription specified by this subscription ID." } ], "body": { "type": "form-urlencoded", "data": [] } }, "docs": "
You can list all invoices, or list the invoices for a specific customer. The invoices are returned sorted by creation date, with the most recently created invoices appearing first.
" }, { "info": { "name": "PostInvoices", "type": "http" }, "http": { "method": "POST", "url": "https://api.stripe.com/v1/invoices", "body": { "type": "form-urlencoded", "data": [] } }, "docs": "This endpoint creates a draft invoice for a given customer. The invoice remains a draft until you finalize the invoice, which allows you to pay or send the invoice to your customers.
" }, { "info": { "name": "GetInvoicesSearch", "type": "http" }, "http": { "method": "GET", "url": "https://api.stripe.com/v1/invoices/search", "params": [ { "name": "expand", "value": "", "type": "query", "description": "Specifies which fields in the response should be expanded." }, { "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": "page", "value": "", "type": "query", "description": "A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results." }, { "name": "query", "value": "", "type": "query", "description": "The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for invoices](https://stripe.com/docs/search#query-fields-for-invoices)." } ], "body": { "type": "form-urlencoded", "data": [] } }, "docs": "Search for invoices you’ve previously created using Stripe’s Search Query Language.\nDon’t use search in read-after-write flows where strict consistency is necessary. Under normal operating\nconditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up\nto an hour behind during outages. Search functionality is not available to merchants in India.
" }, { "info": { "name": "GetInvoicesUpcoming", "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\nNote 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": "GetInvoicesUpcomingLines", "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.
" }, { "info": { "name": "GetInvoicesInvoice", "type": "http" }, "http": { "method": "GET", "url": "https://api.stripe.com/v1/invoices/:invoice", "params": [ { "name": "expand", "value": "", "type": "query", "description": "Specifies which fields in the response should be expanded." }, { "name": "invoice", "value": "", "type": "path" } ], "body": { "type": "form-urlencoded", "data": [] } }, "docs": "Retrieves the invoice with the given ID.
" }, { "info": { "name": "PostInvoicesInvoice", "type": "http" }, "http": { "method": "POST", "url": "https://api.stripe.com/v1/invoices/:invoice", "params": [ { "name": "invoice", "value": "", "type": "path" } ], "body": { "type": "form-urlencoded", "data": [] } }, "docs": "Draft invoices are fully editable. Once an invoice is finalized,\nmonetary values, as well as collection_method, become uneditable.
If you would like to stop the Stripe Billing engine from automatically finalizing, reattempting payments on,\nsending reminders for, or automatically reconciling invoices, pass\nauto_advance=false.
Permanently deletes a one-off invoice draft. This cannot be undone. Attempts to delete invoices that are no longer in a draft state will fail; once an invoice has been finalized or if an invoice is for a subscription, it must be voided.
" }, { "info": { "name": "PostInvoicesInvoiceFinalize", "type": "http" }, "http": { "method": "POST", "url": "https://api.stripe.com/v1/invoices/:invoice/finalize", "params": [ { "name": "invoice", "value": "", "type": "path" } ], "body": { "type": "form-urlencoded", "data": [] } }, "docs": "Stripe automatically finalizes drafts before sending and attempting payment on invoices. However, if you’d like to finalize a draft invoice manually, you can do so using this method.
" }, { "info": { "name": "GetInvoicesInvoiceLines", "type": "http" }, "http": { "method": "GET", "url": "https://api.stripe.com/v1/invoices/:invoice/lines", "params": [ { "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", "value": "", "type": "path" }, { "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": "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." } ], "body": { "type": "form-urlencoded", "data": [] } }, "docs": "When retrieving an 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.
" }, { "info": { "name": "PostInvoicesInvoiceLinesLineItemId", "type": "http" }, "http": { "method": "POST", "url": "https://api.stripe.com/v1/invoices/:invoice/lines/:line_item_id", "params": [ { "name": "invoice", "value": "", "type": "path", "description": "Invoice ID of line item" }, { "name": "line_item_id", "value": "", "type": "path", "description": "Invoice line item ID" } ], "body": { "type": "form-urlencoded", "data": [] } }, "docs": "Updates an invoice’s line item. Some fields, such as tax_amounts, only live on the invoice line item,\nso they can only be updated through this endpoint. Other fields, such as amount, live on both the invoice\nitem and the invoice line item, so updates on this endpoint will propagate to the invoice item as well.\nUpdating an invoice’s line item is only possible before the invoice is finalized.
Marking an invoice as uncollectible is useful for keeping track of bad debts that can be written off for accounting purposes.
" }, { "info": { "name": "PostInvoicesInvoicePay", "type": "http" }, "http": { "method": "POST", "url": "https://api.stripe.com/v1/invoices/:invoice/pay", "params": [ { "name": "invoice", "value": "", "type": "path" } ], "body": { "type": "form-urlencoded", "data": [] } }, "docs": "Stripe automatically creates and then attempts to collect payment on invoices for customers on subscriptions according to your subscriptions settings. However, if you’d like to attempt payment on an invoice out of the normal collection schedule or for some other reason, you can do so.
" }, { "info": { "name": "PostInvoicesInvoiceSend", "type": "http" }, "http": { "method": "POST", "url": "https://api.stripe.com/v1/invoices/:invoice/send", "params": [ { "name": "invoice", "value": "", "type": "path" } ], "body": { "type": "form-urlencoded", "data": [] } }, "docs": "Stripe will automatically send invoices to customers according to your subscriptions settings. However, if you’d like to manually send an invoice to your customer out of the normal schedule, you can do so. When sending invoices that have already been paid, there will be no reference to the payment in the email.
\n\nRequests made in test-mode result in no emails being sent, despite sending an invoice.sent eve"
},
{
"info": {
"name": "PostInvoicesInvoiceVoid",
"type": "http"
},
"http": {
"method": "POST",
"url": "https://api.stripe.com/v1/invoices/:invoice/void",
"params": [
{
"name": "invoice",
"value": "",
"type": "path"
}
],
"body": {
"type": "form-urlencoded",
"data": []
}
},
"docs": "
Mark a finalized invoice as void. This cannot be undone. Voiding an invoice is similar to deletion, however it only applies to finalized invoices and maintains a papertrail where the invoice can still be found.
" } ] } ], "bundled": true }