Skip to main content
Razorpay is a payments and business banking platform that enables businesses to accept, process, and disburse payments online. It provides webhook notifications for payment, order, refund, and invoice lifecycle events, so you can react to payment activity in real time.

MoEngage × Razorpay

The MoEngage and Razorpay integration uses real-time payment data to build unified user profiles and drive personalized engagement. By forwarding payment lifecycle events from Razorpay to MoEngage, you can improve segmentation and maintain data consistency across your marketing stack.

Use Cases

Integrating Razorpay with MoEngage helps you address the following use cases:
  • Recover lost sales: Automatically trigger personalized notifications (push, email, or SMS) when a payment fails, guiding users back to checkout to complete their purchase.
  • Enhance customer trust: Send instant confirmations for successful payments, orders, and refund updates to keep customers informed at every step.
  • Proactive support: Notify users of refund status changes (for example, processed or failed) to reduce customer support inquiries.
  • Smarter segmentation: Use real-time order data to build dynamic segments in MoEngage and send relevant post-purchase offers or loyalty rewards.

Key Features

The Razorpay integration delivers the following capabilities within MoEngage:
  • Real-time data sync: Instantly sync payment, order, and refund events from Razorpay to MoEngage to trigger timely, data-driven campaigns.
  • Customer profile enrichment: Automatically update user profiles with contact information (email or mobile) to keep your data current.
  • Selective event support: The integration supports the following event syncs:
    • Payments: authorized, captured, failed
    • Orders: paid
    • Refunds: speed_changed, processed, failed, created
    If you require additional events, contact the MoEngage team first for evaluation.

Integration

PrerequisitesEnsure you have admin access to your Razorpay dashboard.

Step 1: Get Your MoEngage API Credentials

To get your MoEngage API credentials, perform the following steps:
  1. On the left navigation menu in the MoEngage dashboard, click Settings > Account > APIs.
  2. On the APIs page, copy the following credentials:
    • Workspace ID (earlier App ID).
    • Data API Key: Found under the Data tile.
  3. Build your webhook URL by inserting your Workspace ID and Data API Key into the MoEngage endpoint, and replace 0X with your data center number (for example, api-01 for DC-01). Use the following format:
    https://<YOUR_WORKSPACE_ID>:<YOUR_DATA_API_KEY>@api-0X.moengage.com/v1/partner/razorpay/events/?configName=<config_name>
    
MoEngage APIs settings page showing the Workspace ID and Data API Key fields
Before you contact MoEngage Support for your unique ingestion endpoint, decide which customer identifier (such as email or contact number) you will map. Make sure it aligns with your current MoEngage identity configuration to avoid creating duplicate profiles during the data sync.

Step 2: Configure Webhooks in Razorpay

After you have your endpoint URL and credentials, configure the webhook in your Razorpay dashboard.
  1. Log in to the Razorpay dashboard and go to Account & Settings.
  2. Under Website and app settings, click Webhooks.
  3. Click + Add New Webhook.
  4. In the Webhook URL field, paste the MoEngage endpoint URL you built in Step 1.
  5. Under Active Events, select the following payment events:
    • payment.authorized
    • payment.captured
    • payment.failed
    • payment.pending
  6. Click Create Webhook.
Razorpay Webhook Setup dialog showing the webhook URL, secret, alert email, and selected payment events For more information, refer to the Razorpay Webhooks documentation.

Step 3: Verify Events in MoEngage

After you activate the webhook, verify that events appear in real time in MoEngage.
  1. In MoEngage, go to Segment > Search Users.
  2. Search for your test user by Customer ID.
  3. Look for the Razorpay event names (for example, payment.authorized).
Confirm that event records appear with the expected attributes, such as payment ID, amount, and customer email. MoEngage user profile Event activity tab showing the payment.authorized event with its attributes