Moneybag

Getting Started

Your journey to integrating Moneybag payments starts here

Getting Started

Welcome to Moneybag! We've made it simple to add secure payment processing to your application. This guide will walk you through everything you need to get up and running.


Integration Overview

Quick Start

Get your first payment working in 5 minutes

Start Integration →

🔐

Authentication

Secure your API integration with proper authentication

Learn Security →

🧪

Sandbox Testing

Test payments safely without real transactions

Explore Sandbox →


How Moneybag Works

Payment Flow

sequenceDiagram
    participant Customer
    participant Your App
    participant Moneybag API
    participant Payment Provider
    
    Customer->>Your App: Initiates payment
    Your App->>Moneybag API: Create checkout session
    Moneybag API-->>Your App: Return payment URL
    Your App->>Customer: Redirect to payment page
    Customer->>Payment Provider: Completes payment
    Payment Provider->>Moneybag API: Payment confirmation
    Moneybag API->>Your App: Webhook notification
    Moneybag API->>Customer: Redirect to success URL
    Your App->>Moneybag API: Verify payment
    Moneybag API-->>Your App: Payment details

Key Components

  1. Checkout Creation: Your server creates a secure checkout session
  2. Payment Collection: Customer completes payment on Moneybag's hosted page
  3. Webhook Notification: Real-time updates about payment status
  4. Payment Verification: Confirm payment success before fulfilling order

Integration Steps

Step 1: Set Up Your Account

🚀

Start with Sandbox

Create a free sandbox account to begin testing immediately. No approval needed!

Create Sandbox Account

Step 2: Get Your API Credentials

  1. Log into your Dashboard
  2. Navigate to Developer SettingsAPI Keys
  3. Generate and securely store your API key

Step 3: Make Your First API Call

# Quick test with cURL
curl -X POST https://sandbox.api.moneybag.com.bd/api/v2/payments/checkout \
  -H "X-Merchant-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "order_id": "TEST_001",
    "order_amount": 100.00,
    "currency": "BDT",
    "customer": {
      "name": "Test Customer",
      "email": "test@example.com",
      "phone": "+8801700000000"
    }
  }'

Step 4: Handle the Response

{
  "success": true,
  "data": {
    "payment_url": "https://pay.moneybag.com.bd/checkout/abc123",
    "transaction_id": "TXN_123456"
  }
}

Step 5: Verify Payment Success

After payment, verify the transaction:

curl -X GET https://sandbox.api.moneybag.com.bd/api/v2/payments/verify/TXN_123456 \
  -H "X-Merchant-API-Key: YOUR_API_KEY"

Choose Your Integration Method

Option 1: Direct API Integration

Best for custom implementations and maximum control.

// Direct API call example
const response = await fetch('https://sandbox.api.moneybag.com.bd/api/v2/payments/checkout', {
  method: 'POST',
  headers: {
    'X-Merchant-API-Key': 'YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify(paymentData)
});

Pros: Full control, customizable, language agnostic Cons: More implementation work

Option 2: SDK Integration

Pre-built libraries for faster integration.

// PHP SDK example
$moneybag = new MoneybagClient($apiKey);
$checkout = $moneybag->createCheckout([
    'amount' => 100.00,
    'currency' => 'BDT'
]);

Available SDKs:

Option 3: Plugin Integration

Ready-made plugins for popular platforms.

  • WooCommerce: One-click installation
  • Other platforms: Coming soon

Interactive Tools

🎮 API Playground

Test API endpoints interactively with your sandbox credentials

Open Playground

📊 Dashboard

Monitor transactions, manage API keys, and configure settings

Open Dashboard


Required Information

Before you start integration, have these ready:

Business Information

  • Business name and registration
  • Contact information
  • Website/app URL

Technical Requirements

  • Server-side programming capability
  • HTTPS-enabled website (for production)
  • Database for storing transaction records

Integration Details

  • Callback URLs (success, cancel, fail)
  • Webhook endpoint URL
  • Customer information fields

Ready to Go Live?

After completing your integration and testing, it's time to launch in production!

🚀

Launch Your Integration

Follow our comprehensive checklist to ensure a smooth production launch.

View Going Live Guide


Get Help

Documentation Resources

📚 API Reference

Complete API documentation
View Reference →

🔧 Troubleshooting

Solutions to common issues
Get Solutions →

❓ FAQ

Frequently asked questions
Read FAQ →

📧 Support

Contact our support team
Get Support →

Ready to Start?