Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Anotheruser's avatar

Laravel Cashier - $invoice->upcoming

Hi.

I am trying to get the date of the next invoice. In the Stripe doc's it states that there is an upcoming() that can be called. However I cant get this to work with cashier as there is no 'invoice upcoming' method that i can see.

The Stripe docs for this can be seen here: https://stripe.com/docs/api#retrieve_customer_invoice

Can anyone advise on this?

Many thanks

Barry.

0 likes
2 replies
Anotheruser's avatar

Since posting I have got it working. However, to me this solution looks messy. Is there a better option?

{{ $invoice->getStripeInvoice()->upcoming(['customer' => $company->stripe_id])['date'] }}

Please or to participate in this conversation.