Integration Steps
Learn how to integrate Pine Labs Online APIs to start accepting payments through the Pay Later payment method on your website.
Follow the below steps to integrate with Pine Labs Online seamless checkout APIs in your application.
Note
- Ensure you store your Client ID and Secret in your Backend securely.
- Integrate our APIs on your backend system.
- We strictly recommend not to call our APIs from the frontend.
- Failure to adhere to the above guidelines may result in legal implications. In such cases, you will be held responsible for any damage or loss arising from non-compliance.
1. [Prerequisite] 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 --location '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"
}
'
curl --location 'https://api.pluralpay.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"
}
'
{
"access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c",
"expires_in": 3600
}
Click here for request and response parameter information.
The table below lists the request parameters of our Generate Token API.
Parameter | Type | Description |
---|---|---|
client_id required | string |
Unique client identifier in the Pine Labs Online database. Example: a17ce30e-f88e-4f81-ada1-c3b4909ed232 Note: The Onboarding team has provided you with this information as part of the onboarding process. |
client_secret required | string |
Unique client secret key provided while onboarding. Example: fgwei7egyhuggwp39w8rh Note: The Onboarding team has provided you with this information as part of the onboarding process. |
grant_type required | string |
The grant type to generate an access token. Accepted value: client_credentials
|
The table below lists the response parameters of our Generate Token API.
Parameter | Type | Description |
---|---|---|
access_token | string |
The access token generated by the system. • Minimum length: 1 character. • Maximum length: 8192 characters. Example: eyJhbGciOiJIUzI1NiIsIn Note: Use this token in the authorization headers to authenticate Plural APIs. |
expires_at | string |
Access duration timestamp. Example: 2024-06-28T13:26:06.909140Z
|
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 --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"
],
"notes":"order1",
"callback_url":"https://sample-callback-url",
"failure_callback_url": "https://sample-failure-callback-url",
"purchase_details":{
"customer":{
"email_id":"[email protected]",
"first_name":"Kevin",
"last_name":"Bob",
"customer_id":"123456",
"mobile_number":"9876543210",
"country_code": "91",
"billing_address":{
"address1":"10 Downing Street Westminster London",
"address2":"Oxford Street Westminster London",
"address3":"Baker Street Westminster London",
"pincode":"51524036",
"city":"Westminster",
"state":"Westminster",
"country":"London"
},
"shipping_address":{
"address1":"10 Downing Street Westminster London",
"address2":"Oxford Street Westminster London",
"address3":"Baker Street Westminster London",
"pincode":"51524036",
"city":"Westminster",
"state":"Westminster",
"country":"London"
}
},
"merchant_metadata":{
"key1":"DD",
"key2":"XOF"
}
}
}
'
curl --location 'https://api.pluralpay.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"
],
"notes":"order1",
"callback_url":"https://sample-callback-url",
"failure_callback_url": "https://sample-failure-callback-url",
"purchase_details":{
"customer":{
"email_id":"[email protected]",
"first_name":"Kevin",
"last_name":"Bob",
"customer_id":"123456",
"mobile_number":"9876543210",
"country_code": "91",
"billing_address":{
"address1":"10 Downing Street Westminster London",
"address2":"Oxford Street Westminster London",
"address3":"Baker Street Westminster London",
"pincode":"51524036",
"city":"Westminster",
"state":"Westminster",
"country":"London"
},
"shipping_address":{
"address1":"10 Downing Street Westminster London",
"address2":"Oxford Street Westminster London",
"address3":"Baker Street Westminster London",
"pincode":"51524036",
"city":"Westminster",
"state":"Westminster",
"country":"London"
}
},
"merchant_metadata":{
"key1":"DD",
"key2":"XOF"
}
}
}
'
{
"data":{
"order_id":"v1-4405071524-aa-qlAtAf",
"merchant_order_reference":"112345",
"type":"CHARGE",
"status":"CREATED",
"merchant_id":"104359",
"order_amount":{
"value":1100,
"currency":"INR"
},
"pre_auth":false,
"allowed_payment_methods":[
"CARD",
"UPI",
"NETBANKING",
"POINTS",
"WALLET"
],
"notes":"order1",
"callback_url":"https://sample-callback-url",
"failure_callback_url": "https://sample-failure-callback-url",
"purchase_details":{
"customer":{
"email_id":"[email protected]",
"first_name":"Kevin",
"last_name":"Bob",
"customer_id":"123456",
"mobile_number":"9876543210",
"country_code": "91",
"billing_address":{
"address1":"10 Downing Street Westminster London",
"address2":"Oxford Street Westminster London",
"address3":"Baker Street Westminster London",
"pincode":"51524036",
"city":"Westminster",
"state":"Westminster",
"country":"London"
},
"shipping_address":{
"address1":"10 Downing Street Westminster London",
"address2":"Oxford Street Westminster London",
"address3":"Baker Street Westminster London",
"pincode":"51524036",
"city":"Westminster",
"state":"Westminster",
"country":"London"
}
},
"merchant_metadata":{
"key1":"DD",
"key2":"XOF"
}
},
"payments":[
],
"created_at":"2024-07-15T05:44:51.174Z",
"updated_at":"2024-07-15T05:44:51.174Z"
}
}
Click here for request and response parameter information.
The table below lists the request parameters of our create order API.
Parameter | Type | Description |
---|---|---|
merchant_order_reference required | string |
Enter a unique identifier for the order request.
1234567890 Supported characters:
|
order_amount required | object |
An object that contains the transaction amount details. Learn more about the order_amount child object.
|
pre_auth | boolean |
The pre-authorization type. Possible values:
|
allowed_payment_methods | array of strings |
The type of payment methods you want to offer customers. Accepted values:
UPI Note: Before selecting a payment method, ensure it is configured for you. |
notes | string |
Note to show against an order. Example: Order1
|
callback_url | string |
URL to redirect customers based on order details. Example: https://sample-callback-url
|
purchase_details | object |
An object that contains purchase details. Learn more about the purchase_details child object.
|
Order Amount [Child Object]
The table below lists the various parameters in the order_amount
child object. This object is part of the create order
request object.
Parameter | Type | Description |
---|---|---|
value required | integer |
Transaction amount in Paisa.
1000
|
currency required | string |
Type of currency. Example: INR
|
Purchase Details [Child Object]
The table below lists the various parameters in the purchase_details
child object. This object is part of the create order
request object.
Parameter | Type | Description |
---|---|---|
customer | object |
An object that contains the customer details. Learn more about the customer child object. |
merchant_metadata | object |
An object of key-value pair that can be used to store additional information. Example: "key1": "DD" |
Customer [Child Object]
The table below lists the various parameters in the customer
child object. This is part of the purchase_details
object.
Parameter | Type | Description |
---|---|---|
email_id | string |
Customer's email address.
[email protected] |
first_name | string |
Customer's first name.
Kevin |
last_name | string |
Customer's last name.
Bob |
customer_id | string |
Unique identifier of the customer in the Pine Labs Online database.
123456 |
mobile_number | string |
Customer's mobile number.
9876543210 |
country_code | string |
Country code of the registered mobile number.
91 Note: If the country code is not provided, it defaults to 91 . |
billing_address | object |
An object that contains the details of the billing address. Learn more about our billing_address child object. |
shipping_address | object |
An object that contains the shipping address details. Learn more about our shipping_address child object. |
Billing Address [Child Object]
The table below lists the various parameters in the billing_address
child object. This is part of the customer
object.
Parameter | Type | Description |
---|---|---|
address1 | string | Customer's billing address1.
10 Downing Street Westminster London |
address2 | string | Customer's billing address2.
Oxford Street Westminster London |
address3 | string | Customer's billing address3.
Baker Street Westminster London |
pincode | string | Pincode of the billing address.
51524036 |
city | string | City of the billing address.
Westminster |
state | string | State of the billing address.
Westminster |
country | string | Country of the billing address.
London |
Shipping Address [Child Object]
The table below lists the various parameters in the shipping_address
child object. This is part of the customer
object.
Parameter | Type | Description |
---|---|---|
address1 | string | Customer's shipping address1.
10 Downing Street Westminster London |
address2 | string | Customer's shipping address2.
Oxford Street Westminster London |
address3 | string | Customer's shipping address3.
Baker Street Westminster London |
pincode | string | Pincode of the shipping address.
51524036 |
city | string | City of the shipping address.
Westminster |
state | string | State of the shipping address.
Westminster |
country | string | Country of the shipping address.
London |
The table below lists the various parameters returned in the Create order response objects.
Parameter | Type | Description |
---|---|---|
order_id | string |
Unique identifier of the order in the Pine Labs Online database.
v1-5757575757-aa-hU1rUd |
merchant_order_reference | string |
Unique identifier entered while creating an order.
82d57572-057c-4826-5775-385a52150554 |
type | string |
Payment type. Possible values:
|
status | string |
Order status. Possible values:
|
challenge_url | string |
Use the generated challenge_url to accept payment.Note : This parameter is returned only after the payment is linked against the order_id. |
merchant_id | string |
Unique identifier of the merchant in the Pine Labs Online database. Example: 123456 |
order_amount | object |
An object that contains the transaction amount details. Learn more about our order_amount child object. |
notes | string |
The note you want to show against an order. Example: Order1 |
pre_auth | boolean |
The pre-authorization type. Possible values:
false |
allowed_payment_methods | array of strings |
The type of payment methods you want to offer customers. Accepted values:
CARD Note: Before selecting a payment method, ensure it is configured for you. |
callback_url | string |
URL to redirect customers to success or failure pages. Example: https://sample-callback-url |
purchase_details | object |
An object that contains the purchase details. Learn more about the purchase_details child object.Note: The presence of the object key-values depends on the Input request. |
payments | array of objects |
An array of objects that contains the payment details. Note: Payment object is returned only for the orders linked with a payment. |
created_at | string |
The ISO 8601 UTC Timestamp when the order request was received. Example: 2024-07-09T07:57:08.022Z |
updated_at | string |
The ISO 8601 UTC Timestamp when the order object was updated. Example: 2024-07-09T07:57:08.022Z |
Order Amount [Child Object]
The table below lists the various parameters in the order_amount
child object. This object is part of the create order
response object.
Parameter | Type | Description |
---|---|---|
value | integer |
Transaction amount in Paisa.
1000
|
currency | string |
Type of currency. Example: INR
|
Purchase Details [Child Object]
The table below lists the various parameters in the purchase_details
child object. This object is part of the create order
response object.
Parameter | Type | Description |
---|---|---|
customer | object |
An object that contains the customer details. Learn more about the customer child object. |
merchant_metadata | object |
An object of key-value pair that can be used to store additional information. Example: "key1": "DD" |
Customer [Child Object]
The table below lists the various parameters in the customer
child object. This is part of the purchase_details
object.
Parameter | Type | Description |
---|---|---|
email_id | string |
Customer's email address.
[email protected] |
first_name | string |
Customer's first name.
Kevin |
last_name | string |
Customer's last name.
Bob |
customer_id | string |
Unique identifier of the customer in the Pine Labs Online database.
123456 |
mobile_number | string |
Customer's mobile number.
9876543210 |
billing_address | object |
An object that contains the details of the billing address. Learn more about our billing_address child object. |
shipping_address | object |
An object that contains the shipping address details. Learn more about our shipping_address child object. |
Billing Address [Child Object]
The table below lists the various parameters in the billing_address
child object. This is part of the customer
object.
Parameter | Type | Description |
---|---|---|
address1 | string | Customer's billing address1.
10 Downing Street Westminster London |
address2 | string | Customer's billing address2.
Oxford Street Westminster London |
address3 | string | Customer's billing address3.
Baker Street Westminster London |
pincode | string | Pincode of the billing address.
51524036 |
city | string | City of the billing address.
Westminster |
state | string | State of the billing address.
Westminster |
country | string | Country of the billing address.
London |
Shipping Address [Child Object]
The table below lists the various parameters in the shipping_address
child object. This is part of the customer
object.
Parameter | Type | Description |
---|---|---|
address1 | string | Customer's shipping address1.
10 Downing Street Westminster London |
address2 | string | Customer's shipping address2.
Oxford Street Westminster London |
address3 | string | Customer's shipping address3.
Baker Street Westminster London |
pincode | string | Pincode of the shipping address.
51524036 |
city | string | City of the shipping address.
Westminster |
state | string | State of the shipping address.
Westminster |
country | string | Country of the shipping address.
London |
Refer to our Create Order API documentation to learn more.
3. Check Eligibility
To check your customer eligibility to Pay Later, use our Check Eligibility API, for authentication use the generated access token in the headers of the API request.
Below are the sample requests and sample response for the Check Eligibility API.
curl --request POST \
--url https://pluraluat.v2.pinepg.in/api/payment-option/eligibility/bnpl \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
{
"mobile": "xxxxxx2032",
"pay_code": "SIMPL3",
"amount": {
"value": 3400,
"currency": "INR"
},
"device_info": {
"source_ip_address": "10.11.19.2",
"device_model": "Samsung S21 Ultra",
"device_manufacturer": "Samsung",
"browser_user_agent": "Chrome"
}
}
'
curl --request POST \
--url https://pluraluat.v2.pinepg.in/api/payment-option/eligibility/bnpl \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
{
"mobile": "xxxxxx2032",
"pay_code": "SIMPL3",
"amount": {
"value": 3400,
"currency": "INR"
},
"device_info": {
"source_ip_address": "10.11.19.2",
"device_model": "Samsung S21 Ultra",
"device_manufacturer": "Samsung",
"browser_user_agent": "Chrome"
}
}
'
{
"txn_eligibility": true,
"metadata": {
"credit_limit_available_in_paise": "0",
"installments": [
{
"serial_no": 1,
"amount_in_paise": 1134,
"due_date": "2025-06-30"
},
{
"serial_no": 2,
"amount_in_paise": 1133,
"due_date": "2025-07-21"
},
{
"serial_no": 3,
"amount_in_paise": 1133,
"due_date": "2025-08-21"
}
]
}
}
Click here for request and response parameter information.
The table below lists the request parameters of our Check Eligibility API.
Parameter | Type | Description |
---|---|---|
mobile required | string |
Customer's mobile number. Example: 9876543210
|
pay_code required | string |
Pay Later service provide code. Possible values:
|
amount required | object |
An object that contains the transaction amount details. Learn more about our amount child object.
|
device_info | object |
Mandatory for SIMPL and SIMPL3 ProvidersAn object that contains the device information details. Learn more about our device_info child object.
|
Amount [Child Object]
The table below lists the various parameters in the amount
child object. This object is part of the Check Eligibility
request object.
Parameter | Type | Description |
---|---|---|
value required | integer |
Transaction amount in Paisa.
1000
|
currency required | string |
Type of currency. Example: INR
|
Device Info [Child Object]
The table below lists the various parameters in the device_info
child object. This object is part of the Check Eligibility
request object.
Parameter | Type | Description |
---|---|---|
operating_system | string |
Type of operating system of the device. Example: Linux
|
source_ip_address | string |
The IP address of the user's device initiating the request, used for security validation and fraud detection. Example: 10.11.19.2
|
browser_ip_address | string |
The IP address captured from the user's browser during the transaction. Example: 203.0.113.42
|
browser_user_agent | string |
The user’s browser information string, used to identify the browser, device type, and operating system. Example: Chrome
|
device_model | string |
The model of the user's device. Example: Samsung S21 Ultra
|
device_manufacturer | string |
The name of the company that manufactured the user's device. Example: Samsung
|
The table below lists the response parameters of our Check Eligibility API.
Parameter | Type | Description |
---|---|---|
txn_eligibility | boolean |
Pay Later Eligibility status. Possible values:
|
metadata | object |
An object that contains the credit limit meta information. Learn more about our metadata child object.
|
Metadata [Child Object]
The table below lists the various parameters in the metadata
child object. This object is part of the check eligibility response object.
Parameter | Type | Description |
---|---|---|
credit_limit_available_in_paise | string |
The running line of credit limit available is Paisa.
100
|
installments | array of objects |
An array of objects that contains the installment details. Learn more about our installments child object.Note: This installments array of object is returned only for SIMPL3
|
Installments [Child Object]
The table below lists the various parameters in the installments
child object. This object is part of the metadata
object.
Parameter | Type | Description |
---|---|---|
serial_no | integer |
Instalment number in series. Example: 1 |
amount_in_paise | integer |
The running line of credit limit available is Paisa.
100 |
due_date | string |
The due date by when the instalment must be paid. Example: 2025-08-21 Format: YYYY-MM-DD
|
Refer to our Check Eligibility API documentation to learn more.
4. Create Payment
To create a payment, use our Create Payment API, use the order_id
returned in the response of a Create Order API to link the payment against an order.
Below are the sample requests and sample response for a Create Payment API.
curl --location 'https://pluraluat.v2.pinepg.in/api/pay/v1/orders/{order_id}/payments' \
--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 '
{
"payments": [
{
"merchant_payment_reference": "{% faker 'guid' %}",
"payment_method": "BNPL",
"payment_amount": {
"value": 100,
"currency": "INR"
},
"payment_option": {
"bnpl_details": {
"mobile": "9315829629",
"bnpl_pay_code": "LAZYPAY"
}
},
"device_info": {
"source_ip_address": "source_ip_address",
"device_model": "modelA",
"device_manufacturer": "manufacturerA",
"browser_user_agent": "buaA"
}
}
]
}
'
curl --location 'https://api.pluralpay.in/api/pay/v1/orders/{order_id}/payments' \
--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 '
{
"payments": [
{
"merchant_payment_reference": "{% faker 'guid' %}",
"payment_method": "BNPL",
"payment_amount": {
"value": 100,
"currency": "INR"
},
"payment_option": {
"bnpl_details": {
"mobile": "9315829629",
"bnpl_pay_code": "LAZYPAY"
}
},
"device_info": {
"source_ip_address": "source_ip_address",
"device_model": "modelA",
"device_manufacturer": "manufacturerA",
"browser_user_agent": "buaA"
}
}
]
}
'
{
"data": {
"order_id": "v1-250708064524-aa-Zd1J9Y",
"merchant_order_reference": "efe43c72-acef-43ba-a3cf-c712ca183ffe",
"type": "CHARGE",
"status": "PENDING",
"merchant_id": "106974",
"order_amount": {
"value": 100,
"currency": "INR"
},
"notes": "Text description of order",
"pre_auth": false,
"part_payment": false,
"allowed_payment_methods": [
"CARD",
"NETBANKING",
"CREDIT_EMI",
"UPI",
"WALLET",
"DEBIT_EMI",
"BNPL",
"CARDLESS_EMI"
],
"purchase_details": {
"customer": {
"email_id": "[email protected]",
"first_name": "Kevin",
"last_name": "Bob",
"customer_id": "192212",
"mobile_number": "192192883",
"country_code": "91",
"country_code": "91",
"billing_address": {
"address1": "H.No 15, Sector 17",
"pincode": "61232112",
"city": "CHANDIGARH",
"state": "PUNJAB",
"country": "INDIA"
},
"shipping_address": {
"address1": "H.No 15, Sector 17",
"address2": "string",
"address3": "string",
"pincode": "144001123",
"city": "CHANDIGARH",
"state": "PUNJAB",
"country": "INDIA"
},
"is_edit_customer_details_allowed": false
},
"merchant_metadata": {
"key1": "value1",
"key2": "value2"
}
},
"payments": [
{
"id": "v1-250708064524-aa-Zd1J9Y-bn-a",
"merchant_payment_reference": "2f2c63e5-c623-4a9f-8b43-67dbd721fa38",
"status": "PENDING",
"payment_amount": {
"value": 100,
"currency": "INR"
},
"payment_method": "BNPL",
"payment_option": {
"bnpl_data": {
"mobile": "9315829629",
"bnpl_pay_code": "LAZYPAY"
}
},
"acquirer_data": {
"approval_code": "",
"acquirer_reference": "TXN1679652",
"rrn": "",
"is_aggregator": true,
"acquirer_name": "LAZYPAY_BNPL"
},
"created_at": "2025-07-08T06:45:26.763Z",
"updated_at": "2025-07-08T06:45:35.111Z"
}
],
"created_at": "2025-07-08T06:45:24.813Z",
"updated_at": "2025-07-08T06:45:35.112Z",
"integration_mode": "SEAMLESS",
"payment_retries_remaining": 9,
"is_mcc_transaction": false
}
}
Important
- If the customer's mobile number is modified during the seamless flow after the order has been created, make sure to validate the updated number. This helps prevent unintended or potentially fraudulent transactions.
Click here for request and response parameter information.
Path Parameter
The table below lists the path parameters of our Create Payment API.
Parameter | Type | Description |
---|---|---|
order_id required | string |
Unique identifier of the order in the Pine Labs Online database. Example: v1-5757575757-aa-hU1rUd |
Request Parameters
The table below lists the request parameters of our Create Payment API.
Parameter | Type | Description |
---|---|---|
Payments required | array of objects |
An array of objects that contains the payment details. Learn more about our payments child object |
Payments [Child Object]
The table below lists the various parameters in the payments
child object. This object is part of the create payment
request object.
Parameter | Type | Description |
---|---|---|
merchant_payment_reference required | string |
Unique Payment Reference id sent by merchant. Example: 008cf04b-a770-4777-854e-b1e6c1230609 |
payment_method required | string |
Type of payment method you want to use to accept a payment. Accepted values:
BNPL |
payment_amount required | object |
An object that contains the details of the payment amount. Learn more about our payment_amount child object. |
payment_option required | object |
An object that contains the details of the payment options. Learn more about our payment_option child object. |
device_info | object |
Mandatory for SIMPL and SIMPL3 ProvidersAn object that contains device information. Learn more about our device_type child object. |
Payment Amount [Child Object]
The table below lists the various parameters in the payment_amount
child object. This object is part of the payments
object.
Parameter | Type | Description |
---|---|---|
value required | integer |
The payment amount is Paisa.
100 |
currency required | string |
Type of currency. Example: INR |
Payment Option [Child Object]
The table below lists the various parameters in the payment_option
child object. This object is part of the payments
object.
Parameter | Type | Description |
---|---|---|
bnpl_details | object |
An object that contains the buy now pay later details. Learn more about the bnpl_details child object. |
BNPL Details [Child Object]
The table below lists the various parameters in the bnpl_details
child object. This object is part of the payment_option
object.
Parameter | Type | Description |
---|---|---|
mobile required | string
| |
bnpl_pay_code required | string | Pay Later service provide code. Possible values:
LAZYPAY |
Device Information [Child Object]
The table below lists the various parameters in the device_info
child object. This object is part of the payment_option
object.
Parameter | Type | Description |
---|---|---|
operating_system required | string
| |
source_ip_address required | string | The IP address of the user's device initiating the request, used for security validation and fraud detection. Example: 10.11.19.2 |
browser_ip_address required | string | The IP address captured from the user's browser during the transaction. Example: 203.0.113.42 |
browser_user_agent required | string | The user’s browser information string, used to identify the browser, device type, and operating system. Example: Chrome |
device_model required | string | The model of the user's device. Example: Samsung S21 Ultra |
device_manufacturer required | string | The name of the company that manufactured the user's device. Example: Samsung |
The table below lists the various parameters returned in the Create Payment response objects.
Parameter | Type | Description |
---|---|---|
order_id | string |
Unique identifier of the order in the Pine Labs Online database.
v1-5757575757-aa-hU1rUd |
merchant_order_reference | string |
Unique identifier entered while creating an order.
82d57572-057c-4826-5775-385a52150554 |
type | string |
Payment type. Possible values:
|
status | string |
Order status. Possible values:
|
challenge_url | string |
Use the generated challenge_url URL to navigate your users the checkout page. |
merchant_id | string |
Unique identifier of the merchant in the Pine Labs Online database. Example: 123456 |
order_amount | object |
An object that contains the transaction amount details. Learn more about our order_amount child object. |
notes | string |
The note you want to show against an order. Example: Order1 |
pre_auth | boolean |
The pre-authorization type. Possible values:
false |
allowed_payment_methods | array of strings |
The type of payment methods you want to offer customers. Accepted values:
NETBANKING Note: Before selecting a payment method, ensure it is configured for you. |
callback_url | string |
URL to redirect customers to success or failure pages. Example: https://sample-callback-url |
purchase_details | object |
An object that contains the purchase details. Learn more about the purchase_details child objectNote: The presence of the object key-values depends on the Input request. |
payments | array of objects |
An array of objects that contains the payment details. Learn more about the payments child object.Note: Payment object is returned only for the orders linked with a payment. |
created_at | string |
The ISO 8601 UTC Timestamp when the order request was received. Example: 2024-07-09T07:57:08.022Z |
updated_at | string |
The ISO 8601 UTC Timestamp when the order object was updated. Example: 2024-07-09T07:57:08.022Z |
integration_mode | string |
It is a payment processing approach that defines how transactions are handled. Accepted values:
SEAMLESS |
payment_retries_remaining | integer |
Number of payment retries remaining. Example: 9 |
is_mcc_transaction | boolean |
MCC transaction status. Possible values:
true |
Order Amount [Child Object]
The table below lists the various parameters in the order_amount
child object. This object is part of the create order
request object.
Parameter | Type | Description |
---|---|---|
value | integer |
Transaction amount in Paisa.
1000
|
currency | string |
Type of currency. Example: INR
|
Purchase Details [Child Object]
The table below lists the various parameters in the purchase_details
child object. This object is part of the create order
request object.
Parameter | Type | Description |
---|---|---|
customer | object |
An object that contains the customer details. Learn more about the customer child object. |
is_edit_customer_details_allowed | boolean |
Indicates whether the customer is allowed to edit their details. Possible values:
|
merchant_metadata | object |
An object of key-value pair that can be used to store additional information. Example: "key1": "DD" |
Customer [Child Object]
The table below lists the various parameters in the customer
child object. This is part of the purchase_details
object.
Parameter | Type | Description |
---|---|---|
email_id | string |
Customer's email address.
[email protected] |
first_name | string |
Customer's first name.
Kevin |
last_name | string |
Customer's last name.
Bob |
customer_id | string |
Unique identifier of the customer in the Pine Labs Online database.
123456 |
mobile_number | string |
Customer's mobile number.
9876543210 |
billing_address | object |
An object that contains the details of the billing address. Learn more about our billing_address child object. |
shipping_address | object |
An object that contains the shipping address details. Learn more about our shipping_address child object. |
Billing Address [Child Object]
The table below lists the various parameters in the billing_address
child object. This is part of the customer
object.
Parameter | Type | Description |
---|---|---|
address1 | string | Customer's billing address1.
10 Downing Street Westminster London |
address2 | string | Customer's billing address2.
Oxford Street Westminster London |
address3 | string | Customer's billing address3.
Baker Street Westminster London |
pincode | string | Pincode of the billing address.
51524036 |
city | string | City of the billing address.
Westminster |
state | string | State of the billing address.
Westminster |
country | string | Country of the billing address.
London |
Shipping Address [Child Object]
The table below lists the various parameters in the shipping_address
child object. This is part of the customer
object.
Parameter | Type | Description |
---|---|---|
address1 | string | Customer's shipping address1.
10 Downing Street Westminster London |
address2 | string | Customer's shipping address2.
Oxford Street Westminster London |
address3 | string | Customer's shipping address3.
Baker Street Westminster London |
pincode | string | Pincode of the shipping address.
51524036 |
city | string | City of the shipping address.
Westminster |
state | string | State of the shipping address.
Westminster |
country | string | Country of the shipping address.
London |
Payments [Child Object]
The table below lists the various parameters in the payments
child object. This object is part of the payments
sample response object.
Parameter | Type | Description |
---|---|---|
id | string |
Unique identifier of the payment in the Pine Labs Online database.
v1-5206071124-aa-mpLhF3-cc-l |
merchant_payment_reference | string |
A unique Payment Reference id sent by merchant. Example: 008cf04b-a770-4777-854e-b1e6c1230609 |
status | string |
Payment status. Possible values:
PENDING : When the create payment API request is successfully received by Pine Labs Online.PENDING |
payment_amount | object |
An object that contains the details of the payment amount. Learn more about our payment_amount child object. |
payment_method | string |
Type of payment method. Accepted values:
Netbanking |
payment_option | object |
An object that contains the details of the payment options. Learn more about our payment_option child object. |
acquirer_data | object |
An object that contains the details of the acquirer data. Learn more about our acquirer_data child object. |
created_at | string |
The ISO 8601 UTC Timestamp, when the create payment request was received by Pine Labs Online. Example: 2024-07-11T06:52:12.484Z |
updated_at | string |
The ISO 8601 UTC Timestamp, when the payment response object is updated. Example: 2024-07-11T06:59:38.260Z |
Payment Amount [Child Object]
The table below lists the various parameters in the payment_amount
child object. This object is part of the payments
object.
Parameter | Type | Description |
---|---|---|
value | integer |
The transaction amount is Paisa.
100 |
currency | string |
Type of currency. Example: INR |
Payment Option [Child Object]
The table below lists the various parameters in the payment_option
child object. This object is part of the payments
object.
Parameter | Type | Description |
---|---|---|
bnpl_details | object |
An object that contains the buy now pay later details. Learn more about bnpl_details child object. |
BNPL Details [Child Object]
The table below lists the various parameters in the bnpl_details
child object. This object is part of the payment_option
object.
Parameter | Type | Description |
---|---|---|
mobile required | string
| |
bnpl_pay_code required | string | Pay Later service provide code. Possible values:
LAZYPAY |
Acquirer Data [Child Object]
The table below lists the various parameters in the acquirer_data
child object. This object is part of the payments
object.
Parameter | Type | Description |
---|---|---|
approval_code | string |
Authorization code returned from acquirer against the payment. Example: 030376 |
acquirer_reference | string |
Unique reference returned from acquirer for the payment. Example: 202455840588334 |
rrn | string |
Retrieval reference number returned from acquirer for the payment. Example: 419335023601 |
is_aggregator | boolean |
The selected aggregator model type. Accepted values:
|
acquirer_name | string |
Name of the acquirer. Example: LAZYPAY_BNPL |
Refer to our Create Payment API documentation to learn more.
Note:
Use the Cancel API to cancel the payment against an order at any time.
5. Handle Payment
In create payment API response we return a challenge_url
, use this challenge url to navigate your customers to the checkout page to accept payment.
Note:
- On successful payment we send the webhook event
ORDER_AUTHORIZED
and the status of the payment is updated toauthorized
.- You can capture or cancel an order only when the order status is
authorized
.
5.1 Store Payment Details on Your Server
On a successful and failed payment we return the following fields to the return url.
- We recommend you to store the payment details on your server.
- You must validate the authenticity of the payment details returned. You can authenticate by verifying the signature.
{
"order_id": "v1-4405071524-aa-qlAtAf",
"status": "AUTHORIZED",
"signature": "ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad"
}
{
"order_id": "v1-4405071524-aa-qlAtAf",
"status": "AUTHORIZED",
"error_code": "USER_AUTHENTICATION_REQUIRED",
"error_message": "Consumer Authentication Required",
"signature": "ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad"
}
5.2 Verify Payment Signature
Ensure you follow this as a mandatory step to verify the authenticity of the details returned to the checkout form for successful payments.
Follow the below steps to verify the signature.
- Create a signature on your server using the following parameters using the SHA256 algorithm.
order_id
: Unique Identifier generated for an order request on Pine Labs Online database.payment_status
: Payment status.error_code
: Short code for the error returned.error_message
: Corresponding error message for the code.secret_key
: The Onboarding team has provided you with this information as part of the onboarding process.
Use the below sample code to construct HashMap signature using the SHA256 algorithm.
import java.io.UnsupportedEncodingException;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import javax.crypto.Mac;
import javax.crypto.spec.SecretKeySpec;
public class hash {
public static void main(String[] args) {
// Test the GenerateHash method
String input = "<string>";
String secretKey = "<secret_key>"; // Example key in hex
String hash = GenerateHash(input, secretKey);
System.out.println("Generated Hash: " + hash);
}
public static String GenerateHash(String input, String strSecretKey) {
String strHash = "";
try {
if (!isValidString(input) || !isValidString(strSecretKey)) {
return strHash;
}
byte[] convertedHashKey = new byte[strSecretKey.length() / 2];
for (int i = 0; i < strSecretKey.length() / 2; i++) {
convertedHashKey[i] =
(byte)Integer.parseInt(strSecretKey.substring(i * 2, (i*2)+2),16); //hexNumber radix
}
strHash = hmacDigest(input.toString(), convertedHashKey,
"HmacSHA256");
} catch (Exception ex) {
strHash = "";
}
return strHash.toUpperCase();
}
private static String hmacDigest(String msg, byte[] keyString, String algo) {
String digest = null;
try {
SecretKeySpec key = new SecretKeySpec(keyString, algo);
Mac mac = Mac.getInstance(algo);
mac.init(key);
byte[] bytes = mac.doFinal(msg.getBytes("UTF-8"));
StringBuffer hash = new StringBuffer();
for (int i = 0; i < bytes.length; i++) {
String hex = Integer.toHexString(0xFF & bytes[i]);
if (hex.length() == 1) {
hash.append('0');
}
hash.append(hex);
}
digest = hash.toString();
} catch (UnsupportedEncodingException e) {
// logger.error("Exception occured in hashing the pine payment gateway request"+e);
} catch (InvalidKeyException e) {
// logger.error("Exception occured in hashing the pine payment gateway request"+e);
} catch (NoSuchAlgorithmException e) {
// logger.error("Exception occured in hashing the pine payment gateway request"+e);
}
return digest;
}
public static boolean isValidString(String str){
if(str != null && !"".equals(str.trim())){
return true;
}
return false;
}
}
Note:
To create a request string, format the key-value pairs of data returned to the return URL. The pairs are separated by
&
and arranged in ascending order based on a lexicographical comparison of the keys.
Shown below is a example to create a request string.
"key1=value1&key2=value2", ["order_id=random_order_id&status=AUTHORIZED"]
"key1=value1&key2=value2&key3=value3&key4=value4", ["error_code=USER_AUTHENTICATION_FAILED&error_message=Consumer Authentication required&order_id=<order_id>&status=FAILED"]
- If the signature generated on your server matches the Pine Labs Online signature returned in the return URL, it confirms that the payment details are from Pine Labs Online.
- Capture the status returned on your database. Once the payment status is
AUTHORIZED
you can either capture or cancel an order.
Manage Transactions
To get the status of the transaction made from your application, you can use our Fetch APIs to know the real time status.
1. Get Order by Order ID
Use this API to know the real time status of the transaction made on your application. Refer to our Get Order by Order ID API documentation to learn more.
2. Webhooks
You can configure the webhook events to know the status of your transactions. Refer to our Webhooks documentation to learn more.
Updated 24 days ago