Skip to content
Proofline

Reference

Testing and sandbox

You should see a test receipt the day you integrate, long before a real creator sale.

Keys

Each app has one publishable key, in App settings → Publishable key. Use it in debug and release builds alike: Proofline tells sandbox purchases from real ones by the store’s environment, not by the key, so a sandbox purchase never earns commission whichever build made it. Keys from the hosted platform start with pk_live_; a local development server issues pk_test_ keys.

Rotating the key replaces it and the old one stops working at once, so builds that still carry it send nothing until you ship the new key. Point the SDK at your Proofline platform with baseURL (Swift) or baseUrl (TypeScript): https://app.proofline.link.

A sandbox purchase, end to end

  1. Create a test creator in your program, with a link and a code (for example TEST20).
  2. Open the creator link on a device, from Safari or a social app, so a click is recorded.
  3. Buy in the sandbox with a sandbox Apple Account (or a Play license tester), redeeming the code or using the link.
  4. Watch the receipt appear under Attribution → Receipts with environment Sandbox.

Sandbox purchases produce receipts so you can check the decision, but they never earn commission and never reach a payout.

Integration Doctor

The Doctor walks through the chain and turns each step green: purchase data connected, a test click recorded, the SDK identified the user, a sandbox purchase arrived, and a receipt was written. If a step stays red, it tells you which one and why.

Webhooks from RevenueCat

RevenueCat’s Send test event checks your URL and authorization header. Proofline answers 200 within two seconds and stores the event; a test event never creates a commission.

One RevenueCat project, several apps

Each Proofline app has its own webhook URL. If one RevenueCat project serves several of your apps, tell Proofline which events belong to which app, or each app also records the others’ purchases:

  • In Proofline → Integrations → RevenueCat → Update, fill in RevenueCat app ids with the RevenueCat app ids of this app (the app_id field of its webhook events, comma-separated). Events from other RevenueCat apps are acknowledged with 200 { "ignored": "other_app" } and not stored.
  • Or set the proofline_app_id subscriber attribute to the Proofline app id (the id in the webhook URL), for example with Purchases.shared.attribution.setAttributes(["proofline_app_id": appId]) (iOS) or Purchases.setAttributes({ proofline_app_id: appId }) (React Native). An event whose proofline_app_id names another app is ignored the same way.

Leave both empty when the RevenueCat project serves only this app.

Offline and retries

The SDK queues events offline and retries with backoff; each event has an idempotent ID, so a retry never double-counts. To test, turn on airplane mode, submit a code, then reconnect.

Troubleshooting

Symptom Likely cause
No click recorded The link was opened from a cached preview, or the URL lost its path segment
Purchase arrived, no receipt The SDK didn’t identify the user before purchase, so there’s no appAccountToken
Receipt shows tier U, expected V The code was typed in the app instead of redeemed in the App Store
401 from the SDK Wrong key type (the SDK needs the publishable pk_ key, not sk_), or a rotated key
413 from the SDK A request body over 64 KB; the SDK sends one small event per request, so check what you pass in
422 from the SDK A field failed validation, for example a user id you identify with that contains a NUL character or an unpaired surrogate
Nothing arrives at all baseURL / baseUrl isn’t your Proofline platform URL