#rudh_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/1263416179591090181
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
Hi, let me help you with this.
Do you want the Subscription to have a start date when the customer pays, or when it's created?
Hi, thanks for taking the time for this.
I would like the subscription to have a start date when the users pays (this is a good point, I had not yet thought about this so need to check what my code is doing)
It should come from you business requirement mainly.
Why do you need to create a Stripe Subscription earlier exactly? Could you create it when the customer is ready to pay?
I dont want to create it earlier, I want the subscription to be made ative when the payment is made, which I assume is when the start date is created.
What I do is create an inactive subscription on an earlier button click to reduce the number of total clicks a user has to click.
Because in my head, all of this is required
- create a customer (i do this on entry to the screen so the user doesn't have to do anything)
- create a subscription in the back end that is inactive, when the user clicks that they are interested in the subscription (at which point they see a breakdown of costs etc.)
- purchase subscription button which brings up the payment sheet for the user to fill in their info and pay
what i want to know, is whether it is possible to cancel/delete the inactive subscription when they click cancel on the payment sheet/at step 3 if they click close instead of purchase subscription button
I hope that makes sense, I create a subscription object when the user shows interest, but it only activates on purchase, alternatively I could make it so that the subscription object is only made on the actual purchase subscription button, but in my head that might then make the UI quite slow if it has to create the object, get the response and then initialise the payment sheet, although saying it out loud this does seem more logical
is whether it is possible to cancel/delete the inactive subscription when they click cancel on the payment sheet/at step 3 if they click close instead of purchase subscription button
sure, call your backend to call https://docs.stripe.com/api/subscriptions/cancel when you detect the user cancelling
ok great, and that works regarldless if the subscription is active or inactive?
should do