#iDeal return_url

8 messages · Page 1 of 1 (latest)

severe finch
#

I'm trying to implement Stripe iDeal into my checkout flow. Everything seems to mostly work but when I finish an order, I get sent to the return_url specified in the stripe object (which is to be expected, all the payment intent IDs are in the url). A payment is created in stripe but no order is created in Medusa and my cart is still intact. When I go back to checkout and do it all again, I skip the stripe payment page and get sent to the Medusa order success page, and only then an order appears in the admin panel.

Does anyone know what I might be doing wrong?

elfin vortex
#

On your return_url page you need to perform some checks if the payment_intent status from stripe is for instance succeeded. If it is then you need to complete the cart by yourself. I guess you're using the nextjs starter which does perform this check for card payments on the chekcout page but doesn't handle return_url. Hence the second time you do it, it succeeds on the checkout page. Nextjs starter is not prepared for ideal payments. You need to handle those yourself. Which is not that much work really.

severe finch
#

Ah I see. It indeed doesn't seem like too much work to handle it myself, but I wanted to make sure that was the correct way to go. Thanks!!

severe finch
#

Sorry for reviving this, but for some reason I can't seem to get the CheckoutProvider. I'm trying to use the useStripe() hook to fetch the payment with, but it keeps complaining it needs the <Elements> hook. I have a new page in the pages directory under the order folder. This loads a component from modules/checkout/checkout-complete which has the CheckoutProvider element, which should provide it's children with the right context. Does anyone know what's going wrong here?

elfin vortex
#

Are you using stripe-ideal payment method?

#

I suggest to checkout PaymentElement from Stripe and use just stripe provider. You will have iDeal baked in as long as you activate it in Stripe Dashboard. The UI will be mostly done for you.
You can search for PaymentElement in this discord for some examples, it has been discussed many times.
#1073737740098752684 message

#

You would need to dwelve into Stripe docs