#jason_docs

1 messages ยท Page 1 of 1 (latest)

thin harnessBOT
#

๐Ÿ‘‹ 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/1470530264181772431

๐Ÿ“ 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.

dusk hamlet
#

Hi there ๐Ÿ‘‹ I'm not sure offhnad, though offhand I'd probably expect it to not show.

coarse flicker
#

Hi toby! ๐Ÿ‘‹ I agree, my instinct tells me that it wouldn't show. My product team would like a definitive answer. Do you know of a way I could test this in a sandbox environment? If not, just a definitive response from the support team would also suffice.

dusk hamlet
#

Yup, I was actually going to suggest testing it (if you're anything like me you'd rather see it yourself). I believe there is a way to get the mandate to go inactive for a test bank account, let me double check that though.

#

Dang, I could have sworn we had a test account that revoked the mandate. Checking something else

coarse flicker
#

thank you!

thin harnessBOT
dusk hamlet
#

Ah, mandates are auto-revoked if the payment is disputed (source, so I would suggest trying to test with our test account that will trigger a dispute.

coarse flicker
#

excellent! do you mind if we keep this open while I perform the test?

dusk hamlet
#

Not at all! Chances are that I will be offline, but my teammate is here in the thread now as well.

coarse flicker
#

thanks toby!

ashen sun
#

๐Ÿ‘‹ I'll be here if you have any follow ups. Thread history is also saved for our team to cross reference if you need to come back another day.

coarse flicker
#

thanks mossy!

#

Below are the steps I used to produce my test results:

  • I first added the test card ending in 5559 using manual verification

setup intent: seti_1Sz2TJFh7O2P26Tz1JrLdPTk

  • It appears it created the following mandate

mandate_1Sz2TvFh7O2P26Tzxz7meAWz <= active

  • I then proceeded to process a payment (NOTE: The ACH direct debit did appear in the payment element at this time)

payment intent: pi_3Sz2WmFh7O2P26Tz1HJ4DQs7

  • After the payment went through, I did notice that the charge was disputed

dispute: du_1Sz2XKFh7O2P26Tz3B5kzghh

I then went and checked the Stripe dashboard for the payment method and noticed a new mandate that had an inactive status

payment method: pm_1Sz2TuFh7O2P26Tz4X5h7F1k
mandate_1Sz2WmFh7O2P26TzimU5gEJq <= inactive

  • lastly, I loaded the payment element back up, and I can see the ACH direct debit listed in the Saved section
ashen sun
#

I sort of expected as much. While it would make sense to not show it, I don't believe we check the mandate status when displaying saved payment methods.

coarse flicker
#

oooof.....let me see what happens if I attempt to process another payment, maybe I'll get an error? which would be good!

ashen sun
#

let me know how it goes

coarse flicker
#

so it appears the second charge does succeed, only to have the disputed webhook sent later. Here is the payment intent for the second test: pi_3Sz2vjFh7O2P26Tz0GjVKWry

This is not ideal, especially if the customer's mandate is inactive, I would expect that the customer should not be able to submit a second payment if they haven't explicitly agreed to have the ACH direct debit account authorized for future payments.

At least we get the webhook, so we could reverse the payment if this does occur

ashen sun
#

Digging a little further but it looks like the PM has an active mandate mandate_1Sz2raFh7O2P26Tzp41rdF4m

#

hrm but that's not the mandate used on the pi you provided.

coarse flicker
#

correct, I see three mandates, the first one at the bottom, as you mentioned is active, but I believe this was created with the setup intent when I added the account, the other two, are both listed as inactive, the first inactive one being for the first payment, and the second inactive one being for the second payment

ashen sun
#

my understanding though is we'd attempt the charge and then it would fail in the processing state due to bank rejecting

coarse flicker
#

that's also how I understood it as well....I almost feel like we are experiencing something specific to the sandbox environment

#

both of the inactive mandates are listed as single_use, while the active mandate is listed as multi_use. I feel like once the bank says the mandate is inactive, it would update the status of mandate_1Sz2raFh7O2P26Tzp41rdF4m to inactive, and not necessarily create a new mandate, I could be completely wrong though

ashen sun
#

From what i'm gathering though, mandate information isn't factored in at all when it comes to displaying saved payment methods. Might be worth writing into support to request as a feature. Seems like a fairly reasonable ask to me.

#

that way when a madate transitions to inactive you can mark the Payment Method to not present itself as an option.

coarse flicker
#

agreed. Also, from your understanding....once a mandate becomes inactive the customer should not be allowed to submit a second payment because they have not explicitly agreed to use the account for payments. Based on the documentation, we would need to get permission from the customer before they would be allowed to use it moving forward?

Caution
ACH Direct Debit mandates can become inactive, which renders the payment method unusable. This can occur for various reasons, such as when a customer disputes a payment, when certain payment failures occur, or when Stripe becomes aware that the payment method is no longer valid. For more information, see Blocked bank accounts.

reference: https://docs.stripe.com/payments/ach-direct-debit#mandates
PPD mandate usage: https://docs.stripe.com/payments/ach-direct-debit/sec-codes#ppd-sec-code

#

RE: allow_redisplay => I like this (thinking outside the box!) So then I'd use limited to try and force it not to show?

#

RE: inactive mandate documentation => if an inactive mandate is supposed to render the payment method unusable, I would think this to be a Stripe bug?

ashen sun
#

Correct, if it's set to limited it will only show if the Checkout Session filters include limited(which it doesn't by default)

coarse flicker
#

please double check my work:

setup_intent.succeeded (5559) => 3:23 PM
first charge succeeded => 3:25:47 PM
mandate updated => 3:25:47 PM (previous status: active, new status: inactive)
charge dispute closed => 3:27 PM
second charge succeeded => 3:28 PM <= if the mandate was inactive, this charge should not have been allowed

#

inactive mandate: ...OmR
active mandate: ...F4m

#

I checked the second mandate.updated event for the payment intent confirmation you referenced, and it shows a mandate transitioning from active to inactive, but mandate ending in ...OmR was already inactive at this time

mandate updated event: evt_1Sz2w1Fh7O2P26TzoX14gwcb

ashen sun
#

Sorry, juggling a few threads simultaneously. Taking a look

coarse flicker
#

take your time

ashen sun
#

One thing i'm noticing is on the setup Attempt req_Now28Oxy82wX48 that results in mandate_1Sz2raFh7O2P26Tzp41rdF4m

I see

mandate_data: {
customer_acceptance: {
online: {
infer_from_client: "true",
},
type: "online",
},
}

This mandates final update was at 22:23:26 UTC and the status is active at this point.

With the Payment Intent Confirmation occurring at 22:27:43 UTC a little under 4 minutes later.

coarse flicker
#

I just remembered something koopajah told me, this may be because of how my back end is creating the payment intent

#

I haven't fixed this yet on my side

ashen sun
#

That makes sense, and would explain why a new mandate is being generated on confirmation.

thin harnessBOT