Skip to main content
Your dApp covers all gas costs. Users transact for free - you pay from your credit balance.

1. Sign up

Go to portal.avnu.fi and connect your wallet (your account must already be deployed). That’s your login - no email/password needed.
Team access: Use a multisig wallet (e.g., Ready 1/X) as your org wallet. Anyone who can sign gets access.

2. Create an API key

From the dashboard, create your first API key. Name it something useful (production, staging, etc.).
Same key works on Sepolia (free, unlimited) and Mainnet (uses credits). Test on Sepolia first.
NetworkEndpointCredits
Sepoliasepolia.paymaster.avnu.fiUnlimited (free testing)
Mainnetstarknet.paymaster.avnu.fiReal (costs STRK)

3. Add credits (mainnet only)

Credits are prepaid STRK. They fund your sponsored transactions.
  1. Click Add Credits on your API key
  2. Enter amount in STRK
  3. Approve + confirm the transaction
  4. Credits appear in ~30 seconds
The dashboard shows burn rate and runway (days until empty).

4. Integrate

import { PaymasterRpc } from 'starknet';

// Initialize paymaster with your API key
const paymaster = new PaymasterRpc({
  nodeUrl: 'https://starknet.paymaster.avnu.fi', // or sepolia.paymaster.avnu.fi for testing
  headers: { 'x-paymaster-api-key': process.env.AVNU_API_KEY },
});

// Execute any transaction - gas is paid from your credits
const result = await account.execute(calls, {
  paymaster: {
    provider: paymaster,
    params: {
      version: '0x1',
      feeMode: { mode: 'sponsored' } // You sponsor, user pays nothing
    }
  }
});
Security: Never expose API keys in frontend code. Use a server-side proxy to keep your key safe.

Server-side proxy (Next.js)

// app/api/paymaster/route.ts
export async function POST(request: Request) {
  const body = await request.json();

  const response = await fetch('https://starknet.paymaster.avnu.fi', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      'x-paymaster-api-key': process.env.AVNU_API_KEY!,
    },
    body: JSON.stringify(body),
  });

  return Response.json(await response.json());
}

Dashboard & analytics

The Portal gives you full visibility into your sponsored transactions. Overview - Total credits, burn rate, runway projection (“credits running out in X months”), unique users reached API key details - Gas consumed (STRK + USD equivalent), success rate, efficiency metrics (avg cost per transaction, per user), funding history Analytics - Transaction volume charts, gas cost trends. Filter by time range (7d / 30d / 90d / 1Y) and API key. Explorer - Search transactions by hash or user address. Filter by status (success/reverted). Export to CSV or JSON for reporting.

Usage API

const response = await fetch(
  'https://starknet.api.avnu.fi/paymaster/v1/sponsor-activity?startDate=2025-01-01&endDate=2025-01-31',
  { headers: { 'api-key': process.env.AVNU_API_KEY } }
);

const stats = await response.json();
// { txCount, succeededTxCount, strkGasFees, remainingStrkCredits, ... }
Low credits? The dashboard shows runway projection. Check programmatically via the API to automate monitoring.

Next steps