stripe-firebase-extensions icon indicating copy to clipboard operation
stripe-firebase-extensions copied to clipboard

Write start_date and billing_cycle_anchor to Firestore on customer.subscription events

Open lupustom opened this issue 2 years ago • 0 comments

Feature request

  • firestore-stripe-payments

Is your feature request related to a problem? Please describe.

If a subscription is created manually on Stripe and then synced to the Firestore through the handleWebhookEvents function, important dates like the start_date and the billing_cycle_anchor are missing from the document. If the subscription is backdated the created or current_period_start date will not reflect the true start date chosen for this subscription. There is no way to show or calculate the true start date or next invoice date reliably.

Describe the solution you'd like

Add start_date and the billing_cycle_anchor to the document in the manageSubscriptionStatusChange function.

lupustom avatar Dec 10 '22 15:12 lupustom