我正在研究定期付款的意图,当我尝试Charge the saved card later Server-side
时,得到的响应是:
Array
(
[error] => Array
(
[message] => You cannot attach a PaymentMethod to a Customer during PaymentMethod creation. Please instead create the PaymentMethod and then attach it using the attachment method of the PaymentMethods API.
[type] => invalid_request_error
)
)
为此,我使用了curl方法
curl https://api.stripe.com/v1/payment_methods \
-u ********: \
-d customer="{{CUSTOMER_ID}}" \
-d type=card
有人可以帮助我解决此问题吗?我已经参考了此页面
https://stripe.com/docs/payments/save-and-reuse