通过 Stripe Payment Link URL 预填客户电子邮件

Aru*_*ark 21 forms url attributes stripe-payments

我正在一个项目中测试 Stripe 的新付款链接,并尝试在结账表单的电子邮件字段中预填用户的电子邮件地址。我尝试在付款链接 URL 中附加“电子邮件”数据属性,但这不起作用,数据未传递:

https://buy.stripe.com/14k...fYZ?email=johnsmith@gmail.com
Run Code Online (Sandbox Code Playgroud)

我知道 Stripe 的客户端结帐解决方案确实允许这样做,但我尝试只使用付款链接,因为它简单得多。任何帮助将不胜感激,谢谢!

小智 33

更新:看起来现在可以使用 URL 参数(包括?prefilled_email. 查看文档

\n

?prefilled_email似乎按预期工作

\n

\xe2\x9c\x85 stripe.com/docs/ payment-links/customer-info

\n

  • `?prefilled_email` 似乎按预期工作 ✅ https://stripe.com/docs/ payment-links/customer-info (4认同)

Jus*_*ael 6

Stripe Payment Links 不支持预填写客户的电子邮件。

但是,如果您愿意编写一些代码,则可以使用 Stripe API 创建带有预填充电子邮件的结账会话。创建会话后,您可以将客户发送到urlCheckout Session 对象中提供的位置

  • 您现在可以这样预填充:https://stripe.com/docs/ payments/ payment-links#url-prefills (3认同)