Handle Stripe Webhook
Stripe Webhooks
Stripe Webhook Handler
Receive and process webhook events from Stripe
POST
Handle Stripe Webhook
Receive and process webhook events from Stripe. This endpoint should be configured in your Stripe Dashboard to receive events for checkout completions, subscription changes, and payment updates.Documentation Index
Fetch the complete documentation index at: https://devkit4ai.com/docs/llms.txt
Use this file to discover all available pages before exploring further.
Authentication
Path Parameters
The unique identifier of the project
Webhook mode:
test or liveHeaders
Stripe signature header for webhook verification
Request Body
Stripe sends event payloads as JSON. The body contains the event object with type and data.Response
Returns200 OK on successful processing.
Webhook URL Format
| Mode | Description |
|---|---|
test | For test mode webhooks (development) |
live | For live mode webhooks (production) |
Supported Events
The Cloud API processes these Stripe events:| Event | Action |
|---|---|
checkout.session.completed | Creates subscription and customer records |
customer.subscription.created | Records new subscription |
customer.subscription.updated | Updates subscription status/plan |
customer.subscription.deleted | Marks subscription as canceled |
invoice.paid | Records successful payment |
invoice.payment_failed | Marks subscription as past_due |
Event Processing Flow
Webhook Verification
All webhooks are verified using the signing secret configured in your Stripe settings:Configuring Webhooks
Get Webhook URLs
Call Get Webhook URLs to get your project’s webhook endpoints.
Save Webhook Secret
Copy the signing secret and save it using Update Stripe Config.
Local Development
Use Stripe CLI to forward webhooks to your local development server:Event Payload Example
Error Responses
| Status | Description |
|---|---|
400 | Invalid signature or malformed payload |
404 | Project not found or Stripe not configured |
500 | Internal error processing event |
Retry Behavior
Stripe retries failed webhooks for up to 3 days with exponential backoff. Return200 OK quickly to acknowledge receipt - process data asynchronously if needed.
Related Pages
Get Webhook URLs
Get your webhook endpoint URLs
Update Stripe Config
Save webhook signing secret
List Project Subscriptions
View created subscriptions

