Skip to content
Sign in Create account

Stripe webhook event receiver

POST /api/webhooks/stripe

Accepts a Stripe event using the raw request body and required Stripe-Signature header. The signature is verified before handling; invalid signatures or malformed events return 400, successful and duplicate deliveries are acknowledged with 200, and processing failures return 500 so Stripe can retry. The route is limited to 120 requests per minute.

This operation needs no authentication.

Parameters

  • Stripe-Signature string header required

Request body

application/json object

Stripe event object; accepted fields depend on the event type and are verified against Stripe-Signature.

Responses

200 Event handled or duplicate event acknowledged.

400 Signature verification or event parsing failed.

application/json GenericError

  • error any

    One of

    • string
    • object

      Any keys are accepted.

  • error_code string
  • code string
  • message string
  • detail string
  • status any

    One of

    • string
    • integer
  • errors object

    Any keys are accepted.

429 Route rate limit exceeded.

application/json GenericError

  • error any

    One of

    • string
    • object

      Any keys are accepted.

  • error_code string
  • code string
  • message string
  • detail string
  • status any

    One of

    • string
    • integer
  • errors object

    Any keys are accepted.

text/html string

500 Event could not be recorded or handled; Stripe may retry.

application/json GenericError

  • error any

    One of

    • string
    • object

      Any keys are accepted.

  • error_code string
  • code string
  • message string
  • detail string
  • status any

    One of

    • string
    • integer
  • errors object

    Any keys are accepted.