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.
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
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 documentation for full request and response details.
2. Create Order
Create an order for the bank transfer payment.
Endpoint: POST /api/pay/v1/orders
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 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
- Call the Calculate Convenience Fee API first
- 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 --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 documentation for full details.
3.2 Create Challan
Endpoint: POST /api/pay/v1/orders/{order_id}/payments
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_breakdownobject. 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:
| 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:
- Pine Labs Online receives payment confirmation from the bank
- A webhook event
ORDER_PROCESSEDis sent to your configured endpoint - Use the Get Order API to verify the order status
