Stripe API format invoices totals

David Carr

Stripe API Tutorials Nova Framework

Currency comes out of Stripe with pence / cents on it’s own can be problematic to format.

I’m using Nova Framework not setup with Nova? please read Getting Stripe API setup with Nova Framework

money_format or number_format won’t format the accurate amount. To format the value correctly divide the amount by 100.

{{ $invoice->total / 100 }}

 

Laravel Modules Your Logo Your Logo Your Logo

Become a sponsor

Help support the blog so that I can continue creating new content!

Sponsor

My Latest Book

Modular Laravel Book - Laravel: The Modular way

Learn how to build modular applications with Laravel Find out more

Subscribe to my newsletter

Subscribe and get my books and product announcements.

Fathom Analytics $10 discount on your first invoice using this link

© 2006 - 2024 DC Blog. All code MIT license. All rights reserved.