Skip to main content

Destination

Nexla's bi-directional connectors allow data to flow both to and from any location, making it simple to create a FlexFlow, DB-CDC, Spark ETL, or Replication data flow that sends data to a Razorpay location.
razorpay_api.png

Razorpay

Create a Razorpay Destination

  1. Click the + icon on the Nexset that will be sent to the Razorpay destination, and select the Send to Destination option from the menu.

  2. 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.

  3. In Nexla, Razorpay destinations can be created using pre-built endpoint templates, which expedite destination setup for common Razorpay endpoints. Each template is designed specifically for the corresponding Razorpay endpoint, making destination configuration easy and efficient.
    • To configure this destination using a template, follow the instructions in Configure Using a Template.

    Razorpay destinations can also be configured manually, allowing you to send data to Razorpay endpoints not included in the pre-built templates or apply further customizations to exactly suit your needs.
    • To configure this destination manually, follow the instructions in Configure Manually.

Configure Using a Template

Nexla provides pre-built templates that can be used to rapidly configure destinations to send data to common Razorpay endpoints. Each template is designed specifically for the corresponding Razorpay endpoint, making destination setup easy and efficient.

  • To configure this destination using a template, 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.

Configure Manually

Razorpay destinations can be manually configured to send data to any valid Razorpay API endpoint. Manual configuration provides maximum flexibility for accessing endpoints not covered by pre-built templates or when you need custom API configurations.

Using manual configuration, you can also configure Nexla to automatically send the response received from the Razorpay API after each call to a new Nexla webhook data source.

API Method

  1. To manually configure this destination, select the Advanced tab at the top of the configuration screen.

  2. Select the API method that will be used for calls to the Razorpay API from the Method pulldown menu. Razorpay API typically uses POST method for creating resources and POST method for cancelling resources.

Data Format

  1. Select the format in which the Nexset data will be sent to the Razorpay API from the Content Format pulldown menu. Razorpay API expects JSON format for all requests.

API Endpoint URL

  1. Enter the URL of the Razorpay API endpoint to which data will be sent in the URL field. This should be the complete URL to your Razorpay endpoint (e.g., https://api.razorpay.com/v1/customers, https://api.razorpay.com/v1/orders). Include any required path parameters in the URL.

Ensure the API endpoint URL is correct and accessible with your current credentials. The Razorpay API endpoint URL should point to the endpoint where you want to create or cancel resources. The endpoint URL should include the API version (/v1/) and the resource type path. You can test the endpoint using the Test button after configuring the URL.

Request Body

  1. Configure the request body that will be sent to the Razorpay API. The request body should contain the resource data formatted as JSON, with field names matching the Razorpay API's expected structure. The request body format is typically {message.json} to send the entire Nexset data as JSON, or you can construct a custom JSON structure with specific field mappings.

The request body must be valid JSON and must match the Razorpay API's expected format for the specific resource type you're using. Razorpay API uses specific structures for different resource types (customers, orders, payments, etc.). For detailed information about request body formats, available endpoints, and resource structures, see the Razorpay API documentation.

Save the Destination

  1. Once all of the relevant steps in the above sections have been completed, click the Next button to proceed with the rest of the data flow configuration, or click Save to save the destination configuration for later use.