Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.useaxra.com/llms.txt

Use this file to discover all available pages before exploring further.

Installation

npm install -g @axra/cli

Commands

Login

Save your API key for future commands:
axra login --api-key sk_test_...
Credentials are stored in ~/.config/axra/credentials.json with 0600 permissions. You can also use environment variables:
export AXRA_API_KEY=sk_test_...
export AXRA_API_BASE=https://api.useaxra.com  # optional

Listen (webhook forwarding)

Forward webhook events to your local development server:
axra listen --forward-to http://localhost:3000/webhooks
This opens a WebSocket connection to the Axra API and forwards every webhook event to your local URL with the Axra-Signature header intact — so you can test signature verification locally.

Trigger (test events)

Send a test webhook event to your active axra listen session:
axra trigger payment.completed
Available test events:
EventDescription
payment.completedSuccessful payment
payment.failedFailed payment (card declined)
treasury.payout.completedPayout completed
treasury.payout.failedPayout failed
treasury.wallet.deposit.completedWallet deposit received
treasury.user.createdNew end-user created

Full workflow

# Terminal 1: start webhook listener
axra listen --forward-to http://localhost:3000/webhooks

# Terminal 2: trigger a test event
axra trigger payment.completed

# Your local server receives the event with valid signature
Use axra listen during development instead of exposing your local server with ngrok. It’s faster and doesn’t require port forwarding.