#wsteelix
1 messages Β· Page 1 of 1 (latest)
You can use the Payment Method directly inside the SetupIntent instead
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 π€
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
would event_id be ok? e.g this: https://dashboard.stripe.com/events/evt_1MmFNjLiXZrLhRYl7gGdolIy
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
No request id is different, but okie let me TAL
thanks! if you specifically want the request, then please kindly explain to me how to find it π
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
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?
yes
When checking the customer, I see only this PaymentMethod pm_1MmFNjLiXZrLhRYl3ZHLMNsT attached to it which is a Sepa PaymentMethod
which is exepcted.
ye that's the point i'm trying to make
When saving a bancontact you have a Sepa PaymentMethod related to it
that you need to use
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?
Now in order to get Sepa PaymentMethod you need to follow this:
https://stripe.com/docs/payments/bancontact/set-up-payment?platform=web#charge-sepa-pm
Find the ID of the SEPA Direct Debit payment method by retrieving the SetupIntent and expanding the
latest_attemptfield where you will find the generated_sepa_debit ID inside of payment_method_details.
For regular Cards you can just refer the the main PaymentMethod of the SetupIntent object
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
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!
Welcome!
have a great day and weekend then! π
Thanks! you too π