#hamid-sepa-debit
1 messages ยท Page 1 of 1 (latest)
Is your frontend built using Stripe Elements, or is this for a React Native project?
is angular project
separate team
is managing that, what are they missing?
there?
Thank you for the clarification, do you have a request ID from where you saw the error returned?
It's difficult to tell exactly what's happening from that alone, but it appears that the mandate information is not being provided to the PaymentIntent object. This should be done either when the PaymentIntent is created, if the intents are set to auto-confirm:
https://stripe.com/docs/api/payment_intents/create#create_payment_intent-mandate_data
Or while confirming if you're using a manual confirmation process:
https://stripe.com/docs/api/payment_intents/confirm#confirm_payment_intent-mandate_data
these are my params on backend in ruby code
customer: stripe_customer.id,
payment_method: stripe_payment_method.id,
off_session: true,
confirm: true,
amount: amount,
currency: currency,
description: description,
metadata: metadata,
}```
so it clearly shows confirm: true
hey there, just catching up here
great
can you share an example failing request id?
like req_123
https://stripe.com/docs/api/request_ids
https://support.stripe.com/questions/finding-the-id-for-an-api-request
do not have req_id
Where are you seeing this error then?
that creates a Stripe API request, and should have a request ID
its in the response headers
actually it was on client's server, let me try to get id
can you share any specific object id, like a payment method?
ok thanks!
stripe_intent = Stripe::PaymentIntent.create(stripe_params)
customer: stripe_customer.id,
payment_method: stripe_payment_method.id,
off_session: true,
confirm: true,
amount: amount,
currency: currency,
description: description,
metadata: metadata,
}```
coz the same code was working in locally then in test evn, everywhere, but no sure why its not working on current client's instance.
any update
still looking, bear with me ๐
yea yea sure
It does look like this PM was set up and collected mandate data as expected here: https://dashboard.stripe.com/logs/req_MPJoBDt6yIXO0h
Aren't you supposed to explicitly pass the Mandate id in https://stripe.com/docs/api/payment_intents/create#create_payment_intent-mandate when you do SEPA Debit yourself?
My understanding is that after the SEPA Debit succeeds, you get the mandate id mandate_123 and then you store that in your database to use on future payments
nopes, thats not called madate id
its payment_method which we save and use in our code
for future payments
there are both though
so i am still not clear, whats happening here
Can you try what I just explained? The SetupIntent has a clear mandate id that you need to pass on PaymentIntent confirmation
but point here is it was working fine on all of our servers, we never used mandate_id
Do you have a concrete example where it worked fine?
this is our complete process,
- we created setup intent from Backend
- Front end gets secret and key nad confirm it from stripe.
- FE sends us back the
payment method - BE save it and create
payment_intentwhen we need it
we have created so so many test payments with this complete flow
and with same code
Sure, can I get a concrete example though? That way I can compare what is happening between the 2 requests
I do not have it right now, but ill create and will share with you.
i created quickly same flow for sofort and used its future payment
methodology
which returns sepa_debit_payment_method and used it for charge with same code
and it worked
see request_id
i am sure it will work for sepa as well
Sofort is different though
please try the exact same flow as the one which fails in Live mode
i know but it is using sepa_debit_payment_method
here you got
it worked like a charm
this is 100% same replica
@grand gorge perfect, let me have a look
yhx
okay asked a colleague and found the obvious thing I was missing
The problem here is due to on_behalf_of. You create a SetupIntent without on_behalf_of and then your PaymentIntent has on_behalf_of. That's just not compatible, the Mandate/permissions are per connected account so that's what is blocking you
so you mean on behalf of is impacting mandate?
yes it does, you need a mandate per connected account in that case
hmmmm, let me see
i think there is some other problem, as per our code
we are either adding on_behalf_of in both cases or not
its not like in setup intent we are and in other we are not
can you provide which on_behalf_of we are using?
https://dashboard.stripe.com/logs/req_SN7Hc3kWHxVHn7 this is your PaymentIntent creation, see how it has on_behalf_of there. https://dashboard.stripe.com/logs/req_Q32gSc42ytaWlH this is your SetupIntent creation and it does not have on_behalf_of
hmm, let me see
@grand gorge did that unblock you?
Thanks a lot for getting back and asking, I am waiting for the credentials from client
I might get it tomorrow
Can I resume this thread from here?
the thread will be archived but you can ping in #dev-help with a summary and we can follow up! Overall it boils down to a misunderstanding with on_behalf_of so I think once you confirm that you should be unblocked!
Sure, thx again