Skip to content

Commit 1f20ab0

Browse files
Andrew McKnightAndrew McKnight
authored andcommitted
feat(billing-platform): add InvoicerService.HandlePaymentMethodDetached endpoint
Adds the proto definitions used by the Stripe payment_method.detached webhook to delegate to the billing platform. The request carries the Stripe payment-method id and customer id (which Stripe may omit on the detached object itself and supply only via `previous_attributes`); the response signals whether the billing platform owned and processed the event. Refs REVENG-116
1 parent c677af0 commit 1f20ab0

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
syntax = "proto3";
2+
3+
package sentry_protos.billing.v1.services.invoicer.v1;
4+
5+
// Request to react to a Stripe `payment_method.detached` webhook event
6+
// for a customer whose billing is owned by the platform.
7+
message HandlePaymentMethodDetachedRequest {
8+
// Stripe id of the payment method (e.g. "pm_xxx").
9+
string stripe_payment_method_id = 1;
10+
// Stripe id of the customer the payment method was attached to
11+
// (e.g. "cus_xxx"). May come from `previous_attributes` since Stripe
12+
// omits `customer` on the detached object itself.
13+
string stripe_customer_id = 2;
14+
}
15+
16+
message HandlePaymentMethodDetachedResponse {
17+
// True when the organization's billing is owned by the platform and
18+
// the service has finished its handling.
19+
bool handled = 1;
20+
}

0 commit comments

Comments
 (0)