Skip to content
All articles

Product guides

How to Set Up a Stripe Webhook for Checkout (Step by Step)

Step-by-step setup of the Provedly Stripe webhook so each completed Checkout Session becomes a notification marked Verified, with attribution and fixes.

Provedly team··6 min read

A "Verified purchase" mark in Provedly means one thing: the record arrived through a webhook whose signature Provedly checked against the secret you pasted in. For Stripe, that takes four steps and about five minutes, and it is available on every plan including Free. This walkthrough covers the setup, what Provedly reads from the event, how to get attribution, and what to check when events arrive but nothing is verified.

The four steps

Step 1: add a Stripe source in Provedly

Open the widget, go to the Data tab, and add a Stripe source. Provedly shows you the endpoint URL for this widget:

https://provedly.app/api/hooks/stripe/pp_your_token

Leave this tab open; you will come back for the secret.

Step 2: register the endpoint in Stripe

In the Stripe dashboard, go to Developers, then Webhooks, then Add endpoint. Paste the URL and select one event: checkout.session.completed. You do not need any other events. Adding more does no harm, but Provedly ignores them and it clutters your webhook logs.

If you use Stripe's CLI for local testing, the equivalent is:

stripe listen --events checkout.session.completed \
  --forward-to https://provedly.app/api/hooks/stripe/pp_your_token

For production, register the endpoint in the dashboard rather than relying on the CLI.

Step 3: paste the signing secret

Stripe shows a signing secret for the new endpoint, beginning whsec_. Copy it into the secret field of the Stripe source in Provedly and save. This is the whole basis of verification: Stripe signs each event with that secret, Provedly recomputes the signature, and an event that does not match is rejected. Without the secret, nothing is verified.

Step 4: send a test event

Use "Send test event" from the Stripe endpoint page. Within a few seconds the source in Provedly shows a "last event" timestamp. Test events from Stripe carry placeholder data, so the record may read oddly; delete it afterwards or let the lookback window age it out. The first real checkout produces a proper record.

What Provedly reads from the event

Field in the toast Taken from
Name customer details name on the session
City and country shipping address if present, otherwise billing
Product the first line item
Price the formatted total in the session currency
Time the event time

The name is then passed through your name format setting (the default shows "Sarah M.") and the location through your location format (default "Austin, US"). What Stripe sends you in full is not what visitors see. See Name and location formats: privacy by default.

If a session has no name because you did not collect one, the toast falls back to a generic subject. Collect names at checkout if you want named notifications; do not fabricate them afterwards.

Attribution: pass the visitor id

The dashboard counts proof-assisted orders, defined as a buyer who saw a notification before purchasing, matched by visitor id within 30 days. Stripe does not know the visitor id unless you tell it. When you create the Checkout Session on your server, include it as metadata:

// client: read the id before redirecting to checkout
const visitor = window.Provedly?.visitorId();

// server: create the session
const session = await stripe.checkout.sessions.create({
    mode: 'payment',
    line_items: [{ price: 'price_123', quantity: 1 }],
    success_url: 'https://example.com/thanks',
    cancel_url: 'https://example.com/cart',
    metadata: { provedly_visitor: visitor ?? '' },
});

Provedly reads metadata.provedly_visitor from the completed session and links the purchase to the visitor who saw the toast. No metadata, no attribution; the dashboard never estimates. On Shopify this is automatic, because the widget writes the visitor id to the cart as the attribute provedly_visitor.

What the visitor can check

Every verified toast links to the public verification page for the widget. It lists the connected sources (here, Stripe), the counts, the last verified purchase and the widget's honesty policy. A nightly SHA-256 root seals the history so a count cannot be quietly rewritten later. This is the part competitors generally do not have; as of October 2026, per their listings, most tools let a merchant type in whatever numbers they like with no page explaining where they came from. More on that in Why social proof needs a verification page.

Troubleshooting

Events arrive but records are not verified. Almost always the secret. Re-copy whsec_ from the exact endpoint you registered; each endpoint has its own secret, and a secret from a different endpoint or from the CLI will fail signature checks. Save, then send another test event.

No events arrive. Check the endpoint URL for a stray space and confirm checkout.session.completed is selected. Confirm the endpoint is in live mode if your store is live; test-mode endpoints only receive test-mode events.

Records arrive without a location. The session had no shipping or billing address. Enable address collection in Checkout if location matters to you, or set the location format to "none".

Duplicates. Stripe may retry delivery. Provedly deduplicates by event, so retries do not create duplicate records.

Payments through Payment Intents only. If you charge with Elements and Payment Intents rather than a hosted Checkout Session, checkout.session.completed never fires. Post those orders from your backend to the Records API instead; they will be labelled Imported, and your verification page will list them under "Site owner's backend (API)". See Using the Records API for purchases from your own backend.

Frequently asked questions

Does Provedly need my Stripe API key?

No. Webhooks are inbound: Stripe pushes events to Provedly. You only share the webhook signing secret, which can verify signatures and nothing else.

Can I connect several Stripe accounts to one widget?

Each Stripe source has its own endpoint secret, so you can add a source per account on the same widget if your plan's widget limits allow it.

Will subscription renewals show as purchases?

No. Only checkout.session.completed is read, so the initial checkout appears and later invoice payments do not. That is deliberate; a renewal is not a new buyer deciding.

Verified purchases are included on every plan, including Free: start with Stripe connected.

stripewebhooksverified purchases

Get new articles by email

Honest social proof, verified purchases and what actually moves conversion. A few emails a month at most; leave with one click.

We email you once to confirm. Your address is used only for this newsletter; see the privacy policy.

Show proof you can stand behind.

Free plan, one site, 2,000 impressions a month, verified purchases included. The badge on the free plan links to your verification page, which is the point.