#.abishek

1 messages · Page 1 of 1 (latest)

next edgeBOT
deft hornet
#

hey jack, I have only worked with card as a payment method before

worldly valley
#

Can you elaborate more? Do you have a PaymentIntent that I can take a look at?

deft hornet
#

but I now need to work with the rest of the payment methods offered by Stripe. So when I create a payment intent to charge a customer and if I assign a payment method other than card, does the user experience behavior change? As in, will the payment be automatically charge or will the user be redirected ?

#

for example a existing bank account or bancontact is assigned..

worldly valley
#

So you want to create an off-session PaymentIntent, but this time with a non-card payment_method, am I right?

deft hornet
worldly valley
#

Yes you just pass in the pm_ when creating the PaymentIntent, exactly like what you did earlier with card payment methods.

#

However, some payment methods can't determine the results immediately, so you need to listen to payment_intent related webhook events to get notified about the payment results

deft hornet
#

how do I know what to do when the status is requires_action?

worldly valley
#

This happens when your cusotmer needs to authenticate the payment through 3DS, you need to bring your custoer back to your website and call stripe.confirmCardPayment

deft hornet
#

not sure I understand, so if I am using an existing payment method on a payment intent, why do I need to use web elements?

#

the confirmation method is automatic by default

worldly valley
#

The card issuer and your radar rule determins if a 3DS is needed for a payment, even if the payment is create with a saved payment method

#

So your integration should be ready to handle a paymentIntent when its status becomes requires_action

deft hornet
#

ok, how do I know what action needs to be taken based on the payment method type?

worldly valley
#

So far only card payment has requires_action status.

deft hornet
#

i am more interested about the rest

#

so, do I have to see what is on the next_action attributes to figure it out?

worldly valley
#

No you don't need to. At this moment only card payments has requires_action status, so you always stripe.confirmCardPayment() when a paymentIntent status becomes requires_action

deft hornet
#

ok, let me put it this way then. so if I have a customer that has a bank account or affirmPay payment method stored and if I want to charge them, how do I do it?

#

am sorry, if I am not being clear

worldly valley
#

I don't think you can perform an off-session affirm payment

deft hornet
#

ok, is it the same case for payment methods displayed on the web elements if I created the payment intent with off_session ?

#

like Google Pay, Cash App

#

because I want to handle future payments for all the payments that are enabled and show on web elements, so just making sure how it would work

worldly valley
#

It's the same, it's just that for Google Pay and Cash App. you'll know the payment results immeidately

#

The best way is to try it out yourself. You won't get charged in test mode

deft hornet
#

ok

#

then I will have to release support for each payment periodically instead of one go. Its a plugin I am working on..

worldly valley
#

I'd suggest you to test out the payment method that you wish to support before release.