LuriaDocs
Install

Count Stripe payments

Paste one private Luria URL into Stripe so every payment, renewal and refund reaches Luria from Stripe itself. No Stripe key needed.

plain textupdated 2026-10-02

About 5 minutes

Connect Stripe and Luria hears about each payment from Stripe, not from the browser, so ad blockers, closed tabs and Stripe-hosted confirmation pages no longer lose a sale. Renewals, cancellations and refunds come too.

You do not give Luria any Stripe key. You paste one private Luria URL into Stripe and Stripe sends Luria a copy of four events. Luria cannot see, charge, refund or change anything in your account.

What you'll need

Steps

Step 1: Get your private Stripe URL

Open luriart.com/app, go to Connections, choose Stripe, leave every field blank and click Connect. Luria shows Your private Stripe webhook URL. It looks like this:

https://www.luriart.com/api/webhooks/source?k=<your private key>

Copy it. Treat it like a password: it is unique to your site.

Step 2: Add it in Stripe

In Stripe, open Developers > Webhooks and click Add destination (older dashboards say Add endpoint). Paste the URL and tick these four events:

EventWhat Luria does with it
checkout.session.completedCounts the order (one order, one conversion)
invoice.paidCounts the first subscription payment and logs each renewal
charge.refundedTakes the refund off that order's revenue
customer.subscription.deletedLogs the cancellation

Save it.

On the new webhook's page in Stripe, reveal the Signing secret (it starts with whsec_). Paste it into Stripe signing secret in Luria and click Connect again. Your URL stays the same.

With it, Luria checks that every delivery really came from Stripe. Without it, the private URL is the only check, so anyone who gets hold of the URL could send fake payments.

Step 4: Tell Stripe which visitor paid

A payment counts toward your split tests once Luria knows which visitor made it. Pass the visitor's Luria id as client_reference_id:

// Checkout Sessions, in your server code, with the id your page sent you:
client_reference_id: visitorId

// in the page, where visitorId comes from:
const visitorId = localStorage.getItem("luria_sid");

On a Payment Link, add ?client_reference_id=<that id> to the link URL before the visitor clicks it. Without it, Luria matches by the customer's email when that email already reached Luria (a form or booking tracked earlier); otherwise the payment still counts in your revenue, just not toward a test.

Step 5: Remove any thank-you page conversion line

If your thank-you page calls window.luria.convert("purchase", ...), or you rely on a /thank-you path being auto-counted, remove it now. Stripe is the record from here on, and keeping both counts the order twice.

Verify it worked

  1. In Luria, Connections > Stripe shows Private Stripe URL issued, and Signing secret set if you added it.
  2. In Stripe, Developers > Webhooks lists your Luria URL with the four events.
  3. Make one real purchase. Within a minute the Stripe card shows "Last Stripe event received", and the Customers count in the Customers section on Overview goes up by one.

Full checklist: Verify your install.

No connection? Use a thank-you page

Send buyers back to a page on your own domain (Payment Link: After payment → Redirect; Checkout: success_url), keep the Luria tag on it, and call window.luria.convert("purchase", 129.00) once with the order value. A Stripe-hosted confirmation page cannot report anything, and refunds never flow back this way.

Prefer Luria to set it up? Use a restricted key

If you would rather not touch webhooks, paste a restricted key instead and Luria adds the webhook for you and imports your last 90 days of Checkout payments. In Stripe, open API keys, click Create restricted key, name it Luria and set exactly two permissions:

PermissionAccess
Webhook EndpointsWrite
Checkout SessionsRead

Leave everything else at None. Paste the key (it starts with rk_live_) into Stripe restricted key in Luria. A secret key (sk_) is refused. If you switch from the URL to a key, delete the webhook you added by hand in Stripe.

Common failures

  • "That does not look like a Stripe signing secret". Copy the value that starts with whsec_ from the webhook's page, not the webhook id.
  • Every delivery fails in Stripe after you added a secret. The secret in Luria does not match that webhook. Copy it again from the same webhook and click Connect.
  • Payments arrive but no test gets credit. No client_reference_id and no known email. Add Step 4.
  • Counted twice. A thank-you line or /thank-you auto-count is still active. See Step 5.
  • Test-mode payments. A test-mode webhook works for trying it out; test payments are stored as tests and never count as conversions.
  • Restricted key: "The key needs Webhook Endpoints set to Write". Edit the key, set that permission, paste it again.

Next steps

On this page