Connect Stripe to Nevian

Time needed: about 10 minutesLast updated:

Send every Stripe payment to Nevian with one signed webhook, so each sale, renewal, refund and dispute shows up next to the ad that brought the buyer.

What you need

  • A Stripe account where you can open Workbench and create event destinations.
  • A Nevian workspace with an active plan (Beginner, Pro or Enterprise), where you are the owner, an admin or a member. Viewers can't connect integrations.
  • The two tabs side by side: Nevian on Integrations and the Stripe Dashboard.

Steps

  1. In Nevian, open Integrations, click Add integration (Connect provider when nothing is connected yet) and pick Stripe. In the Connect Stripe window, have the platform open in another tab, then click Next to get your private URL.

    The Connect Stripe window in Nevian, with the Next button highlighted.
  2. Nevian creates your private Webhook URL. Click the copy button next to it and leave this window open: the Signing secret field below is where you paste Stripe's secret in step 7.

    The Webhook URL in the Connect Stripe window, with its copy button highlighted.
  3. In the Stripe Dashboard, open Workbench, go to the Webhooks tab and click Create new destination.

    The Webhooks tab of Stripe Workbench, with the Create new destination button highlighted.
  4. Choose Events on your account, keep the API version, and select the events checkout.session.completed, checkout.session.async_payment_succeeded, checkout.session.async_payment_failed, invoice.paid, charge.refunded and charge.dispute.created. Selling subscriptions? Also select customer.subscription.created, customer.subscription.updated, customer.subscription.deleted and invoice.payment_failed. Click Continue.

    Stripe's new event destination with Events on your account chosen, the events selected and the Continue button highlighted.
  5. Choose Webhook, paste the URL in Endpoint URL and click Create destination.

    The Webhook destination in Stripe, with the pasted Nevian URL in Endpoint URL highlighted.
  6. On the new destination's page, click Reveal secret next to Signing secret and copy the value (it starts with whsec_).

    The Nevian destination in Stripe Workbench, with the Reveal secret button of the signing secret highlighted.
  7. Back in Nevian, paste it in the Signing secret field and click Next. Keep the test step open until the first event arrives, then click Done. Nevian saves it and checks the signature of every call.

    The Connect Stripe window with the signing secret pasted and the Next button highlighted.
  8. Use a Stripe sandbox or test-mode payment to check a test destination. For a live destination, check the next real payment. The destination's Event deliveries tab lists the event as Delivered.

    The Event deliveries tab of the Nevian destination in Stripe, with a delivered checkout.session.completed event highlighted.
  9. In Nevian, the Stripe card in Integrations turns Connected. A later refund updates the same sale.

    The Stripe card in Nevian's Integrations list showing Connected.

Check that it works

  • The Stripe card in Integrations says Connected and shows the time of the last event.
  • Logs › Webhooks lists each call exactly as Stripe sent it. Events from test mode or a sandbox are marked as tests and never count in revenue or conversions.
  • Payment Links need no change: the Nevian tracking script adds client_reference_id with the click ID to every buy.stripe.com link. For Checkout Sessions your server creates, pass client_reference_id: bt.clickId() and metadata.btk.
  • A checkout paid with a delayed method (boleto, bank debit) is recorded as pending until it succeeds.

Problems

"Waiting for the first event…" doesn't change

Stripe hasn't sent anything to Nevian yet. Check in Workbench that the destination is enabled, that its Endpoint URL is the whole Nevian URL and that the events are selected. The Event deliveries tab shows what Stripe tried to send and the answer it got. If you rotated the key in Nevian, the old URL stops working: copy the new one from the integration's Connection tab.

"Stripe reached Nevian, but the call was rejected"

The signature didn't match the Signing secret saved in Nevian. Each destination has its own secret, and test mode has its own too: reveal the secret of this destination again, open the Stripe card in Integrations, go to the Connection tab, click Replace, paste it and click Save. After you roll the secret in Stripe, save the new one the same way.

"Signing secret missing" on the card

You clicked Close before pasting the secret. Every Stripe call is rejected until it is saved: paste it in the Connection tab of the Stripe card and click Save.

"no matching click" on a real sale

The buyer paid without the click ID. For Payment Links, check that the Nevian tracking script is on the page with the buy button and that the button links to buy.stripe.com. For Checkout Sessions, check that your server sends client_reference_id. Stripe explains destinations in its own webhook documentation.

Still stuck? Write to [email protected].

Images are drawings of Stripe's and Nevian's screens, not screenshots; the real screen may look a little different.