Documentation Index
Fetch the complete documentation index at: https://mintlify.com/KingPsychopath/oooc-fete-finder/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Webhook endpoints receive and process events from external services. These endpoints verify payload signatures to ensure authenticity and security.Stripe webhook
Receive and process Stripe events such as payment confirmations, subscription updates, and other partner-related notifications.Endpoint
Path:/api/webhooks/stripe
Method: POST
Headers:
Webhook signature generated by Stripe for payload verification.This header is automatically added by Stripe when sending webhook events.
Must be
application/jsonRequest
The request body should be the raw Stripe event payload as JSON.
Response
Indicates whether the webhook was processed successfully.
Whether the event type was recognized and handled.
Whether data was inserted into the database as a result of processing.
Error responses
Status codes
| Code | Description |
|---|---|
| 200 | Webhook processed successfully |
| 400 | Invalid signature verification |
| 500 | Internal error processing webhook |
| 503 | STRIPE_WEBHOOK_SECRET not configured |
Authentication
Signature verification
The Stripe webhook endpoint uses signature verification to ensure requests are authentic:- Stripe signs each webhook with your
STRIPE_WEBHOOK_SECRET - The signature is sent in the
stripe-signatureheader - The endpoint verifies the signature before processing the payload
- Invalid signatures are rejected with a
400 Bad Requestresponse
Configuration
Environment variables
Secret key provided by Stripe for webhook signature verification.Find this in your Stripe Dashboard under Developers > Webhooks.
Setting up webhooks in Stripe
- Go to your Stripe Dashboard
- Navigate to Developers > Webhooks
- Click “Add endpoint”
- Enter your endpoint URL:
https://your-domain.com/api/webhooks/stripe - Select the events you want to receive
- Copy the signing secret and set it as
STRIPE_WEBHOOK_SECRET
Implementation details
The webhook handler:- Retrieves the webhook secret from
STRIPE_WEBHOOK_SECRET - Reads the raw request body and
stripe-signatureheader - Verifies the signature using Stripe’s verification method
- Processes the validated payload
- Returns processing results
app/api/webhooks/stripe/route.ts:10