Connecting Affirm to BigQuery
Affirm is longer-term financed BNPL, typically on higher-ticket items, which adds a credit decision between the checkout and the sale. BigQuery has no attribution model, no deduplication rules and no opinion about your data — which makes it the only destination on this site where every number is exactly as good as the query that produced it. The join between them succeeds or fails on one thing: whether whatever join key you decide on reaches the Affirm charge before the conversion happens, because BigQuery can only match a conversion it can tie back to a click it recognizes.
Free30 minutesNo obligation
Specific to this pair
Affirm in BigQuery: decline rate and net revenue by ad campaign
Keep every Affirm checkout in BigQuery keyed on your order ID, with the Affirm charge ID beside it and gclid, fbc and ttclid as their own columns. Load both the order total and Affirm's lower settlement amount, record status changes as rows rather than overwrites, and dedupe on order ID plus status before aggregating.
BigQuery is where the full Affirm picture fits in one table: every checkout that chose Affirm, its outcome, and the click identifiers you stored on the order before the shopper left for the application. Key it on your order ID and keep the Affirm charge ID as a second column, because that's the value on Affirm's side when you reconcile. Store gclid, fbc, ttclid and the rest as their own columns, not inside a JSON blob you parse in every query.
Keep two revenue figures. The order total is what the shopper bought and what you send to ad platforms. Affirm's settlement is lower, because its merchant fee comes off before payout, and that's the number finance cares about. Load both and the margin cost of financed orders by campaign becomes one query. Check which settlement export your Affirm merchant portal offers and how it identifies each order.
Record status changes as rows, not overwrites: started, authorized, captured, refunded, financing cancelled. A table holding only the latest status can't tell you how many Affirm orders a campaign produced last month that later reversed. Order webhooks retry, so dedupe on order ID plus status before aggregating. The warehouse is also the only place you'll see whether a campaign sends shoppers who apply and don't complete at a higher rate, which no ad platform reports.
Affirm → BigQuery · what breaks
Why this join usually fails — Affirm → BigQuery
- 01
Whatever join key you decide on 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.
- 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.
- 03
The warehouse quietly disagreeing with every platform
This is not a bug — it is the point. Your warehouse counts orders; Google counts click-attributed conversions in its window; Meta counts differently again. When the four numbers differ, the warehouse is usually right about revenue and wrong about attribution, and knowing which question you are answering is the whole skill.
- 04
Nothing reconciles afterwards
BigQuery will not tell you anything is wrong. Verify by querying the table directly against your source system's own totals, and check for duplicate rows on the join key before trusting any aggregate.
Affirm → BigQuery · the fix
What working looks like — Affirm → BigQuery
Whatever join key you decide on on every order
Conversions arriving in BigQuery
The row lands in a table you own, joinable to every other table you own, with no window and no expiry.
Reconciled against the source
Affirm → BigQuery · architecture
How Affirm and BigQuery actually connect
- 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
BigQuery needs a click to match
BigQuery needs a schema and consistent types. The failure mode is not rejection, it is silent divergence: a column that arrives as a string in one load and an integer in the next, or a timestamp in the wrong zone, which produces answers that look plausible and are not.
- 3
The identifier is the bridge
Whatever join key you decide on, captured at the visit and carried into the Affirm charge.
- 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
Deduplication at the destination
Nothing deduplicates for you. Streaming inserts are at-least-once, so a retried load can create duplicate rows, and the only protection is a deduplication step you write and actually run.
Affirm → BigQuery · normal or broken
Working vs. broken, side by side — Affirm → BigQuery
Normal, not a fault
Whatever join key you decide on present on the order
Sent from your store's order webhook, on Affirm charge capture
Deduplicated correctly
Nothing deduplicates for you. Streaming inserts are at-least-once, so a retried load can create duplicate rows, and the only protection is a deduplication step you write and actually run.
Reconciles with the source
Actually broken
Whatever join key you decide on 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
This is not a bug — it is the point. Your warehouse counts orders; Google counts click-attributed conversions in its window; Meta counts differently again. When the four numbers differ, the warehouse is usually right about revenue and wrong about attribution, and knowing which question you are answering is the whole skill.
Nobody has reconciled it
Affirm → BigQuery · diagnose
Diagnostic order — Affirm → BigQuery
- 01
Count orders carrying whatever join key you decide on
- 02
Follow one real conversion end to end
- 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.
- 04
Reconcile warehouse order counts against each platform for one closed window
The gaps localize the problem: a gap against all platforms is a collection issue, a gap against one is that platform's window or matching.
- 05
Read the match rate, not the success message
BigQuery will not tell you anything is wrong. Verify by querying the table directly against your source system's own totals, and check for duplicate rows on the join key before trusting any aggregate.
Affirm → BigQuery · prove
How it gets proven — Affirm → BigQuery
Source of truth
Your store's orders financed through Affirm, cross-checked against Affirm's settlement.
- Whatever join key you decide on confirmed present on a live order.
- Warehouse order counts and revenue reconciled against the source system for a fully closed window, with duplicates checked on the join key.
- An approved Affirm order confirmed to report and a declined one confirmed not to.
Affirm → BigQuery · free audit
What we check in the free audit
- Count orders carrying whatever join key you decide on
- Follow one real conversion end to end
- Compare Affirm checkouts started, approved and captured
- Reconcile warehouse order counts against each platform for one closed window
- Read the match rate, not the success message
Checked against
Your store's orders financed through Affirm, cross-checked against Affirm's settlement.
Free30 minutesNo obligation
Affirm → BigQuery · when not to buy
When you don't need this — Affirm → BigQuery
- Measure identifier coverage yourself first — pull your last hundred orders and count how many carry whatever join key you decide on.
- If your average order value is low, Affirm is a poor fit for the payment method and the integration follows that.
- If you have one store and one ad platform, a warehouse is infrastructure you will maintain for a reconciliation you could do in a spreadsheet.
Affirm → BigQuery · what we deliver
What gets built — Affirm → BigQuery
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 BigQuery
Streaming inserts or scheduled batch loads from your order system, with the raw event retained alongside whatever you derive from it.
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.
From $400 · See packages
FAQ
Affirm → BigQuery questions, answered
Count orders where Affirm was selected against those that reached captured, grouped by the click identifier or UTM stored on the order. The gap includes abandons as well as declines unless your store records an explicit decline outcome.
Store both. Gross is the order total and what ad platforms receive; net is what Affirm settles after its merchant fee, and it's the one to use for profit by channel.
Almost always because whatever join key you decide on never reached the Affirm charge. 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. Measure coverage before debugging the dispatch.
There is no vendor identifier here. You choose the key — order ID, user ID, click identifier, hashed email — and you live with the consequences. That is the whole appeal and the whole risk: nothing is standardised for you and nothing is silently wrong in a vendor's favour either.
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.
BigQuery will not tell you anything is wrong. Verify by querying the table directly against your source system's own totals, and check for duplicate rows on the join key before trusting any aggregate.
More on Affirm → BigQuery
- Affirm → Google AdsConnecting Affirm to Google Ads
- Affirm → MetaConnecting Affirm to Meta Conversions API
- Affirm → GA4Connecting Affirm to GA4
Using Affirm for bookings? How Affirm bookings get tracked end to end
RELATED GUIDES
Where Affirm → BigQuery fits in the rest of your tracking
- Chargebee → BigQueryConnecting Chargebee to BigQuery
- Checkout.com → BigQueryConnecting Checkout.com to BigQuery
- Authorize.net → BigQueryConnecting Authorize.net to BigQuery
- Affirm → SnowflakeConnecting Affirm to Snowflake
- Affirm → SegmentConnecting Affirm to Segment
- Financial servicesConversion tracking for financial services, built for the compliance review
- GoCardless → BigQueryConnecting GoCardless to BigQuery
- Recurly → BigQueryConnecting Recurly to BigQuery
Free · 30 min
Get Affirm and BigQuery joined properly
Free30 minutesNo obligation
