JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 35
  • Score
    100M100P100Q56485F
  • License MIT

VibeCash - Payment infrastructure for AI agents

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 (vibecash) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    vibecash

    VibeCash - Payment infrastructure for AI agents.

    npm install -g vibecash

    TL;DR - Accept Payments in 30 Seconds

    # 1. Create wallet (one-time setup)
    vibecash wallet create
    # Saves credentials to ~/.vibecash/config.json
    
    # 2. Create a payment link
    vibecash link create 9.99 --name "My Product"
    # Returns: { "url": "https://pay.vibecash.dev/p/plink_xxx", ... }
    
    # 3. Send URL to customer, they pay, done!

    Quick Reference

    vibecash link create <amount>                    # Create reusable payment URL
    vibecash link create 19.99 --name "Pro" --currency USD
    vibecash link create 9.99 --success-url "https://myapp.com/thanks#session_id={CHECKOUT_SESSION_ID}"
    vibecash link list                               # List all links
    vibecash link get <id>                           # Get link details
    vibecash link deactivate <id>                    # Disable a link

    Verify Payment

    vibecash checkout get <session_id>
    # Response: { "session": { "status": "complete", ... } }

    Wallet

    vibecash wallet create    # Create new wallet, get API key
    vibecash wallet info      # Show balance
    vibecash wallet claim     # Get dashboard access link

    One-Time Checkout

    vibecash create 25.00 -d "Consulting"                    # Quick one-time payment
    vibecash checkout create --amount 50 --success-url URL   # With redirect

    Subscriptions

    vibecash create 9.99 --monthly -d "Pro Plan"             # Monthly subscription
    vibecash create 99 --yearly -d "Annual" --trial-days 14  # Yearly with trial
    vibecash subscription list                                # List all
    vibecash subscription cancel <id>                         # Cancel

    Products & Prices

    vibecash product create "Plan Name"                      # Create product
    vibecash price create <prod_id> 29.99 --type recurring --interval month

    Customers

    vibecash customer create --email user@example.com
    vibecash customer list
    vibecash customer portal <id>                            # Self-service portal URL

    Environment Variables

    VIBECASH_SECRET=sk_live_xxx      # API key (or use ~/.vibecash/config.json)
    VIBECASH_API_URL=https://api.vibecash.dev   # Default API endpoint

    Output Format

    vibecash --json <command>    # JSON (default, best for AI/scripts)
    vibecash --human <command>   # Human-readable tables

    Integration Example: Static Website Paywall

    vibecash link create 4.99 \
      --name "Premium Access" \
      --success-url "https://yoursite.com/unlock#session_id={CHECKOUT_SESSION_ID}"

    Step 2: Verify Payment in JavaScript

    // After payment, user lands on: https://yoursite.com/unlock#session_id=cs_xxx
    const sessionId = new URLSearchParams(location.hash.slice(1)).get('session_id');
    
    if (sessionId) {
      const res = await fetch(`https://api.vibecash.dev/v1/checkout/sessions/${sessionId}`);
      const { session } = await res.json();
    
      if (session.status === 'complete') {
        localStorage.setItem('paid', 'true');
        // Unlock content
      }
    }

    API Endpoints

    Action CLI Command API Endpoint
    Create wallet wallet create POST /v1/wallets
    Get wallet wallet info GET /v1/wallets/current
    Create payment link link create POST /v1/payment_links
    List payment links link list GET /v1/payment_links
    Get checkout session checkout get GET /v1/checkout/sessions/:id
    Create checkout checkout create POST /v1/checkout/sessions
    List products product list GET /v1/products
    List subscriptions subscription list GET /v1/subscriptions

    API Base URL: https://api.vibecash.dev


    Supported Payment Methods

    Method One-time Subscription
    Credit/Debit Card
    WeChat Pay
    Alipay
    PayNow (SGD only)

    Supported Currencies

    USD, EUR, GBP, CAD, AUD, SGD, CNY, JPY, HKD


    Common Patterns

    Create Subscription Product

    vibecash product create "Pro Plan"
    # Output: { "id": "prod_xxx", ... }
    
    vibecash price create prod_xxx 19.99 --type recurring --interval month
    # Output: { "id": "price_xxx", ... }
    
    vibecash checkout create --price price_xxx --mode subscription
    # Output: { "url": "https://pay.vibecash.dev/checkout/cs_xxx", ... }

    Poll for Payment Completion

    vibecash checkout get cs_xxx --wait --timeout 60000
    # Waits up to 60 seconds for payment to complete

    License

    MIT