Stripe subscriptions - When testing clocks, an automatic invoice with status paid is getting created on advancing time

22 views Asked by At

I use the following firebase extension for stripe payment integration in my react app - https://extensions.dev/extensions/stripe/firestore-stripe-payments. (I cannot share the code from the app, but can try snippets if need be). The steps to set it up are described here - https://console.firebase.google.com/u/0/project/sample-stripe-payment-demo/extensions/instances/firestore-stripe-payments?tab=usage

I have a product to which I want to setup monthly recurring payments. In order to test out that, when the next billing cycle starts, there should be an invoice generated which will lead to the user / customer having to pay again, I simulate subscriptions using the steps described here - https://docs.stripe.com/billing/testing/test-clocks/simulate-subscriptions/ . I advance the clock by one or two months and check in my firestore database if there is an invoice generated. (with firbase stripe extension, things like customers, subscriptions, invoices are stored as collections in a firestore database).

What I expect when advancing time - in the customers/subscriptions collection for the particular customer for whom I advanced time, the subscription status should not be 'active' since the user has now 'not paid' for this billing cycle.

Instead I see subscription status as 'active' and in another collection , an invoice for that billing cycle customers/subscriptions/[subscriptionid]/invoices/[invoiceid] with status 'paid'.

Question - How do I properly test out my subscriptions payment stripe integration when using this particular extension?

My main reference is this video - https://www.youtube.com/watch?v=xi3F2Zv91UE and the code link in the description

0

There are 0 answers