Pine LabsDOCS

Bank Transfer / ECMS — Integration Steps

Step-by-step guide to integrate Bank Transfer (ECMS) e-challan generation using Pine Labs Online APIs.

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
  2. Create Order
  3. Generate 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. Generate Token

Integrate our Generate Token API in your backend servers to generate the access token. Use the token generated to authenticate Pine Labs Online APIs.

Below are the sample requests and response for the Generate Token API.

cURL
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": "a17ce30e-f88e-4f81-ada1-c3b4909ed232", "client_secret": "fgwei7egyhuggwp39w8rh", "grant_type": "client_credentials" } '

Refer to our Generate Token API documentation to learn more.


2. Create Order

To create an Order, use our Create Order API, for authentication use the generated access token in the headers of the API request.

Below are the sample requests and response for a Create Order API.

cURL
curl --location 'https://pluraluat.v2.pinepg.in/api/pay/v1/orders' \ --header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c' \ --header 'Content-Type: application/json' \ --header 'Request-ID: c17ce30f-f88e-4f81-ada1-c3b4909ed235' \ --header 'Request-Timestamp: 2024-07-09T07:57:08.022Z' \ --header 'accept: application/json' \ --data ' { "merchant_order_reference": 112345, "order_amount": { "value": 1100, "currency": "INR" }, "pre_auth": false, "allowed_payment_methods": [ "CARD", "UPI", "NETBANKING", "POINTS", "WALLET", "BANK_TRANSFER" ], "notes": "order1", "callback_url":"https://sample-callback-url", "failure_callback_url": "https://sample-failure-callback-url", "purchase_details": { "customer": { "email_id": "kevin.bob@example.com", "first_name": "Kevin", "last_name": "Bob", "customer_id": "123456", "mobile_number": "9876543210", "country_code": "91", "billing_address":{ "address1":"H.No 15, Sector 17", "address2":"", "address3":"", "pincode":"61232112", "city":"CHANDIGARH", "state":"PUNJAB", "country":"INDIA", "full_name": "Kevin Bob", "adddress_type": "Home", "address_category": "billing" }, "shipping_address":{ "address1":"H.No 15, Sector 17", "address2":"", "address3":"", "pincode":"144001123", "city":"CHANDIGARH", "state":"PUNJAB", "country":"INDIA", "full_name": "Kevin Bob", "adddress_type": "Home", "address_category": "shipping" } }, "merchant_metadata": { "key1": "DD", "key2": "XOF" } } } '

Refer to our Create Order API documentation to learn more.


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 first
  2. Pass the calculated amount to the Create Challan API

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

cURL
curl --location 'https://pluraluat.v2.pinepg.in/api/pay/v1/fees' \ --header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c' \ --header 'Content-Type: application/json' \ --header 'Request-ID: c17ce30f-f88e-4f81-ada1-c3b4909ed235' \ --header 'Request-Timestamp: 2024-07-09T07:57:08.022Z' \ --header 'accept: application/json' \ --data ' { "amount": { "value":10000, "currency":"INR" }, "payment_method":"CARD", "network_type":"VISA" } '

Refer to our Calculate Convenience Fee API documentation to learn more.

3.2 Create Challan

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

cURL
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 documentation for full details.


4. Fetch and Download Challan

Retrieve and download challan details using:

APIPurpose
Get Challan APIFetches all challans created for a specific order
Get Challan PDF APIDownloads 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 to verify the order status