#robertpartfy-testing
1 messages · Page 1 of 1 (latest)
hi! A good way to do this is using Test Clocks, which let you advance time forward to simulate things like future invoices on a subscription. https://stripe.com/docs/billing/testing/test-clocks
hi karllekko long time no see! 🙂
using test clocks requires me to upgrade to Billing Starter though
yep, it's a paid feature
so that's one option, or the other is updating a subscription to set trial_end to a date a few minutes in the future, when the trial ends it generates an invoice that follows the normal flow for a recurring invoice so can be used to see what happens in that case and test things
i see, no other alternatives are available. am i required to upgrade to Billing Starter in order to use Stripe Subscriptions on production?
is there any "practical" difference between testing with test clocks vs. with trial_end, though? (besides being much easier, :P)
I'm not really sure on the pricing part to be honest!
Testing with test clocks is easier like you say and a bit more reflective of the fulls scenario, it can be very useful for simulating advanced use cases. Depends what you're trying to test specifically but the trial_end trick suffices fairly well for just understanding and seeing how the flow of recurring invoices(https://stripe.com/docs/billing/invoices/subscription#subscription-renewal) works
gottcha, so the renovation flow is (99%) the same in both testing clocks and with trial_end param, right?
yes. The only meaningful difference I can think of is the status transition is different. Like if you look at the customer.subscription.updated event, the previous_attributes[status] (https://stripe.com/docs/api/events/object?lang=node#event_object-data-previous_attributes) will be trialing , which isn't the case for a 'regular' renewal
fantastic! thanks for your support