Stripe Checkout 无需姓名或电子邮件 [英] Stripe Checkout without requiring name or email

查看:37
本文介绍了Stripe Checkout 无需姓名或电子邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想为订阅实施 Stripe 结帐.我遵循了此处的指南,一切正常.但是,Stripe 提供的结帐表单要求用户输入 (i) 卡上的姓名以及 (ii) 用户的电子邮件.

I would like to implement Stripe checkout for subscriptions. I have followed the guidance here and everything works. However, the checkout form that Stripe provides requires the user to enter (i) the name on the card and also (ii) the user's email.

有没有办法去掉这两个项目,让用户不需要输入?删除这些项目是否可以接受(就安全而言)?

这里的目标是让用户轻松完成支付流程,并限制我可以访问的有关用户的信息.

The goal here is to make it easy for users to go through the payment flow, and also to limit the information I have access to about the user.

我正在使用 Node.

I am using Node.

请注意,我将在注册过程的其他地方收集用户的电子邮件,因此在结帐表单上显示电子邮件是多余的(即使我可以预先填写).

Note that I will be collecting the user's email elsewhere in the signup process, so showing the email on the Checkout form is redundant (even if I can prefill it).

以下是更多详细信息:

当我使用 Stripe Elements 而不是 Checkout 时,一切似乎都可以正常工作而无需客户的姓名.

When I use Stripe Elements instead of Checkout, everything seems to work fine without requiring the customer's name.

我还认为旧的 Checkout 不需要名称——我相信旧的模式没有名称字段.多年来我完成的许多具有条纹样式的信用卡表格都不需要信用卡表格中的姓名或电子邮件.

I had also thought the old Checkout did not require name--I believe the old modal did not have a name field. And many credit card forms I have completed over the years that had the Stripe styling did not require name or email in the credit card form.

根据这个答案,表单通常不需要姓名,因为它通常不会在验证过程中实际使用(尽管这个答案已经有几年了).

And according to this answer, name is often not required by forms because it is generally not actually used in the verification process (though that answer is a few years old).

我在 2017 年看到 here 的答案,指出电子邮件字段是必需的.我想知道是否仍然如此.

I see an answer here from 2017 stating that the email field is required. I am wondering if this is still the case.

我知道如果我想使用完全可自定义的表单,那么我可以使用 Elements.但这个问题是关于结帐的.Elements 加载的表单不需要用户输入姓名,而 Checkout 以前也不需要用户输入姓名.如果 Checkout 现在确实需要姓名,Stripe 有没有解释过原因?

I understand that if I want to use a fully customizable form, then I can use Elements. But this question is about Checkout. The form that Elements loads does not require users to enter their names, and Checkout did not previously require users enter their names. If Checkout does require names now, has Stripe ever explained why?

推荐答案

Checkout 当前支持在创建 CheckoutSession [0] 时使用 customer_email 字段预先填写用户的电子邮件,但 Checkout 不支持不收集电子邮件.

Checkout currently supports pre-filling your user's email using the customer_email field when creating a CheckoutSession [0] but Checkout doesn't support not collecting email.

名称"输入字段不可配置且无法预填.您可能必须使用 Stripe.js 和 Elements 创建自己的自定义表单,以免收集用户的电子邮件和姓名.

The "name" input field is not configurable and cannot be pre-filled. You might have to create your own custom form using Stripe.js and Elements to not collect your user's email and name.

[0] https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-customer_email

这篇关于Stripe Checkout 无需姓名或电子邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆