DOCUMENTATION

Ra Pay™ CLI Reference

Complete documentation for the Ra Pay command-line interface. Built for AI agents and developers.

Getting Started

1. Installation

Install Ra Pay globally with npm:

$ npm install -g @rapay/cli

2. Connect Your Bank

Link your bank account via Stripe Connect:

$ ra link-bank

This opens Stripe's secure onboarding flow. Complete verification to enable payments.

3. Accept Terms of Service

Accept the Terms of Service (required before sending payments):

$ ra accept-tos

You must accept the ToS before any payment can be processed.

4. Save a Payment Card

Save a credit or debit card to send payments:

$ ra add-card

Opens Stripe Checkout in your browser to securely save your card. Use test card 4242 4242 4242 4242 in test mode.

5. Verify Setup

Check your account status:

$ ra whoami

Commands Reference

ra link-bank

Connect your bank account via Stripe Connect onboarding. Use --account to reconnect to an existing verified account.

Syntax
ra link-bank [--account <acct_id>] [--json]
Example
$ ra link-bank
JSON Output
{
  "success": true,
  "account_id": "acct_1234567890",
  "onboarding_url": "https://connect.stripe.com/setup/..."
}

ra whoami

Show your Ra Pay account ID and status.

Syntax
ra whoami [--json]
Example
$ ra whoami
JSON Output
{
  "account_id": "acct_1234567890",
  "region": "US",
  "currency": "USD",
  "charges_enabled": true,
  "payouts_enabled": true,
  "details_submitted": true
}

ra accept-tos

Accept the Ra Pay Terms of Service. Required before sending payments.

Syntax
ra accept-tos [--json]
Example
$ ra accept-tos
JSON Output
{
  "status": "already_accepted",
  "version": "1.0",
  "accepted_at": "2025-12-04T10:30:00Z"
}

ra tos-status

Check your Terms of Service acceptance status.

Syntax
ra tos-status [--json]
Example
$ ra tos-status
JSON Output
{
  "needs_acceptance": false,
  "current_version": "1.0",
  "accepted_version": "1.0",
  "accepted_at": "2025-12-04T10:30:00Z",
  "tos_url": "https://rapay.ai/legal/terms"
}

ra add-card

Save a credit or debit card for sending payments. Opens Stripe Checkout in your browser.

Syntax
ra add-card [--json]
Example
$ ra add-card
JSON Output
{
  "success": true,
  "message": "Card saved successfully",
  "customer_id": "cus_1234567890"
}

ra unlink

Disconnect your Ra Pay account and remove local credentials.

Syntax
ra unlink [--json]
Example
$ ra unlink
JSON Output
{
  "success": true,
  "message": "Account unlinked successfully"
}

ra send

Send a payment to another Ra Pay user. Requires a business purpose for compliance and explicit confirmation.

Syntax
ra send <amount> <currency> to <recipient> --for "<purpose>" --confirm [--json]
Example
$ ra send 100 USD to acct_1234567890 --for "Invoice #1234" --confirm
JSON Output
{
  "success": true,
  "tx_id": "tr_1A2B3C4D5E",
  "amount": 100,
  "currency": "USD",
  "recipient": "acct_1234567890",
  "settlement_days": "2-3",
  "fee_breakdown": {
    "stripe_fee": 3.20,
    "rapay_fee": 2.00,
    "recipient_receives": 94.80
  }
}

ra balance

Check your available and pending balance.

Syntax
ra balance [--json]
Example
$ ra balance
JSON Output
{
  "available": {
    "amount": 1250.00,
    "currency": "USD"
  },
  "pending": {
    "amount": 350.00,
    "currency": "USD"
  }
}

ra history

View your transaction history.

Syntax
ra history [--limit <n>] [--json]
Example
$ ra history --limit 10
JSON Output
{
  "transactions": [
    {
      "id": "tr_1A2B3C4D5E",
      "type": "payment",
      "amount": 100.00,
      "currency": "USD",
      "status": "succeeded",
      "created": "2025-12-04T10:30:00Z"
    }
  ]
}

ra show-token

Display your session token for marketplace integrations. The token is securely stored in your OS keychain and can be pasted into partner platforms like AlwaysBeShipping.ai to link your Ra Pay account.

Syntax
ra show-token [--json]
Example
$ ra show-token
JSON Output
{
  "success": true,
  "token": "a1b2c3...64hex",
  "expires_at": "2026-03-18T12:00:00Z",
  "account_id": "acct_1234567890"
}

ra schema

Print AEO schema for AI agent discovery. Returns the full command schema in JSON format.

Syntax
ra schema
Example
$ ra schema
JSON Output
{
  "name": "rapay",
  "version": "1.6.0",
  "description": "CLI-native payment infrastructure for AI agents.",
  "commands": [...],
  "capabilities": [
    "Send fiat payments (USD)",
    "Receive payments via Stripe Connect",
    "JSON output for AI agents (--json flag)"
  ]
}

Dashboard Commands

These commands open the Stripe Dashboard in your browser for management tasks:

ra dashboard— Opens your full Stripe Dashboard
ra refund— Opens refund management
ra dispute— Opens dispute management

For AI Agents

JSON Output Mode

All commands support the --json flag for machine-readable output:

$ ra balance --json

Schema Discovery

AI agents can discover Ra Pay capabilities via the schema command:

$ ra schema

Returns a complete JSON schema with all commands, syntax, and capabilities.

Or fetch directly: https://rapay.ai/schema.json

Why CLI for AI?

  • ✓40x token efficient — JSON responses vs HTML parsing
  • ✓2-second latency — No browser startup overhead
  • ✓99% reliability — No UI selectors to break
  • ✓Zero cookies — No cookies, fingerprints, or browser tracking
  • ✓Deterministic parsing — Schema-validated responses

Configuration

Config File

Ra Pay stores configuration in ~/.rapay/config.toml:

# Ra Pay Configuration
stripe_account_id = "acct_1234567890"
api_url = "https://api.rapay.ai"

The config file is created automatically after running ra link-bank.