# Razorpay Integration via LowCodeAPI

**Last Updated**: February 10, 2026

## Overview
Payment gateway

**Categories:**
- {'id': 'payment-processing', 'name': 'Payment Processing'}

## Base Endpoint
https://api.lowcodeapi.com/razorpay

**Important**: Always include the provider name in the URL path after `api.lowcodeapi.com/`

## Authentication
**Type:** TOKEN

**Official Documentation:** https://razorpay.com/docs

## URL Format (Important)

LowCodeAPI supports two URL formats. **Always try the New Format first**, then fall back to Old Format if needed.

### New Format (Priority)
- Path parameters stay in the URL path
- Do NOT include path parameters as query parameters
- Example: `https://api.lowcodeapi.com/{provider}/resource/{id}?api_token=XXX`

### Old Format (Fallback)
- Path parameters become query parameters
- Example: `https://api.lowcodeapi.com/{provider}/resource/id?id={id}&api_token=XXX`

### Decision Flow for AI Agents
1. Always use **New Format** first - keep path parameters in the URL path
2. If you get a 404 or error, try **Old Format** with sanitized path
3. Log which format worked for future requests to this provider

## API Categories

## Common Endpoints

### Create a Customer

**Method:** POST
**LowCodeAPI Path:** /v1/customers

**New Format URL:**
https://api.lowcodeapi.com/razorpay/v1/customers?api_token=YOUR_API_TOKEN

**Old Format URL:**
https://api.lowcodeapi.com/razorpay/v1/customers?api_token=YOUR_API_TOKEN

**Request Body:**

| Field | Type | Description |
|-------|------|-------------|
| contact | string |  |
| email | string |  |
| fail_existing | string |  |
| gstin | string |  |
| name | sting |  |
| notes | object |  |

**Example Request (New Format):**

```bash
curl -X POST 'https://api.lowcodeapi.com/razorpay/v1/customers?api_token=YOUR_API_TOKEN'
```

**Official Documentation:** https://razorpay.com/docs/api/customers#create-a-customer

### Fetch all Customers

**Method:** GET
**LowCodeAPI Path:** /v1/customers

**New Format URL:**
https://api.lowcodeapi.com/razorpay/v1/customers?api_token=YOUR_API_TOKEN

**Old Format URL:**
https://api.lowcodeapi.com/razorpay/v1/customers?api_token=YOUR_API_TOKEN

**Query Parameters:**

| Parameter | Type | Description |
|-----------|------|-------------|
| count | number |  |
| skip | number |  |

**Example Request (New Format):**

```bash
curl -X GET 'https://api.lowcodeapi.com/razorpay/v1/customers?api_token=YOUR_API_TOKEN'
```

**Official Documentation:** https://razorpay.com/docs/api/customers#fetch-all-customers

### Fetch Customer by ID

**Method:** GET
**LowCodeAPI Path:** /v1/customers/:cust_id

**New Format URL:**
https://api.lowcodeapi.com/razorpay/v1/customers/:cust_id?api_token=YOUR_API_TOKEN

**Old Format URL:**
https://api.lowcodeapi.com/razorpay/v1/customers/cust_id?cust_id={cust_id}&api_token=YOUR_API_TOKEN

**Path Parameters:**

| Parameter | Type | Description |
|-----------|------|-------------|
| cust_id | string |  |

**Example Request (New Format):**

```bash
curl -X GET 'https://api.lowcodeapi.com/razorpay/v1/customers/:cust_id?api_token=YOUR_API_TOKEN'
```

**Official Documentation:** https://razorpay.com/docs/api/customers#fetch-customer-by-id

### Edit a Customer

**Method:** PUT
**LowCodeAPI Path:** /v1/customers/:cust_id

**New Format URL:**
https://api.lowcodeapi.com/razorpay/v1/customers/:cust_id?api_token=YOUR_API_TOKEN

**Old Format URL:**
https://api.lowcodeapi.com/razorpay/v1/customers/cust_id?cust_id={cust_id}&api_token=YOUR_API_TOKEN

**Path Parameters:**

| Parameter | Type | Description |
|-----------|------|-------------|
| cust_id | string |  |

**Request Body:**

| Field | Type | Description |
|-------|------|-------------|
| email | string |  |
| name | string |  |

**Example Request (New Format):**

```bash
curl -X PUT 'https://api.lowcodeapi.com/razorpay/v1/customers/:cust_id?api_token=YOUR_API_TOKEN'
```

**Official Documentation:** https://razorpay.com/docs/api/customers#edit-customer-details

### Fetch All Disputes

**Method:** GET
**LowCodeAPI Path:** /v1/disputes

**New Format URL:**
https://api.lowcodeapi.com/razorpay/v1/disputes?api_token=YOUR_API_TOKEN

**Old Format URL:**
https://api.lowcodeapi.com/razorpay/v1/disputes?api_token=YOUR_API_TOKEN

**Example Request (New Format):**

```bash
curl -X GET 'https://api.lowcodeapi.com/razorpay/v1/disputes?api_token=YOUR_API_TOKEN'
```

**Official Documentation:** https://razorpay.com/docs/api/disputes#fetch-all-disputes

### Fetch a Dispute by ID

**Method:** GET
**LowCodeAPI Path:** /v1/disputes/id

**New Format URL:**
https://api.lowcodeapi.com/razorpay/v1/disputes/id?api_token=YOUR_API_TOKEN

**Old Format URL:**
https://api.lowcodeapi.com/razorpay/v1/disputes/id?id={id}&api_token=YOUR_API_TOKEN

**Path Parameters:**

| Parameter | Type | Description |
|-----------|------|-------------|
| id | string |  |

**Example Request (New Format):**

```bash
curl -X GET 'https://api.lowcodeapi.com/razorpay/v1/disputes/id?api_token=YOUR_API_TOKEN'
```

**Official Documentation:** https://razorpay.com/docs/api/disputes#fetch-a-dispute

### Create an Invoice

**Method:** POST
**LowCodeAPI Path:** /v1/invoices

**New Format URL:**
https://api.lowcodeapi.com/razorpay/v1/invoices?api_token=YOUR_API_TOKEN

**Old Format URL:**
https://api.lowcodeapi.com/razorpay/v1/invoices?api_token=YOUR_API_TOKEN

**Request Body:**

| Field | Type | Description |
|-------|------|-------------|
| type | string |  |
| currency | string |  |
| customer_id | string |  |
| description | string |  |
| draft | string |  |
| email_notify | boolean |  |
| expire_by | number |  |
| partial_payment | boolean |  |
| sms_notify | boolean |  |

**Example Request (New Format):**

```bash
curl -X POST 'https://api.lowcodeapi.com/razorpay/v1/invoices?api_token=YOUR_API_TOKEN'
```

**Official Documentation:** https://razorpay.com/docs/api/payments/invoices#create-an-invoice

### Fetch Invoice by Id

**Method:** GET
**LowCodeAPI Path:** /v1/invoices/:inv_id

**New Format URL:**
https://api.lowcodeapi.com/razorpay/v1/invoices/:inv_id?api_token=YOUR_API_TOKEN

**Old Format URL:**
https://api.lowcodeapi.com/razorpay/v1/invoices/inv_id?inv_id={inv_id}&api_token=YOUR_API_TOKEN

**Path Parameters:**

| Parameter | Type | Description |
|-----------|------|-------------|
| inv_id | string |  |

**Example Request (New Format):**

```bash
curl -X GET 'https://api.lowcodeapi.com/razorpay/v1/invoices/:inv_id?api_token=YOUR_API_TOKEN'
```

**Official Documentation:** https://razorpay.com/docs/api/payments/invoices#fetch-an-invoice

### Fetch All Invoices for a Subscription

**Method:** GET
**LowCodeAPI Path:** /v1/invoices

**New Format URL:**
https://api.lowcodeapi.com/razorpay/v1/invoices?api_token=YOUR_API_TOKEN

**Old Format URL:**
https://api.lowcodeapi.com/razorpay/v1/invoices?api_token=YOUR_API_TOKEN

**Query Parameters:**

| Parameter | Type | Description |
|-----------|------|-------------|
| subscription_id | string |  |

**Example Request (New Format):**

```bash
curl -X GET 'https://api.lowcodeapi.com/razorpay/v1/invoices?api_token=YOUR_API_TOKEN'
```

**Official Documentation:** https://razorpay.com/docs/api/payments/subscriptions#fetch-all-invoices-of-a-subscription

### Update an Invoice

**Method:** PATCH
**LowCodeAPI Path:** /v1/invoices/:inv_id

**New Format URL:**
https://api.lowcodeapi.com/razorpay/v1/invoices/:inv_id?api_token=YOUR_API_TOKEN

**Old Format URL:**
https://api.lowcodeapi.com/razorpay/v1/invoices/inv_id?inv_id={inv_id}&api_token=YOUR_API_TOKEN

**Path Parameters:**

| Parameter | Type | Description |
|-----------|------|-------------|
| inv_id | string |  |

**Example Request (New Format):**

```bash
curl -X PATCH 'https://api.lowcodeapi.com/razorpay/v1/invoices/:inv_id?api_token=YOUR_API_TOKEN'
```

**Official Documentation:** https://razorpay.com/docs/api/payments/invoices#update-an-invoice


## Usage Examples

### Example 1: Create a Payment Intent

```bash
# Create a new payment intent
curl -X POST "https://api.lowcodeapi.com/razorpay/v1/payments?api_token=YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 1000,
    "currency": "usd",
    "payment_method": "pm_card_visa"
  }'

# Response includes payment ID: pay_abc123
```

### Example 2: Retrieve Payment Details

```bash
# Get payment details using ID from previous response
curl -X GET "https://api.lowcodeapi.com/razorpay/v1/payments/{PAYMENT_ID}?api_token=YOUR_API_TOKEN"
```

### Example 3: List All Payments

```bash
# List all payments with pagination
curl -X GET "https://api.lowcodeapi.com/razorpay/v1/payments?api_token=YOUR_API_TOKEN&limit=10"
```

## Error Handling

LowCodeAPI returns standard HTTP status codes. Common errors:

| Status Code | Description |
|-------------|-------------|
| 200 | Success - Request completed successfully |
| 400 | Bad Request - Invalid parameters or request body |
| 401 | Unauthorized - Invalid or missing API token |
| 403 | Forbidden - Insufficient permissions |
| 404 | Not Found - Endpoint or resource doesn't exist |
| 429 | Too Many Requests - Rate limit exceeded |
| 500 | Server Error - Provider API error |

All error responses include error details:

```json
{
  "data": {
    "error": {
      "message": "Error description",
      "code": "ERROR_CODE"
    }
  }
}
```

## Complete Endpoint Reference

| Endpoint | Method | Category |
|----------|--------|----------|
| Create a Customer | POST | Customers |
| Fetch all Customers | GET | Customers |
| Fetch Customer by ID | GET | Customers |
| Edit a Customer | PUT | Customers |
| Fetch All Disputes | GET | Disputes |
| Fetch a Dispute by ID | GET | Disputes |
| Create an Invoice | POST | Invoice |
| Fetch Invoice by Id | GET | Invoice |
| Fetch All Invoices for a Subscription | GET | Subscriptions |
| Update an Invoice | PATCH | Invoice |
| Issue an Invoice | POST | Invoice |
| Send or Resend Notification | POST | Invoice |
| Cancel an Invoice | POST | Invoice |
| Delete an Invoice | DELETE | Invoice |
| Create an Item | POST | Items |
| Fetch Items | GET | Items |
| Fetch Item by ID | GET | Items |
| Update an Item | PATCH | Items |
| Delete an Item | DELETE | Items |
| Create an Order | POST | Order |
| Fetch Orders | GET | Order |
| Fetch Orders by ID | GET | Order |
| Fetch Payment based on Order | GET | Payments |
| Update Order | PATCH | Order |
| Update a Payment Link | PATCH | Payment Links |
| Cancel a Payment Link | POST | Payment Links |
| Fetch all Payment Links | GET | Payment Links |
| Resend a Payment Link | POST | Payment Links |
| Fetch a Payment Link | GET | Payment Links |
| Create a Payment Link | POST | Payment Links |
| Fetch all Payments | GET | Payments |
| Fetch Payment by ID | GET | Payments |
| Fetch Card Details for a Payment | GET | Payments |
| Update Payment | PATCH | Payments |
| Capture a Payment | POST | Payments |
| Fetch Expanded Card or EMI Details for Payments | GET | Payments |
| Create Plan | POST | Plans |
| Fetch All Plans | GET | Plans |
| Fetch Plans by ID | GET | Plans |
| Create an Instant Refund | POST | Refunds |
| Fetch Refunds | GET | Refunds |
| Fetch Refund by ID | GET | Refunds |
| Fetch a Specific Refund for a Payment | GET | Refunds |
| Fetch Multiple Refunds for a Payment | GET | Refunds |
| Update Refund | PATCH | Refunds |
| Create Instant Settlement | POST | Settlements |
| Fetch all Instant Settlements | GET | Settlements |
| Fetch Instant Settlement by ID | GET | Settlements |
| Settlements Recon | GET | Settlements |
| Fetch Settlement by ID | GET | Settlements |
| Fetch All Settlements | GET | Settlements |
| Create Subscription Link | POST | Subscriptions |
| Fetch All Subscriptions | GET | Subscriptions |
| Fetch Subscriptions by ID | GET | Subscriptions |
| Cancel Subscription | POST | Subscriptions |
| Update Subscription | PATCH | Subscriptions |
| Fetch Details of a Pending Update | GET | Subscriptions |
| Cancel Pending Update | POST | Subscriptions |
| Pause a Subscription | POST | Subscriptions |
| Resume a Subscription | POST | Subscriptions |
| Delete an Offer Linked to a Subscription | DELETE | Subscriptions |

## API Definition Endpoints

You can fetch the complete API specification for this provider:

**New Format (OpenAPI spec):**
```bash
curl 'https://backend.lowcodeapi.com/razorpay/openapi'
```

**Old Format (API definition):**
```bash
curl 'https://backend.lowcodeapi.com/razorpay/definition'
```

## Response Format

All responses are wrapped in a `data` key:

```json
{
  "data": {
    // Actual response from provider (object or array)
  }
}
```