Skip to content

Commit

Permalink
chore: move Stripe webhook handling to a single endpoint with dedicat…
Browse files Browse the repository at this point in the history
…ed signing secret (#14394)
  • Loading branch information
pmossman committed Oct 17, 2024
1 parent a917da8 commit 3e8e204
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions airbyte-api/server-api/src/main/openapi/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4607,13 +4607,13 @@ paths:
application/json:
schema:
$ref: "#/components/schemas/CustomerPortalRead"
/v1/billing/complete_checkout_session:
/v1/billing/handle_webhook:
post:
summary: Complete a checkout session
summary: Handle an external billing event (ie a webhook from an external payment provider service)
tags:
- billing
- cloud-only
operationId: completeCheckoutSession
operationId: handleWebhook
requestBody:
content:
application/json:
Expand All @@ -4626,7 +4626,7 @@ paths:
description: Invalid payload
"401":
description: Invalid signature
# This route is unsecured as it accepts webhook events from Stripe, which are validated by their signature.
# This route is unsecured as it accepts webhook events from an external service, which are validated by their signature.
security: []

/v1/billing/list_invoices:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ open class BillingController : BillingApi {
@Body organizationIdRequestBody: OrganizationIdRequestBody,
): OrganizationBalanceRead = throw ApiNotImplementedInOssProblem()

@Post("/complete_checkout_session")
@Post("/handle_webhook")
@ExecuteOn(AirbyteTaskExecutors.WEBHOOK)
override fun completeCheckoutSession(
override fun handleWebhook(
@Body event: JsonNode,
): Unit = throw ApiNotImplementedInOssProblem()

Expand Down

0 comments on commit 3e8e204

Please sign in to comment.