Finance

Stripe Webhook Event JSON Example

A real-world JSON example of a Stripe webhook event payload — the event envelope wrapping a payment_intent.succeeded object. Copy-ready for building and testing payment webhook handlers.

{
  "id": "evt_1PxQ2rKZ9mVnL8gT3sYh4jN",
  "object": "event",
  "api_version": "2024-06-20",
  "created": 1752134100,
  "type": "payment_intent.succeeded",
  "livemode": false,
  "pending_webhooks": 1,
  "request": {
    "id": "req_9mKzQ2vXpL",
    "idempotency_key": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d"
  },
  "data": {
    "object": {
      "id": "pi_3PxQ2rKZ9mVnL8gT1a2B3c4D",
      "object": "payment_intent",
      "amount": 12999,
      "currency": "usd",
      "status": "succeeded",
      "customer": "cus_QzXpL9mNvK2w",
      "payment_method": "pm_1PxQ2rKZ9mVnL8gT6h7I8j9K",
      "receipt_email": "ravi.mehta@example.com",
      "metadata": {
        "orderId": "ord_29fk3jd93kd"
      }
    }
  }
}

Field Reference

idrequiredstringUnique identifier for this specific event delivery, with evt_ prefix — use to deduplicate retried deliveries
typerequiredstringDot-namespaced event type, e.g. payment_intent.succeeded, charge.refunded, customer.subscription.deleted
livemoderequiredbooleanfalse for test-mode events, true for real production payments — always branch on this in handlers
data.objectrequiredobjectThe actual Stripe resource (a PaymentIntent, Charge, Subscription, etc.) that triggered the event, shaped exactly like the corresponding API resource
request.idempotency_keyoptionalstring | nullThe idempotency key of the API request that triggered this event, if any — null for events not caused by a direct API call
pending_webhooksrequirednumberCount of webhook endpoints still queued to receive this event

Variants

charge.refundedA different event type on the same envelope shape — note only data.object and type change.
{
  "id": "evt_1PyR3sLA0nWoM9hU4tZi5kO",
  "object": "event",
  "created": 1752137700,
  "type": "charge.refunded",
  "livemode": false,
  "data": {
    "object": {
      "id": "ch_3PxQ2rKZ9mVnL8gT2b3C4d5E",
      "object": "charge",
      "amount": 12999,
      "amount_refunded": 12999,
      "currency": "usd",
      "refunded": true,
      "payment_intent": "pi_3PxQ2rKZ9mVnL8gT1a2B3c4D"
    }
  }
}

Common Use Cases

  • Building and testing a /webhooks/stripe endpoint before going live
  • Writing idempotent webhook handlers that dedupe on event id
  • Reconciling internal order status with Stripe payment_intent.succeeded / .payment_failed events
stripewebhookpaymentseventpayment_intent

Validate or format this JSON

One click loads this exact example into the tool — no copy-paste needed. Format it, validate it, explore the tree, or generate TypeScript types instantly.

Frequently Asked Questions

The envelope (id, type, created, livemode) gives every event a consistent shape regardless of what changed, so a single webhook endpoint can route on event.type and verify event.id for deduplication without needing type-specific parsing logic first.

Stripe signs every webhook request with a Stripe-Signature header computed from your endpoint's signing secret. Verify it server-side (Stripe's SDKs provide a constructEvent helper) before trusting the payload — never process an unverified webhook body.

Yes — Stripe uses at-least-once delivery and will retry on timeout or non-2xx response. Always make webhook handlers idempotent by checking event.id against previously processed events before applying side effects like fulfilling an order twice.

Related JSON Examples