#TheRankinator
1 messages ยท Page 1 of 1 (latest)
Hi ๐
Have you tested this flow? I ask because I don't think attaching a PM to a Setup Intent will consume it (that requires a Charge AFAIK).
Hi!
I...think we have? Here's been our flow for cards:
- Using a card, create a PaymentMethod without a Customer attached to it
- Create a SetupIntent with that PaymentMethod
- Create a PaymentIntent with that PaymentMethod and try to charge it
- We get back the error
"Invalid Stripe request: : The provided PaymentMethod cannot be attached. To reuse a PaymentMethod, you must attach it to a Customer first."
We can get it to work for cards just by not creating a SetupIntent, but that won't work for bank accounts since we need the SetupIntent in order to get a mandate
Oh wait! I just saw this in another flow. What do you do with the Setup Intent? Can you share a Setup Intent ID?
We don't do anything with the SetupIntent (we thought we needed it to get a mandate for single-use bank tokens) - should we be doing something with it?
We just made this SetupIntent:
seti_1MDAIFJnSU1ayTHcWjdwPPGP
(This has a PaymentMethod without a Customer attached)
Okay but there is no customer here either and no confirmation
This would need to be created with a Customer ID and then confirmed to attach the Payment Method
Right, so bismarck said (in that thread I posted in the initial question) that the way to simulate single-use tokens with the SetupIntent API is to just not add a customer
Ah, okay
The card is validated and not consumed at this point, at least that is what i can see
Right
Oh wait, you're saying it's not consumed when we include it in the SetupIntent?
The payment method you attached to the Setup Intent you provided. I see it was validated but not consumed
Ah so, we seemed to figure something out
The SetupIntent always needs a customer ID included upon creation, but the PaymentMethod can be made single-use or reusable by attaching it to a customer or not (respectively)
I think what we were doing wrong was not pasing a Customer ID to the SetupIntent when we wanted single-usage
A payment method will always be single use unless it is attached to a Customer.
(Presumably this should work for bank accounts as well, we still need to set up ACH Direct Debit so we can't test it just yet)
I think this card is not consumed because it has not been charged
Happy to do it! ๐
Much obliged
You wouldn't happen to be able to help us activate ACH Direct Debit, would you? ๐
I would be able to share this doc: https://stripe.com/docs/payments/ach-debit ๐
The docs are pretty decent on ACH DD. It's a little more involved with all the mandate stuff and setting up financial connection parameters but is you're using the Payment Element it also "just works"