Tearleads

POST/billing/stripe/webhook

Receive a Stripe webhook

Operation billing.stripe.webhook.receive

Description

Receives Stripe events and, for paid invoices, records the subscription binding for the organization and links it to RevenueCat. The caller is Stripe, authenticated by the Stripe-Signature header over the exact raw body rather than by a session. The server re-fetches the subscription from Stripe instead of trusting the event body.

Authentication

No session is required.

Parameters

NameInTypeDetails
stripe-signatureheaderstringoptional

Request body

application/jsonobject with any fields

Responses

200 OK

application/jsonStripeWebhookResponse

Acknowledges a Stripe delivery.

2 fields
  • receivedbooleanrequired
    • always true
  • outcomestringrequired
    • one of associated, ignored, reconciled

    associated when a first paid invoice bound the subscription, reconciled when a renewal refreshed it, ignored otherwise.

Other fields are allowed.

Other responses

StatusMeaningBody
401Unauthorized

application/jsonErrorResponse

500Internal Server Error

application/jsonErrorResponse

503Service Unavailable

application/jsonErrorResponse

Additional rules

The server also enforces these rules, which the schema above cannot express.

  • Stripe-Signature must authenticate the exact raw request body within the replay tolerance.