Payment Systems

Payment Systems Integration

Overview

VIBE AI supports multiple payment systems to enable flexible monetization and user payments:

  1. x402 Protocol - HTTP-native micropayments for agent commerce
  2. NOWPayments - Cryptocurrency payments for credits and marketplace
  3. Coinbase Payments MCP - Native wallet operations and DeFi

1. x402 Protocol

What is x402?

x402 is an HTTP-native micropayment protocol that enables pay-per-use API access without API keys or subscriptions. It uses HTTP status code 402 Payment Required to request payment before serving content.

Features

  • No API Keys - Just sign a transaction
  • Pay-per-Use - Pay exactly what you consume
  • Instant Settlement - USDC on Base network
  • Low Fees - ~$0.01 per transaction
  • Agent-to-Agent - Autonomous commerce
  • Data Marketplace - Alpha signals and research data
  • Trigger Marketplace - Autonomous behavior templates

Integration

# Seller side - Protect your endpoint
@x402_protected(price="0.01", asset="USDC")
async def agent_endpoint(request):
    # Your agent logic
    return result

# Buyer side - Pay and call
result = await x402_client.pay_and_call(
    service_url="https://agent.example.com/api/analyze",
    payment={"amount": "0.01", "asset": "USDC"},
    request_data={"query": "BTC analysis"}
)

Revenue Distribution

  • Creator: 90%
  • Platform: 10%

Technical Details

ParameterValue
Protocolx402 (HTTP 402)
NetworkBase (Ethereum L2)
CurrencyUSDC
SettlementInstant
Gas Cost~$0.01

VIBE Marketplaces

Two distinct marketplaces powered by x402:

1. Trigger Marketplace

Sell autonomous agent behaviors (Agent + Trigger bundles):

Features:
- Trending algorithm (performance-based ranking)
- Featured section (staff picks)
- 6 categories: trading, social, defi, whale, alpha, x402
- One-click installation to user's agent
- Dual revenue: Marketplace sales + x402 data resale
- Creator revenue: 90% | Platform: 10%

Live Examples:

  • Whale Movement Tracker
  • Smart Money Signals
  • Twitter Sentiment Analysis
  • DeFi Yield Hunter

2. Data Marketplace

Sell research data and alpha signals:

Features:
- Alpha signals (token picks, entry/exit points)
- Research data (on-chain analytics, KOL tracking)
- Subscription model (one-time purchase)
- Bundle discounts (10-30% off)
- Pay-per-query via x402

Live Examples:

  • Nansen Smart Money data
  • Top Traders alpha signals
  • FourMeme memecoin discoveries
  • PumpFun token launches

2. NOWPayments

Overview

NOWPayments provides cryptocurrency payment processing for credit purchases and marketplace transactions.

Features

  • 252+ Cryptocurrencies - BTC, ETH, USDT, USDC, and more
  • Credit System - Pay-as-you-go model
  • Marketplace Integration - Agent purchases
  • Real-time Webhooks - Payment status updates
  • HMAC-SHA512 Security - Signature verification

Credit Packages

PackagePriceCreditsBonus
Starter$25250%
Professional$100110+10%
Enterprise$500600+20%
Unlimited$1,0001,300+30%

API Endpoints

POST   /api/billing/nowpayments/create-credit-purchase
GET    /api/billing/nowpayments/payment-status/{payment_id}
POST   /api/billing/nowpayments/webhook
GET    /api/billing/nowpayments/available-packages
GET    /api/billing/nowpayments/currencies
GET    /api/billing/nowpayments/min-amount
GET    /api/billing/nowpayments/estimate
GET    /api/billing/nowpayments/api-status

Payment Flow

1. User selects credit package
   │
   ▼
2. Backend creates NOWPayments payment
   │
   ▼
3. User pays with cryptocurrency
   │
   ▼
4. NOWPayments webhook confirms payment
   │
   ▼
5. Credits added to user account

Integration Status

Active - Fully operational

  • Credit purchases working
  • Marketplace payments ready
  • Webhook handling implemented
  • QR code payment interface

3. Coinbase Payments MCP

Overview

Coinbase Payments MCP (Model Context Protocol) provides native wallet operations through the Coinbase Developer Platform.

Features

  • Multi-Network Support - Base, Ethereum, Polygon, Arbitrum, Optimism, Solana, and more
  • Wallet Management - Create, manage, and monitor wallets
  • Transaction Execution - Send tokens, interact with contracts
  • DeFi Operations - Swaps (Uniswap, Jupiter), staking, lending
  • Gas Management - Automatic gas price optimization

Capabilities

Wallet Operations:

  • Get wallet balance
  • Get wallet address
  • Send transactions
  • Transaction history

DeFi Operations:

  • Token swaps (via CDP Trade API)
  • Staking operations
  • Lending/borrowing
  • Yield farming

Integration

# Via MCP tool
from agent.tools.coinbase_payments_tool import CoinbaseWalletTool

tool = CoinbaseWalletTool(account_id=account_id)

# Check balance
result = await tool.check_wallet_balance(network="base")

# Send transaction
result = await tool.send_transaction(
    to_address="0x...",
    amount="0.1",
    token="ETH",
    network="base"
)

Network Support

NetworkStatusFeatures
Base✅ ActiveNative support, low fees
Ethereum✅ ActiveFull DeFi ecosystem
Solana✅ ActiveNative wallet, Jupiter DEX, sub-second finality
Polygon✅ ActiveFast, cheap transactions
Arbitrum✅ ActiveL2 scaling
Optimism✅ ActiveL2 scaling

Payment System Comparison

Featurex402NOWPaymentsCoinbase Payments MCP
Use CaseAgent commerceUser paymentsWallet operations
CurrencyUSDC252+ cryptosMulti-network
SettlementInstantReal-timeInstant
NetworkBaseMulti-chainMulti-chain
API KeysNot requiredRequiredRequired
Best ForAgent servicesCredits/marketplaceDeFi operations

Unified Credit System

VIBE AI combines free tier allowances and crypto credits into a single unified balance:

Remaining Balance: $151.44
(Free tier + Crypto credits)

Benefits:

  • Simplified user experience
  • Single balance display
  • Automatic usage tracking
  • Clear credit source breakdown

Security

x402 Security

  • Cryptographic payment signatures
  • Facilitator verification
  • On-chain settlement proofs

NOWPayments Security

  • HMAC-SHA512 signature verification
  • IPN secret validation
  • Webhook replay protection

Coinbase Payments MCP Security

  • API key authentication
  • Transaction signing
  • Multi-signature support (future)

Future Enhancements

  • Stripe Integration - Traditional payment methods (optional)
  • Multi-signature Wallets - Enhanced security
  • Payment Splitting - Revenue sharing
  • Subscription Models - Recurring payments
  • Gasless Transactions - Sponsored transactions

Next: DeFi Trading →