#binary-paymentintent-paymentmethod

1 messages · Page 1 of 1 (latest)

blissful garnetBOT
exotic pasture
#

@covert aspen I'm curious why you need to do that exactly though? It's not possible today mostly because I don't remember anyone asking for something like this

#

binary-paymentintent-paymentmethod

covert aspen
#

Thank you for your response

#

what we do is that we generate one PaymentIntent per "thing to pay", for example a basket, or an invoice

#

And the documentation explicitely states that (for what i understand)

A PaymentIntent guides you through the process of collecting a payment from your customer. We recommend that you create exactly one PaymentIntent for each order or customer session in your system. You can reference the PaymentIntent later to see the history of payment attempts for a particular session.

#

we bult all our system around this idea with strong securities around the unicity of basket <> paymentintent which has been working very well fir 3+ years
We needed to adapt a bit this to handle the terminal which has a specific payment flow, but that is for the exception

exotic pasture
#

okay but why would you need to "unset" the PaymentMethod associated with it in this case?

covert aspen
#

for example if the payment has insufficient fund (for a card)

#

actually, in our case, it would be if we are using a BACSDirectDebit PM which has an invalid mandate

exotic pasture
#

can you give a concrete example for me to look at?

covert aspen
#

you mean a business case ?

#

Example :
a client open his basket
we return to the frontend a secret for the paymentintent
the client wants to pay with a saved BACSDirectDebit payment method
the frontend sends the pm id to the backend ,which saves it inside the PaymentIntent
the frontend then validates the PaymentIntent with Stripe
Stripe says wa ca not : the mandate of the BACS is expired
Now the client wants to pay with a card, which he does not want to save -> how can we do ?

#

It is a bit weird the frontend sends the pm id to the backend to be saved in the PI directly.
For all other PM type we use StripeJS with confirmCardPayment(payment_method_id, secret) for example, but for some reason this is not possible with BACSDirectDebit

#

Tbh we studied a lot of implementation solutions that both match our system, the limitation around DirectDebit, and found something that did not force us to rework a big part of either backend or frontend.

We found one but this very specific parameter that can not be unset makes it impossible.

#

(im going to be afk for a moment but will reconnect in 15 min)

exotic pasture
#

I don't really get why you have a frontend->backend->frontend either here

#

But ultimately: they want to pay with card, so you now confirm that PaymentIntent with a card and you ignore the BACS Debit PM, it should be irrelevant

#

For all other PM type we use StripeJS with confirmCardPayment(payment_method_id, secret)
no, that only works with a card PaymentMethod.