Add many in-app purchases at once from a file
Give an Agent a list of products, and it creates them all in App Store Connect in one run, with their names, descriptions and review screenshots. Then finish them on the In-App Purchases tab.
The In-App Purchases tab adds one product at a time with Add Product (see Sell in-app purchases and subscriptions). When you have many, give an Agent the whole list instead. It writes the list into a JSON file, checks it, and creates every product in one run.
Before you start
- Your app has an App Store Connect record. See Create your app’s App Store Connect record.
- You’ve settled on the product IDs. “The product ID is what the app requests from StoreKit and cannot be changed later.” Neither can the type.
- The import makes one-off products only: consumables, non-consumables and non-renewing subscriptions. Auto-renewable plans live in a subscription group: see Sell a subscription in Sell in-app purchases and subscriptions.
What to put in the list
You don’t write the JSON yourself. Type the list in your message, or attach a spreadsheet with one row per product (see Send photos, files and sketches to an Agent). For each product, give:
| What | Required | What it is |
|---|---|---|
| Reference name | Yes | “The reference name is used only in App Store Connect and your reports.” |
| Product ID | Yes | Each one only once in the list. |
| Type | Yes | Consumable, non-consumable or non-renewing subscription. In the file: CONSUMABLE, NON_CONSUMABLE or NON_RENEWING_SUBSCRIPTION. |
| Family Sharing | No | On or off. It’s off unless you say. |
| Name and description, per language | No | What App Store Text holds: a Display Name and a Description for each language, such as English (U.S.), en-US. Each language you list needs a name; the description is optional. Each language appears once per product. “App Review needs at least the app’s primary language.” |
| Review screenshot | No | One PNG or JPEG for App Review. Attach it as a file (.png, .jpg or .jpeg) and say which product it’s for. |
The command’s help says “Pricing, availability, and offers are not part of this command.” The file has no place for a Review Note either. You add those afterward: see Finish the products, below.
Import the products
Ask in the Project’s chat, for example:
Add these in-app purchases to the app. Show me the plan before you create anything.
- 100 Coins: product ID com.example.app.coins100, consumable. English (U.S.) name "100 Coins", description "A pouch of 100 coins".
- Pro: product ID com.example.app.pro, non-consumable, Family Sharing on. English (U.S.) name "Pro", description "Unlock every feature". The attached pro.png is its review screenshot.- The Agent writes your list into the import file and runs
asc iap import --dry-run. That checks the file and lists what would happen, without creating anything: each product isplanned. It shows you the plan in the chat. - Read it. Fix any reference name, product ID or type now, since the product ID and the type can’t be changed later.
- Say yes. The Agent runs the import with
--confirm. The command creates nothing without it, so the Agent asks you first. For each product it creates the in-app purchase, then its languages, then its review screenshot. - The Agent tells you what it made. The command’s receipt counts the products created and skipped, the languages and screenshots added, and names a product that failed with its error.
If any product ID in the list already exists on the app, the run stops before anything is created. To add only the new ones, ask the Agent to skip the others: it runs the import with --skip-existing, and those products are listed as skipped.
If a product fails partway through, the run stops there. The command’s help says “the receipt lists every product already created; nothing is rolled back.” See If something goes wrong, below.
The command takes a limited number of products in one run. For a long list, ask the Agent to import it in parts.
Check them in AirBuild
Open the In-App Purchases tab (see Open the tabs in Sell in-app purchases and subscriptions). On iPhone and iPad, pull down to read the catalog from Apple again. The new products are listed with your one-off products, each with its product ID and type. A new product says Missing Metadata until it has what App Review needs.
Finish the products
Tap a product to open it. App Store Text has the languages the import added, and Review Screenshot says Set when one was uploaded. Price and Storefronts says Not Priced: the import doesn’t price anything.
- Set each price under Price and Storefronts, and add a Review Note. See Finish a product for App Review in Sell in-app purchases and subscriptions.
- To price many products at once, or to give some countries their own price, ask an Agent. See Set a different price in some countries.
- When they’re Ready to Submit, send them to App Review. See Send products to App Review in Sell in-app purchases and subscriptions.
If something goes wrong
The Agent says the product IDs already exist on the app.
product ID(s) already exist on app … (use --skip-existing to skip them). Nothing was created. Ask the Agent to skip those products, or change their product IDs in your list.The Agent says the type must be one of CONSUMABLE, NON_CONSUMABLE, NON_RENEWING_SUBSCRIPTION.
The Agent says there's a duplicate productId or a duplicate locale.
The Agent says a review screenshot isn't a PNG or JPEG.
review screenshot "…" is not a PNG or JPEG image, or that the file has another extension and “App Store Connect accepts only .png, .jpg, or .jpeg file names”. Export the picture as PNG or JPEG, attach it again, and ask the Agent to try once more.