简体   繁体   English

stripe.customers.createBalanceTransaction 会从客户的信用卡中扣款吗?

[英]Will stripe.customers.createBalanceTransaction charge customer's credit card?

I am trying to create a workaround to make sure the customer has sufficient funds before to upgrade him to another tier.我正在尝试创建一种解决方法,以确保客户在将其升级到另一层之前有足够的资金。 I am using stripe.customers.createBalanceTransaction in development mode but I am not sure how it will behave in a production environment.我在开发模式下使用stripe.customers.createBalanceTransaction但我不确定它在生产环境中的表现如何。 Does it charges the customer's credit card to add funds ?它是否会向客户的信用卡收取费用以增加资金?

If not, how can I manage to make the customer pay before upgrade him to the upper tier ?如果没有,我怎样才能让客户在升级到上层之前付款?

Creating a customer balance transaction [0] will not charge your customer's credit card.创建客户余额交易 [0] 不会从您客户的信用卡中扣款。 This will only add/subtract the balance on the customer [1] which will be applicable to their future invoices.这只会增加/减去客户 [1] 的余额,这将适用于他们未来的发票。 It has nothing to do with charging your customer's credit card.它与向客户的信用卡收费无关。

To upgrade a subscription [2] only after your customer pays the price difference, you can update the subscription [3] and charge the customer for it right away by passing payment_behavior: 'pending_if_incomplete' and proration_behavior: 'always_invoice' [4].要仅在您的客户支付差价后升级订阅 [2],您可以更新订阅 [3] 并通过传递payment_behavior: 'pending_if_incomplete'proration_behavior: 'always_invoice' [4] 立即向客户收取费用。 If the payment fails, your customer will not be upgraded to the upper tier.如果付款失败,您的客户将不会升级到上层。

[0] https://stripe.com/docs/api/customer_balance_transactions/create [0] https://stripe.com/docs/api/customer_balance_transactions/create

[1] https://stripe.com/docs/billing/customer/balance [1] https://stripe.com/docs/billing/customer/balance

[2]https://stripe.com/docs/billing/subscriptions/upgrade-downgrade [2]https://stripe.com/docs/billing/subscriptions/upgrade-downgrade

[3] https://stripe.com/docs/api/subscriptions/update [3] https://stripe.com/docs/api/subscriptions/update

[4] https://stripe.com/docs/billing/subscriptions/pending-updates [4] https://stripe.com/docs/billing/subscriptions/pending-updates

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM