Repository navigation
fix(aws-marketplace): cancel a Stripe subscription that binds to a customer AWS Marketplace already bills #9973
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -184,6 +184,14 @@ New agreement: ${notice.agreementId}`, | |
| Event detail: ${notice.detail}`, | ||
| next: 'Review the agreement in the AWS Marketplace Management Portal.', | ||
| } | ||
| case 'stripe-cancelled': | ||
| return { | ||
| subject: `Stripe subscription cancelled: ${account}`, | ||
| opening: `A Stripe checkout completed for a customer AWS Marketplace already bills, so Sim cancelled the Stripe subscription at once. | ||
| Sim subscription: ${notice.subscriptionId} | ||
| Stripe subscription: ${notice.stripeSubscriptionId}`, | ||
| next: 'Refund the Stripe charge: from the admin dashboard for an organization, in Stripe for a personal plan. Cancelling credits only the unused time to the Stripe balance. Keep the customer on the AWS Marketplace terms below.', | ||
|
Comment on lines
+189
to
+193
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The team notice says Sim already cancelled the Stripe subscription, but it is queued alongside the cancellation request, not after it succeeds. The outbox handles these events separately, so support can receive the email while cancellation is still retrying or has failed. They could refund a subscription that continues to renew. Say cancellation was requested and ask support to check its result, or send the success notice only after Stripe confirms cancellation. |
||
| } | ||
| } | ||
| } | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P2: This copy says the cancellation already happened, but it is only queued. The Stripe cancel runs as a separate outbox event that can be retried or fail, and this notice can be sent before it. Say it was queued in the subject and opening, e.g. 'Stripe cancellation queued', so staff do not refund while the subscription is still live.
Prompt for AI agents