Repository navigation
feat(billing): Add ApplySponsorship checkout endpoint - #479
Draft
sentry-junior[bot] wants to merge 4 commits into
Draft
sentry-junior[bot] wants to merge 4 commits into
sentry-junior[bot] wants to merge 4 commits into
Conversation
Sponsoring a contract on the billing platform had no service method, so getsentry orchestrated it outside the platform with an unwrapped invoicer call. ApplySponsorship moves a contract onto the package a sponsorship grants in a new term. The package catalog now names the package each sponsored type grants, so checkout does not hard-code package uids, and BillContractChange documents that a credit larger than the invoice's charges carries onto the new contract's balance. Refs REVENG-663 Co-Authored-By: Steve Konves <steve.konves@sentry.io>
|
The latest Buf updates on your PR. Results from workflow ci / buf-checks (pull_request).
|
skonves
reviewed
Oct 23, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The billing platform had no service method for sponsoring a contract. Sponsorships for orgs migrated to the platform (Education activation,
_adminsponsoring) were orchestrated in getsentry outside the platform, using an invoicer method with no proto behind it. This adds the interface so it can be a realCheckoutServicemethod.checkout/v1/endpoint_apply_sponsorship.proto(new):ApplySponsorshipRequest { organization_id, sponsored_type }→ApplySponsorshipResponse { invoice_id }. Moves the contract onto the package the sponsorship grants, now, in a new term, and clears paid-plan reservations, caps, and activations. A sponsorship that ends with its term (Education) also stages the free downgrade, likeCancelContract. Partner-billed contracts are refused.PackageCatalog.sponsored_packages(new field 4,SponsoredPackageOption { sponsored_type, package_uid }): the catalog names which package each sponsored type grants, next tofree_package_uid. That way checkout reads the mapping fromPackageServiceand doesn't hard-code package uids. Fly.io and Nintendo have no entry because their partners provision them.BillContractChangeRequest: comment only. It now says that when the credit for unused time is larger than the invoice's charges, the surplus goes onto the new contract's balance instead of being forgiven. Moving onto a $0 sponsored package is the first caller that reaches this case.All changes are additive, so the wire format stays compatible.
Consumer: getsentry/getsentry#22711. It needs this released and sentry's
sentry-protospin bumped before its CI can pass.Refs REVENG-663
via Steve Konves.
--
View Junior Session in Sentry