#royi - trial subscription

1 messages · Page 1 of 1 (latest)

stray vessel
#

What are you trying to do instead?

sinful crystal
#

Sorry, I forgot to mention that it works even if there is no payment method

stray vessel
#

And what do you want to happen instead?

sinful crystal
#

to get some trial_ended status

#

or cancelled with some reason

stray vessel
#

We have a webhook to tell you a trial is ending:
https://stripe.com/docs/billing/subscriptions/trials

Three days before the trial period is up, a customer.subscription.trial_will_end event is sent to your webhook endpoint. You can use that notification as a trigger to take any necessary actions, such as informing the customer that billing is about to begin.

Delay payments on active subscriptions using trial periods.

#

And you can also get the subscription updated webhook when it changes to active or a payment fails so you can update the subscription if needed

#

(but you do need to collect a payment method first)

sinful crystal
#

For a flow like ->
trial ended -> change status to trial ended, until a manual operation will be made, how can I model that?

#

Cause it seems that I can't know (from an api call to stripe at least) that a customer trial has ended. or that a trial has past due.

#

I can check that the invoice is incomplete, and the payment method is not defined and the invoice is incomplete. after 23 hours, the invoice status will be void which is not enough cause I can get the same status from different flows

#

according to that at least

stray vessel
#

That's what the customer.subscription.updated event tells you, you can look at the previous_attributes to see that it switched from trialing to active and take action on the subscription