Skip to main content
Affirm → SegmentIntegration guide

Connecting Affirm to Segment

Affirm is longer-term financed BNPL, typically on higher-ticket items, which adds a credit decision between the checkout and the sale. Segment is a customer data platform rather than an ad network, so sending to it is not about matching a conversion — it is about putting one clean event where every other destination can read it. The join between them succeeds or fails on one thing: whether the userId and anonymousId reaches the Affirm charge before the conversion happens, because Segment can only match a conversion it can tie back to a click it recognizes.

Free30 minutesNo obligation

Specific to this pair

Affirm orders in Segment: Order Completed only on capture

Send Segment's Order Completed server-side from the Affirm capture webhook, not at authorization, with order ID as order_id and a messageId derived from it. Carry the browser anonymousId on the order before the redirect, identify with customer ID, and add payment_method and click IDs. Use destination filters so Order Cancelled reaches only destinations that need it.

Segment's ecommerce spec has an event for every Affirm step, and that's the risk. Payment Info Entered when the shopper chooses Affirm, Order Completed when the charge is captured, Order Cancelled or Order Refunded when financing is reversed. Fire Order Completed at authorization or on the return page and every connected destination counts orders that later get cancelled, all at once.

Send Order Completed server-side from the capture webhook. Use the order ID as order_id and derive the messageId from it, so a webhook retry is dropped by Segment instead of reaching every destination twice. Carry the browser's anonymousId on the order before the Affirm redirect, and identify with your customer ID at checkout, so the capture joins the session that came from an ad. Add payment_method as a property and the click IDs you captured as properties or traits so ad destinations downstream can match.

Then check what each destination does with a financed order. Product analytics wants all of it; an ad destination only wants captured revenue; a warehouse wants every status change. Segment's destination filters and mappings are where you make that split, so Order Cancelled doesn't reach an ad platform that has no use for it. If only one or two destinations are connected, a direct integration is less work.

Affirm → Segment · what breaks

Why this join usually fails — Affirm → Segment

  1. 01

    The userId and anonymousId never reaches Affirm

    The shopper leaves for Affirm's flow, is assessed, and returns only if approved. Both the redirect and the decline create paths where nothing fires on your site.

  2. 02

    A credit decision inside the checkout

    Declines are real volume that reached checkout and produced nothing. Counting checkout starts rather than captured charges overstates performance by the decline rate.

  3. 03

    One bad event multiplied across every destination

    Segment's value is fan-out, which is also its risk. An inconsistent identity or a duplicated event does not break one report — it breaks every connected tool simultaneously, and tracing it back is harder than debugging a direct integration.

  4. 04

    Nothing reconciles afterwards

    Segment's debugger shows events arriving and which destinations accepted them. Arriving is not the test — check a destination you care about and confirm the event landed there with the identity intact, then reconcile against your own records.

Affirm → Segment · the fix

What working looks like — Affirm → Segment

  • The userId and anonymousId on every order

  • Conversions arriving in Segment

    Events land in Segment and forward to every connected destination, warehouse included, on one shared definition.

  • Reconciled against the source

Affirm → Segment · architecture

How Affirm and Segment actually connect

  1. 1

    Affirm holds the truth

    Affirm runs a real credit decision, so a shopper who reaches checkout may be declined. The order only exists if the financing was approved and captured.

  2. 2

    Segment needs a click to match

    Segment needs a consistent identity model — the same userId everywhere, an alias when an anonymous visitor becomes known, and event names that follow one spec. Feeding it inconsistent identities pushes the mess to every connected destination at once.

  3. 3

    The identifier is the bridge

    The userId and anonymousId, captured at the visit and carried into the Affirm charge.

  4. 4

    The event source decides reliability

    Fire on capture after approval, and tag the payment method — Affirm orders skew to higher ticket values that will distort a blended average.

  5. 5

    Deduplication at the destination

    Segment deduplicates on messageId within a window. Because it fans out to many destinations, a duplicate here becomes a duplicate everywhere, which makes idempotent messageIds more important than in any single-destination integration.

Affirm → Segment · normal or broken

Working vs. broken, side by side — Affirm → Segment

Normal, not a fault

  • The userId and anonymousId present on the order

  • Sent from your store's order webhook, on Affirm charge capture

  • Deduplicated correctly

    Segment deduplicates on messageId within a window. Because it fans out to many destinations, a duplicate here becomes a duplicate everywhere, which makes idempotent messageIds more important than in any single-destination integration.

  • Reconciles with the source

Actually broken

  • The userId and anonymousId missing on most records

    The shopper leaves for Affirm's flow, is assessed, and returns only if approved. Both the redirect and the decline create paths where nothing fires on your site.

  • Sent from the browser

    Declines are real volume that reached checkout and produced nothing. Counting checkout starts rather than captured charges overstates performance by the decline rate.

  • Counted twice, or not at all

    Segment's value is fan-out, which is also its risk. An inconsistent identity or a duplicated event does not break one report — it breaks every connected tool simultaneously, and tracing it back is harder than debugging a direct integration.

  • Nobody has reconciled it

Affirm → Segment · diagnose

Diagnostic order — Affirm → Segment

  1. 01

    Count orders carrying the userId and anonymousId

  2. 02

    Follow one real conversion end to end

  3. 03

    Compare Affirm checkouts started, approved and captured

    The decline rate is a genuine cost of this payment method and it belongs in the report.

  4. 04

    Check identity resolution before checking anything downstream

    If anonymousId is never aliased to userId, every destination sees two people where there is one, and no downstream fix helps.

  5. 05

    Read the match rate, not the success message

    Segment's debugger shows events arriving and which destinations accepted them. Arriving is not the test — check a destination you care about and confirm the event landed there with the identity intact, then reconcile against your own records.

Affirm → Segment · prove

How it gets proven — Affirm → Segment

Source of truth

Your store's orders financed through Affirm, cross-checked against Affirm's settlement.

  • The userId and anonymousId confirmed present on a live order.
  • An anonymous session confirmed aliased to a known user, with the event visible in at least one downstream destination.
  • An approved Affirm order confirmed to report and a declined one confirmed not to.

Affirm → Segment · free audit

What we check in the free audit

  • Count orders carrying the userId and anonymousId
  • Follow one real conversion end to end
  • Compare Affirm checkouts started, approved and captured
  • Check identity resolution before checking anything downstream
  • Read the match rate, not the success message

Checked against

Your store's orders financed through Affirm, cross-checked against Affirm's settlement.

Get my free conversion tracking audit

Free30 minutesNo obligation

Affirm → Segment · when not to buy

When you don't need this — Affirm → Segment

  • Measure identifier coverage yourself first — pull your last hundred orders and count how many carry the userId and anonymousId.
  • If your average order value is low, Affirm is a poor fit for the payment method and the integration follows that.
  • If you send to one or two destinations, Segment is infrastructure you do not need — direct integrations are simpler and cheaper. It earns its place at genuine fan-out.

Affirm → Segment · what we deliver

What gets built — Affirm → Segment

  • Identifier capture into Affirm

    Capture the identifier before checkout and store it on the order, so approved financing is attributable regardless of the return journey.

  • Event source: your store's order webhook, on Affirm charge capture

    Fire on capture after approval, and tag the payment method — Affirm orders skew to higher ticket values that will distort a blended average.

  • Dispatch to Segment

    Server-side track and identify calls with a stable messageId, consistent userId, and the click identifier carried as a trait or property.

  • Reversals where they exist

    Refunds and cancelled financing both exist and should reduce the reported figure.

Written guarantee

95%+ tracking accuracy

Measured against Your store's orders financed through Affirm, cross-checked against Affirm's settlement.. Miss it and we keep working at no cost.

Get my free conversion tracking audit

From $400 · See packages

FAQ

Affirm → Segment questions, answered

Order Completed at capture, with order_id, total, currency and products. Payment Info Entered can mark the Affirm selection, and Order Cancelled or Order Refunded covers reversed financing.

Free · 30 min

Get Affirm and Segment joined properly

Free30 minutesNo obligation