Stripe payments & revenue

MarketingIT / Technical

Connect Stripe and Preb automatically attaches every payment to the matching deal in your CRM — closing the loop between ad spend and revenue. The connection is read-only: Preb watches your payments to record them, and never charges your customers.

How it works

When a payment succeeds in Stripe, Stripe notifies Preb. Preb finds the contact the payment belongs to, records it as a transaction, attaches it to that contact's open deal, and — if the amount matches — closes the deal. A closed, paid deal then reports a Sale back to Meta and Google with the real revenue value, so your ad platforms can optimize on money earned.

You connect Stripe on the Stripe payments page under Integrations. There are two ways in: Stripe Connect (recommended) or an API key (advanced).

Connecting via Stripe Connect

This is the recommended, one-click option. You authorize Preb to read your Stripe events — read-only access, so Preb never charges your customers.

Open Stripe payments

Go to Integrations → Stripe payments.

Click Connect Stripe

On the Stripe Connect card, click Connect Stripe.

Authorize in Stripe

Approve the read-only connection in Stripe. You'll come back to Preb already connected — no webhook to set up by hand.

Connecting via API key

The API-key method is for people who prefer to manage their own Stripe credentials, or whose region isn't covered by the one-click connection. It takes a couple more steps because you set up the webhook yourself.

Start the API-key setup

On the API key card, start the setup dialog.

Paste a read-only Restricted Key

In Stripe, create a Restricted Key with read access and paste it into Preb.

Create the webhook in Stripe

Preb gives you a webhook URL. Add it as a webhook endpoint in Stripe, then paste Stripe's signing secret back into Preb.

Send a test event

Send a test event from Stripe so Preb can confirm everything is wired up. Until a test event arrives, the connection shows Setup incomplete with a button to resume.

Always use a read-only key

Preb only needs to read your payments. Create a Restricted Key scoped to read-only access — never paste a full secret key.

Webhook events

Preb listens for three Stripe events. If you set up the API-key method, make sure your webhook endpoint is subscribed to all three:

Stripe eventWhat Preb does
payment_intent.succeededRecords the payment, attaches it to the deal, and reports a Sale
charge.refundedRecords a matching refund against the original payment
invoice.paid (renewals)Reports a Subscription renewal for recurring deals

With Stripe Connect, these are handled for you automatically.

Matching logic

To attach a payment to the right contact, Preb tries two things, in order:

  1. Booking ID match (most reliable) — if the Stripe payment carries a preb_booking_uid value, Preb uses it to find the exact booking and contact.
  2. Email match (fallback) — otherwise, Preb looks up the Stripe customer's email and finds the contact with that email.

Once a contact is found, the payment is attached to that contact's most recent open deal. If the payment amount exactly matches the deal amount, Preb closes the deal automatically; if it differs (say, a deposit), the payment is still recorded and the deal stays open for you to reconcile. Either way, the first matched payment reports the Sale to your ad platforms.

Make every payment match — even with a different email

Email matching breaks when a buyer pays with a different address than they booked with (for example, a company card). To guarantee a match, add the booking's ID to the Stripe payment: when you create a Payment Link or Checkout Session, set a metadata field named preb_booking_uid to the booking's ID (shown on the booking in your CRM). Preb checks that first, before falling back to email.

When a payment can't be matched to any contact, it won't close a deal or report revenue. Preb surfaces these on the Stripe page as a "payments couldn't be matched" card (covering the last 30 days) so you can spot coverage gaps and fix them with the booking-ID trick above.

Don't use Stripe?

You can still close the loop. Import transactions from a CSV file on any contact's detail page, and your closed deals will still report revenue back to your ad platforms.

Refunds & recurring

Refunds — when you refund a charge in Stripe, Preb records a matching negative transaction against the original payment, so your revenue figures stay accurate.

Recurring payments — for subscription deals, each successful renewal invoice reports a Subscription renewal event with that cycle's actual amount. The first invoice that creates the subscription isn't double-counted — only genuine renewals fire the renewal event.