Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
83023b0
feat(billing-platform): add refund types + record_charge_refunds endp…
Jun 11, 2026
d0a9bc5
chore: Regenerate Rust bindings
getsantry[bot] Jun 11, 2026
66c0bbb
review(billing-platform): embed refunds in PlatformCharge; drop charg…
Jun 11, 2026
8b895f1
feat(billing-platform): add ChargeService.list_refunds_by_invoice end…
Jun 11, 2026
a7befc8
Merge CI-regenerated Rust bindings into review branch
Jun 11, 2026
41ad2fc
review(billing-platform): rename PlatformRefund.amount to amount_cents
Jun 11, 2026
53dbb75
chore: Regenerate Rust bindings
getsantry[bot] Jun 11, 2026
67ce9cf
review(billing-platform): drop refund-aggregate cache from PlatformCh…
Jun 11, 2026
1175608
chore: Regenerate Rust bindings
getsantry[bot] Jun 11, 2026
7fce3ec
review(billing-platform): mark refunded/amount_refunded deprecated in…
Jun 12, 2026
cd1df86
Merge remote-tracking branch 'origin/andrewmcknight/reveng-157-protos…
Jun 12, 2026
3124187
Merge branch 'andrewmcknight/reveng-157-protos-record-charge-refunds'…
Jun 12, 2026
ef99c2f
chore: Regenerate Rust bindings
getsantry[bot] Jun 12, 2026
fcf53dd
Merge branch 'main' into andrewmcknight/reveng-157-protos-list-refund…
Jun 12, 2026
c64a189
Merge remote-tracking branch 'origin/andrewmcknight/reveng-157-protos…
Jun 12, 2026
ebbf15c
chore: Regenerate Rust bindings
getsantry[bot] Jun 12, 2026
d354e2d
review(billing-platform): add stripe_charge_id back-reference to Plat…
Jun 12, 2026
5136cb8
Merge remote-tracking branch 'origin/andrewmcknight/reveng-157-protos…
Jun 12, 2026
e8cd9f1
chore: Regenerate Rust bindings
getsantry[bot] Jun 12, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,9 @@ message PlatformRefund {
optional string reason = 4;
// Unix epoch seconds when the refund was recorded by the platform.
int64 date_added_st = 5;
// Stripe id of the ``PlatformCharge`` this refund applies to. Mirrors
// Stripe's own ``refund.charge`` wire field. Lets callers disambiguate
// refunds in flat responses like ``ListRefundsByInvoiceResponse`` when
// an invoice has more than one charge (e.g. retries, partial capture).
Comment thread
armcknight marked this conversation as resolved.
string stripe_charge_id = 6;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
syntax = "proto3";

package sentry_protos.billing.v1.services.charge.v1;

import "sentry_protos/billing/v1/services/charge/v1/charge.proto";

// Lists every recorded refund associated with the charges for a single
// platform invoice. Callers in the presentation layer use this to render
// invoice-level refund state without crossing the charge service boundary.
message ListRefundsByInvoiceRequest {
uint64 invoice_id = 1;
}

message ListRefundsByInvoiceResponse {
// Refunds ordered by ``date_added_st`` ascending. Empty when the invoice
// has no refunds.
repeated PlatformRefund refunds = 1;
}
Comment thread
sentry[bot] marked this conversation as resolved.
21 changes: 21 additions & 0 deletions rust/src/sentry_protos.billing.v1.services.charge.v1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ pub struct PlatformRefund {
/// Unix epoch seconds when the refund was recorded by the platform.
#[prost(int64, tag = "5")]
pub date_added_st: i64,
/// Stripe id of the `PlatformCharge` this refund applies to. Mirrors
/// Stripe's own `refund.charge` wire field. Lets callers disambiguate
/// refunds in flat responses like `ListRefundsByInvoiceResponse` when
/// an invoice has more than one charge (e.g. retries, partial capture).
#[prost(string, tag = "6")]
pub stripe_charge_id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CaptureChargeRequest {
Expand Down Expand Up @@ -162,6 +168,21 @@ pub struct ListChargesForInvoiceResponse {
#[prost(message, repeated, tag = "1")]
pub charges: ::prost::alloc::vec::Vec<Charge>,
}
/// Lists every recorded refund associated with the charges for a single
/// platform invoice. Callers in the presentation layer use this to render
/// invoice-level refund state without crossing the charge service boundary.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListRefundsByInvoiceRequest {
#[prost(uint64, tag = "1")]
pub invoice_id: u64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListRefundsByInvoiceResponse {
/// Refunds ordered by `date_added_st` ascending. Empty when the invoice
/// has no refunds.
#[prost(message, repeated, tag = "1")]
pub refunds: ::prost::alloc::vec::Vec<PlatformRefund>,
}
/// Records platform refunds for a Stripe charge from a webhook payload.
/// Mirrors the contents of `stripe_charge.refunds` as `PlatformRefund`
/// rows idempotently keyed by Stripe refund id, and syncs the aggregate
Expand Down
Loading