Fetch products

Fetch the products configured in your Revenipe dashboard and display them in your app.

Before you start

Before fetching products, make sure you have:

  • configured the Revenipe SDK

  • logged in a customer

  • created at least one product in the dashboard

  • activated the product

  • connected the product to the correct billing provider or configuration

Step 1: Fetch products

Call the products method after the customer is logged in.

Example
final products = await Revenipe.instance.getProducts();

Step 2: Display products in your app

Use the returned products to build your pricing UI.

Example
for (final product in products) { print(product.id); print(product.name); }

Product identifiers

Each product has a stable identifier from the Revenipe dashboard.

Use this identifier when starting a purchase or matching products in your app.

Example
final product = products.firstWhere( (product) => product.id == 'pro_plan', );

Why a product might not appear

If a product does not appear in the SDK response, check the product configuration in the dashboard.

  • the product is active

  • the product belongs to the correct app

  • the SDK uses the correct public key

  • the app is using the correct environment

  • the product has valid provider configuration

  • the customer is logged in before fetching products

Important

Do not hardcode all product data in your app.

Use Revenipe as the source for product configuration, pricing-related metadata, purchase configuration, and entitlement-backed access.

You can still customize how products are displayed in your app, but the product identifiers should match the products configured in Revenipe.

Next steps

After fetching products, use the selected product identifier to start a purchase flow.