#stone-customer-paymentmethod
1 messages · Page 1 of 1 (latest)
you use the PaymentIntents API and you pass customer: 'cus_123'and payment_method: 'pm_ABC'
there's no automatic pull of the default one, you always have to be explicit
Is there interaction with customer in that?
not sure what you mean?
Is it possible to charge through the API without user involvement?
Yes https://stripe.com/docs/terminal/features/saving-cards/overview#charging-saved-card
But it's possible that the card is declined or requires 3DS in which case you'll need to get the customer back on your payment page
This link is for Terminal users, use mine to know how to do it online 😄
ah yeah I chose the wrong link in my history though it works the same way :p
nice catch 🙂
In the case the card is declined or requires 3DS, what's the practise?
Hi @snow forge I'm taking over this thread
If the card is declined, you should check the decline code(https://stripe.com/docs/declines/codes) and decide the next step accordingly.
If a 3DS is required (aka PaymentIntent status is requires_action), you should bring your customer back to your website, and call stripe.confirmCardPayment (https://stripe.com/docs/js/payment_intents/confirm_card_payment) to start the 3DS authentication flow.
Would you chart In Chinese?
I can speak Chinese. I can continue the conversation in Chinese if this is the language that your prefer.
Please note that not all Stripe engineers can speak Chinese. If you have a follow-up question in a near future, please ask in English first in this discord server.
Ok, I will detail my senarios.
好的 🙂
Suppose a scenario: Currently, I have a subscription package: August 1st to September 1st $10 per month.
Now time: August 15th, Requirement 1: I want to upgrade the subscription to a monthly package of $20, the subscription period and anchor cycle remain unchanged.
Requirement 2: I want to upgrade the subscription to an annual plan of $100, the subscription period and anchor cycle remain unchanged.
I'm not sure how to implement them using API, user is using Android as well as iOS APP instead of JS.
假设一个场景:当前,我拥有一个订阅套餐:8月1日 到 9月1日 每个月 $10.
现在时间:8月15日, 需求1:我想升级该订阅到 $20的月度套餐,订阅的period以及anchor cycle都不变.
需求2:我想升级该订阅到 $100的年度套餐,订阅的period以及anchor cycle都不变.
我不确定如何使用API实现他们,用户使用的是Android以及iOS APP 而不是JS.
收到,接下来我们说直接说中文就好了。
💯
第一个需求 比较明确,你只需要在 update subscription 的时候,更换 items 里的 price 即可。实现方式请参照这份文档 https://stripe.com/docs/billing/subscriptions/upgrade-downgrade#changing
场景1中我们希望实现: 按照差额立即收取20/2-10/2 = $5的费用,并且下次收费的时间以及周期不变,下个月订阅按照$20收取费用.
我参考过文档,文档中描述两种方式(据我所知)- prorations:always_invoice, None; 但是看起来都不是我们想要的.
proration_behaviour=always_invoice 就是你需要的场景。
If you want the customer to immediately pay the price difference when switching to a more expensive subscription on the same billing cycle, you can set proration_behavior to always_invoice, which will calculate the proration and then immediately generate an invoice after making the switch.
不好意思,我更正下 收费费用应该是:20-10=$10
这样不合理。因为这个月份还没有结束,需要退回用户旧订阅费用的一半$5 。
同意你的看法,目前从产品侧传递信息 是需要这么实现。
嗯,你也可以使用 Test clocks https://stripe.com/docs/billing/testing/test-clocks 快速的测试一下,看看 Stripe 的 proration logic 是否符合你的业务需求。
我使用test-clocks
模拟过
这Stripe提供的方式不是我们想要的
所以你的业务逻辑是不退回旧订阅费用吗?
这是个好问题,我会把当月的额度上线提升到新的套餐
上限
其他的就不退了,这是为了收取更多的费用.
我想到一个变通的方式,你可以看下是否合理以及如何实现?
我可以在后台收取差额,等到webhook收到成功信息后,我取消掉当前的订阅,后面的订阅为新的套餐标准。
我个人是不建议这么做,毕竟客户已经订阅了一个月的套餐,在升级后,理论上客户就无法享用旧套餐,应该要把钱退回。
我们暂时不挑战这个需求的合理性.
我多问下,Stripe的这个收费方式是国际上常用方式吗?
proration 一直以来都是这个逻辑。
Ok, 麻烦你帮忙看看这个
你也可以在创建新的订阅套餐 (i.e., $20)的同时取消旧的套餐。不过新的套餐的开始时间是从 15 号开始,如果你要改成 1 号,你可以使用 backdating https://stripe.com/docs/billing/subscriptions/backdating#backdating-billing-cycle
是的,我看了上述连接可以实现订阅修改这部分。
我可以在后台收取差额,等到webhook收到成功信息后 - 如果收费的时候遇到3DS验证。我应该如何处理?
如何才能让用户顺利的支付上费用?
关于 3DS 的部分我之前说过了,需要通过调用 stripe.confirmCardPayment 来发起 3DS 流程。另外一种方式是让 Stripe 发邮件给客户,客户通过邮件里的链接来完成 3DS
我无法回答非技术问题,关于费用的计算请联系 Stripe Support https://support.stripe.com/contact
Find help and support for Stripe. Our support center provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
可以再重新明确一下你的需求吗?也就是 15 号不收费,旧订阅也不退钱,到下个月 1 号才收 $20 + $10 差价?
在更新订阅的时候把 proration_behavior 设置成 create_prorations 就好了
多谢你
客气
由于订阅周期的改变,billing_cycle_anchor 必须调整为更改订阅的时间,无法将其设置为其他日期。
客气。有问题随时沟通!
这个账单是Stripe提供的
没有,这是我在App买的。
我需要 invoice ID 才能查询该账单是如何生成的