Skip to content

Can't get subscription for invoice #879

@jaimeiniesta

Description

@jaimeiniesta

Existing Issue or Pull Request Verification

  • Confirmed, no existing Issues or Pull Requests found related to my submission.

Package Version

3.2.0

Are you using the latest version?

  • Yes, I verified the issue is still present in the latest version.

Steps to Reproduce

  1. Retrieve an invoice related to a subscription with {:ok, invoice} = Stripe.Invoice.retrieve("INVOICE_ID")}
  2. Look for the subscription

Expected Result

Find the subscription_id for the invoice somewhere.

Actual Result

It's not found anywhere. Also look at invoice.lines, it's not in the line items either.

I need this to work to process subscription renewal webhooks. I'm processing invoice.payment_succeeded to know when a subscription has been renewed, so I can recharge it. But the subscription_id is not found in the Stripe event, even when Stripe is sending it in the payload.

I'm on Stripe version 2025-11-17.clover;managed_payments_preview=v1

As a workaround, when I receive this webhook I request the API myself to get the invoice and I get the subscription_id from there, but it would be great to have this using just StripityStripe :)

Let me know if I can provide more information to debug this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions