Skip to main content

Iron CLI

In addition to the REST API, Iron can be accessed through the MoonPay CLI (mp). The CLI provides direct terminal access to virtual accounts, fiat-to-stablecoin onramps, KYC verification, wallet management, and more. Iron is a MoonPay Company. The mp CLI is the unified command-line tool for all MoonPay products, including Iron.

Installation

npm install -g @moonpay/cli
This installs the mp binary globally. You can verify the installation with:
mp --version

Authentication

Before using any commands, you must authenticate with your MoonPay account.
1
Send a verification code to your email.
mp login --email user@example.com
2
Verify the code you received.
mp verify --email user@example.com --code 123456
You can check your current session or log out at any time:
mp user retrieve
mp logout

Wallet Management

The CLI manages local wallets stored on your machine. Private keys are encrypted with AES-256-GCM using a key stored in your OS keychain. Keys never leave the device.

Creating a Wallet

mp wallet create --name "my-wallet"
This creates a new HD wallet with addresses on Solana, Ethereum, Bitcoin, and Tron.

Importing a Wallet

You can import an existing wallet from a mnemonic or a private key:
mp wallet import --name "restored" --mnemonic "word1 word2 ..."

Managing Wallets

mp wallet list
mp wallet retrieve --wallet "my-wallet"
mp wallet delete --wallet "my-wallet" --confirm
Deleting a wallet is irreversible. Make sure you have exported your mnemonic or private key before deleting.

Virtual Accounts

Virtual accounts let you spin up named virtual bank accounts (IBANs, ACH) that automatically convert incoming fiat into stablecoins and deliver them to a registered wallet. This is the primary Iron product accessible via the CLI. For more context on virtual accounts, see Named Virtual Account.

Setting Up a Virtual Account

1
Create an account and start KYC verification.
mp virtual-account create
This returns a URL to complete identity verification.
2
Complete KYC verification. You can check your status or retrieve the verification link at any time.
mp virtual-account kyc continue
mp virtual-account retrieve
If verification needs to be restarted:
mp virtual-account kyc restart
3
Accept required legal agreements.
mp virtual-account agreement list
mp virtual-account agreement accept --contentId <content-id>
4
Register a wallet to receive stablecoin deliveries. This creates a proof-of-ownership message, signs it locally, and submits the registration in a single command.
mp virtual-account wallet register --wallet main --chain solana
You can list registered wallets with:
mp virtual-account wallet list

Creating an Onramp

Once your account is verified and a wallet is registered, you can create an onramp rule that converts incoming fiat into stablecoins.
mp virtual-account onramp create \
  --name "EUR to USDC" \
  --fiat EUR \
  --stablecoin USDC \
  --wallet <registered-wallet-address>
You can retrieve onramp details (including bank information for wire or ACH transfers), list onramps, or cancel them:
mp virtual-account onramp retrieve --onrampId <id>
mp virtual-account onramp list --status Approved
mp virtual-account onramp delete --onrampId <id>

Funding via Open Banking

You can trigger a payment directly from the CLI using open banking:
mp virtual-account onramp payment create \
  --onrampId <id> \
  --amount 1000 \
  --fiat EUR
To check the status of a payment:
mp virtual-account onramp payment retrieve \
  --onrampId <id> \
  --paymentId <payment-id>

Viewing Transactions

mp virtual-account transaction list

Checking Balances

After funds have been converted and delivered, you can verify your wallet balances:
mp token balance list --wallet "my-wallet"

Virtual Account Command Reference

  • mp virtual-account create - Create a virtual account and start KYC.
  • mp virtual-account retrieve - Get account status.
  • mp virtual-account kyc continue - Check KYC status or get verification link.
  • mp virtual-account kyc restart - Restart KYC verification.
  • mp virtual-account agreement list - List legal agreements.
  • mp virtual-account agreement accept - Accept a legal agreement.
  • mp virtual-account wallet register - Register a wallet with the virtual account.
  • mp virtual-account wallet list - List registered wallets.
  • mp virtual-account onramp create - Create a fiat-to-stablecoin onramp.
  • mp virtual-account onramp retrieve - Get onramp details and banking info.
  • mp virtual-account onramp list - List all onramps.
  • mp virtual-account onramp delete - Cancel an onramp.
  • mp virtual-account onramp payment create - Create an open banking payment link.
  • mp virtual-account onramp payment retrieve - Get payment status.
  • mp virtual-account transaction list - List fiat-to-stablecoin conversions.

Additional MoonPay CLI Capabilities

The mp CLI is the unified interface for the entire MoonPay infrastructure. Beyond Iron’s virtual account and stablecoin features, the same CLI provides access to additional capabilities including buying crypto with fiat, swapping and bridging tokens across chains, transferring assets, setting up trading automations, discovering tokens, and creating multi-chain deposit links. These features support Solana, Ethereum, Base, Polygon, Arbitrum, Optimism, BNB, Avalanche, TRON, and Bitcoin. Run mp --help to explore all available commands.