#yuichi-hamamoto_api
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/1379989781492006944
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
hello! gimme a few minutes to think about this!
when you say the user would waste a few days until the payment is completed, you're worried about giving them additional time or less time?
less time
let's say create subscription(yearly) starts at 1/1
current phase become 1/1-12/31
but since user has complete the payment yet they can't access
If user complete the payment on 1/5
now they can access but the phase is still 1/1-12/31
aaah, and I'm guessing you don't really want to provision the user till they pay right?
Exactly
off the top of my head, I think there's two ways to go about it, but both methods would add more complexity to the implementation :
- option 1 : Send a one time invoice to the customer first for the first time payment. After the customer has paid, add the equivalent amount to the customer's Invoice balance, then create the subscription. The newly created subscription should use the funds from the customer's Invoice balance to pay the first invoice.
- option 2 : the first part of what you described would still stay the same. However, you would create a subscription schedule to add additional time after the end of the subscription with a $0 price. After which, you would switch back to the normal price.
in my opinion, the first option would really be simpler
this guide explains the customer invoice balance that I was talking about : https://docs.stripe.com/billing/customer/balance#details
For option 1, how do I create a subscription? automatic_charge?
you can still create it with send_invoice i believe, but let me quickly try it out to check
yep, you can still create the subscription with send_invoice
ok thx
I'll recommend testing it out to make sure it all works as per what you expect
in case you haven't seen this yet, you can use test clocks to mimic the passing of time : https://stripe.com/docs/billing/testing/test-clocks