Skip to content

[BUG]: subscription.started webhook payload is missing entitlements #690

@kikihakiem

Description

@kikihakiem

Describe the bug
When a customer’s plan is upgraded or downgraded, current subscription is terminated, a new one is started and subscription.started webhook is sent for the new subscription. But the payload does not include the entitlements array, unlike the subscription.updated webhook, which does include it. Downstream apps that sync entitlements from webhooks cannot do so without an extra API call to fetch the subscription.

To Reproduce
Steps to reproduce the behavior:

  1. Create two plans (e.g. Basic and Premium) with an entitlement (e.g. max_transactions).
  2. Create a customer and a subscription to the Basic plan.
  3. Configure a webhook endpoint for the organization and ensure it receives webhooks.
  4. In the Lago UI, upgrade the subscription from Basic to Premium.
  5. Inspect the subscription.started webhook request body sent to your endpoint.

Expected behavior
The subscription.started webhook payload should include the entitlements array on the subscription object (resolved for the new plan), in the same way as the subscription.updated webhook.

Screenshots
N/A

Support

  • Self-hosted Lago v1.41.0

Additional context
N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions