Overview
This guide will walk you through making your first API call to Monei infrastructure. By the end, you’ll have executed a complete crypto-to-fiat transaction. What you’ll learn:- Setting up authentication
- Making your first API call
- Executing an offramp transaction
- Handling responses and errors
Prerequisites
Before you begin, make sure you have:A Monei Account
A Monei Account
Sign up for a free account at monei.ccYou’ll receive:
- API credentials
- Access to sandbox environment
- Dashboard for monitoring transactions
Development Environment
Development Environment
You’ll need one of the following:
- Node.js (v16 or higher)
- Python (v3.8 or higher)
- cURL (for command-line testing)
Test Credentials (Optional)
Test Credentials (Optional)
For testing, you can use sandbox mode which doesn’t require real crypto or bank accounts.Get sandbox credentials from your dashboard.
Step 1: Get Your API Key
Login to Dashboard
Navigate to monei.cc and sign in
Step 2: Install SDK
Choose your preferred language and install the Monei SDK:Step 3: Initialize Client
Set up your Monei client with your API credentials:Always use environment variables for API keys. Never hardcode them in your source code.
Step 4: Your First API Call
Let’s fetch your account information to verify everything is working:Step 5: Complete Transaction Flow
Now let’s execute a complete offramp transaction. selling crypto for Naira:5.1 Get Available Banks
5.2 Verify Bank Account
5.3 Get Exchange Quote
5.4 Execute Swap
Complete Example
Here’s the complete flow in one script:Error Handling
Always implement proper error handling in production:Next Steps
Congratulations! You’ve successfully completed your first Monei transaction. Here’s what to explore next:Authentication
Learn about different auth methods and security best practices
Core Concepts
Understand wallets, transactions, and network management
API Reference
Explore all available endpoints and parameters
Webhooks
Set up real-time notifications for transaction events
Common Issues
Authentication Failed
Authentication Failed
Problem: API returns 401 UnauthorizedSolutions:
- Verify your API key is correct
- Check you’re using the right environment (sandbox vs production)
- Ensure API key hasn’t expired
- Confirm API key has necessary permissions
Network Not Supported
Network Not Supported
Problem: Error about unsupported networkSolutions:
- Check supported networks
- Verify network name is lowercase and hyphenated (e.g.,
bnb-smart-chain) - Ensure token is available on specified network
Rate Limit Exceeded
Rate Limit Exceeded
Problem: 429 Too Many RequestsSolutions:
- Implement exponential backoff
- Check your plan’s rate limits
- Consider upgrading your plan
- Cache responses when possible
Transaction Pending Too Long
Transaction Pending Too Long
Problem: Transaction stuck in pending stateSolutions:
- Network congestion may cause delays
- Check transaction on blockchain explorer
- Contact support if pending for over 1 hour
- Monitor via webhook for automatic updates
Support
Need help? We’re here for you:Documentation
Browse our comprehensive guides
Discord Community
Ask questions and share knowledge
Email Support
Get help from our team

