Skip to content

cancel_at_cycle_end: true ignored — subscription cancel is not working #452

@kishan79

Description

@kishan79

Steps to reproduce the behavior

When calling:

razorpay.subscriptions.cancel(subId, { cancel_at_cycle_end: true });

The subscription is not canceled at the end of the billing cycle. The API response shows:

"has_scheduled_changes": false,
"change_scheduled_at": null

even though the cancel_at_cycle_end parameter was provided.

Impact:

This makes it impossible to show a "cancels at end of period" message in the UI or honor user intent, forcing developers to implement unreliable workarounds.

Expected behavior

According to the official docs, passing cancel_at_cycle_end: true should:

Schedule cancellation at the end of the current cycle

Return:

"has_scheduled_changes": true,
"change_scheduled_at": "cycle_end",
"current_end": [timestamp]

Impact:

This makes it impossible to show a "cancels at end of period" message in the UI or honor user intent, forcing developers to implement unreliable workarounds.

Actual behavior

When calling:

razorpay.subscriptions.cancel(subId, { cancel_at_cycle_end: true });

The subscription is not canceled at the end of the billing cycle. The API response shows:

"has_scheduled_changes": false,
"change_scheduled_at": null

even though the cancel_at_cycle_end parameter was provided.

Impact:

This makes it impossible to show a "cancels at end of period" message in the UI or honor user intent, forcing developers to implement unreliable workarounds.

Code snippets

Node version

v23.11.0

Library version

^2.9.6

Additional Information

Impact:

This makes it impossible to show a "cancels at end of period" message in the UI or honor user intent, forcing developers to implement unreliable workarounds.

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