KosmoKrator

data

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.

Razorpay CLI Setup

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

Install, configure, and verify
# 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: basic auth basic_auth. Configure credentials once, then reuse the same stored profile from scripts, coding CLIs, Lua, and MCP.

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

Command Patterns

The generic command is stable across every integration. The provider shortcut is shorter for humans.

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

Discovery

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

Discovery commands
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

Automation Contexts

The same configured command surface works in these environments. The command does not change unless the host wrapper, credentials, or permissions change.

CLI Functions

Every function below can be called headlessly. Commands are highlighted, copyable, and scroll horizontally when payloads are long.

razorpay.razorpay_list_payments

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

Read read
Parameters
count, skip, from, to
Generic call
kosmo integrations:call razorpay.razorpay_list_payments '{"count":1,"skip":1,"from":1,"to":1}' --json
Shortcut
kosmo integrations:razorpay razorpay_list_payments '{"count":1,"skip":1,"from":1,"to":1}' --json

razorpay.razorpay_get_payment

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

Read read
Parameters
payment_id
Generic call
kosmo integrations:call razorpay.razorpay_get_payment '{"payment_id":"example_payment_id"}' --json
Shortcut
kosmo integrations:razorpay razorpay_get_payment '{"payment_id":"example_payment_id"}' --json

razorpay.razorpay_list_orders

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

Read read
Parameters
count, skip, from, to
Generic call
kosmo integrations:call razorpay.razorpay_list_orders '{"count":1,"skip":1,"from":1,"to":1}' --json
Shortcut
kosmo integrations:razorpay razorpay_list_orders '{"count":1,"skip":1,"from":1,"to":1}' --json

razorpay.razorpay_get_order

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

Read read
Parameters
order_id
Generic call
kosmo integrations:call razorpay.razorpay_get_order '{"order_id":"example_order_id"}' --json
Shortcut
kosmo integrations:razorpay razorpay_get_order '{"order_id":"example_order_id"}' --json

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.

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

razorpay.razorpay_list_refunds

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

Read read
Parameters
count, skip, from, to
Generic call
kosmo integrations:call razorpay.razorpay_list_refunds '{"count":1,"skip":1,"from":1,"to":1}' --json
Shortcut
kosmo integrations:razorpay razorpay_list_refunds '{"count":1,"skip":1,"from":1,"to":1}' --json

razorpay.razorpay_list_customers

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

Read read
Parameters
count, skip
Generic call
kosmo integrations:call razorpay.razorpay_list_customers '{"count":1,"skip":1}' --json
Shortcut
kosmo integrations:razorpay razorpay_list_customers '{"count":1,"skip":1}' --json

razorpay.razorpay_get_current_user

Verify the Razorpay API connection with a lightweight payments request.

Read read
Parameters
none
Generic call
kosmo integrations:call razorpay.razorpay_get_current_user '{}' --json
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 4 parameters
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 1 parameters
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 4 parameters
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 1 parameters
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 4 parameters
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 4 parameters
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 2 parameters
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 0 parameters
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.