#brandon_17715
1 messages · Page 1 of 1 (latest)
@weak canyon where are you blocked?
If you're following a specific guide, can you link it here?
When our users are trying to make an ACH payment, they're running into this error:
‘This PaymentIntent requires a mandate, but no existing mandate was found. Collect mandate acceptance from the customer and try again, providing acceptance data in the mandate_data parameter.’
according to these docs, https://stripe.com/docs/payments/ach-debit#mandates, since we're using the Stripe Payment Element, Stripe handles displaying the mandate (which I think I see when going through the ACH flow)
Regarding our flow, when the user first clicks on "Pay now", we immediately create a PaymentIntent. A modal will appear and display the Stripe Payment Element. After the user enters in the relevent details and clicks submit, we pass that info along with the PaymentIntent id created earlier and call await stripe_ua.paymentIntents.confirm(paymentIntentId, { stripeAccount: stripe_account_id })
it works correctly when the user is paying with a credit card, but it doesn't work when they use ACH.
Ah, thanks for the details. Do you have an example PaymentIntent ID that results in this error?
pi_3OWoYhQBFYRDlKcJ1LpG58BC
Hello! I'm taking over and catching up...
The Payment Method you collected doesn't have the proper mandate for paying this Payment Intent. Are you initializing Stripe.js with your platform's publishable key and the account ID of the connected account you're using?
yes, I believe we are.
Paying with a credit card works correctly, it's just ACH that isn't currently working
So you want to confirm server-side? Is this the guide you're following? https://stripe.com/docs/payments/finalize-payments-on-the-server
correct, we are confirming on the server
are we running into issues because we're creating the paymentIntent too early?
Possibly, I can't say for certain because I can't see all of your code. I recommend you go through that guide and see how it differs from your current approach.
is it possible to call stripe.paymentIntents.update() and pass in the payment_method and mandate_data, before calling cofirm?
I was originally under the impression that the mandate_data could be passed in when calling confirm (because of this interface):
interface MandateData1 {
/**
* This hash contains details about the customer acceptance of the Mandate.
*/
customer_acceptance: MandateData1.CustomerAcceptance;
}
I suppose you could give that a try. Why do you want to make the extra API request though?
I believe we were just following how we had it implemented in the past, except just updating our endpoints to point to stripe_ua
Do you recommend doing it on the FE and letting the SDK handle it?
We always recommend confirming on the frontend, yeah. It makes things a lot easier if you don't absolutely need to confirm on the server.
hmm ok, we'll try the update call first since we have most of the logic already built out on the server, but if that doesn't work, we may try moving the confirm to the FE. Thanks so much for the help!