#naren_api

1 messages ¡ Page 1 of 1 (latest)

night umbraBOT
#

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

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

fiery seal
#

here's the backend code i tried out (but doesn't work)

hot skiff
#

hello! sorry i'm a little confused, what doesn't work specifically for the above code snippet you shared?

#

what does a stripe checkout bar mean? Can you share a screenshot?

If you're using a PaymentIntent, the Payment Element is used only to collect the payment method details. The Payment Element itself doesn't display the payment amount and currency. It's up to you to build the logic to display the payment amount and currency on your own site.

fiery seal
#

i mean the floating bar that shows up when i call presentPaymentSheet in the frontend

hot skiff
#

ah, so you're using our React Native SDK?

fiery seal
#

yes i am

hot skiff
fiery seal
#

yes i am. here's most the code

#

once i click a button, i call openPaymentSheet to trigger the pop up

hot skiff
#

can you log data? and share what's the output?

fiery seal
#

wait a sec i just found what's wrong. i was testing with indian ruppees and they were worth too less for the transaction

#

i want to charge different amounts for different currencies. will i have to hard-code set prices on the client?

#

like i make a dictionary of locations and amounts and just get that info directly

hot skiff
#

like i make a dictionary of locations and amounts and just get that info directly

pretty much, yes

#

i wouldn't hardcode it on the frontend though, this list should be stored on your backend

fiery seal
#

wait can i actually init payment sheet only when the user clicks checkout?

hot skiff
#

you should be presenting the payment sheet only when the user clicks on checkout

fiery seal
#

it might take longer to load but is that the way?

fiery seal