From 5453a6357f113ab8af2b5b37905643df0e77272f Mon Sep 17 00:00:00 2001 From: Kush Sharma Date: Mon, 13 May 2024 10:13:33 +0530 Subject: [PATCH] feat(frontier): accept stripe billing webhook Signed-off-by: Kush Sharma --- raystack/frontier/v1beta1/admin.proto | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/raystack/frontier/v1beta1/admin.proto b/raystack/frontier/v1beta1/admin.proto index 0501b91f..dcc88f92 100644 --- a/raystack/frontier/v1beta1/admin.proto +++ b/raystack/frontier/v1beta1/admin.proto @@ -337,6 +337,19 @@ service AdminService { }; } + // Incoming Webhooks + rpc AcceptBillingWebhook(AcceptBillingWebhookRequest) returns (AcceptBillingWebhookResponse) { + option (google.api.http) = { + post: "/v1beta1/admin/billing/webhook/{provider}", + body: "body" + }; + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { + tags: "Webhook"; + summary: "Accept Billing webhook"; + description: "Accepts a Billing webhook and processes it."; + }; + } + // Usage rpc RevertBillingUsage(RevertBillingUsageRequest) returns (RevertBillingUsageResponse) { option (google.api.http) = { @@ -711,3 +724,10 @@ message ListWebhooksRequest {} message ListWebhooksResponse { repeated Webhook webhooks = 1; } + +message AcceptBillingWebhookRequest { + string provider = 1 [(validate.rules).string = {min_len: 1}]; + google.protobuf.Struct body = 2; +} + +message AcceptBillingWebhookResponse {} \ No newline at end of file