#Yohan

1 messages · Page 1 of 1 (latest)

leaden otterBOT
long wadi
#

Hi there,
Could you please share the SetupIntent Id ?

pulsar tide
#

Yes sure, seti_1MQp6JIraL2RXwueooLZA7NJ

long wadi
pulsar tide
#

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.

long wadi
#

When you expand the latest_attempt of the SetupIntent, did you manage to get the expanded object ?

pulsar tide
#

No I don't

long wadi
#

in the latest_attempt object, you will find the generated_sepa_debit ID inside of payment_method_details

pulsar tide
#

Yes, but it's not working in my case, see my first screenshot, I only have a string in the latest_attempt field...

long wadi
#

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']})

pulsar tide
#

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 :

long wadi
#

Ah sorry. But here it looks like your integration is not passing the expand param properly I think

pulsar tide
#

Ok I'll look for it

#

req_9beQaBasQmmz9F

keen relic
#

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?

pulsar tide
#

Yes sure

#

$setup = SetupIntent::retrieve($session->setup_intent, ['expand' => ['latest_attempt']]);

#

if it can help you

keen relic
#

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']
]);
pulsar tide
#

Yeah, it works like this, many thanks for your help ! Maybe a documentation update would be great. Have a nice day 🙏

keen relic
#

Yeah the lib syntax you're using is considering old/deprecated. The documented syntax is the recommended usage

#

i.e.: $stripe->setupIntents->retrieve('seti_xxx', ['expand' => ['latest_attempt']])