# How to validate App Store attribution before release

> Validate the iOS attribution pipeline in sandbox before release, then confirm a real production purchase after the instrumented build is live.

Published: 2026-06-30 · Last reviewed: 2026-07-14

## Why you cannot test production early

A production App Store Server Notification only exists after a real purchase on a live build. TestFlight and every StoreKit testing mechanism emit the sandbox environment, so there is no way to generate a production event ahead of shipping. That means your first real end-to-end test would otherwise be gated behind App Store review, cost real money, and force another review cycle for any bug. The fix is to prove the pipeline in sandbox first.

## Prove the pipeline in sandbox

Register the app in your attribution platform as a Sandbox environment. A green sandbox run validates your instrumented integration before release: binding, forwarding, verification, and clawback all exercise the code you will ship. Environment-specific behavior still exists (renewal clocks, registration environment, real payment processing), so one real production confirmation after the instrumented build is live remains the final proof.

Sandbox subscriptions also renew on an accelerated clock, minutes instead of months, so you can watch an initial purchase, a renewal, and a refund-driven clawback in a single sitting. Open an affiliate link so a click is recorded, install from TestFlight, confirm the app bound an appAccountToken on first launch, make a sandbox purchase, and confirm the forwarded notification produced an attributed conversion. Then refund it and confirm the commission reverses.

## The environment gate

Registering the app as Production is a safety gate: a production app rejects sandbox notifications outright and writes nothing, which proves the isolation. A sandbox app accepts them and records the conversion as a test, excluded from real payouts. Match the environment to how you are buying: sandbox app for sandbox and TestFlight purchases, production app for a real App Store purchase.

## Confirm one real production sale, safely

Once the instrumented build is live, buy your own subscription through a referred link and confirm the real accrual. A commission hold makes this safe: a matured commission is held before it becomes payable, so a self-test purchase cannot pay out inside the window. Confirm the attribution, then refund the purchase so the clawback reverses the accrual and nothing ever settles.

## Frequently asked

### Can I test the production path with TestFlight?

No. TestFlight purchases always run in the sandbox environment. Test in sandbox first, then confirm one real App Store purchase once the instrumented build is live.

### Is it safe to test with a real purchase?

Yes, because a matured commission is held before it becomes payable. Confirm the attribution, then refund the purchase within the hold window so the clawback reverses it.

## Primary sources

- [Apple: testing with Xcode and sandbox](https://developer.apple.com/documentation/storekit/testing-at-all-stages-of-development-with-xcode-and-the-sandbox) · checked 2026-07-14
- [Apple: TestFlight uses sandbox](https://developer.apple.com/documentation/technotes/tn3186-troubleshooting-in-app-purchases-availability-in-the-sandbox) · checked 2026-07-14

## Next steps

- [iOS testing guide](/guides/ios-testing)
- [StoreKit 2 setup](/guides/ios)
