Skip to main content

Simulating Purchases from the iap.dev Web Console

This tutorial will guide you through simulating a purchase directly from the iap.dev web console, allowing you to test your integration without using Postman or going through the Google Play billing flow.

Prerequisites

  • Access to the iap.dev console
  • The Doggie Treats sample app installed on your device

Steps

1. Create a Test Device

  1. In the iap.dev console, navigate to your project.
  2. Go to the "Devices" section.

Devices Button

  1. Create a new device or select an existing one. (Different from the one running the native app)
  2. Note the device ID for later use.

2. Prepare the Doggie Treats App

  1. Open the Doggie Treats app on your device.
  2. Ensure you're on the app's home screen.

3. Simulate a Purchase

  1. In the iap.dev console, navigate to "Product Purchases".

Product Purchases Button

  1. Click on the "Purchase" button.

Product Purchase Button

  1. Fill in the purchase details:
    • Device: Select the device you created/noted earlier
    • Product: Choose the product you want to purchase
    • Purchase State: Select "PURCHASED"
    • Quantity: Enter 1 (or the desired quantity)

Create Purchase Form

  1. Click "PURCHASE PRODUCT" to simulate the purchase.

4. Verify the Results

  • In the Doggie Treats app:

    • You should see the confetti animation, indicating that the purchase event was received.
  • In the iap.dev console:

    • Navigate back to the "Product Purchases" section.
    • You should see a new purchase entry for the selected product and device.

Troubleshooting

If you don't see the expected results:

  • Ensure the selected device in the console matches the device running the Doggie Treats app.
  • Verify that the Doggie Treats app is properly configured with your iap.dev project details.
  • Check that the product you selected for purchase is correctly set up in your project.

Next Steps

This method of simulating purchases from the web console is useful for:

  • Testing various purchase scenarios quickly
  • Verifying that your app correctly handles different purchase states
  • Simulating bulk purchases or unusual purchase patterns

Try experimenting with different products, quantities, and purchase states to ensure your app handles all scenarios correctly.