#domica-subscription-events
1 messages · Page 1 of 1 (latest)
domica-subscription-events
Do you get a webhook update for the status change, it should be changed to "inactive"?
@spring narwhal what do you mean "expire"? Can you give a concrete example?
Once cancel your subscription, you get an update webhook stating cancel_at_period_end is true, cancel_at and canceled_at both being updated. But the status is still "active" (by default), since your subscription actually expires at next billing period.
Next billing period, do we get a webhook update that the subscription fully expired?
There should be a webhook update, right? Since the subscription status is no longer "active"
Okay so you are talking about canceling at the end of the current period. So in that case you will get customer.subscription.deleted at the end, the same way you would if you canceled immediately
You can use our Test Clocks feature to "advance time" to simulate that: https://stripe.com/docs/billing/testing/test-clocks
Oh it's a delete. Alright, awesome thanks! Will check out the test clock feature
awesome!
@sonic obsidian LMK if I need to create a different thread for this.
Another question, using a payment link to redirect a user to input their data and subscribe, once they're done I get back two webhook requests. Create and update. Why? Create I understand, but I get back an "incomplete" subscription, which is finalized with the update. I'm having a problem where I don't have enough time to store the created subscription and by the time I get the updated webhook I the call to my database hasn't finished in the create webhook.
Any way to change this, get only the created webhook? I mean I should be able to wait until the create is done technically, but that would mean potentially slowing down the application
Can you be a lot more specific with clear examples? Like all you said is
Create and update.
I don't know what that means
By create I mean the customer.subscription.created webhook, by update I mean the customer.subscription.updated webhook.
I seem to get both on first subscription creation? With the customer.subscription.created returning an incomplete object?
Do you have an example I can look at?
If you're talking actual values, I last tested with this sub id sub_1Mo81oJ0n5ix7NyjENiOUPPp (test data of course). This is the webhook id we_1MeIMjJ0n5ix7NyjyISbNwuG.
I get back the customer.subscription.created and customer.subscription.updated in less than a second, I don't have enough time to insert the object into my database before I need to update it.
What I want is the exact evt_123 though. I can find it now, just for next time
And so okay you're using Checkout here. So that is expected, Checkout will create an incomplete Subscription first (to calculate how much to charge upfront) and then once the payment is completed successfully the Subscription transitions to active
But really as a developer using Checkout you want to listen to checkout.session.completed instead