---
search:
  tags:
    - Billing
    - POST
seo:
  description: >-
    Receives Stripe webhook events (customer.subscription.updated,… Reference
    for the POST /billing/webhooks/stripe endpoint in the Sarvex V1 API.
sidebar:
  label: Stripe webhook receiver
  badge: POST
title: Stripe webhook receiver
type: openapi-operation
---
Receives Stripe webhook events (customer.subscription.updated,
customer.subscription.deleted — covers both Portal-driven and
API-driven subscription changes) and syncs subscription state into
the billing record. Verified via the Stripe-Signature header against
a Stripe-issued signing secret — not part of the console's
bearer-JWT or connector HMAC auth models.

`POST /billing/webhooks/stripe`

**Request body** (`application/json`, required)

Request body example:

```json
{}
```

**Responses**

- `200` — Event processed (or ignored, if not a handled type).
- `400` — Request body failed validation.
- `401` — Missing or invalid credentials.

Response example, 400:

```json
{
  "error": {
    "code": "validation_error",
    "message": "One or more fields are invalid.",
    "details": {
      "fields": {
        "email": "must be a valid email address"
      }
    }
  }
}
```

Response example, 401:

```json
{
  "error": {
    "code": "unauthorized",
    "message": "Authentication required.",
    "details": null
  }
}
```
