First-party app
Razorpay

Razorpay

Accept payments, manage orders, refunds, customers, invoices and subscriptions on Razorpay, India's payment gateway.

stable Commerce & PaymentsFinance & Accounting

About

Razorpay ships in the w6w first-party pack. It declares 44 actions, 2 health checks, and the host runs its code in a sandbox that never sees the credential.

App id
io.w6w.razorpay
Version
0.1.0
Author
w6w
Licence
MIT
Categories
Commerce & Payments · Finance & Accounting

Overview

Razorpay is an India-focused payment gateway: collect payments over 180+ methods (UPI, cards, netbanking, wallets, EMI) via Orders, Payment Links, Payment Pages/Invoices and UPI QR codes, then capture, refund, settle and reconcile them.

This app covers that core payment-gateway surface — Orders, Payments (capture, refund), Refunds, Customers, Payment Links, Invoices, Items, Plans, Subscriptions, Settlements, Disputes and QR Codes — the path a workflow needs to accept a payment and later reconcile, refund or dispute it. RazorpayX (Razorpay’s separate banking/payouts product: contacts, fund accounts, payouts, virtual accounts) and the Partner/Route sub-merchant APIs are a different activation and a different product, and are left out rather than half-covered.

Amounts are always integers in the smallest currency sub-unit (paise for INR), with two documented exceptions this app’s field hints call out: three-decimal currencies (KWD, BHD, OMR) drop the last decimal digit, and zero-decimal currencies (JPY) are passed as-is.

Build with Razorpay

Three routes to the same 44 actions. The Workflow tab is generated from Razorpay's own manifest and carries its real ids, so it is copy-pasteable; the Code and CLI examples are the same call for any action on any app, so every app-specific value in them is a blank you fill in.

Create Customer

customer-create

Create a customer profile. The combination of email and contact must be unique per account.

Get Customer

customer-get

Fetch a specific customer's full details.

List Customers

customer-list

Retrieve a paginated list of all customers. Maximum 100 per call.

Update Customer

customer-update

Update a customer's name, email, or contact. The email/contact pair must stay unique.

Accept Dispute

dispute-accept

Accept a dispute as lost. Irreversible — the disputed amount is deducted from your balance.

Contest Dispute

dispute-contest

Submit evidence to challenge a dispute. 'submit' requires at least one evidence document.

Get Dispute

dispute-get

Fetch a dispute's full details, including any submitted evidence.

List Disputes

dispute-list

Retrieve a list of all payment disputes.

Cancel Invoice

invoice-cancel

Cancel a draft or issued invoice.

Create Invoice

invoice-create

Create an invoice or payment page, in draft status. Call Issue Invoice to send it to the customer. Cannot create GST invoices — use the Dashboard for those. Max 50 line items.

Get Invoice

invoice-get

Fetch a specific invoice's full details.

Issue Invoice

invoice-issue

Transition a draft invoice to issued, notifying the customer. Line items are locked after.

List Invoices

invoice-list

Retrieve a paginated list of invoices.

Create Item

item-create

Create a reusable catalog item for use in invoice line items.

List Items

item-list

Retrieve all catalog items.

Create Order

order-create

Create an order before initiating a payment.

Get Order

order-get

Fetch the full details and current status of a specific order.

List Orders

order-list

Retrieve a paginated list of orders. Maximum 100 per call.

List Order's Payments

order-payments-list

Retrieve all payment attempts (successful and failed) made towards an order.

Capture Payment

payment-capture

Capture an authorized payment. Amount must exactly equal the authorized amount unless partial capture is enabled on the account.

Get Payment

payment-get

Fetch a payment's full details and current status.

Cancel Payment Link

payment-link-cancel

Cancel a payment link. Only links still in 'created' status can be cancelled — paid, partially paid and already-expired links cannot be.

Create Payment Link

payment-link-create

Create a shareable payment link. UPI-only links are not available in test mode and do not support partial payments.

Get Payment Link

payment-link-get

Fetch a specific payment link's full details.

List Payment Links

payment-link-list

Retrieve payment links, optionally filtered by payment ID or your reference ID.

Update Payment Link

payment-link-update

Update a payment link. Only allowed while the link is in 'created' or 'partially_paid' status.

List Payments

payment-list

Retrieve a paginated list of payments. Maximum 100 per call.

Refund Payment

payment-refund-create

Refund a captured payment, in full or in part. Speed 'optimum' is instant when available and falls back to normal (5-7 business days) otherwise.

Update Payment Notes

payment-update

Update a payment's notes. Only notes can be modified after creation.

Create Plan

plan-create

Define a recurring billing plan (period, interval, amount). Cannot be modified once created.

List Plans

plan-list

Retrieve all billing plans.

Close QR Code

qr-code-close

Deactivate a QR code. Once closed, it cannot be reopened.

Create QR Code

qr-code-create

Create a UPI QR code for accepting payments. On-demand feature requiring merchant activation.

Get QR Code

qr-code-get

Fetch a QR code's details, including payment counts and current status.

Get Refund

refund-get

Fetch a refund's full details and current status.

List Refunds

refund-list

Retrieve a paginated list of all refunds across payments. Maximum 100 per call.

Get Settlement

settlement-get

Fetch details of a specific settlement transaction.

List Settlements

settlement-list

Retrieve a paginated list of settlements. Each settlement is a batch transfer to your bank account.

Cancel Subscription

subscription-cancel

Cancel a subscription, immediately or at the end of the current billing cycle.

Create Subscription

subscription-create

Subscribe a customer to a plan. The customer must open the returned short_url to authorize the charge mandate before anything is billed.

Get Subscription

subscription-get

Fetch a subscription's full details and current status.

List Subscriptions

subscription-list

Retrieve subscriptions, optionally filtered by plan.

Pause Subscription

subscription-pause

Temporarily stop billing an active subscription.

Resume Subscription

subscription-resume

Resume billing on a paused subscription.

A workflow step names the app and the action, and the editor fills in the connection when you pick one. This is the Step shape from the workflow spec, carrying Razorpay's real ids.

{
  "manifestVersion": "2",
  "name": "razorpay-example",
  "steps": [
    {
      "id": "customer-create",
      "uses": {
        "app": "io.w6w.razorpay",
        "action": "customer-create",
        "connection": "conn_YOUR_CONNECTION_ID"
      },
      "with": {
        "name": "<name>"
      }
    }
  ]
}

Here are some of the things you can do

  • Create Customer

    perform
    customer-create
  • Get Customer

    read
    customer-get
  • List Customers

    search
    customer-list
  • Update Customer

    perform
    customer-update
  • Accept Dispute

    perform
    dispute-accept

+39 more actions available

Every app-specific value here is a blank you have to fill in. An app action is reached through the connection that authenticates it, so the address is a connection id, not the app id — and connections belong to your account, so a public page cannot know yours. Create one for Razorpay, then fill in the three blanks: conn_YOUR_CONNECTION_ID, the action key, and the parameters that action declares. The call itself is real — the shape is transcribed from the studio's own snippet builder, which prints the same kind of blanks — but nothing in it is specific to Razorpay. The Workflow tab is where this app's real ids are.

Install
npm install @w6w/sdk
yarn add @w6w/sdk
pnpm add @w6w/sdk
deno add npm:@w6w/sdk
Code
import { W6wClient, isActionRun } from "@w6w/sdk";

// Reads W6W_BASE_URL and W6W_TOKEN from the environment when omitted.
const client = new W6wClient();

const envelope = await client.run({
  urn: "conn_YOUR_CONNECTION_ID",
  action: "customer-create",
  payload: {
    name: "<value>",
    // contact: "<value>",
    // email: "<value>",
    // gstin: "<value>",
    // notes: "<value>",
  },
});

if (isActionRun(envelope)) console.log(envelope.value);
Install the CLI
npm install -g @w6w/cli
CLI
w6w run conn_YOUR_CONNECTION_ID --action customer-create --payload '{"name":"<value>"}'

Give an AI agent Razorpay — without giving it Razorpay's credentials. One MCP endpoint exposes every app, function and workflow the caller is entitled to, as tools it can discover and run. Access is granted per team while we onboard.

One tool call
{
  "name": "w6w_invoke",
  "arguments": {
    "ref": "app:io.w6w.razorpay#customer-create",
    "input": {
      "name": "<name>"
    }
  }
}

Every tool names its target with a single ref. The app: form above doesn't name a connection at all — the host resolves which of the caller's Razorpay connections to sign with, and refuses rather than guesses when the answer is ambiguous.

What the agent gets

Credentials it can't read

The token is attached host-side, at the moment of the call. It is never a tool argument, never in the model's context, and never in a transcript — so a prompt injection has nothing to exfiltrate.

A tool surface scoped to the caller

Tools are derived per end user from what that person has actually connected and is entitled to — not one shared bot identity carrying the union of everyone's access.

A durable workflow in one call

Multi-step work runs on the workflow engine and returns a run handle the agent can poll — retries, branching and state survive the conversation that started them.

Health-aware discovery

Razorpay's declared health checks are on the surface too, so an agent can tell "the vendor is down" from "your credential expired" before it burns a retry on either.

The MCP surface is part of the hosted platform. Razorpay itself is MIT, and the runtime that executes it is source-available (FSL).

Request MCP access

Health checks

Razorpay declares its own checks, so its health is a property of the app rather than something the host guesses at.

service

Razorpay platform status

Component status from status.razorpay.com's live Statping feed (/api/services). Covers the Payments API, Checkout and Payment Link components this app calls; Dashboard and the separate RazorpayX Payouts/Payroll product are reported for context but do not drive the verdict.

quota

Rate-limit headroom