#Honeydewd - subscription
1 messages · Page 1 of 1 (latest)
thanks
So you'd want to use the phases parameter to achieve this. You'd need phases.item here, https://stripe.com/docs/api/subscription_schedules/create#create_subscription_schedule-phases. Could you review this and let me know if you have any specific questions?
To add more context, the subscription schedule API allows you to automate changes to subscriptions in the future.
To learn more, please visit: https://stripe.com/docs/billing/subscriptions/subscription-schedules
ah i see so i can just set it on a schedule to delete the subscription item when needed
Yes!
gotcha
but if i just delete the subscription item what is the expected behaviour? will it refund or just be invoiced for that month
Let me test it to confirm
also i took at look at the subscription schedules but i see no information on how to delete a subscription item at a specific time
You'd use the phases.item to do this. When there are multiple phases, the end_date of one phase will always equal the start_date of the next phase.
okay thanks!
also is there a webhook to detect the deletion of a subscription item
maybe a list of all webhooks and their functions would be nice, i just don't know where to look lol
there's too many docs!
lol
you'd get customer.subscription.updated
I mean the docs for event types is quite clear https://stripe.com/docs/api/events/types#event_types-customer.subscription.updated
there's also https://stripe.com/docs/billing/subscriptions/webhooks specifically for subs events
thanks but how do i know what was updated from a services perspective?
how will my backend know a subscription item was deleted
the updated event shows the diff
awesome thanks
https://stripe.com/docs/api/events/object#event_object-data-previous_attributes in this is what the event had "before"
thanks for your help!