Razorpay Node

Manage orders, payments, refunds, subscriptions, invoices, payment links, and payouts via Razorpay API.

Setup

  1. Go to dashboard.razorpay.com
  2. Settings → API Keys → Generate Key
  3. Copy Key ID (rzp_live_xxx or rzp_test_xxx)
  4. Copy Key Secret
  5. Add a RAZORPAY credential in Nodebase
Important: All amounts in Razorpay are in the smallest currency unit (paise). ₹1 = 100 paise. ₹500 = 50,000 paise. Output includes amountInRupees for convenience.

Operations

Orders

CREATE ORDER — create a new payment order.

  • Required: Amount (paise), Currency (INR)
  • Optional: Receipt, Notes, Allow Partial Payment

Output: {{razorpay.orderId}}, {{razorpay.amount}}

Also: FETCH ORDER, FETCH ORDER PAYMENTS, LIST ORDERS.

Payments

FETCH PAYMENT, CAPTURE PAYMENT, LIST PAYMENTS, UPDATE PAYMENT.

When capturing a payment, the amount must match the original order amount.

Refunds

CREATE REFUND — refund a payment. Leave amount empty for a full refund. Speed: Normal (5-7 days) or Optimum (instant if possible).

Output: {{razorpay.refundId}}, {{razorpay.status}}

CREATE PAYMENT LINK — Required: Amount, Description, Customer details.

Output: {{razorpay.shortUrl}} — share this link with your customer.

Example workflow: Webhook → Razorpay Create Payment Link → WhatsApp
"Hi {{name}}, pay here: {{razorpay.shortUrl}}"

Also: FETCH, UPDATE, CANCEL PAYMENT LINK.

Customers

CREATE, FETCH, UPDATE CUSTOMER. Output: {{razorpay.customerId}}

Subscriptions

CREATE SUBSCRIPTION — recurring billing. Required: Plan ID, Total Count (billing cycles).

Output: {{razorpay.subscriptionId}}, {{razorpay.status}}

Invoices

CREATE INVOICE — generate and send an invoice. Supports line items with quantity and tax.

Output: {{razorpay.invoiceId}}, {{razorpay.shortUrl}}

Payouts (Razorpay X)

CREATE PAYOUT — send money to a bank account or UPI. Required: Account Number, Fund Account ID, Amount, Mode.

Modes: NEFT | RTGS | IMPS | UPI

Output: {{razorpay.payoutId}}, {{razorpay.utr}}

Verify Payment Signature ⭐

Verify that a payment callback is genuine (not forged). Use this BEFORE fulfilling any order.

  • Order ID — from your order creation
  • Payment ID razorpay_payment_id from callback
  • Signature razorpay_signature from callback

Output: {{razorpay.isValid}}, {{razorpay.message}}

With "Throw on Invalid" ON (recommended), the workflow stops automatically if the signature is invalid.
Recommended workflow: Webhook → Verify Signature → Update Database → Send WhatsApp