#onemilostoomany_best-practices

1 messages ยท Page 1 of 1 (latest)

tidal flaxBOT
#

๐Ÿ‘‹ 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.

prisma totem
#

๐Ÿ‘‹ 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

tidal flaxBOT
balmy comet
#

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.

soft pilot
#

Hello, I'm taking over for dougal who had to step away - please give me a few minutes to catch up ๐Ÿ™‚

#

Yes, it looks like you can set expires_at (ref) or manually expire (ref) a CreditGrant. I believe these can be created with any expiration date at any time.

#

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?

balmy comet
#

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?

soft pilot
balmy comet
#

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.

soft pilot
#

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.

balmy comet
#

Ok, thank you so much. Have a good day!