Skip to main content

Razorpay

Razorpay is a comprehensive payment platform that enables businesses to accept, process, and disburse payments with its product suite, providing payment gateway, payment links, subscriptions, and banking solutions for modern businesses.

Razorpay icon

Power end-to-end data operations for your Razorpay API with Nexla. Our bi-directional Razorpay connector is purpose-built for Razorpay, making it simple to ingest data, sync it across systems, and deliver it anywhere — all with no coding required. Nexla turns API-sourced data into ready-to-use, reusable data products and makes it easy to send data to Razorpay or any other destination. With comprehensive monitoring, lineage tracking, and access controls, Nexla keeps your Razorpay workflows fast, secure, and fully governed.

Features

Type: API

SourceDestination

  • Seamless API Integration: Connect to any endpoint as source or destination without coding, with automatic data product creation
  • Visual Composition & Chaining: Build complex integrations using visual templates, chain API calls, and compose workflows with data validation and filtering
  • API Proxy: Expose curated slices of your data securely with a secure and customizable API proxy that validates and transforms data on the fly
  • Request optimization with intelligent batching, retry, and caching to minimize API calls and costs

Prerequisites

Before creating a Razorpay credential, you need to obtain your Key ID and Key Secret from your Razorpay account. Razorpay uses Basic Authentication for all API requests, with the Key ID as the username and the Key Secret as the password.

To obtain your Razorpay API credentials, follow these steps:

  1. Sign in to your Razorpay account using your administrator credentials.

  2. Navigate to your account settings or API management section in the Razorpay interface.

  3. Look for the API Keys or API section in your account settings, or navigate to Settings > API Keys or Developers > API Keys.

  4. If you don't have API keys yet, look for the option to generate or view your Key ID and Key Secret.

  5. Click Generate API Keys or Create API Keys to create new API keys.

  6. Configure your API key settings:

    • Enter a name for the API keys (e.g., "Nexla Integration")
    • Review and select the permissions or scopes for the keys (if applicable)
  7. Click Generate or Create to create the API keys.

  8. Your Key ID will be displayed immediately after creation. Copy the Key ID.

  9. Your Key Secret will be displayed immediately after creation. Copy the Key Secret immediately, as it may not be accessible again after you navigate away from the page.

  10. Store both credentials securely, as you will need them to configure your Nexla credential. The Key ID and Key Secret are sensitive information and should be kept confidential.

The Key ID and Key Secret are used for Basic Authentication with all API requests to the Razorpay API. The Key ID is used as the username, and the Key Secret is used as the password in Basic Authentication. The credentials authenticate your requests and grant access to Razorpay resources based on your account permissions. If your credentials are compromised, you should immediately revoke them in your Razorpay account settings and generate new ones. For detailed information about obtaining API keys, API authentication, and available endpoints, refer to the Razorpay API documentation.

Authenticate

Credentials required

FieldRequiredSecretDescription
Key IDYesNoYour username or personal API Key
Key SecretYesYesYour password or key secret

Create a credential in Nexla

  1. After selecting the data source/destination type, click the Add Credential tile to open the Add New Credential overlay.

New Credential Overlay – Razorpay

RazorpayCred.png
  1. Enter a name for the credential in the Credential Name field and a short, meaningful description in the Credential Description field.

  2. Razorpay uses Basic Authentication for all API requests. Enter your Razorpay Key ID in the Key ID field. This is the Key ID (username or personal API Key) you obtained from your Razorpay account settings (Settings > API Keys or Developers > API Keys). The Key ID is used as the username in Basic Authentication for all API requests to the Razorpay API.

  3. Enter your Razorpay Key Secret in the Key Secret field. This is the Key Secret (password or key secret) you obtained from your Razorpay account settings. The Key Secret is used as the password in Basic Authentication for all API requests to the Razorpay API. The Key Secret is sensitive information and must be kept confidential.

    Your Razorpay API credentials can be found in your Razorpay account settings under Settings > API Keys or Developers > API Keys. The Key ID and Key Secret are used for Basic Authentication with all API requests to the Razorpay API. The Key ID is used as the username, and the Key Secret is used as the password in Basic Authentication.

    If your credentials are compromised, you should immediately revoke them in your Razorpay account settings and generate new ones. The Key ID and Key Secret provide access to your Razorpay account data and should be treated as sensitive information. Keep your credentials secure and do not share them publicly.

    For detailed information about obtaining API keys, API authentication, and available endpoints, see the Razorpay API documentation.

  4. Click the Save button at the bottom of the overlay. The newly added credential will now appear in a tile on the Authenticate screen during data source/destination creation.

Use as a data source

To create a new data flow, navigate to the Integrate section, and click the New Data Flow button. Select the Razorpay connector tile, then select the credential that will be used to connect to your Razorpay account, and click Next; or, create a new Razorpay credential for use in this flow.

Endpoint templates

Nexla provides pre-built templates that can be used to rapidly configure data sources to ingest data from common Razorpay endpoints. Select the endpoint from which this source will fetch data from the Endpoint pulldown menu. Available endpoint templates are listed in the expandable boxes below.

Fetch Resources

This endpoint template fetches a list of resources from your Razorpay account. Use this template when you need to retrieve information about various Razorpay resources such as customers, orders, payments, refunds, settlements, disputes, invoices, items, or other resource types.

  • Select the resource type from the Resource Type pulldown menu. Available options include customers, orders, payments, refunds, settlements, disputes, invoices (invoices?type=invoice), items, and other resource types. The resource type determines which Razorpay resource will be queried.

This endpoint returns a list of resources from your Razorpay account, including resource IDs, names, and other resource metadata. Use this endpoint to discover which resources are available in your Razorpay account before using them with other Razorpay endpoints.

For detailed information about resource management, API response structures, and available resource types, see the Razorpay API documentation.

Fetch with ID

This endpoint template fetches information about a resource by its ID from your Razorpay account. Use this template when you need to retrieve detailed information about a specific resource, such as a customer, order, payment, refund, or other resource type.

  • Select the resource type from the Resource Type pulldown menu. Available options include customers, orders, payments, refunds, settlements, disputes, invoices (invoices?type=invoice), items, and other resource types. The resource type determines which Razorpay resource will be queried.
  • Enter the resource ID in the Resource ID field. This should be the unique identifier of the resource you want to retrieve information for. The resource ID determines which specific resource's information will be retrieved.

This endpoint returns information about a resource by its ID from your Razorpay account, including resource details, status, and other resource metadata. The endpoint returns a single resource's information.

For detailed information about resource retrieval, API response structures, and available resource data, see the Razorpay API documentation.

Once the selected endpoint template has been configured, click the Test button to the right of the endpoint selection menu to retrieve a sample of the data that will be fetched. Sample data will be displayed in the Endpoint Test Result panel on the right, allowing you to verify that the source is configured correctly before saving.

Manual configuration

Razorpay data sources can also be manually configured to ingest data from any valid Razorpay API endpoint, including endpoints not covered by the pre-built templates, chained API calls, or custom request parameters. Select the Advanced tab at the top of the configuration screen, and follow the instructions in Connect to Any API to configure the API method, endpoint URL, date/time and lookup macros, path to data, metadata, and request headers.

Razorpay API endpoints use the base URL https://api.razorpay.com/v1/ (for example, https://api.razorpay.com/v1/customers, https://api.razorpay.com/v1/orders/{order_id}), and Razorpay typically uses the GET method for retrieving data. For the Response Data Path, use $.items[*] to extract all items from the items array for list endpoints, or $ to extract the entire response for single-record endpoints, depending on your endpoint.

Once all of the relevant settings have been configured, click the Create button in the upper right corner of the screen to save and create the new Razorpay data source. Nexla will now begin ingesting data from the configured endpoint and will organize any data that it finds into one or more Nexsets.

Use as a destination

Click the + icon on the Nexset that will be sent to the Razorpay destination, and select the Send to Destination option from the menu. Select the Razorpay connector from the list of available destination connectors, then select the credential that will be used to connect to your Razorpay account, and click Next; or, create a new Razorpay credential for use in this flow.

Endpoint templates

Nexla provides pre-built templates that can be used to rapidly configure destinations to send data to common Razorpay endpoints. Select the endpoint to which data will be sent from the Endpoint pulldown menu. Then, click on the template in the list below to expand it, and follow the instructions to configure additional endpoint settings.

Create Resources

This endpoint template creates a resource in your Razorpay account using records from a Nexset. Use this template when you need to create new resources such as customers, orders, payments, refunds, or other resource types in your Razorpay account.

  • Select the resource type from the Resource Type pulldown menu. Available options include customers, orders, payments, refunds, settlements, disputes, invoices (invoices?type=invoice), items, and other resource types. The resource type determines which Razorpay resource will be created.

This endpoint sends data as JSON in the request body to create resources in your Razorpay account. Each record from your Nexset will be sent as a separate API request to create a new resource in Razorpay. The request body should contain the resource data in the format required by the Razorpay API.

The resource structure must match the Razorpay API's expected format for the selected resource type. This endpoint also creates a data source to track the created resources. For detailed information about resource creation, request body formats, available resource types, and resource management, see the Razorpay API documentation.

Cancel Payment Resources

This endpoint template cancels payment resources in your Razorpay account using records from a Nexset. Use this template when you need to cancel payment resources such as payment links or other payment-related resources.

  • Select the resource type from the Resource Type pulldown menu. Available options include payment-related resource types such as payment links. The resource type determines which Razorpay payment resource will be cancelled.
  • Enter the resource ID in the Resource ID field. This should be the unique identifier of the payment resource you want to cancel. The resource ID determines which specific payment resource will be cancelled.

This endpoint sends data as JSON in the request body to cancel payment resources in your Razorpay account. Each record from your Nexset will be sent as a separate API request to cancel a payment resource in Razorpay. The request body should contain any additional cancellation data in the format required by the Razorpay API.

This endpoint also creates a data source to track the cancelled resources. For detailed information about payment resource cancellation, request body formats, available resource types, and resource management, see the Razorpay API documentation.

Manual configuration

Razorpay destinations can also be manually configured to send data to any valid Razorpay API endpoint. Select the Advanced tab at the top of the configuration screen, and follow the instructions in Connect to Any API to configure the API method, data format, endpoint URL, request headers, attribute exclusions, record batching, and response webhooks.

Razorpay API endpoints use the base URL https://api.razorpay.com/v1/ (for example, https://api.razorpay.com/v1/customers, https://api.razorpay.com/v1/orders). Razorpay typically uses the POST method for creating resources and cancelling resources, and expects JSON format for all requests. The request body is typically {message.json} to send the entire Nexset record as JSON, with field names matching the Razorpay API's expected structure for the selected resource type.

Save & activate

Once all endpoint settings have been configured, click the Done button in the upper right corner of the screen to save and create the destination. To send the data to the configured Razorpay endpoint, open the destination resource menu, and select Activate.

The Nexset data will not be sent to the Razorpay endpoint until the destination is activated. Destinations can be activated immediately or at a later time, providing full control over data movement.