About moonpay-buy-crypto
A CLI skill that creates a MoonPay checkout URL for buying supported cryptocurrencies with a card or bank transfer. The buyer completes identity checks and payment in a browser; this is a fiat purchase, not a token swap.
Key features
- 01Generate a MoonPay checkout URL
- 02Buy supported tokens with fiat
- 03Specify USD amount and destination wallet
- 04Hand off checkout to a browser
Use cases
- 01Start a card purchase of SOL
- 02Create a bank-transfer checkout for crypto
- 03Send a buyer to complete KYC and payment
Install
Copy the command and run it in a terminal.
$
npx skills add https:/ / github.com/ moonpay/ skills --skill moonpay-buy-cryptoAfter installing, type/moonpay-buy-cryptoin Claude Code to confirm it loaded.
Details
From the project READMEBuy crypto with fiat
Goal
Generate a MoonPay checkout URL for buying crypto with a credit card or bank transfer. The user completes the purchase in their browser.
Command
mp buy \
--token <currency-code> \
--amount <usd-amount> \
--wallet <destination-address> \
--email <buyer-email>
Supported tokens
btc, sol, eth, trx, pol_polygon, usdc, usdc_sol, usdc_base, usdc_arbitrum, usdc_optimism, usdc_polygon, usdt_trx, eth_polygon, eth_optimism, eth_base, eth_arbitrum
Example flow
- User: "I want to buy $50 of SOL with my credit card."
- Run:
mp buy --token sol --amount 50 --wallet <address> --email [email protected] - Open the returned checkout URL in the user's browser so they can complete the purchase.
Notes
- This is fiat-to-crypto (credit card / bank), not a token swap.
- For token-to-token swaps, use the moonpay-swap-tokens skill instead.
- The
--amountflag is in USD (e.g.--amount 50= $50 worth of the token). - The
--tokenflag uses MoonPay currency codes, not mint addresses. - The checkout URL handles KYC and payment processing.
Related skills
- moonpay-swap-tokens — Swap between tokens (no fiat).
- moonpay-discover-tokens — Search for tokens.
- moonpay-auth — Ensure user is logged in.
Comments
Markdown supported