#sh3ft-currency-mismatch

1 messages · Page 1 of 1 (latest)

cyan forumBOT
#

Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

#

sh3ft-currency-mismatch

fast burrow
#

Hello again

#

Same deal as before

#

Please send payment intent id

loud thunder
#

pi_3ONdeOB6P9f0Kuge0rd29QzE

fast burrow
#

And what currency are you initializing payment element with there?

loud thunder
#

For this example euros

#

this is what I do on the backend:
stripe.Subscription.create(
customer=customer_id if customer_id else customer.id,
payment_behavior=“default_incomplete”,
items=[
{“price”: request.data.get(“priceId”)},
],
payment_settings={“save_default_payment_method”: “on_subscription”},
expand=[‘latest_invoice.payment_intent’],
)

fast burrow
#

It's the exact same issue as yesterday

#

That price has a default currency in usd

#

That customer has a default currency of usd

#

And you're setting euros in the frontend

loud thunder
#

In Stripe I have setup diferent currencies for multiple country for all my price plans how can I use those currencies for my price plans

#

when the user fetches the product list instead of showing the prices in with the default currency to show it to the users local currency and then afterwards setup the payment for that product to the users local currency

fast burrow
#

Yeah the issue is that customer above is a usd customer

#

That's their default/local customer

#

So it was expecting you to set usd in stripe.js

loud thunder
#

Okay so If I make a new customer with eur it will work as expected?

fast burrow
#

If you set eur in the frontend yeah

#

What you set in the frontend needs to match what's on the customer

#

That's the issue here

loud thunder
#

Ohh okay I think I got it now 🙂

#

I will try this and I will let you know. Thank you so much that was helpful

fast burrow
#

No problem

loud thunder
fast burrow
#

No it's chose automatically with the first payment

loud thunder
#

This is what i do:
customer = stripe.Customer.create(
description=“Subscribtion Payment”,
name=request.data.get(“username”),
email=request.data.get(“email”),
currency=request.data.get(“currency”)
)
subscription = stripe.Subscription.create(
customer=customer_id if customer_id else customer.id,
payment_behavior=“default_incomplete”,
items=[
{
“price”: request.data.get(“priceId”),
},
{“price_data”: {
“currency”: request.data.get(“currency”),
“product”: request.data.get(“product_id”),
“recurring”: request.data.get(“recurring”),
“unit_amount_decimal”: request.data.get(“unit_amount_decimal”)
}}
],

fast burrow
#

Oh

#

Multi currency prices are really for checkout

#

For automatic detection

#

If you have a custom checkout page using elements, it's better to just have a price id for each currency

#

And just pass that depending on customer location

#

Which doc are you following to integrate this? Want to really make sure we're on the same page here

loud thunder
#

this one

cyan forumBOT
fast burrow
#

No what doc are you following to integrate subscriptions

#

And multi currency prices

#

That's really for Checkout

#

Just curious what guide you're following here