gpt4 book ai didi

javascript - 如何从服务器端创建可重定向的 strip 支付网址?

转载 作者:行者123 更新时间:2023-12-05 07:18:07 27 4
gpt4 key购买 nike

https://stripe.com/docs/api/checkout/sessions/retrieve这是链接,但它在客户端创建付款网址。但我只希望从服务器端获得它,以便我可以将它临时保存在数据库中。

最佳答案

根据你的问题,我了解到你想将 stripe 的结帐 session 链接临时存储在数据库中。共享的文档是正确的。

const session = await stripe.checkout.sessions.create(payload);
// get your customer, success and cancel URL, and other details in the payload object.
if (session) console.log(session.url)

我希望这就是您要找的。

关于javascript - 如何从服务器端创建可重定向的 strip 支付网址?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58484357/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com