Skip to main content
POST
/
billing
/
webhook
Stripe webhook
curl --request POST \
  --url https://api.comparebench.com/billing/webhook \
  --header 'Content-Type: application/json' \
  --header 'Stripe-Signature: <stripe-signature>' \
  --data '
{
  "id": "evt_1OqXYZ...",
  "type": "checkout.session.completed",
  "data": {
    "object": {}
  }
}
'
{}
Receives Stripe webhook events. This endpoint is called by Stripe — you do not call it directly. The Stripe-Signature header is added automatically by Stripe and is used to verify the payload. Requests without a valid signature return 400. Handled events:
EventAction
checkout.session.completedFulfills one-time purchases (enthusiast tier)
customer.subscription.updatedSyncs subscription tier changes
customer.subscription.deletedDowngrades to the highest remaining one-time purchase tier, or free
To test webhooks locally, use the Stripe CLI:
stripe listen --forward-to localhost:8181/billing/webhook

Headers

Stripe-Signature
string
required

Webhook signature from Stripe — used to verify the payload

Body

application/json

Standard Stripe event object. See Stripe docs for the full shape.

id
string
Example:

"evt_1OqXYZ..."

type
string

Event type

Example:

"checkout.session.completed"

data
object

Response

Event processed

The response is of type object.