canonical: https://jentic.com/apis/paywithinstamojo/paywithinstamojo

# Pay with Instamojo

Instamojo API enables Indian merchants to create payment orders, track payment status, and manage transactions via a gateway that supports UPI, cards, net banking, wallets, and EMI. The API uses OAuth 2.0 client credentials authentication and provides order creation with automatic payment link generation, order retrieval by ID or transaction ID, and bulk order listing for reconciliation.

## For AI agents

Create payment orders, track order statuses, and list transactions for Indian merchants across UPI, cards, net banking, and wallets.

## Scope

Does not handle refunds, subscription billing, or payouts - use for payment order creation and status tracking only.

## Capabilities

- Create payment orders with automatic payment link generation for Indian customers
- Retrieve order details and payment status by order ID or transaction ID
- List all orders with pagination for bulk reconciliation
- Accept payments via UPI, credit/debit cards, net banking, wallets, and EMI
- Generate hosted payment pages without custom frontend integration

## Use cases

### Indian E-Commerce Payment Collection

Accept payments from Indian customers using UPI, cards, net banking, wallets, and EMI. Instamojo creates a payment order via POST `/gateway/orders` with the amount, description, and redirect URLs. The response includes a hosted payment page URL where customers select their preferred Indian payment method. This eliminates the need for PCI compliance on the merchant side.

Example prompt: Create a payment order for 999 INR with name 'Premium Plan', email buyer@example.com, and phone 9876543210 via POST `/gateway/orders`

### Order Status Tracking

Monitor payment completion for order fulfillment workflows. After creating an order, merchants poll the status via GET `/gateway/orders/id`:{id} to confirm payment receipt before shipping goods or activating services. The API returns the order status, payment details, and timestamps for each state transition.

Example prompt: Retrieve the payment status for order ID 'abcd1234efgh5678' via GET `/gateway/orders/id`:{id} and confirm whether payment was completed

### Bulk Reconciliation

List all payment orders for a merchant account to reconcile transactions with accounting records. The GET `/gateway/orders` endpoint returns paginated results with order amounts, statuses, and timestamps. This enables daily batch reconciliation without querying individual orders.

Example prompt: Retrieve the first page of all gateway orders via GET `/gateway/orders` and return the total count and list of order IDs with their statuses

### AI Agent Payment Automation via Jentic

AI agents use the Instamojo API through Jentic to create payment orders and check statuses for Indian merchants without managing OAuth 2.0 token flows directly. Agents search by intent, receive typed schemas, and execute with Jentic handling the client_credentials token exchange and injection into requests.

Example prompt: Search Jentic for 'create Indian payment order', load the schema for POST `/gateway/orders`, and execute with amount 1500, name 'Service Fee', and customer details

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | `/gateway/orders` | Create a new payment order |
| GET | `/gateway/orders` | List all payment orders with pagination |
| GET | `/gateway/orders/id:{id}` | Retrieve order by ID |
| GET | `/gateway/orders/transaction_id:{transaction_id}` | Retrieve order by transaction ID |

## Key resources

- **Gateway Orders** — Create, retrieve, and list payment orders with hosted checkout links

## Why Jentic

- **Setup:** Wiring Pay with Instamojo by hand means running the OAuth 2.0 client_credentials exchange against instamojo.com, managing token expiry, and attaching the access token to every call yourself. Through Jentic you install once, import Instamojo from the API Directory, store the client credentials once, and your agent calls it.
- **Permission scoping:** Instamojo carries its order details in the request body and identifies an order by id in the path, so scope the agent by the operations it needs, such as reading an order by id or transaction id. You choose that set, so order creation is not included unless you add it.
- **Credential handling:** Your Instamojo OAuth client id and secret are stored once, encrypted, by your own Jentic One instance, which runs the token exchange and injects the access token at execution time. They never enter the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'create a payment order in India' or 'track an order status', and Jentic returns the matching Instamojo operation with its input schema so the agent calls the right endpoint without reading the reference docs.

## Related APIs

- **Paystack API** — African payment gateway with similar hosted payment model but for different regional markets
- **Stripe API** — Global payment processor with India support and deeper subscription billing features
- **Flutterwave API** — Emerging market payment gateway with broader regional coverage

## FAQ

### What authentication does the Instamojo API use?

The Instamojo API uses OAuth 2.0 with the client_credentials grant type. You exchange your client_id and client_secret for an access token via https://www.instamojo.com/oauth2/token/, then include the token in the Authorization header. Through Jentic, this token exchange is handled automatically.

### Can I accept UPI payments with the Instamojo API?

Yes. When you create a payment order via POST `/gateway/orders`, the hosted payment page presents UPI as a payment option alongside cards, net banking, and wallets. Customers can pay using any UPI app including Google Pay, PhonePe, and Paytm.

### What are the rate limits for the Instamojo API?

Instamojo applies rate limits per OAuth access token. Standard limits allow approximately 30 requests per minute for order creation and 60 requests per minute for order retrieval endpoints.

### How do I check an order status through Jentic?

Search Jentic for 'check Instamojo order status', load the schema for GET `/gateway/orders/id`:{id}, and execute with the order ID. Jentic handles the OAuth token exchange automatically and returns the order status, amount, and payment details in a structured response.

### Does Instamojo support recurring payments?

The core gateway orders API does not directly support recurring billing. Each payment requires a new order creation via POST `/gateway/orders.` For subscription-style billing, you create a new order for each billing cycle and track payments by customer reference.

### Can I limit what my agent is allowed to do with the Instamojo API?

Yes. Because you self-host Jentic One, your own rules decide which Instamojo operations and credentials the agent may use. You can grant read-only access, such as retrieving an order by ID via GET `/gateway/orders/id`:{id}, looking it up by transaction ID, or listing orders via GET `/gateway/orders`, while leaving out order creation via POST `/gateway/orders` unless you add it. Only the operations you include are callable, and the stored OAuth client credentials are attached at execution time rather than exposed to the agent.
