Class InvoiceService
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddLines
(String invoice, InvoiceAddLinesParams params) Adds multiple line items to an invoice.addLines
(String invoice, InvoiceAddLinesParams params, RequestOptions options) Adds multiple line items to an invoice.create()
This endpoint creates a draft invoice for a given customer.create
(RequestOptions options) This endpoint creates a draft invoice for a given customer.create
(InvoiceCreateParams params) This endpoint creates a draft invoice for a given customer.create
(InvoiceCreateParams params, RequestOptions options) This endpoint creates a draft invoice for a given customer.At any time, you can preview the upcoming invoice for a customer.createPreview
(RequestOptions options) At any time, you can preview the upcoming invoice for a customer.At any time, you can preview the upcoming invoice for a customer.createPreview
(InvoiceCreatePreviewParams params, RequestOptions options) At any time, you can preview the upcoming invoice for a customer.Permanently deletes a one-off invoice draft.delete
(String invoice, RequestOptions options) Permanently deletes a one-off invoice draft.finalizeInvoice
(String invoice) Stripe automatically finalizes drafts before sending and attempting payment on invoices.finalizeInvoice
(String invoice, RequestOptions options) Stripe automatically finalizes drafts before sending and attempting payment on invoices.finalizeInvoice
(String invoice, InvoiceFinalizeInvoiceParams params) Stripe automatically finalizes drafts before sending and attempting payment on invoices.finalizeInvoice
(String invoice, InvoiceFinalizeInvoiceParams params, RequestOptions options) Stripe automatically finalizes drafts before sending and attempting payment on invoices.list()
You can list all invoices, or list the invoices for a specific customer.list
(RequestOptions options) You can list all invoices, or list the invoices for a specific customer.list
(InvoiceListParams params) You can list all invoices, or list the invoices for a specific customer.list
(InvoiceListParams params, RequestOptions options) You can list all invoices, or list the invoices for a specific customer.markUncollectible
(String invoice) Marking an invoice as uncollectible is useful for keeping track of bad debts that can be written off for accounting purposes.markUncollectible
(String invoice, RequestOptions options) Marking an invoice as uncollectible is useful for keeping track of bad debts that can be written off for accounting purposes.markUncollectible
(String invoice, InvoiceMarkUncollectibleParams params) Marking an invoice as uncollectible is useful for keeping track of bad debts that can be written off for accounting purposes.markUncollectible
(String invoice, InvoiceMarkUncollectibleParams params, RequestOptions options) Marking an invoice as uncollectible is useful for keeping track of bad debts that can be written off for accounting purposes.Stripe automatically creates and then attempts to collect payment on invoices for customers on subscriptions according to your subscriptions settings.pay
(String invoice, RequestOptions options) Stripe automatically creates and then attempts to collect payment on invoices for customers on subscriptions according to your subscriptions settings.pay
(String invoice, InvoicePayParams params) Stripe automatically creates and then attempts to collect payment on invoices for customers on subscriptions according to your subscriptions settings.pay
(String invoice, InvoicePayParams params, RequestOptions options) Stripe automatically creates and then attempts to collect payment on invoices for customers on subscriptions according to your subscriptions settings.removeLines
(String invoice, InvoiceRemoveLinesParams params) Removes multiple line items from an invoice.removeLines
(String invoice, InvoiceRemoveLinesParams params, RequestOptions options) Removes multiple line items from an invoice.Retrieves the invoice with the given ID.retrieve
(String invoice, RequestOptions options) Retrieves the invoice with the given ID.retrieve
(String invoice, InvoiceRetrieveParams params) Retrieves the invoice with the given ID.retrieve
(String invoice, InvoiceRetrieveParams params, RequestOptions options) Retrieves the invoice with the given ID.search
(InvoiceSearchParams params) Search for invoices you’ve previously created using Stripe’s Search Query Language.search
(InvoiceSearchParams params, RequestOptions options) Search for invoices you’ve previously created using Stripe’s Search Query Language.sendInvoice
(String invoice) Stripe will automatically send invoices to customers according to your subscriptions settings.sendInvoice
(String invoice, RequestOptions options) Stripe will automatically send invoices to customers according to your subscriptions settings.sendInvoice
(String invoice, InvoiceSendInvoiceParams params) Stripe will automatically send invoices to customers according to your subscriptions settings.sendInvoice
(String invoice, InvoiceSendInvoiceParams params, RequestOptions options) Stripe will automatically send invoices to customers according to your subscriptions settings.upcoming()
At any time, you can preview the upcoming invoice for a customer.upcoming
(RequestOptions options) At any time, you can preview the upcoming invoice for a customer.upcoming
(InvoiceUpcomingParams params) At any time, you can preview the upcoming invoice for a customer.upcoming
(InvoiceUpcomingParams params, RequestOptions options) At any time, you can preview the upcoming invoice for a customer.Draft invoices are fully editable.update
(String invoice, RequestOptions options) Draft invoices are fully editable.update
(String invoice, InvoiceUpdateParams params) Draft invoices are fully editable.update
(String invoice, InvoiceUpdateParams params, RequestOptions options) Draft invoices are fully editable.updateLines
(String invoice, InvoiceUpdateLinesParams params) Updates multiple line items on an invoice.updateLines
(String invoice, InvoiceUpdateLinesParams params, RequestOptions options) Updates multiple line items on an invoice.voidInvoice
(String invoice) Mark a finalized invoice as void.voidInvoice
(String invoice, RequestOptions options) Mark a finalized invoice as void.voidInvoice
(String invoice, InvoiceVoidInvoiceParams params) Mark a finalized invoice as void.voidInvoice
(String invoice, InvoiceVoidInvoiceParams params, RequestOptions options) Mark a finalized invoice as void.Methods inherited from class com.stripe.net.ApiService
getResponseGetter, request, requestStream
-
Constructor Details
-
InvoiceService
-
-
Method Details
-
delete
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.- Throws:
StripeException
-
delete
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.- Throws:
StripeException
-
retrieve
Retrieves the invoice with the given ID.- Throws:
StripeException
-
retrieve
Retrieves the invoice with the given ID.- Throws:
StripeException
-
retrieve
Retrieves the invoice with the given ID.- Throws:
StripeException
-
retrieve
public Invoice retrieve(String invoice, InvoiceRetrieveParams params, RequestOptions options) throws StripeException Retrieves the invoice with the given ID.- Throws:
StripeException
-
update
Draft invoices are fully editable. Once an invoice is finalized, monetary values, as well ascollection_method
, become uneditable.If you would like to stop the Stripe Billing engine from automatically finalizing, reattempting payments on, sending reminders for, or automatically reconciling invoices, pass
auto_advance=false
.- Throws:
StripeException
-
update
Draft invoices are fully editable. Once an invoice is finalized, monetary values, as well ascollection_method
, become uneditable.If you would like to stop the Stripe Billing engine from automatically finalizing, reattempting payments on, sending reminders for, or automatically reconciling invoices, pass
auto_advance=false
.- Throws:
StripeException
-
update
Draft invoices are fully editable. Once an invoice is finalized, monetary values, as well ascollection_method
, become uneditable.If you would like to stop the Stripe Billing engine from automatically finalizing, reattempting payments on, sending reminders for, or automatically reconciling invoices, pass
auto_advance=false
.- Throws:
StripeException
-
update
public Invoice update(String invoice, InvoiceUpdateParams params, RequestOptions options) throws StripeException Draft invoices are fully editable. Once an invoice is finalized, monetary values, as well ascollection_method
, become uneditable.If you would like to stop the Stripe Billing engine from automatically finalizing, reattempting payments on, sending reminders for, or automatically reconciling invoices, pass
auto_advance=false
.- Throws:
StripeException
-
list
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.- Throws:
StripeException
-
list
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.- Throws:
StripeException
-
list
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.- Throws:
StripeException
-
list
public StripeCollection<Invoice> list(InvoiceListParams params, RequestOptions options) throws StripeException 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.- Throws:
StripeException
-
create
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.- Throws:
StripeException
-
create
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.- Throws:
StripeException
-
create
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.- Throws:
StripeException
-
create
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.- Throws:
StripeException
-
search
Search for invoices you’ve previously created using Stripe’s Search Query Language. Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up to an hour behind during outages. Search functionality is not available to merchants in India.- Throws:
StripeException
-
search
public StripeSearchResult<Invoice> search(InvoiceSearchParams params, RequestOptions options) throws StripeException Search for invoices you’ve previously created using Stripe’s Search Query Language. Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up to an hour behind during outages. Search functionality is not available to merchants in India.- Throws:
StripeException
-
upcoming
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.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 or edit the invoice. If you want to change the amount that your customer will be billed, you can add, remove, or update pending invoice items, or update the customer’s discount.
You can preview the effects of updating a subscription, including a preview of what proration will take place. To ensure that the actual proration is calculated exactly the same as the previewed proration, you should pass the
subscription_details.proration_date
parameter when doing the actual subscription update. The recommended way to get only the prorations being previewed is to consider only proration line items whereperiod[start]
is equal to thesubscription_details.proration_date
value passed in the request.Note: Currency conversion calculations use the latest exchange rates. Exchange rates may vary between the time of the preview and the time of the actual invoice creation. Learn more
- Throws:
StripeException
-
upcoming
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.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 or edit the invoice. If you want to change the amount that your customer will be billed, you can add, remove, or update pending invoice items, or update the customer’s discount.
You can preview the effects of updating a subscription, including a preview of what proration will take place. To ensure that the actual proration is calculated exactly the same as the previewed proration, you should pass the
subscription_details.proration_date
parameter when doing the actual subscription update. The recommended way to get only the prorations being previewed is to consider only proration line items whereperiod[start]
is equal to thesubscription_details.proration_date
value passed in the request.Note: Currency conversion calculations use the latest exchange rates. Exchange rates may vary between the time of the preview and the time of the actual invoice creation. Learn more
- Throws:
StripeException
-
upcoming
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.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 or edit the invoice. If you want to change the amount that your customer will be billed, you can add, remove, or update pending invoice items, or update the customer’s discount.
You can preview the effects of updating a subscription, including a preview of what proration will take place. To ensure that the actual proration is calculated exactly the same as the previewed proration, you should pass the
subscription_details.proration_date
parameter when doing the actual subscription update. The recommended way to get only the prorations being previewed is to consider only proration line items whereperiod[start]
is equal to thesubscription_details.proration_date
value passed in the request.Note: Currency conversion calculations use the latest exchange rates. Exchange rates may vary between the time of the preview and the time of the actual invoice creation. Learn more
- Throws:
StripeException
-
upcoming
public Invoice upcoming(InvoiceUpcomingParams params, RequestOptions options) throws StripeException 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.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 or edit the invoice. If you want to change the amount that your customer will be billed, you can add, remove, or update pending invoice items, or update the customer’s discount.
You can preview the effects of updating a subscription, including a preview of what proration will take place. To ensure that the actual proration is calculated exactly the same as the previewed proration, you should pass the
subscription_details.proration_date
parameter when doing the actual subscription update. The recommended way to get only the prorations being previewed is to consider only proration line items whereperiod[start]
is equal to thesubscription_details.proration_date
value passed in the request.Note: Currency conversion calculations use the latest exchange rates. Exchange rates may vary between the time of the preview and the time of the actual invoice creation. Learn more
- Throws:
StripeException
-
addLines
Adds multiple line items to an invoice. This is only possible when an invoice is still a draft.- Throws:
StripeException
-
addLines
public Invoice addLines(String invoice, InvoiceAddLinesParams params, RequestOptions options) throws StripeException Adds multiple line items to an invoice. This is only possible when an invoice is still a draft.- Throws:
StripeException
-
finalizeInvoice
public Invoice finalizeInvoice(String invoice, InvoiceFinalizeInvoiceParams params) throws StripeException 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.- Throws:
StripeException
-
finalizeInvoice
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.- Throws:
StripeException
-
finalizeInvoice
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.- Throws:
StripeException
-
finalizeInvoice
public Invoice finalizeInvoice(String invoice, InvoiceFinalizeInvoiceParams params, RequestOptions options) throws StripeException 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.- Throws:
StripeException
-
markUncollectible
public Invoice markUncollectible(String invoice, InvoiceMarkUncollectibleParams params) throws StripeException Marking an invoice as uncollectible is useful for keeping track of bad debts that can be written off for accounting purposes.- Throws:
StripeException
-
markUncollectible
Marking an invoice as uncollectible is useful for keeping track of bad debts that can be written off for accounting purposes.- Throws:
StripeException
-
markUncollectible
Marking an invoice as uncollectible is useful for keeping track of bad debts that can be written off for accounting purposes.- Throws:
StripeException
-
markUncollectible
public Invoice markUncollectible(String invoice, InvoiceMarkUncollectibleParams params, RequestOptions options) throws StripeException Marking an invoice as uncollectible is useful for keeping track of bad debts that can be written off for accounting purposes.- Throws:
StripeException
-
pay
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.- Throws:
StripeException
-
pay
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.- Throws:
StripeException
-
pay
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.- Throws:
StripeException
-
pay
public Invoice pay(String invoice, InvoicePayParams params, RequestOptions options) throws StripeException 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.- Throws:
StripeException
-
removeLines
Removes multiple line items from an invoice. This is only possible when an invoice is still a draft.- Throws:
StripeException
-
removeLines
public Invoice removeLines(String invoice, InvoiceRemoveLinesParams params, RequestOptions options) throws StripeException Removes multiple line items from an invoice. This is only possible when an invoice is still a draft.- Throws:
StripeException
-
sendInvoice
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.Requests made in test-mode result in no emails being sent, despite sending an
invoice.sent
event.- Throws:
StripeException
-
sendInvoice
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.Requests made in test-mode result in no emails being sent, despite sending an
invoice.sent
event.- Throws:
StripeException
-
sendInvoice
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.Requests made in test-mode result in no emails being sent, despite sending an
invoice.sent
event.- Throws:
StripeException
-
sendInvoice
public Invoice sendInvoice(String invoice, InvoiceSendInvoiceParams params, RequestOptions options) throws StripeException 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.Requests made in test-mode result in no emails being sent, despite sending an
invoice.sent
event.- Throws:
StripeException
-
updateLines
Updates multiple line items on an invoice. This is only possible when an invoice is still a draft.- Throws:
StripeException
-
updateLines
public Invoice updateLines(String invoice, InvoiceUpdateLinesParams params, RequestOptions options) throws StripeException Updates multiple line items on an invoice. This is only possible when an invoice is still a draft.- Throws:
StripeException
-
voidInvoice
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.Consult with local regulations to determine whether and how an invoice might be amended, canceled, or voided in the jurisdiction you’re doing business in. You might need to issue another invoice or credit note instead. Stripe recommends that you consult with your legal counsel for advice specific to your business.
- Throws:
StripeException
-
voidInvoice
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.Consult with local regulations to determine whether and how an invoice might be amended, canceled, or voided in the jurisdiction you’re doing business in. You might need to issue another invoice or credit note instead. Stripe recommends that you consult with your legal counsel for advice specific to your business.
- Throws:
StripeException
-
voidInvoice
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.Consult with local regulations to determine whether and how an invoice might be amended, canceled, or voided in the jurisdiction you’re doing business in. You might need to issue another invoice or credit note instead. Stripe recommends that you consult with your legal counsel for advice specific to your business.
- Throws:
StripeException
-
voidInvoice
public Invoice voidInvoice(String invoice, InvoiceVoidInvoiceParams params, RequestOptions options) throws StripeException 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.Consult with local regulations to determine whether and how an invoice might be amended, canceled, or voided in the jurisdiction you’re doing business in. You might need to issue another invoice or credit note instead. Stripe recommends that you consult with your legal counsel for advice specific to your business.
- Throws:
StripeException
-
createPreview
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.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 or edit the invoice. If you want to change the amount that your customer will be billed, you can add, remove, or update pending invoice items, or update the customer’s discount.
You can preview the effects of updating a subscription, including a preview of what proration will take place. To ensure that the actual proration is calculated exactly the same as the previewed proration, you should pass the
subscription_details.proration_date
parameter when doing the actual subscription update. The recommended way to get only the prorations being previewed is to consider only proration line items whereperiod[start]
is equal to thesubscription_details.proration_date
value passed in the request.Note: Currency conversion calculations use the latest exchange rates. Exchange rates may vary between the time of the preview and the time of the actual invoice creation. Learn more
- Throws:
StripeException
-
createPreview
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.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 or edit the invoice. If you want to change the amount that your customer will be billed, you can add, remove, or update pending invoice items, or update the customer’s discount.
You can preview the effects of updating a subscription, including a preview of what proration will take place. To ensure that the actual proration is calculated exactly the same as the previewed proration, you should pass the
subscription_details.proration_date
parameter when doing the actual subscription update. The recommended way to get only the prorations being previewed is to consider only proration line items whereperiod[start]
is equal to thesubscription_details.proration_date
value passed in the request.Note: Currency conversion calculations use the latest exchange rates. Exchange rates may vary between the time of the preview and the time of the actual invoice creation. Learn more
- Throws:
StripeException
-
createPreview
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.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 or edit the invoice. If you want to change the amount that your customer will be billed, you can add, remove, or update pending invoice items, or update the customer’s discount.
You can preview the effects of updating a subscription, including a preview of what proration will take place. To ensure that the actual proration is calculated exactly the same as the previewed proration, you should pass the
subscription_details.proration_date
parameter when doing the actual subscription update. The recommended way to get only the prorations being previewed is to consider only proration line items whereperiod[start]
is equal to thesubscription_details.proration_date
value passed in the request.Note: Currency conversion calculations use the latest exchange rates. Exchange rates may vary between the time of the preview and the time of the actual invoice creation. Learn more
- Throws:
StripeException
-
createPreview
public Invoice createPreview(InvoiceCreatePreviewParams params, RequestOptions options) throws StripeException 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.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 or edit the invoice. If you want to change the amount that your customer will be billed, you can add, remove, or update pending invoice items, or update the customer’s discount.
You can preview the effects of updating a subscription, including a preview of what proration will take place. To ensure that the actual proration is calculated exactly the same as the previewed proration, you should pass the
subscription_details.proration_date
parameter when doing the actual subscription update. The recommended way to get only the prorations being previewed is to consider only proration line items whereperiod[start]
is equal to thesubscription_details.proration_date
value passed in the request.Note: Currency conversion calculations use the latest exchange rates. Exchange rates may vary between the time of the preview and the time of the actual invoice creation. Learn more
- Throws:
StripeException
-
lineItems
-
upcomingLines
-