Stripe Connect PaymentIntent error: No such payment_intent

三世轮回 提交于 2020-06-27 11:30:18

问题


I'm using stripe connect in my API, and I would like to update and process an existing paymentIntent. The paymentIntent creation is successful using the NodeJS stripe package

const paymentIntent = await stripe.paymentIntents.create(
      {
        payment_method_types: ["card"],
        amount: 1499, // in cents
        currency: "usd"
      },
      {
        stripe_account: "acct_xxx"
      }
    )

This successfully returns a paymentIntent object with id ('pi_yyy'), client_secret ('pi_yyy_secret_zzz'), status ('requires_payment_method') and more fields.

However, when using the returned payment intent id to further update the payment intent or calling stripe.createPaymentMethod on the frontend with the client_secret, an error is returned:

Error: No such payment_intent: pi_yyy

来源:https://stackoverflow.com/questions/57624880/stripe-connect-paymentintent-error-no-such-payment-intent

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!