Duplicated subscriptions on local development
Open
@lukeholder is already working on this.
Since Dec 1, 2025.
bug
- Dominant language
- PHP
- Stars
- 6
- Forks
- 4
- Avg merge
- 13h 3m
- Merged PRs (30d)
- 2
Description
Description
When you are working on local development with forwarded stripe events, the customer.subscription.created and customer.subscription.updated events are received almost at the same time and, as updating use createOrUpdateSubscription, the subscriptions are created 2 times.
My idea is to use a specific update method instead of
https://github.com/craftcms/stripe/blob/fa70b83685815e6366c570dcefdd7e5d75eff371/src/services/Webhooks.php#L97
Steps to reproduce
- Up local development with stripe forwarded
- Create a subscription
- Subscription is duplicated
Additional info
- Craft version: 5.40
- PHP version: 8.2
- Database driver & version: Mysql
- Plugins & versions: 1.1.0
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.