Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Double subscription_updated event when use updateSubscription and updateSubscriptionItem sequentially #116

Closed
atpsito opened this issue Aug 9, 2024 · 1 comment

Comments

@atpsito
Copy link

atpsito commented Aug 9, 2024

I'm using this code to updtate subcription's variant and update quantity in subscriptionItem

const { error } = await updateSubscription(subscriptionId, {
        variantId,
        invoiceImmediately: true
});

const { error: subscriptionItemError, data } =
    await updateSubscriptionItem(subscriptionItemId, {
    quantity: seats
});

then I received 2 webhooks events where the quantity is diferent so I can't have the quantity updated in my database:

image

Can you guys fix this?

@atpsito atpsito changed the title Double subscription_updated event when use updateSubscription and updateSubscription sequentially Double subscription_updated event when use updateSubscription and updateSubscriptionItem sequentially Aug 9, 2024
@brankoconjic
Copy link
Collaborator

Hi,

Please reach out to our support: hello@lemonsqueezy.com

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants