stripe-payments - Stripe Payment Intents 和 charge.succeeded webhook 有时不触发

标签 stripe-payments webhooks

当用户下订单时,我们会在 iOS/Android 应用中创建 PaymentIntents(如果重要的话,使用 capture_method=manual)。

一旦 charge.succeeded webhook 触发,我们就会将订单发送到连接的地点。如果几分钟内没有发生这种情况,我们的订单就过期了。

有趣的是,十分之二的时间我们无法触发此 Webhook。

我想知道听这个网络钩子(Hook)是否真的明智,以便决定我们是否将订单发送到连接的帐户的地点,或者是否有更好的方法来确定一旦我们 try catch ,付款实际上会起作用它。

最佳答案

Webhook 是获取付款意图状态的推荐方法,但您也可以使用 API 来获取其状态。

引自 Stripe docs :

It is technically possible to use polling instead of webhooks to monitor for changes caused by asynchronous operations—repeatedly retrieving a PaymentIntent so that you can check its status—but this is markedly less reliable and may pose challenges if used at scale. Stripe enforces rate limiting on API requests, so exercise caution should you decide to use polling.

就您的情况而言,我建议等待 webhook,然后在几分钟后调用 PaymentIntents APICharges API如果您还没有收到网络钩子(Hook)。

关于stripe-payments - Stripe Payment Intents 和 charge.succeeded webhook 有时不触发,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61285110/

相关文章:

php - 当我使用 3D 安全测试卡号时,为什么 Stripe 不给我支付意向 requires_action 状态?

ruby-on-rails - 在 Rails 中使用 Stripe webhook

java - 在新的 Android Studio 中初始化 Stripe 对象

node.js - Dialogflow CX webhook 用于使用 nodejs 回复用户

javascript - Stripe 和 MogoDB 集成的 GraphQL 突变过早返回 null

iOS 本地通知操作在后台

c# - WebHook 实现示例?

json - 使用 Webhook 发送到 Microsoft Teams 的 Azure Monitor 警报 - 没有向 Teams 发送消息

github - 无法让 Jenkins 触发基于 Github 更改的构建