#onemilostoomany_best-practices
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ 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.
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
๐ 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/1480545637853298700
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
๐ Your approach sounds solid, but the only potential issue I can see is that because Stripe doesn't know about the credits, it might make it tricky to audit or reconcile data in the future. It might be worth looking into Billing credits, which is a relatively new feature: https://docs.stripe.com/billing/subscriptions/usage-based/billing-credits This might help by centralizing a lot more of the usage data, but having said that, I don't think there's any functional issues with the approach as you describe it, if you want to stick with that
Thank you for the quick response! I was a bit confused about using Billing credits because i use credits that expire at different times and i would like to be able to regrant more after expiration. I can set the expires_at field manually when the subscription is created but i was wondering if i could later (after credits are expired), give more credits as a kind of promotion and change expiration date? Also, what would be the minimum i need to show to the user, so i can create subscription for the said user myself? If i understand correctly that would be MIT.
Hello, I'm taking over for dougal who had to step away - please give me a few minutes to catch up ๐
I'm not sure I understand the second part of your question. Are you wondering how to apply credits to an invoice before you charge the saved payment method?
For the second part of my question: I used to have a user subscribe over stripe and that meant the user sees every subscription item and the usage per hour cost. User also payed at the moment of giving credit card info (allthough the bill was zero). Since that was a poor experience for the user, i decided to just make a setup intent (take the user's credit card info without making the user pay ) and then manually create the subscription for the user as a merchant-initiated transaction so i can invoice after trial expires. The question is: What do i have to show to the user at the screen where i take the user info so that i can automatically charge after the trial in accordance to compliance?
I see! I thought you were still asking about the credits. So you're creating a SetupIntent with usage: off_session (ref) right? You can read more about compliance here: https://docs.stripe.com/payments/save-and-reuse?payment-ui=elements#compliance
I do create it with usage: off_session. and then i create the subscription when data is confirmed "customer=" + customerId +
"&items[0][price]=" + gpuPrice +
"&items[1][price]=" + storagePrice +
"&items[2][price]=" + apiPrice +
"&collection_method=charge_automatically" +
"&trial_period_days=30"
Sorry if i'm writing too much, i just want to do this the best i can. I'll read more about compliance.
No need to apologize ๐ that flow sounds good to me. You just need to disclose your intended use of the saved payment method when collecting it which the compliance docs explain.
Ok, thank you so much. Have a good day!