#GeochiNova
1 messages ยท Page 1 of 1 (latest)
Hi there!
You pass hidePostalCode: true in an options object
So it might look like <CardElement id="card-element" options={hidePostalCode: true} onChange={handleChange} />
๐
@lean moon Can I also ask you how do I make it so that Stripe automatically displays the price in proper currency according to the country I'm in?
I'm using the following code to display the price:
<div>
<p className='text-purple-500 text-sm'>
{' '}
{price.unit_amount / 100 + '0'} {price.currency.toUpperCase()} / {price.recurring.interval}
</p>
</div>
I have two prices created for the product, with eur set as default. I'm in Spain
Another price is in GBP. Isn't Stripe supposed to select the one automatically? or ?
No we don't handle any of that when you use Card Element. You build the entire UI yourself and Card Element solely collects the card details.
You would likely want to do geolocation via IP of your customer and then load the proper currency UI based on that (and create a PaymentIntent with proper currency within Stripe)
whoa.... sounds involved
so you're saying that I'd have to create different pages/components for each currency??
Yes. If you want us to handle this for you then you should use Stripe Checkout and multicurrency Prices
Same in that Payment Element only collects the payment method. It doesn't display any UI about the purchase itself.
can I use the Multicurrency Prices with these elements? (don't know what they are yet)
No, that's only supported with Stripe Checkout. See: https://stripe.com/docs/payments/checkout/present-local-currencies
Since you understand this better. Can I pleas ask you to pretend that you're writing a chatGPT prompt, to write code for the, what was it - geolocation via IP and then loading proper currency UI and whatever else you think would make sense ?
๐ I tried
Otherwise I'd recommend hiring someone to help you out on this.