#mochihealth

1 messages ยท Page 1 of 1 (latest)

young spireBOT
pale basin
#

๐Ÿ‘‹ hello

#

This is really up to you. You can always exclude PaymentMethods without an active mandate if you want.

#

Maybe I'm not understanding the question?

abstract trail
#

should i be deleting these. also what are the scenarios which cause a bank pm to have an inactive mandate

pale basin
#

You can either detach them (which effectively deletes them) or you could bring your customer back on session and collect a new mandate agreement from them.

#

They can become inactive if the customer tells their bank they don't want to permit debits of their account any more or if they have a debit fail for certain failure reasons.

abstract trail
#

how can i detach them

pale basin
abstract trail
#

and how can i brink them back on session to reactivate the mandate

#

if i have a custome stripe implementation that uses stripe elements

pale basin
#

You create a new mandate by submitting mandate_data when you confirm your PaymentIntent or SetupIntent

abstract trail
#

but right now if im folling the setup intent flow recommended by stripe for creating new payment methods how can i fit this in for revising current ones

pale basin
#

That will set the already-created PaymentMethod up with a new mandate

abstract trail
#

thanks.

#

what does the confirm=true do

hollow trench
#

Hi there ๐Ÿ‘‹ jumping in as my teammate needed to step away.

Passing true for the confirm parameter causes the intent to immediately be confirmed when it is created.

abstract trail
#

so for the user flow of this. do I need to like prepopulate the current payment method in the stripe element or is this just like a button that I can add to payment methods that dont have an active mandate that they can click on to reconfirm it or something

hollow trench
#

The approach described doesn't use the Payment Element, it is all completed server-side after you've collected mandate acceptance from your customer. Is that what you were looking for, or were you looking for an approach that used Elements to create new mandates (I'm not certain if this latter is possible offhand and will need to look into that further)?

abstract trail
#

is there a flow that I can use the stripe elements to collect the new mandate with or do I need a custom front end flow for this

hollow trench
#

Since payment method details don't need to be recollected, just mandate information, I'm not sure an Element would be needed here, but do believe this might be possible via Stripe.js.

To make sure we're talking about the same thing, are you referring to ACH Debits when you reference bank accounts, or a different type of bank debit payment method?

abstract trail
#

yea ach debits

hollow trench
#

๐Ÿ‘

Do you have a Payment Method in test mode that is in the state you're describing (has an invalidated mandate) that you would be able to test with? I'm not entirely certain what you're after is possible client-side and will need to do some testing. If you already have a Payment Method in that state you'll likely be able to test faster than I can.

abstract trail
#

yea i have one\

#

do you want it?

#

I'm just not sure what the normal flow is for pm with invalid mandate. do they normally get deleted and then you would need to just set up an entirely new one or do they get reconfirmed

#

also for my subscription flow when a payment fails does it make sense to mark it as uncollectible or leave it as is. the flow right now is that a new pi would be created when the customer wants to resubscribe

hollow trench
#

I think a new Setup Intent being confirmed with the existing Payment Method is the way to handle this.

Can you try taking that Payment Method you have and:

  1. Create a Setup Intent, passing the ID of that Payment Method in the payment_method field.
  2. Try to confirm that Setup Intent client side via confirmSetup from Stripe.js, passing the clientSecret from the Setup Intent.
    https://stripe.com/docs/js/setup_intents/confirm_setup
abstract trail
#

let me see

abstract trail
#

i get an error Missing required param: mandate_data.

#

what should i pass in there

young spireBOT
abstract trail
#

i get the erro on step 1

hollow trench
#

Ah, dang, was hoping that would allow for the collection of mandate acceptance again. So I think what you'll need to do instead, is what my teammate mentioned earlier, you'll need to collect the necessary details in your own form to create a new Mandate, and then provide those details in mandate_data.

Pausing because of your newer message, can you share the ID of the request that returned that error?

abstract trail
#

req_Zd1cHpqqcQJpOG

hollow trench
#

Ah, I see, can you try that request again without using confirm. There are two different approaches to confirmation, client-side or server-side. When you pass confirm as true in creation requests, server-side confirmation is what is occurring. Since we want to try to use Stripe.js to do the confirmation, we want to try client-side confirmation here.

abstract trail
#

ok thanks let me try that

#

the request works but the payment element doesnt prepopulate with any info or anything so I'm not sure where to go from there

boreal ore
#

Hello! I'm taking over and catching up...

#

When you already have a Payment Method you want to use you don't use the Payment Element at all; the Payment Element is only for collecting new payment details, not using existing ones.

abstract trail
#

but what exactly am i displaying on the frontend for the customer to see

boreal ore
#

Whatever you want. A button, info about the Payment Method, it's up to you.

abstract trail
#

also what happens when you detach a payment method that is the defualt one on a subscription

boreal ore
#

If there's no other default set (like on the Customer) future payments will fail.

abstract trail
#

gotcha

#

thanks

#

let me try the confirmation one before you close this thread out

#

am i supposed to display a mandate to the customer or something

boreal ore
#

That should be handled when you call the confirm method I linked to above.

#

Are you not seeing that?

abstract trail
#

nothing is displayed to the user its just an pi call and it just renews the mandate for the pm. there was no ui that popped up for this

#

unless I did something wrong

boreal ore
#

Oh, wait, that makes sense; you already have the Payment Method.

#

Wait, let's back up a bit.

#

How did you create that Payment Method in the first place?

abstract trail
#

with the setupintent in developent mode so that it fails in the payment stage

#

that invalidates the mandata

#

mandate

boreal ore
#

Not sure I understand?

abstract trail
#

so I want to create a way for the user on the frontend to revalidate the existing pm with a new mandate so that it will be good

boreal ore
#

Okay. Did that not happen with what you just tried?

abstract trail
#

it happened

boreal ore
#

Okay.

abstract trail
#

but my question is do I need to display a mandate to the customer when I do that

#

is there something that is required to show them from like a regulatory side

boreal ore
#

You do need to display it in some cases as outlined there I mean, but not always.

abstract trail
#

also should I even allow the user to validate the bank again since it failed to begin with

#

should I just detach the payment method from the customer

#

and make them add a new one

boreal ore
#

That's up to you. You can try to validate it again, or you can ask them to supply new info.

abstract trail
#

also after I validated and paid again and it failed again since im using the failed test account it didnt invalidate the mandate again

#

is that supposed to happen

#

what are the scenarios that would cause a pm to be invalidated

boreal ore
#

Are you talking about ACH Payment Methods specifically?

abstract trail
#

yea

boreal ore
#

I think it's things like the account holder revoking the mandate or the account being closed.

boreal ore
#

Oh, sorry.

#

Which test account are you using?

abstract trail
#

what do you mean

boreal ore
abstract trail
#

pm_usBankAccount_accountClosed

boreal ore
#

Yeah, that's expected then. The test account is closed.

abstract trail
#

no but it didnt re invalidate the payment method after another failure

#

only invalidated it the first time

boreal ore
#

What do you mean by invalidated?

abstract trail
#

sorry like had the mandate revoked so that it couldnt be used for payments

#

also in every scenerio would I want to allow the user to renew the mandate or are there some scenerios where I would want to do nothing or detach the payment method

boreal ore
abstract trail
#

req_dnydr0q0JUhKMH

#

but first req_z4uMp6H2luJTWu

#

to renew the mandate

#

I understand this is a lot so thank you

boreal ore
#

So in that last request you created a Setup Intent but then did nothing with it.

#

The Setup Intent's status is requires_confirmation.

#

So it didn't do anything yet, it won't do anything until you confirm it.

abstract trail
#

but thats from calling the confirm bank account route

boreal ore
#

As far as I can tell you didn't call that.

#

Not with this Setup Intent anyway.

#

Maybe you called it on a different one?

#

But there's no request like that for this other Setup Intent.

abstract trail
#

oh sorry I called that to get the secret to pass to the confirm bank account

#

strange I dont see those logs on the customer

boreal ore
#

What do you mean?

abstract trail
#

that you can see logs for a specific customer

#

but i guess this one isnt stored on the customer

#

but anyway

#

I confirmed it

#

and then used it again

#

and the payment failed

#

but the mandate is still good?

boreal ore
#

Can you share the request IDs?

abstract trail
#

req_2QPcDh8B9qq7C9

boreal ore
#

Do you have the request ID for the Setup Intent confirmation?

abstract trail
#

didnt you just pull it up?

boreal ore
#

In any case, though, this seems expected to me. The account can be set up for future use, but because it's a special test account you get back declines saying the account doesn't exist.

#

You sent the request ID for the Subscription creation.

#

Let's back up a bit. What's your ultimate goal here?

abstract trail
#

so when a payment fails with a bank account I'm ultimately usure whether to allow the user to renew the mandate again so they can use it again on their next payment or just detach the payment mehtod and make them input a new one. do you have any recommendations?

boreal ore
#

My recommendation would be to look at the reason why the payment failed and take the most appropriate action based on that specific reason. Most of the time that's probably going to be to detach that Payment Method and get new payment details from your customer.

abstract trail
#

where can i see that

#

and what are the potential reasons

#

is there a list of enums

#

also I saw that an option when a subscription fails to update is to mark it as uncollectible in stripe settings. is that the recommended configuration?

#

and would that void the invoice or no?

boreal ore
#

Regarding the uncollectable vs. void vs. leave as-is, we do not have a recommended setting. Whichever works best for your use case is the one you should pick.

#

And no, uncollectable is not the same as void, they're separate statuses.

abstract trail
#

thanks