#emak_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/1266408607226789890
๐ 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.
- emak_api, 1 day ago, 26 messages
Hi there ๐ can you share the ID of a Subscription where you saw this behavior, so I can take a closer look at it and what settings it used?
Thank you, taking a closer look at that.
Let me double check as well -- I'am seeing a direct event on going from trial to pause which is what I would expect.
Yeh I do see that when I send a update on trial ends at to 5 seconds from now it makes it look like the subscription is "Active" for a moment and then goes into "Pause"
Ahh that is a horrible first snapshot, but it was under "Boom" and showed Active for a moment then turned to "Paused" + "Trial ended Jul 26"
This subscription id is = sub_1PgpcKCXFZDNk0183JOLmKb8
Hm, for this Subscription, I'm getting the impression it moved from a trialing status to a paused status based on this customer.subscription.updated Event:
https://dashboard.stripe.com/test/events/evt_1PgpW1CXFZDNk018qBOQ56WA
Same for this one based on this Event:
https://dashboard.stripe.com/test/events/evt_1PgpdqCXFZDNk018n7vHdzT6
Yes, I do see that but maybe the UI takes a moment to update?
If I may, I can record a quick video illustrating this
Sure! I do want to warn you though my teammates and I focus more on the API side of these flows in this forum, so I'm not quite as familiar with how the dashboard may represent these changing states.
Ohh okay, well I think its fine because I think the API or the webhooks aren't telling our side that they are active
Just a strange intermediate state I think
Agreed, if the dashboard is showing something different than the API, I do think that's worth having our teams look into. Even if it doesn't actually impact your integration.
Sounds good, I'll continue to record it then
To recap, what I do is:
- Create subscription on trial
- Mark it to be expiring in 5 seconds from now
- It says "Active" on the UI until a little bit then it says "Paused" (which is what I expect from my cancelation behaviour)
May I get your review on the flow we've got for handling customers that end their trial and then they pay us which should resume their subscription? I just want to make sure that we are making good use of the API and not making silly mistakes somewhere.
Hm, the Loom controls aren't rendering correctly to let pause and focus on certain spots. Can you share the ID of the Subscription from that video?
sub_1PgprrCXFZDNk018slpCLjlk is the ID of the subscription in that video
On the flow:
- We create a subscription with the end_behaviour as "pause"
- When the trial ends we get a webhook response that tells us it is paused, we do what we do in our product to handle that.
- When they input their payment information after trial ended and they are paused, we call "resume" with proration "create_prorations" and billing cycle to "now" so that we can generate a invoice of the current # of users (they pay against that number)
- Next we call
pay_invoicebecause in order for them to resume fully into active, they have to pay the invoice I just created from the previous step. After this, they are now active. - Sync with Stripe and all is good.
This works right now for us, but I wonder if there was a need to do step 4 in which I call the API to pay the open invoice.
Yeah, that's very strange, I'm not seeing anything in the history of that Subscription that would cause it to go into an active state. I'd suggest writing into our Support team, and provide them with that video, so they can have the right term further investigate that dashboard behvior.
https://support.stripe.com/?contact=true
Taking a look at the flow you described
Thanks!
Looking at the state of the Invoice, I do believe some action needs to be done for Step 4. But, I think you may have some flexibility there around what action you take. Explicitly making a request to pay the Invoice works, but you may also be able to update the Invoice and set auto_advance to true which allows our automatic processes to progress the Invoice lifecycle.