---
title: Bank Transfer / ECMS — Integration Steps
slug: payments-e-challan/integration-steps
excerpt: >-
  Step-by-step guide to integrate Bank Transfer (ECMS) e-challan generation
  using Pine Labs Online APIs.
sidebar_order: 1
hidden: false
sidebar_label: Integration Steps
metadata:
  title: ECMS Integration Steps — E-Challan Generation API | Pine Labs
  description: >-
    Generate e-challans for IMPS, NEFT, and RTGS fund transfers with Pine Labs
    ECMS APIs. Step-by-step guide covering token generation, order creation,
    challan generation, and download.
  keywords: >-
    ECMS integration, e-challan generation, bank transfer API, challan download,
    IMPS NEFT RTGS, Pine Labs integration
  robots: index
---

Integrate with Pine Labs Online APIs to generate e-challans and enable fund transfers via IMPS, NEFT, or RTGS.

Follow these steps to start generating e-challans seamlessly.

1. [Generate Token](#1-prerequisite-generate-token)
2. [Create Order](#2-create-order)
3. [Generate Challan](#3-generate-challan)
4. [Fetch and Download Challan](#4-fetch-and-download-challan)


> **Note:**
> - Store your Client ID and Secret in your backend securely.
> - Integrate APIs on your backend system — never call from the frontend.
> - Failure to adhere to these guidelines may result in legal implications.

---

## 1. [Prerequisite] Generate Token

Generate an access token to authenticate all subsequent API calls.

**Endpoint:** `POST /api/auth/v1/token`

```bash
curl --request POST \
--url https://pluraluat.v2.pinepg.in/api/auth/v1/token \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--header 'Request-Timestamp: 2024-07-09T07:57:08.022Z' \
--header 'Request-ID: c17ce30f-f88e-4f81-ada1-c3b4909ed235' \
--data '{
  "client_id": "<your_client_id>",
  "client_secret": "<your_client_secret>",
  "grant_type": "client_credentials"
}'
```

Refer to the [Generate Token API](/api/authentication/generate-token) documentation for full request and response details.

---

## 2. Create Order

Create an order for the bank transfer payment.

**Endpoint:** `POST /api/pay/v1/orders`

```bash
curl --location 'https://pluraluat.v2.pinepg.in/api/pay/v1/orders' \
--header 'Authorization: Bearer <access_token>' \
--header 'Content-Type: application/json' \
--header 'Request-ID: c17ce30f-f88e-4f81-ada1-c3b4909ed235' \
--header 'Request-Timestamp: 2024-07-09T07:57:08.022Z' \
--data '{
  "merchant_order_reference": "ECMS-12345",
  "order_amount": {
    "value": 1100,
    "currency": "INR"
  },
  "pre_auth": false,
  "allowed_payment_methods": [
    "CARD",
    "UPI",
    "NETBANKING",
    "POINTS",
    "WALLET"
  ],
  "notes": "Bank Transfer order",
  "callback_url": "https://your-domain.com/callback",
  "failure_callback_url": "https://your-domain.com/failure",
  "purchase_details": {
    "customer": {
      "email_id": "customer@example.com",
      "first_name": "Kevin",
      "last_name": "Bob",
      "customer_id": "CUST-001",
      "mobile_number": "9876543210",
      "country_code": "91"
    }
  }
}'
```

Refer to the [Create Order API](/api/orders/create-order) documentation for the full parameter list.

---

## 3. Generate Challan

Generate an e-challan enabling secure and traceable bank transfer payments.

There are two paths depending on whether you charge a convenience fee:

### Option A: With convenience fee

1. Call the [**Calculate Convenience Fee**](/api/convenience-fee/calculate-convenience-fee) API first
2. Pass the calculated amount to the [**Create Challan** API](/api/e-challans/create-challan)

### Option B: Without convenience fee

Pass an empty object for the convenience fee field in the Create Challan API.

### 3.1 Calculate Convenience Fee (optional)

**Endpoint:** `POST /api/pay/v1/orders/{order_id}/payments`

```bash
curl --location 'https://pluraluat.v2.pinepg.in/api/pay/v1/orders/{order_id}/payments' \
--header 'Authorization: Bearer <access_token>' \
--header 'Content-Type: application/json' \
--header 'Request-ID: c17ce30f-f88e-4f81-ada1-c3b4909ed235' \
--header 'Request-Timestamp: 2024-07-09T07:57:08.022Z' \
--data '{
  "amount": {
    "value": 10000,
    "currency": "INR"
  },
  "payment_method": "CARD",
  "network_type": "VISA"
}'
```

Refer to the [Calculate Convenience Fee API](/docs/convenience-fees) documentation for full details.

### 3.2 Create Challan

**Endpoint:** `POST /api/pay/v1/orders/{order_id}/payments`

```bash
curl --location 'https://pluraluat.v2.pinepg.in/api/pay/v1/orders/{order_id}/payments' \
--header 'Authorization: Bearer <access_token>' \
--header 'Content-Type: application/json' \
--header 'Request-ID: c17ce30f-f88e-4f81-ada1-c3b4909ed235' \
--header 'Request-Timestamp: 2024-07-09T07:57:08.022Z' \
--data '{
  "convenience_fee_breakdown": {
    "fee_amount": {
      "value": 1000,
      "currency": "INR"
    },
    "tax_amount": {
      "value": 180,
      "currency": "INR"
    },
    "additional_fee_amount": {
      "value": 0,
      "currency": "INR"
    },
    "maximum_fee_amount": {
      "value": 99999999,
      "currency": "INR"
    },
    "applicable_fee_amount": {
      "value": 1180,
      "currency": "INR"
    }
  }
}'
```

> **Note:** If charging a convenience fee, use the values returned by the Calculate Convenience Fee API in the `convenience_fee_breakdown` object. If not charging a fee, pass an empty object.

The response includes the challan with:
- Customer identifier (for beneficiary setup)
- IFSC code
- Payment reference ID
- Expiry date

> Use the challan to complete payment either by visiting the bank or through NetBanking. The challan provides all the beneficiary details needed to add and make the transfer.

Refer to the [Create Challan API](/docs/payments-e-challan) documentation for full details.

---

## 4. Fetch and Download Challan

Retrieve and download challan details using:

| API | Purpose |
|---|---|
| **Get Challan API** | Fetches all challans created for a specific order |
| **Get Challan PDF API** | Downloads the challan in PDF format |

Use these APIs to access or share the challan information as needed.

---

## Payment confirmation

Once the customer completes the bank transfer:

1. Pine Labs Online receives payment confirmation from the bank
2. A webhook event `ORDER_PROCESSED` is sent to your configured endpoint
3. Use the [Get Order API](/api/orders/get-order-by-id) to verify the order status
