#Yohan
1 messages · Page 1 of 1 (latest)
Hi there,
Could you please share the SetupIntent Id ?
Yes sure, seti_1MQp6JIraL2RXwueooLZA7NJ
Thanks for sharing. That SetupIntent has a successful status. There is a resulted PaymentMethod pm_1MQp6PIraL2RXwuenO2SS8yZ you can use it in step https://stripe.com/docs/payments/bancontact/set-up-payment?platform=checkout#charge-sepa-pm
as {{SEPA_DEBIT_PAYMENT_METHOD_ID}}
Thanks for your help. I just did that and it's not working, see error : The provided bancontact PaymentMethod cannot be used again. It was used in a previous PaymentIntent or SetupIntent to set up a sepa_debit PaymentMethod, which can be used for multiple payments. To find the ID of the sepa_debit PaymentMethod, list the sepa_debit PaymentMethods associated with the Customer used to set up this PaymentMethod.
When you expand the latest_attempt of the SetupIntent, did you manage to get the expanded object ?
in the latest_attempt object, you will find the generated_sepa_debit ID inside of payment_method_details
Yes, but it's not working in my case, see my first screenshot, I only have a string in the latest_attempt field...
It looks like you are passing the expand param with a wrong format, try this instead:
Stripe::SetupIntent.retrieve('{{SETUP_INTENT_ID}}', {expand: ['latest_attempt']})
Not sure to understand when you say it's a wrong format, I pass it exactly the way you do in the doc, see php tab :
Ah sorry. But here it looks like your integration is not passing the expand param properly I think
Can you share the ID (req_xxx) of the retrieve API request?
https://support.stripe.com/questions/finding-the-id-for-an-api-request
Taking a look
Yep, seems the expand parameter isn't being passed there for some reason. Can you paste the exact code that's making that API request?
Yes sure
$setup = SetupIntent::retrieve($session->setup_intent, ['expand' => ['latest_attempt']]);
Curious, but it is working with a curl call : curl -G https://api.stripe.com/v1/setup_intents/seti_1MQpYAIraL2RXwue47mZMLtD
-u sk_test_***********:
-d "expand[]"=latest_attempt
if it can help you
Yeah, can see that in your logs. I think it's a differing syntax thing with our PHP lib, try this:
SetupIntent::retrieve([
'id'=> $session->setup_intent,
'expand' => ['latest_attempt']
]);
Yeah, it works like this, many thanks for your help ! Maybe a documentation update would be great. Have a nice day 🙏