Appearance
Test your Mini App inside MiniPay
In this guide, you will learn how to test your Mini App inside MiniPay. Follow the steps below to get started.
Installing MiniPay
Install MiniPay on your device.
Create an account: Sign up using your Google or Apple account and phone number.
Test inside MiniPay
Enable Developer Mode:
Open the MiniPay app on your phone and navigate to settings.
In the About section, tap the Version number repeatedly until the confirmation message appears.
Return to Settings, then select Developer Settings.
Enable Developer Mode and toggle Use Testnet to connect to Celo Sepolia testnet (Chain ID 11142220). For production testing, leave testnet off to use Celo Mainnet.
Load Your Mini App:
In Developer Settings, tap "Load test page".
Enter your Mini App URL.
TIP
For local development, use ngrok to expose your localhost. See How do I run ngrok? below. Add
allowedHostsin Vite so the dev server accepts the ngrok host.Click Load to launch and test your Mini App.
Local testing
- Start your dev server (e.g.
npm run devorpnpm dev). Note the port (e.g. 5173). - Expose it with ngrok (see below):
ngrok http 5173. - Copy the HTTPS Forwarding URL from ngrok and paste it into MiniPay's "Load test page" field.
- Ensure your Vite config has
allowedHostsfor ngrok so the dev server accepts requests (see "Blocked request" below).
Sandbox vs production
- Testnet (Celo Sepolia): Use Developer Mode's "Use Testnet" to test with fake funds and avoid mainnet fees.
- Mainnet (Celo): Turn testnet off to test with real Celo and stablecoins. Use small amounts.
Debugging inside MiniPay
- Console: If your Mini App opens in a WebView that supports remote debugging, use your IDE or browser devtools to attach and view
console.log/ errors. - Common errors: "window.ethereum is required" means the app is not running inside MiniPay—load it via "Load test page". "Blocked request" usually means Vite needs
allowedHostsfor your ngrok domain.
Troubleshooting
Q: How do I run ngrok?
A: Ngrok is a command line interface (CLI) that runs on your local machine. It lets you expose your local server to the rest of the internet. So, once it's running, everyone can access your local environment.
First, you need to install and configure
ngrok. Follow ngrok's quickstart guide to learn how.When you're ready, start
ngrokby running:bashngrok http [port] #replace [port] with the port used by your localhostUse the
ForwardingURL you see in your terminal to access your local Mini App inside MiniPay.ngrok (Ctrl+C to quit) Session Status online Account inconshreveable (Plan: Free) Version 3.0.0 Region United States (us) Latency 78ms Web Interface http://127.0.0.1:4040 Forwarding https://84c5df474.ngrok-free.dev -> http://localhost:8080 Connections ttl opn rt1 rt5 p50 p90 0 0 0.00 0.00 0.00 0.00
Q: Seeing a Blocked request error?
A: If you're using Vite, make sure to allow the host you're using. Here's an example of the changes to make to vite.config.ts when using ngrok.
tsx
import react from "@vitejs/plugin-react";
import { defineConfig } from "vite";
export default defineConfig({
plugins: [react()],
server: {
allowedHosts: [".ngrok.app", ".ngrok-free.dev", ".ngrok-free.app"],
},
});