#deadshot-futuresub-webhookevent

1 messages · Page 1 of 1 (latest)

scarlet rapidsBOT
clever leaf
#

You should receive the customer.subscription.updated event

#

The latter event is only triggered when you make updates to the Schedule. But the schedule itself is making automated upated to the Subscription and that triggers customer.subscription.updated

safe stump
#

Also when I receive the event, it starts, I should look for subscription event status of 'active"?

clever leaf
#

The Event object (https://stripe.com/docs/api/events/object) will include a data.object property that will have the Subscription as a value. You can check the status there. It should be active as long as the first Invoice is paid.

safe stump
#

What do you mean by first invoice is paid because I want to execute code immediately when the subscription starts?

clever leaf
#

Well, let's step back. You have a Subscripition created that starts in the future. Do you have a payment method collected at that time?

safe stump
#

Yes, i collect payment method at that time

clever leaf
#

Okay so when the Subscription starts it should attempt to collect the funds for the first invoice payment.

safe stump
#

Also my first week has coupon of 100% off applied every time, does that make any difference?

clever leaf
#

Are you billing weekly?

safe stump
#

Yes

clever leaf
#

Then you will generate $0 invoices that will automatically be marked as paid and the Subscription will have a status='active'

#

But... this does sound like a kind of complex billing integration. I would strongly recommend you use our Test Clocks helper to perform end-to-end simulations of this behavior to ensure it does what you expect.

https://stripe.com/docs/billing/testing/test-clocks

safe stump
#

Ok

#

Thanks

#

I will check that out

clever leaf
#

It's a useful tool since it allows you to write complete end-to-end test scripts and validate that your subscriptions, invoices, and webhooks all behave like you expect.