#nftarea
1 messages ยท Page 1 of 1 (latest)
Hi there, you can create prices in different currencies for the same product, and you should specify the price in your customer's currency when creating a subscription.
Yup. It's working fine using checkouts but we need to display on a page on our app
Is there a way I can retrieve the price in user's currency using API call?
https://stripe.com/docs/api/prices/list?lang=curl#list_prices-currency you can specify the currency and product when listing prices
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 is the plan. I am trying to get the amount from all the currencies.
Thanks
I was looking for that.
Thanks ๐๐ผ
No problem
Will it work for a specific plan? I have multiple prices on a product.
Wait, so you are using Plans API, not Prices API?
Yeah
There's a Plan listing API, but doesn't have a currency params (https://stripe.com/docs/api/plans/list?lang=curl#list_plans)
Yeah, that's what I am asking.
So I guess you need to retrieve all Plans, and filter by yourself.
Retrieved plan contains amount for just default currency.
So, you mean I need to list plans with a currency and then filter the one I need?
There's no currency param in the Plan listing API, you can specify a product to retrieve all plans related to this product, and filter the currency in your own code.
Okay. Thanks
Still does not work. It only shows the amount in default currency.
I have a plan with USD as default currency and the amount is $40. I have set Australian Dolllar as another price using multi currency which is set to say $50. When I retrieve the plan object I only get amount $40.
I want to get $50 if I know user's currency is AUD.
There's no currency param in the Plan listing API, you can specify a product to retrieve all plans related to this product, and filter the currency in your own code.
I tried doing this but plans have the amount only in default currency.
The Plan listing API returns all plans in all currencies.
Can you share with me the product ID?
Hm, you were actually using Prices API, not Plans API.
https://dashboard.stripe.com/test/logs/req_aVfEYUZSHpab6Q for example, this price was created via Prices API.
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
So, there is not way to get it amount in all currencies?
You should use Prices API. https://stripe.com/docs/api/prices/list?lang=curl#list_prices-currency you can specify the currency and product when listing prices
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
It doesn't return anything if I pass call API like this.
Stripe::Price.list({ product: "prod_K99MIpyDAIzNPR", currency: "NZD"})
Maybe I am unable to make you understand what I want.
Thanks for the help. I will try something.
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
I don't see any prices in NZD, there are prices in USD and AUD, but no NZD.
This plan has price in NZD
price_1M7IKyLyyYrd44AgpfEAwNw1
I added it using multi currencies option
Yeah, I think I am unable to make you understand what I want.
If you see in the screenshot, the plan has amount in AUD, INR and NZD. I want to get the amount in all these currencies along with the default USD amount.
Ah, I understand now
Is it possible?
Yup, the currency_options is not included in response by default, you need to expand it.
Stripe::Price.list({ product: "prod_K99MIpyDAIzNPR", currency:
"NZD", expand:['currency_options']})
My mistake, it should be expand:['data.currency_options']
Still doesn't return anything.
remove currency param
Yeah, I tried that and got the prices. Thanks
Thanks for going through all this. I appreciate it a lot. Thanks Jack
I'm happy that your problem is resolved!
When can we find documentation about the expand feature?
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.