Browse

signature_invalid error

signature_invalid is returned with HTTP 400. Retryable: no. Sending the same request again returns the same error. Nothing is charged for this error.

What it means

The request signature is missing or does not match.

Most likely cause

Only the Stripe webhook endpoint returns this. The request has no Stripe-Signature header, or the signature was made with a different signing secret or over a body that changed on the way.

How to fix it

Sign the exact raw request body with the signing secret this server was given and send the signature header.

Example

Stripe signs its own deliveries; you never call this endpoint yourself. A request without a Stripe-Signature header is refused with HTTP 400 and nothing is recorded.

Terminal
curl -i -X POST https://YOUR_API_HOST/v1/billing/webhook -H "Content-Type: application/json" -d '{}'

An error response is one JSON envelope. Branch on code, never on the message text. The message and fix of a real response can be more specific than the defaults shown here.

{
  "error": {
    "code": "signature_invalid",
    "message": "The request signature is missing or does not match.",
    "fix": "Sign the exact raw request body with the signing secret this server was given and send the signature header.",
    "docs_url": "https://lookvalid.com/docs/errors/signature_invalid",
    "retryable": false,
    "request_id": "req_3fK9pQ2xVb7LmN4sTz8WcA"
  }
}

See also