InvoiceService::upcoming( null|array $params = null, null|array|StripeUtilRequestOptions $opts = null )

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 discount that is applicable to the customer.


Description Description

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 a

proration_date

parameter when doing the actual subscription update.
The value passed in should be the same as the

subscription_proration_date

returned on the upcoming invoice
resource. The recommended way to get only the prorations being previewed is to
consider only proration line items where

period[start]

is equal to
the

subscription_proration_date

on the upcoming invoice resource.


Parameters Parameters

$params

(Optional)

Default value: null

$opts

(Optional)

Default value: null


Top ↑

Return Return

(StripeInvoice)


Top ↑

Source Source

File: includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/InvoiceService.php


			

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.