Developer Resources

Everything you need to integrate our mobile recharge API into your applications. Comprehensive SDKs, documentation, and code samples for all major programming languages.

REST APIEasy IntegrationActive Community

Quick Start

Get up and running with our API in minutes. Choose your preferred language and start building.

1. Get Your API Key

Sign up for a free account and get your API key instantly. Start with our sandbox environment for testing.

1
Create your account
2
Get your API key from dashboard
3
Start with sandbox environment

API Endpoints

POST /api/v1/rechargeRecharge
GET /api/v1/balanceBalance
GET /api/v1/operatorsOperators
GET /api/v1/transaction/{id}Status

Code Examples

Get started quickly with these code examples for different programming languages

J

Basic Recharge Request

JavaScript

const iRecharge = require('irechargebd-sdk');

const client = new iRecharge.Client({
  apiKey: 'your-api-key',
  environment: 'sandbox' // or 'production'
});

async function recharge() {
  try {
    const result = await client.recharge({
      operator: 'grameenphone',
      phone: '01712345678',
      amount: 100
    });
    
    console.log('Recharge successful:', result);
  } catch (error) {
    console.error('Recharge failed:', error.message);
  }
}
P

Async Recharge with Error Handling

Python

import asyncio
from irechargebd import AsyncClient

async def recharge():
    client = AsyncClient(
        api_key='your-api-key',
        environment='sandbox'
    )
    
    try:
        result = await client.recharge(
            operator='grameenphone',
            phone='01712345678',
            amount=100
        )
        print(f"Recharge successful: {result}")
    except Exception as e:
        print(f"Recharge failed: {e}")
    finally:
        await client.close()

asyncio.run(recharge())
P

Laravel Integration

PHP

<?php
use IRechargeBD\Client;

class RechargeController extends Controller
{
    public function recharge(Request $request)
    {
        $client = new Client([
            'api_key' => config('irecharge.api_key'),
            'environment' => config('app.env') === 'production' ? 'production' : 'sandbox'
        ]);
        
        try {
            $result = $client->recharge([
                'operator' => 'grameenphone',
                'phone' => $request->phone,
                'amount' => $request->amount
            ]);
            
            return response()->json($result);
        } catch (Exception $e) {
            return response()->json(['error' => $e->getMessage()], 400);
        }
    }
}

Testing Environment

Test your integration with our comprehensive sandbox environment before going live

Sandbox Environment

Our sandbox environment allows you to test all API endpoints without making real transactions. Perfect for development and testing.

No Real Transactions

Test without spending real money or affecting real accounts

Realistic Responses

Get realistic API responses that match production behavior

Error Simulation

Test error handling with simulated failure scenarios

API Testing Tool

Documentation

Comprehensive documentation to help you integrate our API successfully

API Reference

Complete API endpoint documentation with examples

View Documentation →

Integration Guides

Step-by-step integration guides for different platforms

View Documentation →

Code Samples

Ready-to-use code samples for all supported languages

View Documentation →

Best Practices

Security, performance, and reliability best practices

View Documentation →

Ready to Start Building?

Join thousands of developers who are already using our API to build amazing mobile recharge applications.