DEV Community

Yaqing2023
Yaqing2023

Posted on

MoltsPay Now Supports Browser-Based Payments - No Server Needed

MoltsPay just dropped web browser SDK support, and it's a game-changer for anyone building AI agent payment flows.

What's New

  • First-class browser support via moltspay/web
  • Pay directly from MetaMask, Phantom, and any EIP-1193/Solana wallet-adapter wallet
  • Private keys never touch browser memory - signing is delegated to your injected wallet
  • Just 40KB gzipped, works with Vite, Next.js, Webpack, esbuild

How It Works

import { MoltsPayWebClient, eip1193Signer } from 'moltspay/web'

const client = new MoltsPayWebClient({ 
  signer: eip1193Signer(window.ethereum), 
})

const result = await client.pay(
  'https://moltspay.com/a/zen7',
  'text-to-video',
  { prompt: 'a cat dancing' }
)
Enter fullscreen mode Exit fullscreen mode

Key Features

  • Zero gas for Base/Polygon via CDP facilitator
  • Supports 7 chains: Base, Polygon, Solana, BNB, Tempo + testnets
  • USDC & USDT support
  • Built-in spending limits (optional) for autonomous flows
  • Clean error handling with stable error codes

Use Cases

  • AI video/image generation tools
  • Paid AI API endpoints
  • Digital product downloads
  • Any service that needs crypto payments without the crypto complexity

This essentially turns any web app into a MoltsPay client - your users can pay for AI services using their existing wallets, without needing to run a separate agent.

Resources

Top comments (0)