From 9739b351e60024c2c1e5500f606d61beebacae06 Mon Sep 17 00:00:00 2001 From: Kush <3647166+kushsharma@users.noreply.github.com> Date: Sun, 19 May 2024 19:19:53 +0530 Subject: [PATCH] feat(frontier): accept stripe billing webhook (#358) Signed-off-by: Kush Sharma --- raystack/frontier/v1beta1/frontier.proto | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/raystack/frontier/v1beta1/frontier.proto b/raystack/frontier/v1beta1/frontier.proto index 3b550f6e..d8de24ed 100644 --- a/raystack/frontier/v1beta1/frontier.proto +++ b/raystack/frontier/v1beta1/frontier.proto @@ -1750,6 +1750,19 @@ service FrontierService { description: "Get the upcoming invoice of a billing account."; }; } + + // Incoming Webhooks + rpc BillingWebhookCallback(BillingWebhookCallbackRequest) returns (BillingWebhookCallbackResponse) { + option (google.api.http) = { + post: "/v1beta1/billing/webhooks/callback/{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."; + }; + } } // Billing @@ -3689,3 +3702,10 @@ message ListCurrentUserPreferencesRequest {} message ListCurrentUserPreferencesResponse { repeated Preference preferences = 1; } + +message BillingWebhookCallbackRequest { + string provider = 1 [(validate.rules).string = {min_len: 1}]; + bytes body = 2; +} + +message BillingWebhookCallbackResponse {} \ No newline at end of file