#cabeedelhertz

1 messages · Page 1 of 1 (latest)

grizzled vortexBOT
slender lily
#

Hello

#

Let's clarify on something first

#

If the payment method has already been set up for future usage, and I update the subscription with PaymentBehavior "default_incomplete", then the paymentIntent requires confirmation but attempting to confirm the payment fails because the payment method is already set up (already has mandate data).

#

This shouldn't be the behavior as far as I know if you pass the PaymentMethod ID to confirmPayment

#

Is that what you are doing?

steady beacon
#

We have not been passing that. Is that argument in a recent release because I don't see it in the libary code for my client?

slender lily
grizzled vortexBOT
steady beacon
#

They seem to have the payment_method ID param on the specific confirm functions like stripe.confirmUsBankPayment() but the general stripe.confirmPayment() does not

slender lily
#

Hmm it is possible that it wasn't properly added to our types

#

Try disabling the type check and see if it works

#

I can flag that we missed it in our types

steady beacon
#

okay I'll test that out thanks. Regardless of that, do you know if there is a "correct" way to check if a payment method has been set up for future usage on the server side?

I can check if the paymentMethod was used on a past paymentIntent. But, as an example, if the paymentMethod was set up for future usage using stripe.confirmSetup(), that will update the subscription with the pending_setup_intent, and then once set up, stripe will remove the pending_setup_intent from the subscription object.
So if that data is not persisted on the subscription object, how can I check if the payment was set up?

hasty terrace
steady beacon
#

That looks like it only works for Cards. It looks like the other payment method types dont have that. And I specifically need to know it for CashApp

hasty terrace
steady beacon
#

Also to Bismarck's earlier point:
"This shouldn't be the behavior as far as I know if you pass the PaymentMethod ID to confirmPayment
Is that what you are doing?"

I don't see why that would fix the issue I'm seeing. The paymentIntent would already have a paymentMethod (ID) attached to it, so calling confirmPayment() passing in that same payment method ID wouldn't change the behavior would it?

#

And I would think there would be some direct relationship/attribute for a payment method regarding if and how it is set up for future usage. The stripe dashboard seems to suggest this because it shows how each payment method is set up for future use

hasty terrace
#

I don't understand

#

Did you test it out to see?

hasty terrace
#

The endpoint I listed above would be the best way

steady beacon
#

Yeah the setupintent.List seems like it should work well