vibecash
v0.1.3
Published
VibeCash - Payment infrastructure for AI agents
Maintainers
Readme
vibecash
VibeCash - Payment infrastructure for AI agents.
npm install -g vibecashTL;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
Payment Links (Recommended)
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 linkVerify 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 linkOne-Time Checkout
vibecash create 25.00 -d "Consulting" # Quick one-time payment
vibecash checkout create --amount 50 --success-url URL # With redirectSubscriptions
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> # CancelProducts & Prices
vibecash product create "Plan Name" # Create product
vibecash price create <prod_id> 29.99 --type recurring --interval monthCustomers
vibecash customer create --email [email protected]
vibecash customer list
vibecash customer portal <id> # Self-service portal URLEnvironment Variables
VIBECASH_SECRET=sk_live_xxx # API key (or use ~/.vibecash/config.json)
VIBECASH_API_URL=https://api.vibecash.dev # Default API endpointOutput Format
vibecash --json <command> # JSON (default, best for AI/scripts)
vibecash --human <command> # Human-readable tablesIntegration Example: Static Website Paywall
Step 1: Create Payment Link with Redirect
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 completeLicense
MIT
