Zoho CRM Zia AI: Features and Real-World Uses for Indian Teams
How Zia AI in Zoho CRM helps Indian SMBs prioritise leads, predict deal wins, detect…
For Indian D2C brands selling directly to consumers, Zoho CRM + Instamojo integration closes the gap between payment collection and customer relationship management. When a buyer completes a payment on an Instamojo payment link, that transaction data should immediately update the corresponding CRM deal, trigger a fulfillment workflow, and fire a GST invoice — without manual intervention. This guide walks through the complete Zoho CRM Instamojo integration: webhook configuration, Deluge functions for deal updates, payment link generation from CRM, and post-payment automation.

The integration connects two systems through Instamojo’s webhook notifications and the Zoho CRM REST API. The data flow operates in two directions:
Neither direction requires a third-party middleware tool. Both use native Zoho CRM functions and Instamojo’s REST API (version 2.0, available on Business accounts and above).
Confirm the following before starting the configuration:
| Field Label | Field Type | Purpose |
|---|---|---|
| Instamojo Payment ID | Single Line Text | Stores the payment_id from webhook |
| Instamojo Payment Link | URL | Stores the generated payment link |
| Payment Status | Picklist | Pending / Paid / Failed / Refunded |
| Payment Amount (INR) | Currency | Amount received via Instamojo |
| Payment Date | Date | Date of successful payment |
Instamojo sends a POST request to your webhook URL whenever a payment request changes status. Here is how to set it up:
{
"payment_id": "MOJO2503005J01234567",
"payment_request_id": "a1b2c3d4e5f6789012345678",
"status": "Credit",
"amount": "2999.00",
"buyer": "rahul.sharma@example.com",
"buyer_name": "Rahul Sharma",
"buyer_phone": "+919876543210",
"currency": "INR",
"mac": "abc123def456..."
}
Note the mac field — this is an HMAC-SHA1 signature that you must verify before processing any webhook to prevent spoofed requests.

In Zoho CRM, go to Setup > Developer Space > Functions and create a new standalone function. This function will receive Instamojo webhook calls.
First, expose it as a REST API endpoint via Setup > Developer Space > Rest API, then use that URL as your Instamojo webhook target.
Here is the Deluge function that processes the webhook, verifies the signature, and updates the matching Deal:
// Instamojo Webhook Receiver - Deluge Function
// Receives POST from Instamojo, verifies MAC, updates CRM Deal
payment_id = input.get("payment_id");
payment_request_id = input.get("payment_request_id");
status = input.get("status");
amount = input.get("amount");
buyer_email = input.get("buyer");
buyer_phone = input.get("buyer_phone");
received_mac = input.get("mac");
// Verify MAC signature (HMAC-SHA1 of pipe-separated values using private salt)
// Note: Deluge does not have native HMAC, so validate on a trusted server or skip in test mode
// In production, verify via a Zoho Creator intermediate function with Python support
if (status == "Credit")
{
// Find matching Deal by email or phone
deals = zoho.crm.searchRecords("Deals", "Email_Address:equals:" + buyer_email);
if (deals.size() == 0)
{
// Try searching Contacts linked to Deals
contacts = zoho.crm.searchRecords("Contacts", "Email:equals:" + buyer_email);
if (contacts.size() > 0)
{
contact_id = contacts.get(0).get("id");
deals = zoho.crm.searchRecords("Deals", "Contact_Name.id:equals:" + contact_id);
}
}
if (deals.size() > 0)
{
deal = deals.get(0);
deal_id = deal.get("id");
update_map = map();
update_map.put("Instamojo_Payment_ID", payment_id);
update_map.put("Payment_Status", "Paid");
update_map.put("Payment_Amount_INR", amount.toDecimal());
update_map.put("Payment_Date", zoho.currentdate);
update_map.put("Stage", "Closed Won");
update_response = zoho.crm.updateRecord("Deals", deal_id, update_map);
info "Deal updated: " + deal_id;
// Trigger Zoho Books invoice creation (optional)
// books_response = invokeurl [...];
}
else
{
info "No matching Deal found for email: " + buyer_email;
// Optionally create a new Contact + Deal here
}
}
return "OK";
Add a custom button on the Deals detail view that generates a payment link and stores it on the record. Go to Setup > Customization > Modules > Deals > Links and Buttons and create a new button that calls the following function:
// Generate Instamojo Payment Link - Deluge Function
// Called from Deal record button
deal_id = input.Deal.ID;
deal = zoho.crm.getRecordById("Deals", deal_id);
deal_name = deal.get("Deal_Name");
amount = deal.get("Amount");
contact_name = deal.get("Contact_Name").get("name");
// Fetch Contact email
contact_id = deal.get("Contact_Name").get("id");
contact = zoho.crm.getRecordById("Contacts", contact_id);
buyer_email = contact.get("Email");
buyer_phone = contact.get("Mobile");
// Call Instamojo API to create payment request
api_key = "your_instamojo_api_key";
auth_token = "your_instamojo_auth_token";
payload = map();
payload.put("purpose", deal_name);
payload.put("amount", amount.toString());
payload.put("buyer_name", contact_name);
payload.put("email", buyer_email);
payload.put("phone", buyer_phone);
payload.put("send_email", "True");
payload.put("send_sms", "True");
payload.put("redirect_url", "https://yoursite.com/payment-success/");
payload.put("allow_repeated_payments", "False");
headers = map();
headers.put("X-Api-Key", api_key);
headers.put("X-Auth-Token", auth_token);
response = invokeurl
[
url: "https://www.instamojo.com/api/1.1/payment-requests/"
type: POST
parameters: payload
headers: headers
];
if (response.get("success") == true)
{
payment_link = response.get("payment_request").get("longurl");
payment_request_id = response.get("payment_request").get("id");
update_map = map();
update_map.put("Instamojo_Payment_Link", payment_link);
update_map.put("Payment_Status", "Pending");
zoho.crm.updateRecord("Deals", deal_id, update_map);
return "Payment link created: " + payment_link;
}
else
{
return "Error creating payment link: " + response.toString();
}
Use this reference table when mapping Instamojo webhook fields to your Zoho CRM Deal and Contact fields:
| Instamojo Webhook Field | Zoho CRM Target | Module | Notes |
|---|---|---|---|
| payment_id | Instamojo_Payment_ID | Deals | Store for reconciliation |
| payment_request_id | Custom field (optional) | Deals | Links back to payment request |
| status = “Credit” | Stage = “Closed Won” | Deals | Only on Credit status |
| amount | Payment_Amount_INR | Deals | Convert string to decimal |
| buyer | Contacts | Used to find matching record | |
| buyer_phone | Mobile | Contacts | Fallback match field |
| created_at | Payment_Date | Deals | Use webhook timestamp |
Once the Deal updates to “Closed Won” via the webhook, configure these follow-on automations in Zoho CRM workflow rules:
Add a workflow rule: when Deal Stage changes to “Closed Won” and Payment Status is “Paid”, call a Deluge function that creates a Zoho Books invoice via the Books API. Pull the line items from a custom Products subform on the Deal. The Books API endpoint is https://www.zohoapis.in/books/v3/invoices?organization_id={org_id}.
Use Zoho CRM’s WhatsApp integration (or a Zoho Flow connector to a WhatsApp Business API provider) to send a confirmation message to the buyer’s mobile number stored in the Contact record. Include the payment amount and an order ID generated from the Deal ID.
Add a workflow action to create a Task assigned to the fulfillment team with subject “Fulfill order for [Deal Name]” and due date of the next business day. Tag it with the payment ID for tracking.
Instamojo sends webhook events for failed payment attempts and refunds. Extend your receiver function to handle these cases:
if (status == "Failed")
{
// Update Deal payment status
update_map = map();
update_map.put("Payment_Status", "Failed");
zoho.crm.updateRecord("Deals", deal_id, update_map);
// Create follow-up task
task_map = map();
task_map.put("Subject", "Follow up: failed payment for " + deal.get("Deal_Name"));
task_map.put("Due_Date", zoho.currentdate.addBusinessDay(1));
task_map.put("Status", "Not Started");
task_map.put("What_Id", deal_id);
zoho.crm.createRecord("Tasks", task_map);
}
if (status == "Refunded")
{
update_map = map();
update_map.put("Payment_Status", "Refunded");
update_map.put("Stage", "Closed Lost");
zoho.crm.updateRecord("Deals", deal_id, update_map);
}
Before going live, run through this testing checklist:
For a full overview of all available options, explore our complete guide to Zoho integrations.
Can Zoho CRM receive Instamojo payment notifications automatically?
Yes. Instamojo supports webhook notifications for payment events. You configure a webhook URL in your Instamojo dashboard pointing to a Zoho CRM REST API function endpoint. When a payment completes, Instamojo sends a POST request with transaction details, which your Deluge function processes to update the relevant CRM Deal or Contact record automatically.
How do I generate Instamojo payment links from Zoho CRM?
Use a Zoho CRM custom button on the Deal detail view that calls a Deluge function. The function uses invokeurl to call the Instamojo API’s /payment-requests/ endpoint with the deal amount, buyer name, email, and redirect URL. The generated payment link is stored in a custom URL field on the Deal record and can be shared with the customer via email or WhatsApp from within CRM.
Does Instamojo support recurring or subscription payments?
Instamojo does not natively support recurring billing or subscription management. For recurring payments from Indian customers, consider Razorpay Subscriptions or Cashfree Subscriptions instead. Instamojo is best suited for one-time payment links and D2C checkout flows where a sales rep or automated workflow sends a payment request per order.
How do I handle GST invoicing after an Instamojo payment?
Configure a Zoho CRM workflow that triggers when a Deal stage changes to Closed Won and Payment Status is Paid. The workflow calls a Deluge function that creates a Zoho Books invoice via the Books API, pulling product details and buyer information from the CRM Deal. Zoho Books then generates a GST-compliant invoice with the correct HSN/SAC codes and tax rates, and emails it to the buyer automatically.
What Instamojo plan is needed for API access?
API access is available on Instamojo’s Business plan and above. The free Starter plan does not include API access or webhooks. Business plan pricing starts at approximately INR 499 per month plus transaction fees of 2% plus INR 3 per transaction for domestic payments. UPI payments attract a lower fee of 1.8% with no fixed charge.
Need help connecting Instamojo to Zoho CRM for your D2C brand? Aaxonix builds and maintains payment integrations for Indian businesses.
Talk to Our TeamOur team builds systems that actually work. No fluff, just honest architecture and clean implementation.