Skip to main content

Overview

Instamojo is a payment gateway designed for Indian businesses, supporting UPI, cards, net banking, and wallets. TelemanAI integrates with Instamojo for INR transactions.

Prerequisites

  • Instamojo business account
  • KYC verification completed
  • API credentials (API Key and Auth Token)
  • Indian bank account

Configuration

Environment Variables

# Instamojo Configuration
IM_API_KEY=your_api_key
IM_AUTH_TOKEN=your_auth_token
IM_URL=https://www.instamojo.com/api/1.1/
INSTAMOJO=YES
IM_API_KEY
string
required
Your Instamojo API Key
IM_AUTH_TOKEN
string
required
Your Instamojo Auth Token
INSTAMOJO
string
Set to YES to enable, NO to disable

Setup Steps

1

Create Instamojo Account

Register at instamojo.com and complete KYC.
2

Get API Credentials

Navigate to Settings → API & Plugins to generate:
  • API Key
  • Auth Token
Use test credentials during development.
3

Configure Environment

Add credentials to .env file.
4

Set Up Webhook

Configure webhook URL:
https://your-domain.com/instamojo/webhook
5

Enable Gateway

INSTAMOJO=YES
Clear cache:
php artisan config:clear

Supported Payment Methods

Instamojo supports all major Indian payment methods:
  • UPI - Google Pay, PhonePe, Paytm, BHIM
  • Cards - Visa, Mastercard, RuPay, American Express
  • Net Banking - All major Indian banks
  • Wallets - Paytm, Mobikwik, Freecharge, Airtel Money
  • EMI - Credit card EMI options

Currency

Instamojo only supports INR (Indian Rupee) transactions.

Testing

Test Environment

Use test credentials for development:
IM_API_KEY=test_your_api_key
IM_AUTH_TOKEN=test_your_auth_token  
IM_URL=https://test.instamojo.com/api/1.1/

Test Payments

In test mode:
  • All payments auto-succeed
  • No real money is charged
  • Test all payment methods
Switch to live credentials only after thorough testing.

Payment Flow

  1. User selects subscription package
  2. Clicks Pay with Instamojo
  3. Redirected to Instamojo payment page
  4. Chooses payment method (UPI/Card/Net Banking)
  5. Completes payment
  6. Redirected back to TelemanAI
  7. Webhook confirms payment
  8. Subscription activated

Webhook Configuration

Instamojo sends payment notifications via webhook:

Webhook URL

https://your-domain.com/instamojo/webhook

Webhook Events

  • Payment successful - Payment completed
  • Payment pending - Payment in progress
  • Payment failed - Payment unsuccessful

Troubleshooting

  • Verify API Key and Auth Token
  • Check if using correct environment (test/live)
  • Ensure KYC is approved
  • Try regenerating credentials
  • Check IM_URL is correct
  • Verify INSTAMOJO=YES
  • Clear application cache
  • Check internet connectivity
  • Verify webhook URL is publicly accessible
  • Check webhook configuration in dashboard
  • Test webhook using Instamojo test panel
  • Ensure HTTPS is enabled

Security Best Practices

  • Never expose API credentials in code
  • Store credentials in .env only
  • Use HTTPS for production
  • Validate webhook payloads
  • Monitor transactions regularly
  • Set up fraud alerts

Fees

Instamojo charges transaction fees:
  • UPI: ₹3 per transaction
  • Credit/Debit Cards: 2% + GST
  • Net Banking: ₹10 per transaction
  • Wallets: 2% + GST
Check current fees on Instamojo pricing page.

Next Steps

Razorpay

Alternative Indian payment gateway

Payment Overview

Compare payment gateways

Packages

Set up pricing packages

Payment Settings

Payment configuration guide

Build docs developers (and LLMs) love