#_api
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
๐ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1266026246824001678
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
Hello
Can you clarify a bit? You are asking how to handle an ACSS Debit payment for different Connected Accounts?
As you are using OBO?
yes, I have a process in place where users transfer money to vendors, a merchant account for a vendor and a bank account set with a setup intent by a user, it has the vendor's account Id in the OBO field and when a vendor changes merchant account to a new one the payment fails because the OBO is different than the one inserted before
Yeah you just need to create a new mandate for the new merchant
the link I attached shows migration that worked for me, I was in chat with one of the reps here and he gave me a way to rewrap a setup intent so it will have the new account as OBO and ill be able to charge it without remandating
Hmm no you can't charge without a mandate
That's not possible
But all you really need to do is pass mandate_data when you confirm the PaymentIntent so that a new mandate is created
payment_method_types: ['us_bank_account'],
customer: '{{CUSTOMER_ID}}',
confirm: true,
payment_method: 'pm_1234',
mandate_data: {
customer_acceptance: {
type: 'offline',
accepted_at: 1692821946,
},
},
});```
thats what he gave me and it works for ACH
the pm is the old one and the accepted at is also the same as the old mandate
Sure
That is a SetupIntent
So that also creates a new mandate but that mandate also won't be OBO the Connected Account
You either have to use a SetupIntent to create a new mandate OBO the Connected Account you are trying to charge and then pass that Mandate ID to the PaymentIntent, or you just create the Mandate when you create the PaymentIntent
yeah he told me to add the new obo
Okay yeah that's fine then
I want to make it so that users dont have to re-insert their bank account information
Why doesn't that work for ACSS?
is throws an error
A mandate is required. Please either provide the id of an existing mandate on confirmation, or provide payment_method_options[acss_debit][mandate_options].
I didn't, but then again I didnt need to when I tried ACH
I'd need to see the examples, but you basically need to pass the Mandate ID via https://docs.stripe.com/api/payment_intents/create#create_payment_intent-mandate
payment_method_types: ["acss_debit"],
customer: oldSetupIntent.customer as string,
confirm: true,
payment_method: "pm_1PgQ8aGES5MQAgehn7NlyqMZ",
on_behalf_of: merchantAccount.stripeInfo.accountId,
mandate_data: {
customer_acceptance: {
type: "offline",
accepted_at: oldMandate.customer_acceptance.accepted_at
}
}
});```
basically the the OBO is the id of the new account
Yep
the link you sent me is for payment intent creation
I do provide mandate id to a payment intent
That SetupIntent returns a Mandate ID: https://docs.stripe.com/api/setup_intents/object#setup_intent_object-mandate
I provide the mandate Id that is attached to the seti i just created
And that fails?
yes
Okay can you provide the request ID for that?
it fails before the payment intent creation
Ah sorry I see the issue
You aren't passing payment_method_options.acss_debit.mandate_options to your SetupIntent: https://docs.stripe.com/api/setup_intents/object#setup_intent_object-payment_method_options-acss_debit-mandate_options
ACSS mandates require more info than ACH
but will it require an end user to do actions?
No
You just describe whatever was agreed upon between you and your customer
For instance something like:
mandate_options: {
payment_schedule: 'interval',
interval_description: 'First day of every month',
transaction_type: 'personal',
},
is this info contained inside the mandate object?
Or whatever enums are most applicable between you and your customer
Yes within payment_method_details: https://docs.stripe.com/api/mandates/object#mandate_object-payment_method_details-acss_debit
So you can retrieve your old mandates to check on that
I see that it also requires custom_url and default_for fields
are these required also? and if they are what do I provide to them?
No don't believe those are required
default_for is only relevant for Subscriptions
So if you aren't working with Subscriptions then you can ignore that
And custom_mandate_url is only for Custom Mandates
ok, please give me a second, I want to try it
Sure
it throws "Offline mandate customer acceptance data is not supported by acss_debit payment method type." message in the seti creation
perhaps this is a dead end?
Ah didn't realize that -- but really they accepted the initial one online, right?
Yeah, so that is what I'm saying -- if they agreed during that time for that PaymentMethod to be charged for any of your Connected Accounts then you should be able to relay the same online acceptance data.
what do you mean any of my connected accounts?
Using OBO makes your Connected Account the merchant of record
what about accounts that were added after the creation of the mandate?
That is up to you and your customer
Basically you have to determine if they are okay with you charging their PaymentMethod for the Connected Account you are setting as OBO -- that is what having a Mandate indicates.
so they do need to remandate their bank account
the users I mean
I can't do it programatically
No, I just told you how to do it programatically
You pass the same data from the initially collected mandate
Assuming they agree to you doing this
currently im in test env and I dont believe the test iframe that "collects" the bank data and does the mandate asks about it, so it will always fail in test?
I'm not sure what you mean by that, sorry. Can you be more specific?
you said that users give permission by agreeing to charging to different connected accounts
how can I replicate this behavior in test?
currently it always fails, and I dont remember anything about the stripe iframe asking me about giving permissions
A Mandate is "permission"
You are taking that too literally
What I'm saying is that if you are going to create a new Mandate here while your customer is not actually in your flow then that customer needs to be okay with you doing that
I still don't really understand and the API doesn't elaborate on this too much, the error message said "offline mandate" isn't supported in acss debit, what I need is for the seti to be created successfully and charging it after with a payment intent. what do I need to do to make it happen? I gave you a code snippet of the seti creation and the data I provided it, the data seems correct yet it fails. If there is a mandate in the old seti doesnt it mean the user already gave me permission thus its suppose to work?
I still don't really understand and the API doesn't elaborate on this too much, the error message said "offline mandate" isn't supported in acss debit, what I need is for the seti to be created successfully and charging it after with a payment intent. what do I need to do to make it happen?
You need to passmandate_data.customer_acceptance.type: 'online'and the correspoindingonlinehash: https://docs.stripe.com/api/setup_intents/create#create_setup_intent-mandate_data-customer_acceptance-type
If there is a mandate in the old seti doesnt it mean the user already gave me permission thus its suppose to work?
I can't tell you that -- that is up to the agreement between you and your customer. I'd say it is probably safe to assume that? But that isn't something I can answer for you.
the hash is also inside the mandate object?
Sure!