Payments integration

Measure A/B test revenue impact with Stripe: Optibase + Stripe integration

Stripe Checkout takes the user off your domain, which is where most A/B testing tools lose attribution. Optibase solves this with a server-to-server flow: pass the Optibase user ID into Stripe via client_reference_id, then send the conversion back to Optibase from your Stripe webhook. Every successful checkout maps to the variant the user actually saw.
Server-side attribution that survives Stripe Checkout's domain change.
Records purchase value per variant, not just purchase count.
Reuses your existing Stripe webhook, no third-party middleware.
Header image
Join 3000+ companies already testing with Optibase
About Stripe

What is Stripe?

Stripe is the payments and subscription billing platform powering most modern SaaS, e-commerce, and marketplaces. If your company takes money online, there is a strong chance Stripe is in the path.
For A/B testing, Stripe is also the place where the most important conversion lives: the actual purchase. The challenge is that Stripe Checkout opens on a different domain (checkout.stripe.com), which breaks the page-side cookie that most A/B testing tools rely on for attribution. Optibase handles this with a server-to-server flow that ties every successful checkout back to the variant the user saw.
Why this integration

Why connect Optibase to Stripe

A/B testing icon

See revenue per variant, not just clicks

Click-through rate is the wrong success metric for most marketing tests. The variant with the higher CTR is not always the one with higher revenue. Wiring Stripe through to Optibase means the test results page shows actual purchase events tied to the variant the user saw, not a proxy metric.

Catch the "CTR up, revenue down" loser

Some tests look like wins on the conversion-rate dashboard but lose money on the bottom line. Cheaper plan signups, lower-quality leads, more refunds. With Stripe wired through, the revenue figure is right next to the conversion-rate figure, so the bad winners stop slipping through.

Sales-side question answered, every time

Every Optibase customer running a paid product eventually gets the question "did this test actually move revenue?" from their CFO, board, or growth lead. With the Stripe integration in place, the answer is one click away on the test results page. No CSV exports, no warehouse joins.
Use cases

What you can run with Optibase + Stripe

Pricing page test, revenue per variant in Optibase reports

Test two pricing layouts on Optibase. Pass the Optibase user ID to Stripe through the pricing page CTA. When a user completes Stripe Checkout, your webhook fires the conversion back to Optibase with the purchase value attached. The Optibase results page now shows revenue per variant alongside conversion rate.

Trial-to-paid CTA test, full funnel attribution

Test the CTA copy on your free-trial signup. Track the Optibase user ID through the trial signup flow into the upgrade-to-paid event. Optibase records the upgrade as a paid conversion attributed to the variant the user saw on the marketing page weeks earlier.

Checkout flow test, revenue per visitor

Run a test on your checkout page itself (one-step vs two-step, copy variations, default plan selection). The Stripe webhook reports the actual purchase value per variant, so you can compare revenue per visitor (not just conversion rate) across the variants.
A/B testing icon

Plan-tier shuffle test, ARPU per variant

Test which plan tiers are featured most prominently on your pricing page. Some configurations push users to higher tiers at the same conversion rate. Stripe revenue tells you whether the average revenue per user is actually higher in the test variant.
Setup

How to set up the Stripe integration

The integration uses Stripe webhooks plus a server-to-server call back to Optibase. It requires backend code, but the code is small.

Get the Optibase user ID on the page

Optibase exposes the visitor's ID in the browser. Pull it before the user clicks the Stripe Checkout CTA.

Pass the ID into Stripe as client_reference_id

When you create the Stripe Checkout session (via Payment Link, Stripe API, or Stripe Elements), pass the Optibase user ID as the client_reference_id. Stripe will pass this value through Checkout and include it in the webhook payload after the purchase completes.

Set up the Stripe webhook

In your Stripe dashboard, create a webhook endpoint that listens for the checkout.session.completed event. Point it at a URL on your own server. (If you already have a Stripe webhook for fulfillment, reuse it.)

From the webhook, send the conversion to Optibase

When the webhook fires, your server reads client_reference_id (the Optibase user ID) and the amount_total (the purchase value in cents) from the Stripe payload. Then make a POST request to the Optibase conversion endpoint with the user ID, the conversion event name, and the value.

Match the conversion event name in the Optibase dashboard

In Optibase, create a matching conversion event with the exact name you used in the webhook call. Now the test results page on Optibase counts every Stripe Checkout completion as a conversion, attributed to the right variant, with the right revenue value.
What syncs

What gets sent to Stripe

Field

Direction

Frequency

Sent as

Optibase user ID

Page → Stripe

On Checkout creation

client_reference_id field

checkout.session.completed

Stripe → your server

On successful purchase

Webhook event

Optibase user ID

Stripe webhook → your server

Per webhook

client_reference_id field in payload

Purchase value

Stripe webhook → your server

Per webhook

amount_total field

Conversion event

Your server → Optibase

Per webhook

POST to Optibase conversion endpoint

Stripe → Optibase direct

n/a

n/a

The flow runs through your server

FieldDirectionFrequencySent as
Optibase user ID Page → Stripe On Checkout creation client_reference_id field
checkout.session.completed Stripe → your server On successful purchase Webhook event
Optibase user ID Stripe webhook → your server Per webhook client_reference_id field in payload
Purchase value Stripe webhook → your server Per webhook amount_total field
Conversion event Your server → Optibase Per webhook POST to Optibase conversion endpoint
Stripe → Optibase direct Not applicable n/a The flow runs through your server

The integration is intentionally a server-side relay, not a direct Stripe-to-Optibase connection. Your server is in the middle, which means you control the data, can enrich it, and can plug in custom logic (filtering test users, handling refunds, etc).

Browse integrations

Optibase integrates with the rest of your stack

Google Analytics 4

The Google Optimize replacement. Variant exposure lands in GA4 as an event parameter, native or via GTM. Build variant-aware audiences for Google Ads remarketing.

Learn more

Mixpanel

Auto-detected. Variant exposure lands as a Mixpanel event with variantId and testId. Works in any Insight, Funnel, Retention, or Cohort.

Learn more

Amplitude

Variant assignment events flow into Amplitude. Skip the Amplitude Experiment seat. Analyze in your existing Amplitude dashboards.

Learn more

PostHog

PostHog Actions detect Optibase data attributes natively. Pair Optibase marketing-page testing with PostHog's product analytics.

Learn more

BigQuery

Service-account auth, batch export of variant assignments, conversions, visitor IDs, and timestamps. Joinable with the GA4 BigQuery export, Stripe revenue, and any other warehouse data.

Learn more

Google Tag Manager

Trigger Optibase conversions from any GTM event with optibaseSendConversionEvent('your-conversion-id'). Push variant data into the dataLayer for every other tag to consume.

Learn more

MCP Server

Hosted Model Context Protocol server at https://my.optibase.io/api/mcp. Read tests, conversions, heatmaps, and traffic from Claude Desktop, Cursor, or any MCP-compatible client.

Learn more

Custom API

Active Variants API in the browser. Conversion endpoint for server-to-server events. External user IDs. Reverse-ETL flows.

Learn more
FAQ

Frequently asked questions about the Stripe integration

How do I attribute revenue to A/B test variants?
Pass the Optibase user ID to Stripe via client_reference_id when you create the Checkout session. Stripe passes it through Checkout and includes it in the webhook payload after a successful purchase. Your server picks it up from the checkout.session.completed webhook and sends a conversion event with the purchase value to the Optibase conversion endpoint. The result is variant-level revenue attribution on every test.
Why doesn't standard client-side conversion tracking work?
Stripe Checkout opens on checkout.stripe.com, which is a different domain from your site. The page-side Optibase script cannot follow the user there, so the standard "click the button, count the conversion" model breaks. The server-side webhook flow restores attribution by carrying the user ID through Stripe and sending the conversion back from your server.
Does this work with Stripe Subscriptions, Payment Links, and Stripe Elements?
Yes. Wherever you create the Stripe Checkout session (Payment Link, Stripe API, Elements), the requirement is the same: include client_reference_id set to the Optibase user ID. Stripe carries that field through every Checkout flow and includes it in the resulting webhook.
What Stripe events are supported?
The documented integration uses checkout.session.completed. If you need to track other Stripe events (refunds, subscription renewals, payment failures), you can wire those in as additional webhooks calling the Optibase conversion endpoint with custom event names. The pattern is the same.
Do I need a developer to set this up?
Yes, a small amount of backend work is required: setting up a Stripe webhook endpoint and writing the few lines that POST to Optibase. If your team already has any Stripe webhook in production (most teams do, for fulfillment or notifications), the integration adds a few lines to that existing handler.
How does attribution work when a user sees multiple tests?
Optibase stores all variant exposures associated with the user ID. When the conversion is sent back to Optibase, the platform attributes it to every active test the user was exposed to, so each test's results page reflects the right number of conversions and revenue.
Is the Stripe integration available on every Optibase plan?
Yes. Every Optibase integration, including Stripe, is available on every plan including the free tier. There is no upgrade or paid feature gate.