Skip to content
SarvexDocs
Esc
↑↓navigate↵open⌘Jpreview

Stripe webhook receiver

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
Authorization
Stripe-SignatureAPI key · headerrequired

Stripe's own webhook signature scheme (timestamp + HMAC-SHA256 over the raw body, keyed by the Stripe-issued webhook signing secret). Verified via the Stripe SDK, not Sarvex's connector HMAC scheme.

Request body
requiredapplication/json
object
Responses
200

Event processed (or ignored, if not a handled type).

400

Request body failed validation.

errorobjectrequired
Show properties
codestringrequired
messagestringrequired
detailsobject | null
401

Missing or invalid credentials.

errorobjectrequired
Show properties
codestringrequired
messagestringrequired
detailsobject | null
Try it
Server
Authorization
Bodyapplication/json
Request
curl -X POST "https://api.sarvex.example.com/v1/billing/webhooks/stripe" \
  -H "Stripe-Signature: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
Response
Event processed (or ignored, if not a handled type).