#titus_best-practices

1 messages ¡ Page 1 of 1 (latest)

heavy solsticeBOT
#

👋 Welcome to your new thread!

⏱️ We automatically close idle threads, which makes them read-only. Make sure you stick around to chat in realtime!

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1212415502027333643

📝 Have more to share? You can add more detail below, including code, screenshots, videos, etc.

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question. Thank you for your patience!

steel mountain
#

Second question: We have a draft implementation of Checkout that creates the subscription. When customers provide a credit card here, is that enough for re-use in the PaymentIntent, or do we need a separate interaction where they grant us permission for additional charges?

fierce gorgeBOT
tepid arch
#

Yes, if you have a checkout session in subscription mode, the user's card will be set up for future off session payments, so you would be able to use that card for future charges with or without a payment intent.

#

Metered billing does not support upfront charging but that is because the typical use case is that you are charging them for usage throughout the month and don't know usage numbers until they happen. Can you tell me more about what you are trying to charge for and how you would like to charge for it?

steel mountain
#

Thank you! Our use case is: a customer with 10 users subscribes on the 1st of the month and pays $1 per seat upfront. On the 15th of the month they add 10 more users. We would like to charge a prorated ($0.50) amount for those new users for the period of the month still remaining. Would there be a better way to approach this?

tepid arch
#

Yes, our standard non-metered pricing would do exactly this. You could start the subscription with a quantity of 10, then when they add seats you would update the quantity to 20 and set the proration_behavior to always_invoice we would calculate how far through the month we are and charge 10 x that price https://docs.stripe.com/api/subscriptions/update#update_subscription-proration_behavior

#

Also that pricing charges upfront

steel mountain
#

Aaaaaaaaaaa!!! I don't think I can possibly thank you enough for saving me from going down the wrong rabbit hole. I have been reading the docs until I was cross-eyed, and must have entirely missed this. That makes so much more sense. So would this work with "Flat Rate", "Package", or "Tiered"?

tepid arch
#

Yes it should work with any of those as far as I know. Metered is the weird one where it charges at the end of the month and can't be prorated properly.

steel mountain
#

Fantastic. One last question I think... What happens if they start using less seats mid-month, such as deleting 5 of their users. Should I still update the subscription, or only update it for increases?

tepid arch
#

That is up to you but it would likely make sense to update it so that you aren't charging them for a full 20 seats when they are only using 15. If you don't want to credit them for using less seats you can specify protation_behavior=none when making that update

steel mountain
#

Got it! Again, thank you so much, and have a great day.