#sh3ft-currency-mismatch
1 messages · Page 1 of 1 (latest)
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, 23 hours ago, 15 messages
- sh3ft, 3 days ago, 6 messages
sh3ft-currency-mismatch
pi_3ONdeOB6P9f0Kuge0rd29QzE
And what currency are you initializing payment element with there?
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’],
)
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
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
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
Okay so If I make a new customer with eur it will work as expected?
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
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
No problem
I'm using this api to create the customer: https://stripe.com/docs/api/customers/create?lang=python can I pass the currency inside this api?
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
No it's chose automatically with the first payment
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”)
}}
],
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
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
this one