Skip to content

Sandbox testers ​

Connect App Store Connect to change a sandbox tester's renewal rate and clear its purchase history before you rerun purchase flows.

Connect Astra Scout to App Store Connect to clear a sandbox tester's purchase history and speed up its renewals inside the app, without opening the website. An Admin sets up the key; testers use it from then on.

A sandbox tester is an Apple account used only for test purchases: the transactions are fake and nothing is charged. You create it in App Store Connect, Apple's website for managing apps. An account that already bought a subscription does not see the trial offer again, and a real subscription renews too slowly to test.

Before you start ​

  • An App Store Connect API key (a key that lets Astra Scout talk to Apple): a .p8 file, its Issuer ID and its Key ID.
  • An Apple account role that can manage sandbox testers (Admin or Account Holder).
  • At least one sandbox tester in App Store Connect > Users and Access > Sandbox.

A team key (recommended) is created by an Admin in App Store Connect > Users and Access > Integrations, with the Admin role. Apple lets you download the .p8 file a single time, so save it.

An individual key is also supported. It has no Issuer ID: turn on Individual key in the pane.

Set up ​

  1. Choose Astra Scout > Settings… (Cmd+,) and click App Store in the sidebar. The pane's title reads App Store Connect.
  2. In the API key section, type the Issuer ID and the Key ID. For an individual key, turn on Individual key instead; the Issuer ID field goes away.
  3. Click Choose .p8 File… and pick the file. The row reads "Key chosen: " followed by the file name and "Press Save." Nothing is saved yet.
  4. Click Save. The row then reads Key saved. (Save stays disabled until the Key ID, a key and, for a team key, the Issuer ID are all set.)
  5. Click Test Connection. On success it reads Connected · N sandbox testers, where N is the number of sandbox testers in the account.
  6. A Sandbox tester section appears. Choose the tester your iOS device signs in with. It starts at None.

Settings > App Store

The key is stored encrypted on this Mac and is never shown again. Remove asks "Remove the App Store Connect key?" and deletes it from this Mac.

If the account has no sandbox tester yet, the section says "No sandbox testers in this account yet" and where to create one. If you delete the chosen tester in App Store Connect, Astra Scout forgets the choice the next time it loads the list, and the picker goes back to None.

Change the renewal rate ​

  1. Under Sandbox tester, choose a tester. The Subscription renewal rate menu appears only for a chosen tester.
  2. Open Subscription renewal rate and choose a rate.
  3. The line under it shows how long a 6-month subscription lasts at that rate. Apple may take up to an hour to apply it.

Apple renews a sandbox subscription at most 12 times, then it ends.

Rate1 week1 month2 months3 months6 months1 year
Every 3 minutes3 min3 min6 min9 min18 min36 min
Every 5 minutes (Apple's default)3 min5 min10 min15 min30 min1 h
Every 15 minutesabout 5 minabout 15 minabout 30 minabout 45 minabout 1 h 30 minabout 3 h
Every 30 minutes10 min30 min1 h1 h 30 min3 h6 h
Every hour15 min1 h2 h3 h6 h12 h

The rate changes only when you choose one here, or when an AI CLI asks for it (see From a terminal).

Clear the purchase history ​

  1. Connect the device (see Devices) and open the ... menu in the device toolbar (its tooltip is "More Device Actions").

  2. Choose Clear Sandbox Purchase History…. The item is in the menu of every iOS device, simulators included. If no key or tester is set up yet, Settings opens on App Store instead; set them up, then try again.

  3. A native dialog titled "Clear sandbox purchase history?" names the sandbox account and warns that this cannot be undone. Click Clear History (or Cancel).

    The confirmation dialog

  4. While the request is sent, the ... button shows a spinner. Then an alert Clear request sent appears: Apple received the request but does not say when it finishes. Click OK.

    The result alert

A subscription that has not ended stays until it ends. The dialog tells how long a 6-month subscription lasts at the current rate. If you rerun purchase flows often, choose a fast renewal rate first.

After clearing ​

  1. If iOS asks, sign in to the sandbox account again.
  2. Open Settings > Developer > Sandbox Apple Account. iOS may have turned off Allow Purchases & Renewals; turn it back on.
  3. Relaunch the app and check that it shows the free state or the paywall.
  4. Run the purchase flow.

See Purchase testing for the rest of the iOS device setup.

From a terminal ​

If you drive Astra Scout with an AI CLI (Claude Code, Codex, Gemini CLI), a CLI with the Astra Scout plugin can use the same key (see The scout plugin and the test-purchase skill):

  • list_sandbox_testers lists the testers. It only reads.
  • set_sandbox_renewal_rate changes a tester's rate.
  • clear_purchase_history never acts by itself. It answers NEEDS_CONFIRMATION, and the same native dialog as above ("Clear sandbox purchase history?") appears in Astra Scout. The request is listed as Awaiting confirmation under Activity from CLIs in Settings > Intelligence > MCP Connection. Nothing is cleared until you click Clear History.

Troubleshooting ​

MessageFix
Apple rejected the API key: check the Issuer ID, Key ID and the .p8 file.Check the three values. The .p8 file must belong to that Key ID. An individual key needs Individual key turned on.
This API key is not allowed to manage sandbox testers (it needs the Admin or Account Holder role).Ask an Admin to create the key, or to change the role of its owner.
This sandbox tester was not found in App Store Connect (it may have been deleted).Choose another tester under Sandbox tester.
Apple is rate limiting requests. Wait a moment and try again.Wait a minute, then retry.
The stored key cannot be opened any more. Choose the .p8 file again.Click Choose .p8 File… and Save.
Cannot reach App Store Connect. Check the network.Check the Mac's connection.
This file is not a .p8 private key.Pick the .p8 file you downloaded from App Store Connect.