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, charge.dispute.created, charge.dispute.funds_withdrawn, charge.dispute.closed and charge.dispute.funds_reinstated. 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: Nevian saves it and checks the signature of every call. Then go on to the last step of the window. It reads Connected. Waiting for the first sale. Click Done: your first sale shows up by itself.

    The Connect Stripe window with the signing secret pasted.

Check that it works

  • The Stripe card in Integrations shows it as connected right away, waiting for the first sale.
  • Your first real sale shows up in Logs › Webhooks and in the reports. A later refund updates the same sale. Events from Stripe's test mode or a sandbox are marked as tests and never count in revenue.
  • In Stripe, the destination's Event deliveries tab lists each event it sent as Delivered.
  • 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

No sale shows up after a real sale

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? Chat with us on WhatsApp or write to [email protected].

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