mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-20 22:42:53 -05:00
bd20ad3adb
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 |
||
---|---|---|
.. | ||
lib | ||
test | ||
.eslintrc.js | ||
index.js | ||
package.json |