Skip to content
Proofline

Guides · Purchase data

Apphud

Proofline reads Apphud’s server-to-server webhooks. Apphud offers them on its Expert and Enterprise plans.

1. Connect Apphud in Proofline

Open Integrations for your app and connect Apphud. Leave the secret token blank and Proofline generates one. It is shown once, so copy it before you close the dialog. Your webhook URL is:

https://app.proofline.link/api/ingest/apphud/<appId>

2. Add the webhook in Apphud

Add a webhook connection in Apphud for each platform you sell on (iOS, Android). For each one:

  • URL: the URL above.
  • Secret token: the token from Proofline. Apphud sends it in the X-Apphud-Token header. Proofline compares it in constant time and rejects requests without it with 401.
  • Environment: production. Turn sandbox on only for a test connection. Apphud’s payload has no environment field of its own, so Proofline reads it from the subscription in the event.

Proofline checks the event’s bundle id and package name against your app. Events for another app are acknowledged and ignored.

3. Link purchases to the Proofline user

Purchases are tied to creators through the Proofline end-user id. Store it as an Apphud user property, and start Apphud with the same user id you give Proofline’s identify call:

let token = try await Proofline.identify(userID: user.id)
Apphud.start(apiKey: "app_…", userID: user.id)
Apphud.setUserProperty(key: .init("proofline_end_user_id"), value: token.uuidString, setOnce: false)

What Proofline reads

Apphud event In Proofline
subscription_started, intro_started, promo_started, trial_started, non_renewing_purchase Purchase (a trial at price 0)
subscription_renewed, intro_renewed, promo_renewed Renewal
trial_converted, intro_converted, promo_converted Renewal, when the event carries a transaction and a price
*_refunded Refund, reversed against the stored purchase
subscription_canceled, trial_canceled, autorenew_*, *_expired, billing_issue Subscription state
revenue Ignored: it repeats every revenue event, and counting it would double revenue

Money comes from local_price in the purchase currency, converted once to integer minor units. Tax and the store fee come from local_tax and local_proceeds (Apphud’s proceeds after commission and tax). On Google Play, Apphud reports the order id and the purchase token. Proofline keys the transaction on the order id, just as Google Play’s own notifications do.

If another source reports the same purchase

Apphud reports the store’s own transaction ids, so a purchase also reported by RevenueCat, the stores’ notifications or another subscription tool earns at most one commission per program. When your Stripe account is connected to Proofline directly, Stripe purchases that Apphud reports are ignored and Stripe’s own events are used.

Privacy

Apphud events include IP addresses, e-mail, device lists and attribution data. Proofline stores only the fields it needs and drops the rest when the event arrives.

Limits

  • No backfill: events from before you connect are not imported, and there is no nightly reconciliation for Apphud yet.
  • Duplicates are ignored by Apphud’s event id.
  • Apphud turns off a connection after more than 50 failed deliveries in 48 hours. The Integration Doctor warns when no event has arrived for a week.