Skip to main content
Square → AppsFlyerIntegration guide

Connecting Square to AppsFlyer

Square holds the transaction, and for most Square businesses the majority of those transactions are a card tapped at a counter with no browser anywhere near them. AppsFlyer exists because mobile app attribution is a different problem from web attribution, and on iOS a large share of it is now aggregated and delayed by design rather than by accident. The join between them succeeds or fails on one thing: whether the AppsFlyer device identifier, appsflyer_id reaches the Square payment or order before the conversion happens, because AppsFlyer can only match a conversion it can tie back to a click it recognizes.

Free30 minutesNo obligation

Specific to this pair

Square In-App Payments to AppsFlyer: send purchases from the server

When your backend creates the Square payment from an In-App Payments SDK token, post the purchase to AppsFlyer's server-to-server API with the stored appsflyer_id, revenue, currency and Square payment ID. Do not also log it from the SDK. Record refunds and voids, and send counter payments by linked app users as a separate event.

AppsFlyer only applies to a Square merchant with its own mobile app, typically an ordering app that collects cards with Square's In-App Payments SDK. That SDK hands your backend a card token, and your backend creates the Square payment. That server call is the right place to send the AppsFlyer purchase, because it is the moment you know the payment succeeded, and the app user making it.

Store the appsflyer_id against your user when the app first opens, then post the purchase to the AppsFlyer server-to-server API with that ID, the revenue and currency from the Square payment, and the Square payment ID as your reference. Do not also log the purchase from the AppsFlyer SDK in the app, or every order counts twice and the duplicate is forwarded to every ad network AppsFlyer reports to.

Two Square-specific edges. Refunds and voids are common in food service, so check how your AppsFlyer setup records reversed revenue rather than leaving refunded orders in ROAS. And if app users also pay at the counter, those payments link to the app user only if the Square customer profile is tied to your app account; sending them is possible but they are not in-app purchases, so name them as a separate event.

Square → AppsFlyer · what breaks

Why this join usually fails — Square → AppsFlyer

  1. 01

    The AppsFlyer device identifier, appsflyer_id never reaches Square

    Square Online checkout is hosted, so the identifier must be carried deliberately rather than by cookie. For in-person payments there is no identifier at all unless the customer booked an appointment or is in the customer directory — a walk-in who taps a card cannot be joined to an ad click by anyone.

  2. 02

    Most of the revenue has no browser

    A card at a terminal has no click, no session and no identifier. That is a boundary to measure rather than a bug to fix, and the honest deliverable includes how much of your revenue sits outside it.

  3. 03

    Web conversions sent to a mobile attribution platform

    This is the common error and it produces confident nonsense. A purchase made on your website has no device identifier and no install behind it. AppsFlyer will either discard it or attribute it to nothing, and the revenue disappears somewhere between the two systems without anyone noticing it went.

  4. 04

    Nothing reconciles afterwards

    AppsFlyer shows the event on the raw data export with its attributed media source. Check the raw export, not the aggregate dashboard, and confirm the event carries a device identifier rather than landing as organic.

Square → AppsFlyer · the fix

What working looks like — Square → AppsFlyer

  • The AppsFlyer device identifier, appsflyer_id on every transaction

  • Conversions arriving in AppsFlyer

    The event is attributed to the install source, forwarded to whichever networks are configured, and appears in the cohort reporting.

  • Reconciled against the source

Square → AppsFlyer · architecture

How Square and AppsFlyer actually connect

  1. 1

    Square holds the truth

    Square records every payment with its amount, channel and, where the customer is identified, a link to the customer directory. That directory is the only bridge between a counter payment and anything that happened online.

  2. 2

    AppsFlyer needs a click to match

    AppsFlyer needs the device identifier and an event name it recognizes, plus the revenue value for in-app purchases. A server event about a user with no linked device cannot be attributed to an install.

  3. 3

    The identifier is the bridge

    The AppsFlyer device identifier, appsflyer_id, captured at the visit and carried into the Square payment or order.

  4. 4

    The event source decides reliability

    Subscribe to payment and order events and send from your server. This covers online orders cleanly, and covers in-person payments only for the share you can join to an identity.

  5. 5

    Deduplication at the destination

    AppsFlyer deduplicates in-app events by its own event identifier. Sending the same purchase from both the SDK and your server produces two events and double-counts revenue in every dashboard downstream, including the ad networks AppsFlyer forwards to.

Square → AppsFlyer · normal or broken

Working vs. broken, side by side — Square → AppsFlyer

Normal, not a fault

  • The AppsFlyer device identifier, appsflyer_id present on the transaction

  • Sent from the Square payment webhook

  • Deduplicated correctly

    AppsFlyer deduplicates in-app events by its own event identifier. Sending the same purchase from both the SDK and your server produces two events and double-counts revenue in every dashboard downstream, including the ad networks AppsFlyer forwards to.

  • Reconciles with the source

Actually broken

  • The AppsFlyer device identifier, appsflyer_id missing on most records

    Square Online checkout is hosted, so the identifier must be carried deliberately rather than by cookie. For in-person payments there is no identifier at all unless the customer booked an appointment or is in the customer directory — a walk-in who taps a card cannot be joined to an ad click by anyone.

  • Sent from the browser

    A card at a terminal has no click, no session and no identifier. That is a boundary to measure rather than a bug to fix, and the honest deliverable includes how much of your revenue sits outside it.

  • Counted twice, or not at all

    This is the common error and it produces confident nonsense. A purchase made on your website has no device identifier and no install behind it. AppsFlyer will either discard it or attribute it to nothing, and the revenue disappears somewhere between the two systems without anyone noticing it went.

  • Nobody has reconciled it

Square → AppsFlyer · diagnose

Diagnostic order — Square → AppsFlyer

  1. 01

    Count transactions carrying the AppsFlyer device identifier, appsflyer_id

  2. 02

    Follow one real conversion end to end

  3. 03

    Split Square revenue by channel before anything else

    Online versus in-person. Every subsequent number depends on that split, and blending them makes both unreadable.

  4. 04

    Check what share of your revenue happens in the app at all

    If most purchases are on the web, AppsFlyer is not your conversion destination and the work belongs somewhere else entirely.

  5. 05

    Read the match rate, not the success message

    AppsFlyer shows the event on the raw data export with its attributed media source. Check the raw export, not the aggregate dashboard, and confirm the event carries a device identifier rather than landing as organic.

Square → AppsFlyer · prove

How it gets proven — Square → AppsFlyer

Source of truth

Square's transaction list, split by channel — online and in-person are different questions.

  • The AppsFlyer device identifier, appsflyer_id confirmed present on a live transaction.
  • In-app revenue events reconciled per transaction against your billing system, with the organic share stated rather than assumed away.
  • The in-person join rate measured and stated as a number before any coverage claim is made.

Square → AppsFlyer · free audit

What we check in the free audit

  • Count transactions carrying the AppsFlyer device identifier, appsflyer_id
  • Follow one real conversion end to end
  • Split Square revenue by channel before anything else
  • Check what share of your revenue happens in the app at all
  • Read the match rate, not the success message

Checked against

Square's transaction list, split by channel — online and in-person are different questions.

Get my free conversion tracking audit

Free30 minutesNo obligation

Square → AppsFlyer · when not to buy

When you don't need this — Square → AppsFlyer

  • Measure identifier coverage yourself first — pull your last hundred transactions and count how many carry the AppsFlyer device identifier, appsflyer_id.
  • If nearly all your revenue is in person with no appointments and no identified customers, there is very little here to attribute and we will say so rather than build a bridge to nothing.
  • If you have no mobile app, this is not a destination for you. If you have one but sell mostly on the web, send web conversions to your ad platforms directly and use AppsFlyer only for install and in-app events.

Square → AppsFlyer · what we deliver

What gets built — Square → AppsFlyer

  • Identifier capture into Square

    Capture the click identifier and carry it into Square Online checkout, and for in-person work use an appointment booking as the bridge so the eventual payment can be joined through the customer record.

  • Event source: the Square payment webhook

    Subscribe to payment and order events and send from your server. This covers online orders cleanly, and covers in-person payments only for the share you can join to an identity.

  • Dispatch to AppsFlyer

    The AppsFlyer server-to-server events API, posted from your billing system with the device identifier and revenue.

  • Reversals where they exist

    Square exposes refunds clearly, and in hospitality and services voids and comps are frequent enough that wiring the reversal matters.

Written guarantee

95%+ tracking accuracy

Measured against Square's transaction list, split by channel — online and in-person are different questions.. Miss it and we keep working at no cost.

Get my free conversion tracking audit

From $400 · See packages

FAQ

Square → AppsFlyer questions, answered

From your backend after the Square payment succeeds, using the server-to-server events API with the stored appsflyer_id and revenue. Do not also fire the purchase from the app SDK.

Free · 30 min

Get Square and AppsFlyer joined properly

Free30 minutesNo obligation