JSPM

  • Created
  • Published
  • Downloads 3305
  • Score
    100M100P100Q107863F
  • License SEE LICENSE IN LICENSE

AI-powered payments for Claude Code

Package Exports

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@visa/cli) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    Visa CLI

    Enable AI agents to make real payments. Two commands to start, zero build steps.

    npm install -g @visa/cli
    visa-cli setup

    Then ask Claude:

    Generate me an image of a sunset

    Quick Start

    1. Install

    npm install -g @visa/cli

    2. Setup

    visa-cli setup

    This does three things in one step:

    1. Registers the MCP server with Claude Code
    2. Opens a browser for GitHub sign-in + card enrollment
    3. Generates a Secure Enclave attestation key (for Touch ID verification)

    Restart Claude Code or run /mcp to connect, then start using it.

    3. Start Using It

    Ask Claude naturally:

    Generate me an image of a sunset
    What's the price of SOL right now?
    Make me a lofi jazz beat
    Generate a video of waves crashing on a beach

    All payments are handled automatically with your enrolled card. Touch ID confirms each transaction. Result URLs (images, audio, video) open automatically in your browser.


    Available Tools

    AI Generation

    Tool What it does Cost
    generate_image_card Generate an AI image (Ultra) — FLUX1.1 [pro] ultra, 2K resolution ~$0.06
    generate_image_fast_card Generate an AI image (Fast) — FLUX1.1 [pro], 1K resolution ~$0.04
    generate_video_tempo_card Generate an AI video — Grok Imagine Video (xAI), ~6s clip at 720p ~$0.30
    generate_music_tempo_card Generate a music track via Suno AI ~$0.10
    check_music_status_tempo_card Check music generation status and get audio URLs ~$0.01

    Data & Crypto

    Tool What it does Cost
    query_onchain_prices_card Query real-time token prices from 150+ blockchains via Allium ~$0.02

    Payments & Account

    Tool What it does Cost
    pay Pay a merchant URL (auto-detects payment rail) varies
    batch Run any paid tool multiple times in parallel with one Touch ID approval per-item × count
    get_status Check enrollment, cards, and spending controls free
    get_cards List enrolled cards (masked, last 4 only) free
    transaction_history View recent transactions and generated media free
    update_spending_controls Set daily limit, max per-transaction, approval mode free
    add_card Add a payment card free
    login GitHub sign-in + card enrollment free
    feedback Submit feedback about Visa CLI free
    reset Clear all credentials from this device free

    Security

    Every payment requires Touch ID (macOS) via Secure Enclave. This cannot be disabled or bypassed — attestation is verified server-side.

    Layer Protection
    Session token macOS Keychain (only credential on device)
    Touch ID Secure Enclave ECDSA signing (hardware-backed)
    Spending limits Server-side enforcement
    Rate limiting Server-side per-session
    Card data Server-side only (never touches the client)

    Spending Controls

    Setting Default Description
    Max per transaction $100 Per-transaction ceiling
    Daily limit $500 Daily spend ceiling
    Daily transaction count 50 Daily transaction count ceiling

    Adjust with: "Set my daily limit to $200"


    CLI Commands

    visa-cli setup             # Register MCP server, authenticate, and generate attestation key
    visa-cli status            # Show enrollment and spending controls
    visa-cli feedback "msg"    # Submit feedback about Visa CLI
    visa-cli reset --confirm   # Clear session and attestation key

    Troubleshooting

    "Authentication required" — Run visa-cli setup to log in and enroll a card.

    "Session expired" — Run visa-cli setup to re-authenticate.

    "Amount exceeds limit" — Ask Claude to increase your spending limit, or use update_spending_controls.

    "Rate limited" — Wait a few seconds and try again.

    Batch request failed / "Merchant server error" — The upstream API (e.g. fal.ai) may be temporarily overloaded. Wait a minute and retry with a smaller batch. Timeouts scale automatically with batch size.

    Tools not showing in Claude Code — Run /mcp in Claude Code to reconnect, or restart Claude Code.


    Requirements

    • macOS (Touch ID or system password required for payment approval)
    • Node.js 18+
    • Claude Code

    Use of this software is governed by the Visa CLI Terms of Use and Privacy Notice.