KosmoKrator

payments

Razorpay CLI for AI Agents

Use the Razorpay CLI from KosmoKrator to call Razorpay tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.

8 functions 7 read 1 write API key auth

Razorpay CLI Setup

Razorpay can be configured headlessly with `kosmokrator integrations:configure razorpay`.

# Install KosmoKrator first if it is not available on PATH.
curl -fsSL https://raw.githubusercontent.com/OpenCompanyApp/kosmokrator/main/install.sh | bash

# Configure and verify this integration.
kosmokrator integrations:configure razorpay --set key_id="$RAZORPAY_KEY_ID" --set key_secret="$RAZORPAY_KEY_SECRET" --enable --read allow --write ask --json
kosmokrator integrations:doctor razorpay --json
kosmokrator integrations:status --json

Credentials

Authentication type: API key api_key. Configure credentials once, then use the same stored profile from scripts, coding CLIs, Lua code mode, and the MCP gateway.

KeyEnv varTypeRequiredLabel
key_id RAZORPAY_KEY_ID Text text yes Key ID
key_secret RAZORPAY_KEY_SECRET Secret secret yes Key Secret
url RAZORPAY_URL URL url no API Base URL

Call Razorpay Headlessly

Use the generic call form when another coding CLI or script needs a stable universal interface.

kosmo integrations:call razorpay.razorpay_list_payments '{
  "count": 1,
  "skip": 1,
  "from": 1,
  "to": 1
}' --json

Use the provider shortcut form for shorter human-facing commands.

kosmo integrations:razorpay razorpay_list_payments '{
  "count": 1,
  "skip": 1,
  "from": 1,
  "to": 1
}' --json

Agent Discovery Commands

These commands return structured output for coding agents that need to inspect capabilities before choosing a function.

kosmo integrations:docs razorpay --json
kosmo integrations:docs razorpay.razorpay_list_payments --json
kosmo integrations:schema razorpay.razorpay_list_payments --json
kosmo integrations:search "Razorpay" --json
kosmo integrations:list --json

All CLI Functions

Every function below can be called headlessly. The generic form is stable across all integrations; the provider shortcut is shorter but specific to Razorpay.

razorpay.razorpay_list_payments

Read read

List payments from Razorpay. Supports pagination and date-range filters. Returns payment IDs, amounts, statuses, and methods.

Parameters
count, skip, from, to

Generic CLI call

kosmo integrations:call razorpay.razorpay_list_payments '{"count":1,"skip":1,"from":1,"to":1}' --json

Provider shortcut

kosmo integrations:razorpay razorpay_list_payments '{"count":1,"skip":1,"from":1,"to":1}' --json

razorpay.razorpay_get_payment

Read read

Get details of a specific Razorpay payment by its ID. Returns full payment information including amount, status, method, and metadata.

Parameters
payment_id

Generic CLI call

kosmo integrations:call razorpay.razorpay_get_payment '{"payment_id":"example_payment_id"}' --json

Provider shortcut

kosmo integrations:razorpay razorpay_get_payment '{"payment_id":"example_payment_id"}' --json

razorpay.razorpay_list_orders

Read read

List orders from Razorpay. Supports pagination and date-range filters. Returns order IDs, amounts, currencies, and statuses.

Parameters
count, skip, from, to

Generic CLI call

kosmo integrations:call razorpay.razorpay_list_orders '{"count":1,"skip":1,"from":1,"to":1}' --json

Provider shortcut

kosmo integrations:razorpay razorpay_list_orders '{"count":1,"skip":1,"from":1,"to":1}' --json

razorpay.razorpay_get_order

Read read

Get details of a specific Razorpay order by its ID. Returns full order information including amount, status, and payments.

Parameters
order_id

Generic CLI call

kosmo integrations:call razorpay.razorpay_get_order '{"order_id":"example_order_id"}' --json

Provider shortcut

kosmo integrations:razorpay razorpay_get_order '{"order_id":"example_order_id"}' --json

razorpay.razorpay_create_order

Write write

Create a new payment order in Razorpay. Specify the amount (in smallest currency unit, e.g., paise for INR), currency, and an optional receipt identifier.

Parameters
amount, currency, receipt, notes

Generic CLI call

kosmo integrations:call razorpay.razorpay_create_order '{"amount":1,"currency":"example_currency","receipt":"example_receipt","notes":"example_notes"}' --json

Provider shortcut

kosmo integrations:razorpay razorpay_create_order '{"amount":1,"currency":"example_currency","receipt":"example_receipt","notes":"example_notes"}' --json

razorpay.razorpay_list_refunds

Read read

List refunds from Razorpay. Supports pagination and date-range filters. Returns refund IDs, amounts, payment references, and statuses.

Parameters
count, skip, from, to

Generic CLI call

kosmo integrations:call razorpay.razorpay_list_refunds '{"count":1,"skip":1,"from":1,"to":1}' --json

Provider shortcut

kosmo integrations:razorpay razorpay_list_refunds '{"count":1,"skip":1,"from":1,"to":1}' --json

razorpay.razorpay_list_customers

Read read

List customers from Razorpay. Supports pagination. Returns customer IDs, names, emails, and contact numbers.

Parameters
count, skip

Generic CLI call

kosmo integrations:call razorpay.razorpay_list_customers '{"count":1,"skip":1}' --json

Provider shortcut

kosmo integrations:razorpay razorpay_list_customers '{"count":1,"skip":1}' --json

razorpay.razorpay_get_current_user

Read read

Get current user information from Razorpay. Returns details about the authenticated Razorpay account.

Parameters
none

Generic CLI call

kosmo integrations:call razorpay.razorpay_get_current_user '{}' --json

Provider shortcut

kosmo integrations:razorpay razorpay_get_current_user '{}' --json

Function Schemas

Use these parameter tables when building CLI payloads without calling integrations:schema first.

razorpay.razorpay_list_payments

List payments from Razorpay. Supports pagination and date-range filters. Returns payment IDs, amounts, statuses, and methods.

Operation
Read read
Schema command
kosmo integrations:schema razorpay.razorpay_list_payments --json
ParameterTypeRequiredDescription
count integer no Number of payments to return (default: 10, max: 100).
skip integer no Number of payments to skip for pagination.
from integer no Unix timestamp for the start of the date range.
to integer no Unix timestamp for the end of the date range.

razorpay.razorpay_get_payment

Get details of a specific Razorpay payment by its ID. Returns full payment information including amount, status, method, and metadata.

Operation
Read read
Schema command
kosmo integrations:schema razorpay.razorpay_get_payment --json
ParameterTypeRequiredDescription
payment_id string yes The Razorpay payment ID (e.g., "pay_1234567890").

razorpay.razorpay_list_orders

List orders from Razorpay. Supports pagination and date-range filters. Returns order IDs, amounts, currencies, and statuses.

Operation
Read read
Schema command
kosmo integrations:schema razorpay.razorpay_list_orders --json
ParameterTypeRequiredDescription
count integer no Number of orders to return (default: 10, max: 100).
skip integer no Number of orders to skip for pagination.
from integer no Unix timestamp for the start of the date range.
to integer no Unix timestamp for the end of the date range.

razorpay.razorpay_get_order

Get details of a specific Razorpay order by its ID. Returns full order information including amount, status, and payments.

Operation
Read read
Schema command
kosmo integrations:schema razorpay.razorpay_get_order --json
ParameterTypeRequiredDescription
order_id string yes The Razorpay order ID (e.g., "order_1234567890").

razorpay.razorpay_create_order

Create a new payment order in Razorpay. Specify the amount (in smallest currency unit, e.g., paise for INR), currency, and an optional receipt identifier.

Operation
Write write
Schema command
kosmo integrations:schema razorpay.razorpay_create_order --json
ParameterTypeRequiredDescription
amount integer yes Amount in smallest currency unit (e.g., 10000 for ₹100.00 in INR).
currency string no Three-letter currency code (default: "INR").
receipt string no Your internal receipt identifier (max 40 characters).
notes object no Key-value notes to attach to the order.

razorpay.razorpay_list_refunds

List refunds from Razorpay. Supports pagination and date-range filters. Returns refund IDs, amounts, payment references, and statuses.

Operation
Read read
Schema command
kosmo integrations:schema razorpay.razorpay_list_refunds --json
ParameterTypeRequiredDescription
count integer no Number of refunds to return (default: 10, max: 100).
skip integer no Number of refunds to skip for pagination.
from integer no Unix timestamp for the start of the date range.
to integer no Unix timestamp for the end of the date range.

razorpay.razorpay_list_customers

List customers from Razorpay. Supports pagination. Returns customer IDs, names, emails, and contact numbers.

Operation
Read read
Schema command
kosmo integrations:schema razorpay.razorpay_list_customers --json
ParameterTypeRequiredDescription
count integer no Number of customers to return (default: 10, max: 100).
skip integer no Number of customers to skip for pagination.

razorpay.razorpay_get_current_user

Get current user information from Razorpay. Returns details about the authenticated Razorpay account.

Operation
Read read
Schema command
kosmo integrations:schema razorpay.razorpay_get_current_user --json
ParameterTypeRequiredDescription
No parameters.

Permissions

Headless calls still follow the integration read/write permission policy. Configure read/write defaults with integrations:configure. Add --force only for trusted automation that should bypass that policy.