更新时间:2023-12-04 21:15:04
不是传入 token
参数作为您创建的令牌的 ID,您可以在创建费用时完全省略此参数并只传入 customer
参数:https://stripe.com/docs/api/node#create_charge-customer
Instead of passing in a token
parameter as the ID of the token you created, you could omit this parameter altogether when creating the charge and pass in only the customer
parameter instead:
https://stripe.com/docs/api/node#create_charge-customer
这假设您已经创建了一个客户并在收取此费用之前将该令牌保存为该客户的付款来源:https://stripe.com/docs/charges#saving-credit-稍后的卡片详细信息
This assumes that you already created a customer and saved that token as a payment source for that customer before making this charge: https://stripe.com/docs/charges#saving-credit-card-details-for-later
如果您确实想为该客户的特定卡收费(而不是记录中的默认卡),您可以将卡 ID (card_*) 作为 source
传入:https://stripe.com/docs/api/node#create_charge-source
If you do want to charge a specific card for that customer (as opposed to the default card on record), you'd pass in the card ID (card_*) as the source
:
https://stripe.com/docs/api/node#create_charge-source