#wsteelix

1 messages Β· Page 1 of 1 (latest)

worldly mapleBOT
leaden trail
#

You can use the Payment Method directly inside the SetupIntent instead

remote wigeon
#

hi @leaden trail , eg for SEPA Direct Debit (with iDeal and Bancontact) we need to check for the payment method inside the setup_attempt

#

we know that we can use the payment_method directly inside setup_intent, but then we need to support also SEPA direct debit, which always produce this error if we use that

#

so I was wondering if it's ok to use the payment_method inside setup_attempt for regular cards setup_attempt also πŸ€”

leaden trail
#

It has the same Id, doesn't it? I don't think the way of retrieving the Id would make any different. Probably there is another issue

#

Can you provide the request id of that error? req_xxx

remote wigeon
leaden trail
#

No request id is different, but okie let me TAL

remote wigeon
#

thanks! if you specifically want the request, then please kindly explain to me how to find it 😁

worldly mapleBOT
remote wigeon
#

It has the same Id, doesn't it?
they have different payment_method id inside setup_attempt (which is the correct one to be used for default payment method) for SEPA at least

#

so e.g if we know that the payment_method_id for card's setup_intent are the same inside its setup_attempt also, then we can use the same method to extract it for both SEPA and cards

wise jolt
#

Hey! Taking over for my colleague. let me resume your case. You are using SetupIntent in order to collect a bancontact PaymentMethod pm_1MmFMPLiXZrLhRYln6QdmZYs for the customer cus_NXK00cbIZjtY9k .
This is the requestId:
https://dashboard.stripe.com/logs/iar_UDpES6XIDqK6t5

#

Now when you tried to use that PaymentMethod you got this error

The customer does not have a payment method with the ID pm_1MmFMPLiXZrLhRYln6QdmZYs. The payment method must be attached to the customer.
right?

remote wigeon
#

yes

remote wigeon
#

ye that's the point i'm trying to make

wise jolt
#

When saving a bancontact you have a Sepa PaymentMethod related to it

#

that you need to use

remote wigeon
#

that's for SEPA, when confirming a SetupIntent, we need to use the payment method inside its SetupAttempt object

#

my question is:

for regular cards, when confirming a SetupIntent, can we also use this payment method inside SetupAttempt?

wise jolt
#

Find the ID of the SEPA Direct Debit payment method by retrieving the SetupIntent and expanding the latest_attempt field where you will find the generated_sepa_debit ID inside of payment_method_details.

wise jolt
#

But you can give it a chance and test using the PaymentMehtod inside SetupAttempt, not sure honestly. For sure, with cards you'll have only 1 PaymentMethod at the end

remote wigeon
#

alrighty! I will have to test it then 😁

#

since there's no GUI on the Dashboard to view SetupAttempts, so i was just a bit lazy

#

thanks for helping anyway!

wise jolt
#

Welcome!

remote wigeon
#

have a great day and weekend then! 🌞

wise jolt
#

Thanks! you too πŸ™‚