Skip to content

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

Merged
xabg2 merged 5 commits into
masterfrom
feature/cancellation-flow-for-users-outside-refund-period
Jul 14, 2026
Merged

[PB-6371]: feature/expose endpoint for cancellation flow for users outside refund period#387
xabg2 merged 5 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

Copy link
Copy Markdown

@xabg2
xabg2 requested a review from sg-gs July 14, 2026 10:29
@xabg2
xabg2 merged commit f4c76c3 into master Jul 14, 2026
10 of 11 checks passed
@xabg2
xabg2 deleted the feature/cancellation-flow-for-users-outside-refund-period branch July 14, 2026 10:35
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