#yuichi-hamamoto_api

1 messages ¡ Page 1 of 1 (latest)

cold drumBOT
#

👋 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.

tardy cosmos
#

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?

hard vigil
#

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

tardy cosmos
#

aaah, and I'm guessing you don't really want to provision the user till they pay right?

hard vigil
#

Exactly

tardy cosmos
#

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

hard vigil
#

For option 1, how do I create a subscription? automatic_charge?

tardy cosmos
#

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

hard vigil
#

ok thx

tardy cosmos
#

I'll recommend testing it out to make sure it all works as per what you expect