#Truu
1 messages · Page 1 of 1 (latest)
Hi there, are you passing the subscription's latest_invoice.payment_intent.client_secret to your frontend to render the PaymentElement?
yes, exactly that to draw the CC fields (card, cvc, zip, etc)
OK, the PaymentElement doesn't display the amount, so you can get the amount from PaymentIntent and display in your page.
do you mean other fields of data inside of 'payment_intent' that are added to the output along with 'client_secret'
is there a guide to those possibilities?
basically you can also return the PaymentIntent's amount when you return the client_secret to frontend.
ok, that's very helpful, I'll use that, thank you!
Hey, looking at this page...
do I have to keep track of special currencies and which to multiply by 100 or 1000 or 1?
like I am going to see amount = 1400 and I need to convert that to USD so my code has to show $14.00 and divide that by 100 and use the proper '$' symbol
is there some automated function through stripe that handles all of this translation for every country, or do I have to write my own converter for display of the total?
There's no existing API to format amount based on currency at this moment, you need handle the currency and amount display by yourself.
got it, thank you!