#awais_api

1 messages ¡ Page 1 of 1 (latest)

brittle oxideBOT
#

👋 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/1401818660200513557

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

dreamy perch
#

if this can not be done in the way i am trying kindly suggest the best way to achive what i want.

loud stream
dreamy perch
#

here is the dashboard view of my currencies, i would like to mention that for the default currency which is USD it is working fine but i want to charge the currencies i have added against the single price. let me know if you did not understand any thing. if you are concern about the price in the checkout session object priceDetails['productPrice'] this one carries the price of the product which will be 'price_1RjEqeIQVJgQbJIfF3CTO9F6' in my case.

loud stream
#

Looking into this.

dreamy perch
#

ok

loud stream
#

As per the error message you should only be passing price OR price_data. Can you remove price_data since you are passing the price object and try again?

dreamy perch
#

sure i can but will this resolve the issue let me do this will update you shortly

loud stream
#

What is the exact issue that you are facing?

#

Also do note you must remove the currency parameter as well.

dreamy perch
#

if i remove the currency option though i am in Pakistan and i want my Pakistani customers to be charged in PKR the will be charged in USD. did you get my point i want to charge customers in there local currency, and rate may vary for different countries. it will not be based on USD. I mean I do not want to use any exchange API i want to set price in dashboard for different countries. If any country that is not listed in my currencies option list user from that country will be charged in USD

#

if i remove the currancy key then it will start working but will show the price in USD on checkout session page

#

when i removed currency.

#

you can also suggest me any work around it it is not possible in the way i am trying.

loud stream
dreamy perch
#

there is no other way?

loud stream
#

What do you mean by other ways? What is not working with the way mentioned above?

dreamy perch
#

I did not mention any thing wrong with the way you told me, But now i have you precious time i thought i should ask for some other ways if this did not worked for me. i am going to change my code as you suggested and will test.