Skip to content

[PB-6371]: feature/expose endpoint for cancellation flow for users outside refund period#387

Open
xabg2 wants to merge 2 commits into
masterfrom
feature/cancellation-flow-for-users-outside-refund-period
Open

[PB-6371]: feature/expose endpoint for cancellation flow for users outside refund period#387
xabg2 wants to merge 2 commits into
masterfrom
feature/cancellation-flow-for-users-outside-refund-period

Conversation

@xabg2

@xabg2 xabg2 commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

Exposing the endpoint to allow the users to cancel the subscription at the moment by paying the 50% of the remaining amount.

We also handle the logic in the invoice.paid webhook event to cancel the subscription.

@xabg2 xabg2 self-assigned this Jul 9, 2026
@xabg2 xabg2 requested review from jzunigax2 and sg-gs as code owners July 9, 2026 08:27
@xabg2 xabg2 added the enhancement New feature or request label Jul 9, 2026
Comment thread src/services/payment.service.ts Outdated
}

await this.provider.subscriptions.cancel(subscriptionId, {});
await stripePaymentsAdapter.deleteSubscription(subscriptionId);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would keep the cancel wording, as the subscription status changes, the sub does not disappear

});

describe('Cancel early charge', () => {
test('When the user wants to cancel the usb early, then we charge the 50% of the remaining amount', async () => {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo here, usb instead of sub

@sonarqubecloud

sonarqubecloud Bot commented Jul 9, 2026

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request ready-for-preview

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants