Follow this flow before code integration.

1) Configure Gas Sponsorship

  1. Open Dashboard -> Gas sponsorship.
  2. Add gas budget using:
    • Crypto, or
    • Fiat
  3. Your deposit is converted and tracked as USD gas credit in the dashboard.

2) Review History

Check both:
  • Deposit history
  • Gas usage history
This helps you track top-ups and sponsorship consumption.

3) Configure Controls

Set and manage:
  • low balance thresholds
  • notification settings
  • sponsorship enable/disable

4) Create Paymaster and get API Key

  1. Go to Paymaster in the dashboard.
  2. Create a Paymaster for your app and fill these settings:
    • Paymaster Name: a readable name for your team (for example, Mainnet Sponsor).
    • Token Mode Enabled (isERC20): turn this on only if you want ERC20 fee collection mode.
    • Sponsorship Enabled (isSponsored): controls whether sponsor mode is allowed for this paymaster.
    • Treasury Wallet Address (treasuryWalletAddress): the wallet that receives token compensation in token mode.
    • Constant Fee (constantFee, range 0 to 10): extra token fee charged per operation in token mode.
    • Paymaster Validity (Minutes) (validUntilMinutes): how long generated paymaster data remains valid.
    • Wallet Restriction Type (restrictionType):
      • NONE: no wallet restriction
      • ALLOWLIST: only listed wallets are allowed
      • BLOCKLIST: listed wallets are blocked
    • Restricted Wallets (restrictedWallets): wallet list used when allowlist/blocklist mode is selected.
  3. Important conditional rule:
    • If Token Mode Enabled is ON (isERC20=true), Treasury Wallet Address and Constant Fee are mandatory.
  4. Open View details.
  5. Copy the Paymaster API key.
Use this API key in your createPaymasterClient(...) configuration.

Credit and settlement behavior

  • In both mode: "sponsor" and mode: "token", paymaster usage deducts from your USD gas credit.
  • In mode: "token", token charges are sent to the configured treasury wallet as compensation.
  • constantFee is an additional token fee amount charged from the user per userOp/transaction.
  • Validation-service enforces paymaster policy (isSponsored, isERC20, restrictions) and paymaster-v2 consumes that validated config.