Skip to content

chore(billing): Created recurring credit and message protos(REVENG-251)#330

Open
krithikravi wants to merge 1 commit into
mainfrom
krithikravi/recurring-credit-protos
Open

chore(billing): Created recurring credit and message protos(REVENG-251)#330
krithikravi wants to merge 1 commit into
mainfrom
krithikravi/recurring-credit-protos

Conversation

@krithikravi

Copy link
Copy Markdown
Member

https://linear.app/getsentry/issue/REVENG-251/define-protobufs-for-recurring-credits

This PR defines the shape of a recurring credit, as well as endpoints to get, create, and cancel recurring credits. Cancellation is currently not supported in the legacy code, but it seems like a logical extension to add as part of this ticket.

@krithikravi krithikravi requested a review from a team as a code owner June 25, 2026 19:07
@linear-code

linear-code Bot commented Jun 25, 2026

Copy link
Copy Markdown

REVENG-251

@github-actions

Copy link
Copy Markdown

The latest Buf updates on your PR. Results from workflow ci / buf-checks (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedJun 25, 2026, 7:08 PM

Comment on lines +8 to +14
message GetActiveRecurringCreditsRequest {
uint64 organization_id = 1;
// Returns all recurring credits active at any point within
// [start_date, end_date], inclusive.
sentry_protos.billing.v1.Date start_date = 2;
sentry_protos.billing.v1.Date end_date = 3;
}

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.

let's have 2 endpoints. one for units and another for monetary recurring credits

}

// A recurring gift or discount granted to an organization.
message RecurringCredit {

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.

Suggested change
message RecurringCredit {
message RecurringCreditEntry {

It's a mix of RecurringCredit and RecurringCreditEntry models, but I think it makes more sense to call it RecurringCreditEntry for our purposes right now.

// Amount granted for the billing period. Interpretation depends on type:
// UNITS -> unit quantity (billable metric base units), CENTS -> cents,
// DISCOUNT_PERCENT -> whole percent.
int64 amount = 4;

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.

Suggested change
int64 amount = 4;
uint64 amount = 4;

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants