> For the complete documentation index, see [llms.txt](https://doc-primelms.mrb-lab.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc-primelms.mrb-lab.com/in-app-purchase-setup/17.-subscriptions-setup/17.3-code-setup-for-subscriptions.md).

# 17.3 Code Setup for Subscriptions

{% hint style="info" %}
Make sure you have completed all of the previous steps of 17, 17.1 & 17.2.
{% endhint %}

Go to the **lib/iAP/iap\_config.dart** file and add your **Product IDs** here separated with commas as shown in the picture below.

<figure><img src="https://3680394644-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyaJJT5ZOPh9eibDKGSOc%2Fuploads%2FPpAGm6VpJrAdfAafY8P6%2Fiap_configs.png?alt=media&amp;token=fde2dc64-72ae-443b-bfa4-e7711c27e89e" alt=""><figcaption></figcaption></figure>

After that set the iAPEnaled value to **true**.

<figure><img src="https://3680394644-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyaJJT5ZOPh9eibDKGSOc%2Fuploads%2Ftbhci1HSqfEKRZWfXyui%2Fiap_config.png?alt=media&amp;token=d938971d-1081-489d-b4d6-0e2f81fa0a31" alt=""><figcaption></figcaption></figure>

That's it. Your subscription setup is completed. Now, you can test the app and the products and publish your app in production by uploading a new version.

{% hint style="info" %}
To test the In-App Purchases feature, use a real Android or iOS phone. Emulators/Simulators won't support this.
{% endhint %}
