#abrams-webhook

1 messages · Page 1 of 1 (latest)

undone nimbus
#

Hi there! Yes, if you are supporting asynch payment methods (like bank debits) then it is possible that a PaymentIntent is successful but the charge fails later on.

noble halo
undone nimbus
#

All card payments are synchronous.

#

So the dispute would happen later

#

But the inital charge would succeed when the PaymentIntent succeeds

noble halo
#

When you say, "bank debits," do you mean debit cards?

undone nimbus
noble halo
#

Ok. Is there a way to turn off asynchronous payments? Or is there another event that I can listen to where the payment is settled, and takes into account asynchronous payments?

undone nimbus
#

What integration flow are you using?

noble halo
#

I only want to take action in my webhook when the funds are in my account. So if payment_intent.succeeded is fired but the ACH debit has not been completed, I don't want to take action.

noble halo
undone nimbus
#

Ah okay so you are using Stripe Checkout

noble halo
#

Yes. I am forwarding the customer to the Stripe website for checkout/payment via the stripe.redirectToCheckout javascript call

undone nimbus
#

That will discuss how to handle synchronous and asynchronous payment methods

noble halo
#

Can I just turn off asynchronous payments? I thought there was a simple event I can listen to when the funds are in my account. I didn't know that payment_intent.succeeded also fires for asynchronous payments where the funds are not in my account yet. It appears there is no such event and payment_intent.succeeded is not this event as it does not cover asynchronous payments.

#

If there is no such event, and I have to do a lot of coding just to cover the asynchronous payment possibilities, I would rather just turn it off

undone nimbus
noble halo
# undone nimbus Sure, you can control which payment methods are shown by setting which payment m...

Hi, I just went to this page you suggested. Then there is another link to https://stripe.com/docs/payments/payment-methods/overview. On the https://stripe.com/docs/payments/payment-methods/overview, it doesn't specify which payment types are synchronous and which payment types are asynchronous (ie. which payment methods where listening to payment_intent.succeeded will work because the funds are in my account).

undone nimbus
#

There is a chart that shows which are "delayed"

#

Which means asynch

noble halo
trim basin
#

For Apple Pay, Google Pay, and Microsoft Pay, those are all card transactions and work in a very similar way to regular cards.

noble halo
# trim basin Hello! For Alipay you can read details about timing and logistics at the top of...

I see. I took a look at both of these links and it seems like for both Alipay and Wechat pay, they are not supported on the Stripe checkout page, right? For both Alipay and Wechat pay, it looks like I have to redirect the customer to the Alipay or Wechat pay, rather than redirecting them to the Stripe checkout page (I would like to just redirect the customer to the Stripe checkout page at Stripe's website via the javscript call stripe.redirectToCheckout).

trim basin
noble halo
#

Hi. I just tried Alipay and WeChat pay out. For Alipay, in my CURL call, I added &payment_method_types[]=alipay. For WeChat pay, in my CURL call, I added &payment_method_types[]=wechat_pay&payment_method_options[wechat_pay][client]=web.

#

For Alipay, I got the log error: Invalid currency options usd. The payment method alipay only supports the following currencies: cny, hkd.

#

For Wechatpay, I got the log error: The currency provided (usd) is invalid. Sessions with wechat_pay support the following currencies: hkd, cny.

#

I have set line_items[][price_data][currency]=usd

trim basin
noble halo
#

Both support USD though

trim basin
#

Actually, hang on, that table may not be detailed enough for what you're seeing, one sec...

noble halo
#

Oh, that's too bad, I guess I can't use Alipay and Wechat pay then. I always present my prices in USD. For PayPal, they will convert the price in USD to the local currency of that country

#

Seems like Stripe does not convert USD to the local currency. Thus, if I use Alipay or Wechat pay, I have to quote the price in CNY

trim basin
noble halo
#

Well, I want to present the price as USD. When the customer goes to Stripe checkout, if they select Alipay or Wechat pay (instead of selecting a credit card), I want Stripe to handle any currency conversions from USD to CNY. For example, a customer in China is paying for my product. They get redirected to the Stripe checkout page where they see the options to pay by credit card, Alipay, or Wechat pay. They select Alipay. Stripe will then convert the USD price amount to CNY amount for the customer to pay on Alipay. This does not seem possible with the Stripe checkout page.

#

For PayPal, I can present my price as USD. On the checkout page at PayPal, the customer may see the amount in their local currency. PayPal handles this automatically. I can't seem to do the same with Alipay and Wechat pay, it seems I am forced by Stripe to present the price as CNY, which I don't want to do because my website does not keep track of the exchange rates

trim basin
#

That's correct, what you're describing will not work on Stripe.

#

What country is your Stripe account in?

noble halo
#

It's in Hong Kong. But I accept USD as my payment. I have customers from around the world, so I have to present my prices in USD

trim basin
#

Yeah, if you want to use Alipay with Stripe you need to present in HKD.

#

Same for WeChat.

noble halo
#

Anyways, on to Apple Pay, Google Pay, and Microsoft Pay. How do I enable these options on the Stripe checkout page? I don't see an option to enable these for the payment_method_types parameter at https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-payment_method_types

#

Perhaps pple Pay, Google Pay, and Microsoft Pay are not supported on the Stripe checkout page?

#

Apple Pay (pple Pay is a typo)

trim basin
#

Apple Pay and Google Pay are supported on Stripe Checkout, and should work by default unless you've explicitly disabled them or they're not supported for the transaction you're trying to make.

#

I don't believe Microsoft Pay is supported by Checkout though.

noble halo
#

Yup, I see them there. There are turned on

#

I think I know what the problem is. Apple Pay and Google Pay won't show unless I am using an IPhone or Android phone. I am on my PC now

trim basin
#

Yep, you need to be on a supported device with a valid payment card in the wallet.

noble halo
#

I just used my IPhone 7, and using Safari on my IPhone 7, I am using my localhost test website, and I was redirected to the Stripe checkout page in Safari. But I still don't see the Apple Pay option?

trim basin
#

Do you have a valid card in your Apple Pay wallet on that device?

noble halo
#

Ahh, I don't. I guess that's why Apple Pay isn't presented

#

I guess it's the same with Google Pay, it won't show up even if I use my Android phone, so I don't need to bother to test that with my Android phone either.

trim basin
#

Yeah, a valid card needs to be in there for it to show up.

noble halo
#

Ok, I have one last question then. My original question was about payment_intent.succeeded. I am currently listening to payment_intent.succeeded in my webhook. I only want to take action if the funds are in my account. You can see my conversation with @undone nimbus, that if I am only listening to payment_intent.succeeded and I only want to take action if the funds are in my account, that I cannot have any asynchronous payment options turned on. I see by default, only cards, Apple Pay, and Google Pay are turned on. I am making a CURL call to create the Session object and I am not passing payment_method_types at all when I create the Session object.

#

So if I am not passing payment_method_types at all, it should be using the default payments, that is cards + Apple Pay + Google Pay, which are the default payment types turned on in my account. If I am just using the default payment types, is it safe for me to listen to the payment_intent.succeeded event? That is, when my webhook receives the payment_intent.succeeded event, the funds should be in my Stripe account, right?

trim basin
#

It doesn't matter if you're using async methods of payment or not, that event will fire once you get the money.

#

It's just that with async methods it may take longer to fire.

noble halo
#

Ok, then I should be able to listen to payment_intent.succeeded because if that even fires, it means the funds are in my account (ie. any background check has passed, any e-cheque has settled, any bank transfer has also been settled, and the funds are in my account)

#

"if that event fires" (sorry, another typo)

trim basin
#

To clarify, that event means the payment succeeded, not that the resulting funds have actually settled yet. There are various delays involved for pretty much every method of payment. Card payments, for example, land in your pending balance first and take a bit of time to move to your available balance.

#

But pending or not, the money is in your Stripe account.

noble halo
#

I see. So there is a Sepa Direct Debit option that I can turn on. Sepa Direct Debit falls under the category of Bank Debits and according to this page here https://stripe.com/en-hk/payments/payment-methods-guide, Bank Debits is "Delayed," meaning it is asynchronous. So will payment_intent.succeeded fire even if the funds are not settled? (ie. I don't want the situation where I take action because payment_intent.succeeded fires but the funds aren't even settled yet and a few days later, the Sepa Direct Debit transaction is rejected/reversed)

trim basin
#

So the payment_intent.succeeded event won't fire immediately, only after the payment succeeds.

noble halo
#

Ok, thanks. I think that's all the questions I have for now. I don't have Sepa Direct Debit turned on anyways, I may consider it in the future. I will probably roll out with the default options turned on, that is cards + Apple Pay + Google Pay. Since cards, Apple Pay, and Google Pay are immediate payments (ie. they are synchronous payments), the funds should be in my account if I receive a payment_intent.succeeded event