stripe-firebase-extensions
stripe-firebase-extensions copied to clipboard
Write start_date and billing_cycle_anchor to Firestore on customer.subscription events
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.