Log in to Google Play Console:
Navigate to the Google Play Console.
Log in with your Google account.
Select Your App:
Choose the app for which you want to add in-app products.
Go to "Monetize" Section:
In the left menu, click on "Monetize" to access the Monetization setup.
Add a New Product:
Click on the "Products" tab and then the "+" button to add a new product.
Choose Product Type:
Select the appropriate product type (in-app purchases, subscriptions, etc.).
Configure Product Details:
Provide the necessary details, including the product's title, description, price, and any other required information.
Define Pricing:
Set the pricing for your in-app product. You can set different prices for different regions if needed.
Save and Activate:
Save your changes and activate the in-app product. This makes it available for users to purchase.
Testing License Key:
If you are testing in-app purchases, you can use a test license key. Copy the key from the "Services & APIs" section in the Google Play Console.
Publish Changes:
Once you've configured your in-app product, remember to click "Save" or "Publish" to apply the changes.
Log in to Apple Developer Center:
Go to the Apple Developer Center.
Log in with your Apple ID.
Access App Store Connect:
In the developer account, access the "App Store Connect" section.
Select Your App:
Choose the app for which you want to set up in-app purchases.
Go to "In-App Purchases" Section:
In the left sidebar, click on "In-App Purchases."
Add a New In-App Purchase:
Click the "+" button to add a new in-app purchase.
Choose Product Type:
Select the type of in-app purchase you want to create (consumable, non-consumable, auto-renewable subscription, etc.).
Configure In-App Purchase Details:
Provide details such as the reference name, product ID, pricing, and any other required information.
Define Pricing and Availability:
Set the pricing for your in-app product. You can also define availability in different regions.
Review and Submit:
Review your in-app purchase details and make sure everything is configured correctly.
Submit for Review (if required):
If your app is not in the "Ready for Sale" state, you may need to submit the in-app purchase for review.
Testing with Sandbox Tester:
To test in-app purchases, set up a sandbox tester account in the "Users and Access" section. Use this account to test the in-app purchase flow during development.
Save Changes:
Save your changes in App Store Connect.
# pubspec.yaml |
// Example: Initializing In-App Purchases in Flutter |
// Example: Displaying products for purchase |
Initiating the Purchase Process
// Example: Initiating the in-app purchase process |
// Example: Verifying and handling consumable purchases |
Restoring Purchases
// Example: Restoring previous purchases |
// Example: Initiating subscription purchase |
Handling Subscription Renewals and Cancellations
// Example: Handling subscription status changes |
// Example: Testing in-app purchases locally |
Debugging In-App Purchase Issues
flutter run --enable-software-rendering |
Hire Flutter developers to elevate your Flutter app design. Unlock the full potential of Flutter layouts with our professional Flutter developers.