#jogui_best-practices

1 messages ¡ Page 1 of 1 (latest)

azure rivetBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1240299785420931122

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

blazing spade
#

Stripe doesn't have a built in way to present different amounts for the same currency based on geolocation of the customer. This is something you'd handle in your integration.

Should I create multiple Stripe Prices and use the metadata field to add the country ISO list that i want to make it available for each price? Is something better?
I'm not sure I fully grasp the part about "making ISO list available to each price"

hearty tendon
#

For example, with Stripe prices i can attach metadata fields to each Stripe Price entity, when i create them in the Stripe dashboard. I thought as a solution to add a field "countries" for each Stripe price, and there as a value add the ISO country list that this price is available to each country

#

Stripe price 10EURO to countries ES,IT,PT, Stripe price 20 euro to countries DE,NL, etc.

#

then i can load this information in my backend and generate the "map" that will give me a stripe price id for each user depending on his/her country

blazing spade
#

Ah so basically, you'd pass the appropriate ID by looking at the ISO when you create the checkout session?
Yeah that makes sense

#

would recommend trying it out in test mode

hearty tendon
#

yup, but is not a checkout sesion, but stripe elements

#

i have much more freedom, but much more work

blazing spade
#

You can't use Price IDs with PaymentIntents API really.

hearty tendon
#

SubscriptionCreateParams.Builder subCreateParams =
SubscriptionCreateParams.builder()
.setCustomer(customer.getId())
.addItem(Item.builder().setPrice(priceId).build())
.addAllExpand(
List.of(
"latest_invoice.payment_intent.payment_method",
"latest_invoice.total_tax_amounts.tax_rate",
"default_payment_method"))
.setProrationBehavior(SubscriptionCreateParams.ProrationBehavior.NONE);

#

its subscription, not paymentintent

blazing spade
#

Ah Ah that makes sense

#

my bad

hearty tendon
#

currently we have this and its working, we are using the stripe elements credit card component, not the new one that "automatizes" all types of payment methods, dunno if you are refering to that

#

anyway, thanks for confirming it

#

do you know if i can export this chat from discord, to save the convo when the manager comes asking for a more "automatic way"? haha

blazing spade
feral elkBOT