Stripe Webhook
POST
/api/v1/webhooks/stripe
const url = 'https://example.com/api/v1/webhooks/stripe';const options = {method: 'POST'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/v1/webhooks/stripeHandle Stripe webhook events with idempotency.
Two-phase flow: run the handler FIRST, then persist the WebhookEvent row on success. If the handler fails, rollback the session (so no event row persists) and return 500 — Stripe will retry and the handler will re-run on the next delivery.
Responses
Section titled “ Responses ”Successful Response
Media type application/json
Response Stripe Webhook Api V1 Webhooks Stripe Post
object
key
additional properties
string
Example generated
{ "additionalProperty": "example"}