Stripe 3D Secure 为未来付款保存卡时
Stripe 3D Secure when Saving Cards for future payments
保存卡以备将来付款时是否可以使用 3D Secure?
来自 Stripe 的文档,https://stripe.com/docs/sources/three-d-secure。这似乎是这样做的方法。
但是根据文档,不再推荐使用 PaymentIntents 代替:
Use of this API is no longer recommended. If you wish to use 3D Secure we strongly encourage you to adopt PaymentIntents, our new payments API.
那么,有没有一种方法可以使用 PaymentIntents(利用 3D 安全)来保存卡而不立即付款?
只是想让你知道,我已经联系了 Stripe 支持,因为我和你有同样的担忧,这里是答案:
[...] PaymentIntents currently does not support creating sources without also creating a charge thereafter. It's also not possible to integrate 3DSecure with the current method of saving credit cards unfortunately.
PaymentIntents is a fairly new Stripe product and we're still working out the kinks and deciding what functionality we'll support down the line. Saving sources is definitely high on our priority list and there'll be more information on this update in the future.
我试图获取有关他们的路线图的更多信息,以了解该功能是否会在 9 月发布,但支持人员无法提供信息。
编辑:
stripe 改进了它的文档,现在解释了如何在尊重 SCA 的同时实现你想要的东西 https://stripe.com/docs/payments/cards/saving-cards#saving-card-without-payment and https://stripe.com/docs/payments/cards/charging-saved-cards
Is it possible to use 3D Secure when saving cards for future payments?
我使用 PaymentIntents
所做的是创建一个客户,然后进行付款:
customer = stripe.Customer.create(
payment = stripe.PaymentIntent.create(customer=customer_id, ....
在付款中,您有卡类型 payment['charges']['data'][0]['payment_method_details']['card']['brand']
和卡的最后 4 位数字 payment['charges']['data'][0]['payment_method_details']['card']['last4']
您可以在本地存储 customer_id
、卡类型和最后 4 位数字,以便下次向该客户显示。
要再次付款,您只需将 stripe.PaymentIntent.create()
与您第一次保存的 customer.id
一起使用。
如果客户想使用另一张卡,只需
customer = stripe.Customer.modify(
customer_id,
source=token_id
)
token_id
来自前端 stripe.js
使用 the SetupIntent
API,这基本上是 PaymentIntent
且金额为空(相同的工作流程)。
创建支付意向时设置setup_future_usage='off_session'
。
stripe.PaymentIntent.create(
amount=1099,
currency='usd',
setup_future_usage='off_session',
)
这些 stripe 文档展示了如何以允许未来“off_session”使用 3D Secure 的卡进行支付的方式保存卡。
https://stripe.com/docs/payments/payment-intents#future-usage
保存卡以备将来付款时是否可以使用 3D Secure?
来自 Stripe 的文档,https://stripe.com/docs/sources/three-d-secure。这似乎是这样做的方法。
但是根据文档,不再推荐使用 PaymentIntents 代替:
Use of this API is no longer recommended. If you wish to use 3D Secure we strongly encourage you to adopt PaymentIntents, our new payments API.
那么,有没有一种方法可以使用 PaymentIntents(利用 3D 安全)来保存卡而不立即付款?
只是想让你知道,我已经联系了 Stripe 支持,因为我和你有同样的担忧,这里是答案:
[...] PaymentIntents currently does not support creating sources without also creating a charge thereafter. It's also not possible to integrate 3DSecure with the current method of saving credit cards unfortunately.
PaymentIntents is a fairly new Stripe product and we're still working out the kinks and deciding what functionality we'll support down the line. Saving sources is definitely high on our priority list and there'll be more information on this update in the future.
我试图获取有关他们的路线图的更多信息,以了解该功能是否会在 9 月发布,但支持人员无法提供信息。
编辑: stripe 改进了它的文档,现在解释了如何在尊重 SCA 的同时实现你想要的东西 https://stripe.com/docs/payments/cards/saving-cards#saving-card-without-payment and https://stripe.com/docs/payments/cards/charging-saved-cards
Is it possible to use 3D Secure when saving cards for future payments?
我使用 PaymentIntents
所做的是创建一个客户,然后进行付款:
customer = stripe.Customer.create(
payment = stripe.PaymentIntent.create(customer=customer_id, ....
在付款中,您有卡类型 payment['charges']['data'][0]['payment_method_details']['card']['brand']
和卡的最后 4 位数字 payment['charges']['data'][0]['payment_method_details']['card']['last4']
您可以在本地存储 customer_id
、卡类型和最后 4 位数字,以便下次向该客户显示。
要再次付款,您只需将 stripe.PaymentIntent.create()
与您第一次保存的 customer.id
一起使用。
如果客户想使用另一张卡,只需
customer = stripe.Customer.modify(
customer_id,
source=token_id
)
token_id
来自前端 stripe.js
使用 the SetupIntent
API,这基本上是 PaymentIntent
且金额为空(相同的工作流程)。
创建支付意向时设置setup_future_usage='off_session'
。
stripe.PaymentIntent.create(
amount=1099,
currency='usd',
setup_future_usage='off_session',
)
这些 stripe 文档展示了如何以允许未来“off_session”使用 3D Secure 的卡进行支付的方式保存卡。
https://stripe.com/docs/payments/payment-intents#future-usage