Skip to content

[BUG] subscriptions api does not report expiration date properly #32

@tz-lom

Description

@tz-lom

Bug Description

Subscriptions API reports null in expires_at if auto renew is disabled

Steps to Reproduce

Have active VPS without auto renew
Call API /api/billing/v1/subscriptions

Expected Behavior

[
    {
        "id": "?????",
        "name": "KVM 4",
        "status": "active",
        "billing_period": 1,
        "billing_period_unit": "month",
        "currency_code": "USD",
        "total_price": 2999,
        "renewal_price": 2999,
        "is_auto_renewed": false,
        "created_at": "2025-?????",
        "expires_at": "?????????",  <- date is expected
        "next_billing_at": null
    }
]

Actual Behavior

[
    {
        "id": "?????",
        "name": "KVM 4",
        "status": "active",
        "billing_period": 1,
        "billing_period_unit": "month",
        "currency_code": "USD",
        "total_price": 2999,
        "renewal_price": 2999,
        "is_auto_renewed": false,
        "created_at": "2025-?????",
        "expires_at": null,  <- this is the problem
        "next_billing_at": null
    }
]

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions