WACM.in Logo
Back to Documentation

Razorpay Payments

Accept payments securely via WhatsApp using Razorpay integration. Generate payment links, manage subscriptions, and track payment lifecycle.

Overview

WACM integrates with Razorpay to enable seamless payment collection within WhatsApp conversations. Customers receive payment links, complete transactions, and get instant confirmation—all without leaving the chat.

Payment Links

Generate and send payment links via WhatsApp

Subscriptions

Manage recurring payments and billing

Flow Automation

30+ payment variables for AI Flow Builder

Setup Steps

1

Create Razorpay Account

Sign up at razorpay.com and complete KYC verification.

2

Get API Keys

Navigate to Settings → API Keys in Razorpay dashboard to generate your Key ID and Key Secret.

3

Configure in WACM

Enter your Razorpay credentials in WACM dashboard under Settings → Payments.

Configuration
{
  "razorpay_key_id": "rzp_live_xxxxxxxx",
  "razorpay_key_secret": "your_secret_key"
}
4

Configure Webhook

Set up Razorpay webhook to receive payment notifications:

Webhook URL
https://api.wacm.in/api/wpbox/razorpay-webhook

Payment Lifecycle

1
Order CreatedPending
2
Payment Link SentVia WhatsApp
3
Customer Completes PaymentRazorpay
4
Webhook Confirms PaymentSuccess
5
Confirmation SentVia WhatsApp

Flow Variables

Use these payment variables in your AI Flow Builder for advanced automation. Variables are available when using commerce_payment_received, commerce_payment_failed, and other commerce trigger nodes.

Payment Received Variables

Payment Received (commerce_payment_received)

ParameterTypeRequiredDescription
payment_idstringOptionalInternal payment record ID
payment_providerstringOptionalPayment provider (e.g., "razorpay", "stripe")
payment_provider_idstringOptionalProvider-assigned payment ID
payment_order_idstringOptionalProvider order reference ID
payment_amountnumberOptionalAmount in smallest currency unit (paise/cents)
payment_amount_formattedstringOptionalFormatted amount (e.g., "500.00")
payment_currencystringOptionalCurrency code (e.g., "INR")
payment_currency_symbolstringOptionalCurrency symbol (e.g., "₹")
payment_statusstringOptionalPayment status (e.g., "captured")
payment_methodstringOptionalPayment method (upi, card, netbanking)
payment_capturedstringOptionalWhether captured ("Yes" / "No")
payment_customer_emailstringOptionalCustomer email
payment_customer_phonestringOptionalCustomer phone
payment_feenumberOptionalProcessing fee (paise/cents)
payment_taxnumberOptionalTax amount (paise/cents)
payment_amount_refundednumberOptionalAmount refunded
payment_vpastringOptionalVPA (for UPI payments)
payment_bankstringOptionalBank name
payment_walletstringOptionalWallet used
payment_rrnstringOptionalRetrieval Reference Number
payment_datestringOptionalPayment date (formatted)
payment_timestampstringOptionalPayment timestamp (unix epoch)
payment_descriptionstringOptionalPayment description
payment_internationalstringOptionalWhether international ("Yes" / "No")

Payment Failed Variables

Payment Failed (commerce_payment_failed)

ParameterTypeRequiredDescription
payment_idstringOptionalInternal payment record ID
payment_providerstringOptionalPayment provider
payment_amountnumberOptionalAmount in smallest currency unit
payment_amount_formattedstringOptionalFormatted amount
payment_statusstringOptionalPayment status
payment_error_codestringOptionalError code from provider
payment_error_descriptionstringOptionalError description
payment_error_reasonstringOptionalError reason
payment_error_sourcestringOptionalError source
payment_error_stepstringOptionalError step
payment_datestringOptionalPayment date

Subscription Variables

Subscription Events (activated/expired/renewed/cancelled)

ParameterTypeRequiredDescription
subscription_idstringOptionalInternal subscription ID
subscription_providerstringOptionalProvider name (e.g., "razorpay")
provider_subscription_idstringOptionalProvider subscription ID
plan_idstringOptionalPlan ID
provider_customer_idstringOptionalProvider customer ID
statusstringOptionalStatus (active/expired/cancelled)
quantitynumberOptionalSubscription quantity
total_countnumberOptionalTotal billing cycles
paid_countnumberOptionalPaid billing cycles
customer_notifystringOptionalCustomer notify ("Yes"/"No")
charge_atstringOptionalNext charge date
start_atstringOptionalStart date
end_atstringOptionalEnd date
expire_bystringOptionalExpiry date

Refund Variables

Refund Processed (commerce_refund_processed)

ParameterTypeRequiredDescription
refund_idstringOptionalInternal refund ID
refund_providerstringOptionalProvider name
provider_refund_idstringOptionalProvider refund ID
provider_payment_idstringOptionalOriginal payment ID
refund_amountnumberOptionalRefund amount (paise/cents)
refund_amount_formattedstringOptionalFormatted refund amount
refund_currencystringOptionalCurrency code
refund_statusstringOptionalRefund status
speed_processedstringOptionalProcessing speed
speed_requestedstringOptionalRequested speed

Payment Link Variables

Send Payment Link (commerce_send_payment_link)

ParameterTypeRequiredDescription
{{commerce_payment_url}}stringOptionalGenerated payment link URL
{{commerce_payment_id}}stringOptionalPayment link ID
{{commerce_payment_provider}}stringOptionalGateway provider used

Order Variables

Order Events (order_created / order_status_updated)

ParameterTypeRequiredDescription
order_order_idstringOptionalOrder ID
order_order_numberstringOptionalOrder number
order_total_amountnumberOptionalTotal amount
order_currencystringOptionalCurrency code
order_statusstringOptionalOrder status
order_customer_namestringOptionalCustomer name
order_customer_phonestringOptionalCustomer phone
order_customer_emailstringOptionalCustomer email
order_items_textstringOptionalItems list (text)
order_payment_methodstringOptionalPayment method
order_payment_statusstringOptionalPayment status
order_tracking_numberstringOptionalTracking number
order_tracking_urlstringOptionalTracking URL
order_dataJSONOptionalFull order data

Subscription Management

WACM supports Razorpay subscriptions for recurring billing. Create subscription plans and manage the full subscription lifecycle through WhatsApp.

Subscription Example
{
  "plan_id": "plan_xxxxxxxx",
  "customer_notify": 1,
  "quantity": 1,
  "total_count": 12,
  "start_at": 1704067200,
  "expire_by": 1735689600,
  "notes": {
    "customer_id": "123",
    "wacm_company_id": "456"
  }
}

Subscription Events

Monitor subscription.created, subscription.charged, and subscription.cancelled events via webhooks for real-time updates.

Security

Webhook Signature Verification

All Razorpay webhooks are verified using the webhook secret to ensure authenticity.

PCI DSS Compliance

Razorpay is PCI DSS Level 1 certified. No sensitive payment data is stored on WACM servers.

Shop API Reference

Explore the full eCommerce and payment API documentation.

View API