#xip_best-practices

1 messages ยท Page 1 of 1 (latest)

left bobcatBOT
#

๐Ÿ‘‹ 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/1461038454942076952

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

oblique trout
#

We have tested the following implementation and things seem to work well:

  • a script that is added to a client's website
  • script injects an iframe into the page, passing host window location (with all url params) to it
  • iframe contains react app that presents a payment flow using Stripe Elements with Checkout Sessions
  • when calling checkoutState.checkout.confirm, we set redirect to always (to test)
  • alternatively, we use a redirect payment method (i.e. crypto)
  • we set return url to host page url (that we injected into the iframe earlier) and add checkout id as a url param
  • when payment is confirmed, the user is redirected as expected
  • when the flow completes, the user is redirected back to the initial host page
  • our script runs again, injects url params into our iframe again
  • iframe detects checkout id param, sets state to show checkout result

What are we missing?

left bobcatBOT
tidal drift
#

hello! just want to acknowledge that i'm looking at your question now

#

i know that we flag it as not recommended, but i do know that multiple users of ours do use them, i do know that we've seen issues resulting from their usage before

#

so i might need to dig a bit more to find specific reasons

oblique trout
#

that would be incredibly helpful

#

btw, we are not in a rush, so if it would be convenient, I'm more than happy to come back to this tomorrow

tidal drift
#

if we want to go that route i can always turn this into an email case, coming back tomorrow is a tricky proposition because then it's a roll of the dice for who you're talking to next, and they might need to do the same research as me ๐Ÿ˜›

oblique trout
#

heh

tidal drift
#

but let me see what i can turn up quickly

oblique trout
#

email works too, but I'm happy to do whiโ€” okay!

tidal drift
#

ok, so i've chatted with a few people about this and it sounds like the general thoughts are that lots of users have seen issues with redirects in the past, but if you've specifically tested redirects and it's working then it should be pretty safe

#

i would just make sure to thoroughly test all of the payment methods you're planning on using

oblique trout
#

Understood. Thank you!