#karsh

1 messages ยท Page 1 of 1 (latest)

pseudo nicheBOT
still rover
flint pine
#

Thanks. I've just followed this one today as well, but this only makes SEPA direct debit show up in the payment element. Not iDEAL, bancontact or sofort (local payment methods I need)

still rover
#

You have an example Subscription I can see?

flint pine
#

So that works great, but then with iDeal.
The payment element showed me that I could pay with card or sepa direct debit.

But I want to use SEPA direct debit, while letting the user do an iDeal payment instead of filling int heir bank details

#

So when using the guide you linked, I get a payment element showing this:

still rover
#

Checking

flint pine
still rover
#

Ok, the default subscription flow (like I shared), doesn't support iDEAL currently

flint pine
#

Okay, so I need to do use setupintents I think. Just missing the logic on what to do first.

  1. Setupintent
  2. Create subscription after setupintent succeeds?
still rover
#

Yes

flint pine
#

Okay so after the setupintent is confirmed, we're on a 'confirm' page (the return_url).
Then I can check server side if the setupintent went well, if not redirect back to payment page.

I'm a bit lost at this point.

I can retrieve the setupintent and check if the status == "succeeded".
Then I can list payment methods and get the ID of the sepa payment method.

Then I am at step 7 of this guide https://stripe.com/docs/payments/save-and-reuse?platform=web#charge-saved-payment-method

Buth ere I need to start creating a subscription instead, correct?

Learn how to save card details and charge your customers later.

still rover
#

Then I can check server side if the setupintent went well, if not redirect back to payment page.
Why do that server-side? Just use the response once confirmSetup resolves. It'll contain the pm_xxx you can use to create your subscription

flint pine
#

You mean, this?

#

and then use that paymentMEthod that's saved to the customer to create the subscription?

still rover
#

Yep, exactly!

flint pine
#

And then I need to create that subscription with setting the default payment method to that pm_xx I got from the setupIntent ?

still rover
#

Yep

flint pine
#

thank you! I'll try this out right now. I probably have 1 or 2 follow up questions ๐Ÿ™‚

still rover
flint pine
#

Thanks, I think for my use case that means I need to follow this: list the payment methods associated with that customer

#

that seems to work as I've got a subscription created ๐Ÿ˜„

still rover
flint pine
#

oh okay!

still rover
#

Not sure I understand the question

flint pine
#

Okay this is what I want:
The user can buy a subscription, say something that costs 25 euros a month, using iDeal to give the mandate for SEPA direct debits.

Right now it looks like this is working (https://dashboard.stripe.com/test/payments/pi_3MZE2rKWokmZWsWf0QqXN8OY )

But, I read the SEPA transactions can take several days.
Or it might fail due to needing authorization.

I'd like to program the fallbacks for what should happen if the money isn't being received (the subscription should stop after retrying). And if it needs authorization, then I need to let the user know to do something.

To trigger these secnario's I think I can use the test data in the last link? But not sure how to use it. In other words, the instructions aren't clear eonugh for me

still rover
#

Well you'd create a subscription using those test credentials to simulate the failure scenarios you described

#

I believe there's one that doesn't immediately fail, but does after a few minutes. That should help account for that

flint pine
#

okay thanks, I think I can figure it out

#

appreciate your time and help!