Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
π Fixed missing subscription attribution on free to paid upgrade (#21846
) closes https://linear.app/ghost/issue/ENG-1561 - problem: When a free member upgraded to paid, we sometimes did not capture the subscription attribution data - cause: - after checkout, Stripe sends `customer.subscription.created`, `customer.subscription.updated` and `checkout.session.completed` webhook events - we want to create a subscription in our database based on the `checkout.session.completed` event, as it contains additional data (e.g. subscription attribution data) - but, we were sometimes creating a subscription based on a `customer.subscription.*` event during free β paid upgrades, which did not contain subscription attribution data - solution: we now ignore `customer.subscription.*` events until a member and its related subscription have been created in the database first, by the `checkout.session.completed` event
- Loading branch information