Bulk IAP Import
A typical UDP implementation consists of:
- Preparing your IAP Catalog inside your Unity project
- Building and uploading your APK file to the UDP console
However, putting together an IAP Catalog of hundreds of products in the Editor can be tedious, and that’s when you may want to leverage the Bulk IAP Import feature.
Bulk IAP Import lets you upload a CSV file to the UDP Console with all your IAP product details, including prices in multiple currencies and descriptions in multiple languages.
This section describes how to import your IAP items in bulk.
Implementation requirements
To add new IAP products
You should only use the Bulk IAP Import function to add new IAP products if you implemented UDP:
- With the UDP Package
- With Unity IAP, not using codeless
If your implementation is with Unity IAP codeless, don’t use the Bulk IAP Import function to add new IAP products to your catalog. Your game’s IAP products must be defined in the Editor’ IAP Catalog by the time you build your game APK, so your bulk upload would be in vain.
To add localized descriptions and prices
For all implementations, you can use Bulk IAP Import to assign descriptions in more languages and prices in more currencies to your existing IAP products.
With the UDP Package
You can use Bulk IAP Import to entirely redefine your game’s IAP Catalog without having to rebuild your game.
You only need to have a UDP implementation in good working order.
With Unity IAP (non codeless)
With Unity IAP, the IAP Catalog sync is unidirectional: from the Editor to the UDP Console only. You therefore cannot Pull an IAP Catalog that was uploaded on the UDP Console.
If you will upload your game’s IAP Catalog to the UDP Console via Bulk IAP Upload, you should prepare your game to fetch IAP product information from the UDP Console, rather than from the game client’s default IAP Catalog.
Simply do not invoke any IAP product retrieval method in your code to allow your game to fetch its entire IAP Catalog from the UDP Console.
For more information, see Querying IAP inventory.
With Unity IAP (codeless)
Don’t use the Bulk IAP Import function to add new IAP products, your bulk upload would be in vain. You must define your game’s IAP products in the Editor’s IAP Catalog by the time you build your game APK. See Filling in the IAP Catalog.
You can still, however, use Bulk IAP Import to assign descriptions in more languages and prices in more currencies to your existing IAP products. To ensure a successful operation, make sure that for each IAP product the ProductID and Product Type you define in the CSV file match exactly the values defined in your Editor’s IAP Catalog.
Download the CSV Template
- Select EDIT INFO on the Game Information page.
- Go to the In-App Purchases panel.
- Click IMPORT CATALOG.
- Click Download Template.
Fill in the CSV file
CSV files use commas (,) and semicolons (;) to separate data values. Commas separate primary data values, and semicolons separate subvalues.
Each IAP item must appear entirely on a single line within the CSV file.
You must enter data in the exact format of the template provided.
Data values for CSV files
See Filling in the IAP Catalog for general information on IAP item fields.
Each row in a CSV file of In-App Purchases can contain the following values. Do not pass empty values.
Field | Description |
product_id | Represents the ID of a unique IAP product product_id needs to start with a lowercase letter or a digit and must be composed of only lowercase letters (a-z), digits (0-9), underscores (_), and periods (.) |
language; product_name; description | When setting the language value, use the language code listed in TABLE A. UDP uses en-US as the default language. Use semicolon(;) to separate language, product_name and description. To include localized versions of the item's product name and description, you must list the default language, product_name, and description, followed by the languages, product_names, and descriptions for each locale. In the following example, the product has en-US (ENGLISH) as the default language and zh-CN (CHINESE) as a localization: en-US;Product 1;This is my first product; zh-CN; 产品1; 产品描述1. Note: After uploading the file, only the fields corresponding to languages already defined in the Game Info section will be imported. If you intend to support multiple languages, define them on the UDP Console before importing your IAP catalog. |
consumable | This value must be set to TRUE or FALSE (case insensitive). |
currency; price | When setting the currency value, use the currency code listed in TABLE B. The price must be positive.The default currency is USD. The price of each IAP product must immediately follow its corresponding currency. For example: USD;0.99;CNY;6 |
TABLE A - Language codes
Language | Code |
AFRIKAANS | af |
AMHARIC | am |
BULGARIAN | bg |
CATALAN | ca |
CHINESE | zh-CN |
CHINESE(HONG KONG) | zh-HK |
CHINESE (TAIWAN) | zh-TW |
CROATIAN | hr |
CZECH | cs |
DANISH | da |
DUTCH | nl |
ENGLISH (UK) | en-GB |
ENGLISH | en-US |
ESTONIAN | et |
FILIPINO | fil |
FINNISH | fi |
FRENCH (CANADA) | fr-CA |
FRENCH | fr-FR |
GERMAN | de |
GREEK | el |
HINDI | hi |
HUNGARIAN | hu |
INDONESIAN | id |
ITALIAN | it |
JAPANESE | ja |
KOREAN | ko |
LATVIAN | lv |
LITHUANIAN | lt |
MALAY | ms |
NORWEGIAN | no |
POLISH | pl |
PORTUGUESE (BRAZIL) | pt-BR |
PORTUGUESE (PORTUGAL) | pt-PT |
ROMANIAN | ro |
RUSSIAN | ru |
SERBIAN | sr |
SLOVAK | sk |
SLOVENIAN | sl |
SPANISH (LATIN AMERICA) | es |
SPANISH | es-ES |
SWAHILI | sw |
SWEDISH | sv |
THAI | th |
TURKISH | tr |
UKRAINIAN | uk |
VIETNAMESE | vi |
ZULU | zu |
TABLE B - Currency codes
Code | Code | Code |
AED | IDR | PEN |
ARS | ILS | PHP |
AUD | INR | PKR |
BGN | IQD | PLN |
BHD | ISK | QAR |
BND | JOD | RON |
BIF | JPY | RUB |
BRL | KES | SAR |
CAD | KHR | SDG |
CHF | KRW | SEK |
CNY | KWD | SGD |
CZK | LAK | THB |
DKK | LKR | TND |
DZD | LYD | TRY |
EGP | MAD | TWD |
EUR | MMK | TZS |
GBP | MXN | USD |
GHS | MYR | UYU |
HKD | NOK | VND |
HRK | NZD | ZAR |
HUF | OMR |
Example 1
product_id,language; product_name; description,consumable,currency; price com.mystudio.mygame.product1,en-US;Product 1;This is my first product; zh-CN; 产品1; 产品描述1,TRUE,USD;0.99;CNY;6;EUR;0.79 com.mystudio.mygame.product2,en-US;Product 2;This is my second product; zh-CN; 产品2; 产品描述2,FALSE,USD;1.99;CNY;12;EUR;1.59 com.mystudio.mygame.product3,en-US;Product 3;This is my third product; zh-CN; 产品3; 产品描述3,TRUE,USD;4.99;CNY;30;EUR;3.99
Example 2
product_id,language; product_name; description,consumable,currency; price com.mystudio.mygame.product1,en-US;Product 1;This is my first product,TRUE,USD;0.99 com.mystudio.mygame.product2,en-US;Product 2;This is my second product,FALSE,USD;1.99 com.mystudio.mygame.product3,en-US;Product 3;This is my third product,TRUE,USD;4.99
Upload your CSV file
- Select EDIT INFO on the Game Information page.
- Go to the In-App Purchases section.
- Click IMPORT CATALOG.
- Click Upload document or drag and drop your CSV file in the designated box.
- Click CREATE to upload your IAP Catalog to the UDP console.
Note: Uploading a CSV file entirely overwrites this revision’s IAP catalog. The UDP console only uses the information contained in your CSV file; any other IAP information you previously entered via the UDP console is lost.
Export a CSV file
If you want to re-use an existing IAP Catalog or add new products to it, click EXPORT CATALOG to download it, and use this file to make modifications on your IAP Catalog. Upload the final IAP Catalog back using IMPORT CATALOG.
The EXPORT CATALOG button is only shown if you have IAP products in your IAP Catalog, and is only visible in editing mode.