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. The pipeline is environment-agnostic: the only thing that differs between sandbox and production is the environment field on the event, so a green sandbox run means the production code path is the same code path.
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.