#.abishek
1 messages · Page 1 of 1 (latest)
hey jack, I have only worked with card as a payment method before
Can you elaborate more? Do you have a PaymentIntent that I can take a look at?
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..
So you want to create an off-session PaymentIntent, but this time with a non-card payment_method, am I right?
correct, i will be assigning an existing non-card payment method to https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
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
ok, so looks like I need to check the status of the payment intent and act accordingly. I was just reading through https://stripe.com/docs/payments/paymentintents/lifecycle#intent-statuses
how do I know what to do when the status is requires_action?
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
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
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
ok, how do I know what action needs to be taken based on the payment method type?
So far only card payment has requires_action status.
i am more interested about the rest
so, do I have to see what is on the next_action attributes to figure it out?
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
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
I don't think you can perform an off-session affirm payment
https://stripe.com/docs/payments/ach-debit/set-up-payment?platform=android#web-future-payments and this is how you create an off-session payment with ACH (aka us_bank_account)
As I mentioned before, some payment method (i.e., ACH) can't determine the result immediately so you need to subscribe to webhook events (https://stripe.com/docs/payments/ach-debit/accept-a-payment?platform=web&ui=API#web-confirm-paymentintent-succeeded)
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
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
ok
then I will have to release support for each payment periodically instead of one go. Its a plugin I am working on..
I'd suggest you to test out the payment method that you wish to support before release.