Promptwatch Logo

Stripe Webhooks

Stripe's webhook service that delivers real-time event notifications for payment processing and account updates.
Stripe
Webhook

What is Stripe Webhooks?

Stripe Webhooks delivers account events to a registered HTTPS endpoint. The endpoint subscribes to chosen event types, and Stripe sends each matching event as a JSON Event object in an HTTP POST. A receiver might use payment_intent.succeeded to complete an order or invoice.paid to update a subscription ledger.

Every endpoint has its own signing secret, commonly identified by the whsec_ prefix. Stripe puts a timestamp and signatures in Stripe-Signature. Its libraries verify the delivery by passing the raw UTF-8 body, that header, and the endpoint secret to constructEvent(). A body parser that changes whitespace or JSON ordering will break this check.

Stripe asks endpoints to return a 2xx response before starting slow work. In live mode, it retries unsuccessful delivery for up to three days with exponential backoff. Sandbox events are retried three times over a few hours. Events can arrive more than once or out of order, and every retry receives a new signature and timestamp even though the Event ID remains the right key for deduplication.

A Stripe webhook reports an event from a Stripe account. It does not fetch website content, influence AI citations, or place pages in a model-training dataset. robots.txt applies to crawlers requesting site paths, not to an HTTPS callback configured by the account owner.

Not relevant for AI search

Is Stripe Webhooks relevant for AI search?

No. Stripe Webhooks is not part of AI search or training, so allowing or blocking it does not change your AI visibility.

Stripe Webhooks is not a crawler. It delivers webhook notifications to endpoints you registered, so it never fetches public content for an AI product. Robots.txt does not apply, and allowing or blocking it has no effect on AI search or training.

How to handle Stripe Webhooks

Retrieve the signing secret for this exact endpoint and keep it separate from Stripe API credentials. Preserve the raw body on the webhook route, read Stripe-Signature, and let the Stripe library construct the event. Reject a request that fails verification before using any object in its payload.

Write the Event ID to durable storage and queue the business operation before returning a prompt 2xx response. An already processed ID should receive another successful acknowledgment without repeating the operation. Do not make one event handler depend on another event arriving first; fetch the current Stripe object when the local state is missing required context.

Use the Event deliveries view to inspect failures and scheduled retries. Disable or remove the event destination if it is no longer used. robots.txt cannot secure the route or unsubscribe it from Stripe.

Examples

  • Stripe sends `payment_intent.succeeded` to a checkout endpoint. The handler verifies `Stripe-Signature`, stores the Event ID, returns 200, and completes fulfillment from a queue.
  • An `invoice.paid` event is delivered twice. The second request has a fresh signature, but the same Event ID causes the ledger handler to skip a duplicate credit.
  • A subscription update arrives before an invoice event that the application expected first. The receiver reads the referenced Stripe object instead of failing on delivery order.

Frequently asked questions about Stripe Webhooks

Learn about AI visibility monitoring and how Promptwatch helps your brand succeed in AI search.

Stripe sends an HTTP POST containing a JSON Event object for an event type selected in that endpoint's configuration.

Be the brand AI recommends

Monitor your brand's visibility across ChatGPT, Claude, Perplexity, and Gemini. Get actionable insights and create content that gets cited by AI search engines.

Promptwatch Dashboard