Skip to main content
Worldpay → PostHogIntegration guide

Connecting Worldpay to PostHog

Worldpay spans online and in-person payments for large merchants, which means one provider covers two channels with completely different attribution potential. PostHog can be self-hosted, which changes the calculus entirely: the data stays on infrastructure you control, and so does the responsibility for everything that goes wrong with it. The join between them succeeds or fails on one thing: whether the distinct_id reaches the Worldpay transaction before the conversion happens, because PostHog can only match a conversion it can tie back to a click it recognizes.

Free30 minutesNo obligation

Specific to this pair

Worldpay purchases in PostHog: tie the distinct_id to the order

Write the PostHog distinct_id onto the order at creation, then capture a purchase server-side when Worldpay confirms payment, with an event UUID derived from the order code. Add payment-side properties like payment method and whether 3-D Secure was challenged. Capture refunds as their own event, and keep card-present transactions out to avoid one giant anonymous user.

PostHog is useful for Worldpay merchants who want funnel and product analytics that include the payment step the browser cannot see. The hosted payment page is a black box to the PostHog snippet: you see the redirect and, sometimes, the return. To close the funnel, write the PostHog distinct_id onto the order when it is created, then capture a purchase event server-side when Worldpay's notification confirms payment, with that distinct_id and the order code.

Use the order code to derive the event UUID, so a retried notification or a resent capture call does not record two purchases. Include properties that only the payment side knows and the browser never will: payment method, whether 3-D Secure was challenged, and the time between redirect and settlement. A funnel broken down by challenge outcome often explains checkout drop-off better than any page change.

Do not send card-present transactions as PostHog events. They have no person behind them, and capturing them under a placeholder distinct_id creates one enormous anonymous user who appears in every funnel. If you want store volume next to web, keep it in a warehouse table and join there. Refunds should be captured as their own event so revenue insights can subtract them, since PostHog will not reverse a purchase on its own.

Worldpay → PostHog · what breaks

Why this join usually fails — Worldpay → PostHog

  1. 01

    The distinct_id never reaches Worldpay

    The hosted payment pages redirect the shopper off-site, and card-present terminals have no marketing context at all. Only the ecommerce channel is joinable, and only if the identifier was attached at payment creation.

  2. 02

    Two channels reported as one number

    Card-present revenue cannot be attributed to a click and will make ecommerce performance look far worse than it is if the two are summed.

  3. 03

    Self-hosting the analytics and the outage together

    The advantage of owning the pipeline is that nothing blocks it. The cost is that when the ingestion instance fills its disk on a Saturday, the events are gone and nobody is paged. Hosted tools fail differently and more visibly.

  4. 04

    Nothing reconciles afterwards

    PostHog shows events in the activity view within moments. On a self-hosted instance, check the ingestion lag as well — events that are queued are not events that are lost, and the two need different responses.

Worldpay → PostHog · the fix

What working looks like — Worldpay → PostHog

  • The distinct_id on every transaction

  • Conversions arriving in PostHog

    The event lands on the person profile and becomes available in insights, funnels and session replay.

  • Reconciled against the source

Worldpay → PostHog · architecture

How Worldpay and PostHog actually connect

  1. 1

    Worldpay holds the truth

    Card-present transactions have no click and no session by construction. Splitting the channels before comparing anything is the first requirement of an honest number here.

  2. 2

    PostHog needs a click to match

    PostHog needs a distinct_id, an event name and its properties. Self-hosted instances additionally need the ingestion endpoint reachable and the project API key correct, which is a class of failure hosted tools do not have.

  3. 3

    The identifier is the bridge

    The distinct_id, captured at the visit and carried into the Worldpay transaction.

  4. 4

    The event source decides reliability

    Fire on settlement from the notification rather than a return URL, since hosted pages mean the shopper may not come back.

  5. 5

    Deduplication at the destination

    PostHog deduplicates on the event UUID where supplied. Without one, a retried batch duplicates, and on a self-hosted instance there is no vendor support desk to notice it for you.

Worldpay → PostHog · normal or broken

Working vs. broken, side by side — Worldpay → PostHog

Normal, not a fault

  • The distinct_id present on the transaction

  • Sent from the Worldpay payment notification

  • Deduplicated correctly

    PostHog deduplicates on the event UUID where supplied. Without one, a retried batch duplicates, and on a self-hosted instance there is no vendor support desk to notice it for you.

  • Reconciles with the source

Actually broken

  • The distinct_id missing on most records

    The hosted payment pages redirect the shopper off-site, and card-present terminals have no marketing context at all. Only the ecommerce channel is joinable, and only if the identifier was attached at payment creation.

  • Sent from the browser

    Card-present revenue cannot be attributed to a click and will make ecommerce performance look far worse than it is if the two are summed.

  • Counted twice, or not at all

    The advantage of owning the pipeline is that nothing blocks it. The cost is that when the ingestion instance fills its disk on a Saturday, the events are gone and nobody is paged. Hosted tools fail differently and more visibly.

  • Nobody has reconciled it

Worldpay → PostHog · diagnose

Diagnostic order — Worldpay → PostHog

  1. 01

    Count transactions carrying the distinct_id

  2. 02

    Follow one real conversion end to end

  3. 03

    Split settled volume by channel before anything else

    Every subsequent number depends on that split, and it is usually the first thing nobody has done.

  4. 04

    Check ingestion health and disk before debugging any missing event

    On self-hosted instances the answer is infrastructure far more often than it is instrumentation.

  5. 05

    Read the match rate, not the success message

    PostHog shows events in the activity view within moments. On a self-hosted instance, check the ingestion lag as well — events that are queued are not events that are lost, and the two need different responses.

Worldpay → PostHog · prove

How it gets proven — Worldpay → PostHog

Source of truth

Worldpay's settled transactions by date, split by channel — ecommerce and card-present are different questions.

  • The distinct_id confirmed present on a live transaction.
  • Purchase events reconciled per transaction against your billing system, with ingestion lag checked over the same window.
  • Ecommerce transactions reconciled separately from card-present, with the split stated.

Worldpay → PostHog · free audit

What we check in the free audit

  • Count transactions carrying the distinct_id
  • Follow one real conversion end to end
  • Split settled volume by channel before anything else
  • Check ingestion health and disk before debugging any missing event
  • Read the match rate, not the success message

Checked against

Worldpay's settled transactions by date, split by channel — ecommerce and card-present are different questions.

Get my free conversion tracking audit

Free30 minutesNo obligation

Worldpay → PostHog · when not to buy

When you don't need this — Worldpay → PostHog

  • Measure identifier coverage yourself first — pull your last hundred transactions and count how many carry the distinct_id.
  • If nearly all your Worldpay volume is card-present, there is very little for click attribution to reach.
  • If you have no reason to keep the data on your own infrastructure and no team to run it, the hosted product removes the only real downside of this one.

Worldpay → PostHog · what we deliver

What gets built — Worldpay → PostHog

  • Identifier capture into Worldpay

    Pass the identifier into the transaction's custom or merchant reference fields on the ecommerce channel, and treat card-present volume as a separate, unattributable line.

  • Event source: the Worldpay payment notification

    Fire on settlement from the notification rather than a return URL, since hosted pages mean the shopper may not come back.

  • Dispatch to PostHog

    The PostHog capture API, posted server-side from your backend to your own instance or to PostHog Cloud.

  • Reversals where they exist

    Refunds and chargebacks are recorded against the original transaction.

Written guarantee

95%+ tracking accuracy

Measured against Worldpay's settled transactions by date, split by channel — ecommerce and card-present are different questions.. Miss it and we keep working at no cost.

Get my free conversion tracking audit

From $400 · See packages

FAQ

Worldpay → PostHog questions, answered

Store the distinct_id on the order before redirecting to Worldpay, then capture the purchase from your server when the payment notification arrives, using the order code to build a stable event UUID.

Free · 30 min

Get Worldpay and PostHog joined properly

Free30 minutesNo obligation