如何从 Checkout 会话中检索 Stripe 支付意向 ID?

huangapple go评论60阅读模式
英文:

How do I retrieve a Stripe Paymentintent id from a Checkout Session?

问题

Stripe以前在创建结账会话时返回Paymentintent id。

然而,自2022年11月15日的API更新后,不再如此。

相反,一个新的事件"确认结账会话已完成的请求"返回Paymentintent id。

我是否有办法使用原始结账会话事件来访问Paymentintent id?

英文:

Stripe used to return a Paymentintent id when a checkout session was created.

However, since the 2022-11-15 API update, this is no longer the case.

Instead a new event "A request to confirm a Checkout Session completed" returns the Paymentintent id.

Is there any way I could access the Paymentintent id using the original checkout session event?

答案1

得分: 1

No, this is an expected change that was introduced in API version 2022-08-01 source.

Checkout Sessions no longer create a Payment Intent when they are created, instead they create it when they are confirmed, so it is not possible to get the ID of the associated Payment Intent from the Checkout Session creation request's response, as no associated Payment Intent has been created at that point.

英文:

No, this is an expected change that was introduced in API version 2022-08-01 source.

Checkout Sessions no longer create a Payment Intent when they are created, instead they create it when they are confirmed, so it is not possible to get the ID of the associated Payment Intent from the Checkout Session creation request's response, as no associated Payment Intent has been created at that point.

huangapple
  • 本文由 发表于 2023年3月15日 21:33:20
  • 转载请务必保留本文链接:https://go.coder-hub.com/75745433.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定