#bentley-ach-mandate
1 messages ยท Page 1 of 1 (latest)
bentley-ach-mandate
Hello
Do you have more details like an exact request id req_123?
We're working on an integration and created the bank pm using the API. I'm seeing that message when I attempt to create the payment via the Stripe dashboard.
{ "id": "mandate_1LuJ4lAIEGRSPHp6NfltP1WK", "object": "mandate", "customer_acceptance": { "accepted_at": 1666112135, "online": { "ip_address": "108.213.203.44", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36" }, "type": "online" }, "livemode": false, "multi_use": {}, "payment_method": "pm_1LuJ4kAIEGRSPHp62eh52L1h", "payment_method_details": { "type": "us_bank_account", "us_bank_account": {} }, "status": "active", "type": "multi_use" }
That's the mandate that got created for the bank PM
lemme see if I can pull more info from the webhook events
You have an error, that error should return detailed information including request_log_url
Hi there ๐ taking over for @hushed arch
Give me a couple minutes to get caught up.
Sorry, here's the request id. req_jdsymvCy9zOY9p
Oh, I should add that if I create the bank account PM through the dashboard it will create the mandate as offline and i'm able to make payments with it.
Have you looked into how to accept the mandate for this customer via the API? The error message seems to indicate that you haven't yet, so I would take a look at these docs first and come back if you have more questions: https://stripe.com/docs/payments/ach-debit/accept-a-payment?platform=mobile&ui=react-native#react-native-submit-payment
We're not processing a payment. We're only confirming a SetupIntent at this point. I then went into the dashboard to make sure that I could use the payment method after I verified it. That's when I get that error.
It's the same issue, just in a different place. You still need to collect the mandate as though you were creating a payment
How do we go about that when using a SetupIntent? I'm reading this doc and can't quite tell. We're using our own UI to collect bank account info and a modal to display our legal jargon.
https://stripe.com/docs/payments/ach-debit/set-up-payment
It's covered pretty verbosely in step 5: https://stripe.com/docs/payments/ach-debit/set-up-payment?platform=web#web-collect-mandate-and-submit
There's recommended mandate text that you have the user accept here: https://stripe.com/docs/payments/ach-debit#recommended-mandate-text
Which part is confusing?
I guess it's confusing because we're already doing step 5. It created the mandate I posted above.
Although, the code looks a bit different. I'm guessing because we're using our own UI to gather the bank account info.
.
That code results in a SetupIntent with a status of requires_action which is the micro-deposit verification. I've done that step as well as if I'm the owner of the bank account using the verification url or dashboard.
I believe you need to pass these fields in to the Setup Intent: https://stripe.com/docs/api/setup_intents/create?event_types-payment_intent.payment_failed#create_setup_intent-mandate_data-customer_acceptance-type
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Or the Payment Intent, depending on which is giving you the error
The SetupIntent is initially created server-side and the client_secret is sent up to the client-side. Client-side code is what I posted above. I'm not creating the PaymentIntent. I'm using the dashboard to create a payment.
This is the payment method that gets created. The associated mandate indicates that the customer accepted the mandate.
Everything seems fine, so I'm not sure what more we can do. ๐ฉ
Ahhh, okay. I don't think that's possible. The Setup Intent's client-secret needs to be passed into the Payment Intent during creation in order to indicate that the Payment Intent has been authenticated already and should be charged off-session. You can only do that via the API.
So I have to persist the client secret? The docs explicitly say not to do that.
I see a mandate field on the PaymentIntent. Do I set that using the id of the mandate associated with my saved bank payment method?
You don't persist the client secret beyond the next step. You pass it to the client and use it with stripe.collectBankAccountForSetup (see step 4 here: https://stripe.com/docs/payments/ach-debit/set-up-payment?platform=web#web-collect-details)
We're using the secret then.
const createSetupIntent = async () => { const variables = { communityId: lease.community.id }; const response = await createSetupIntentMutation({ variables }); setClientSecret(response.data.createSetupIntent.setupIntent.clientSecret); };
I believe the Payment Intent will inherit the mandate from the Setup Intent, if you set up the payment flow the way the docs describe. So I don't think you have to explicitly set it on the Payment Intent itself
The problem with that is that we're only saving payment method. The payment intent will happen way later and is not part of this use case.
Okay, I got it to work. In PostMan I'm able to call {{baseUrl}}/v1/payment_intents and use the mandate associated with my saved bank account payment method. Just have to set confirm to true.
That makes sense. The error seemed to indicate that would work, so I'm glad that's the case
Yup, thank you for help and patience! Is there anyone I can contact to let them know how grateful I am?
I appreciate the feedback! I can surface it via this thread, if you like (positive and critical feedback alike)