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 }}

 

Read articles directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Copyright © 2006 - 2024 DC Blog - All rights reserved.