Integration Steps
Learn how to integrate subscription APIs to automate plan creation, subscription management, and scheduled payments.
Integration Overview
The integration process involves the following steps:
1. Mandate Registration
- This step is common to all three mandate types.
- It involves registering the customer’s consent and mandate details.
2. Pre-Debit Notification & Debit Execution Request
- This step is applicable only for One-Time and On-Demand mandates.
- It includes notifying the customer before initiating a debit and executing the debit transaction.
Note:
- For recurring mandates (e.g., Weekly, Monthly, etc.), Pine Labs handles both Pre-Debit Notification and debit execution automatically.
- Pine Labs will debit and automatically refund
₹2if no amount is charged during the mandate registration process, as per the plan details.
Mandate Registration
Follow the below steps to integrate with Pine Labs Online subscription APIs for Mandate Registration.
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 --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"
}
'
curl --request POST \
--url 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-c3b4909ed232Note: 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: fgwei7egyhuggwp39w8rhNote: 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: eyJhbGciOiJIUzI1NiIsInNote: Use this token in the authorization headers to authenticate Pine Labs Online 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 Plan
Use this API to Create a Plan. To authenticate this API, use the generated access token in the Authorization headers of the API request.
Below are the sample requests and response for the Create Plan API.
curl --request POST \
--url https://pluraluat.v2.pinepg.in/api/v1/public/plans \
--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 '
{
"plan_name": "Monthly Plan 2025-06-12T06:16:47.175Z",
"plan_description": "Diwali dhammaka plan intended to attract customers on diwali time",
"frequency": "Month",
"amount": {
"value": 100,
"currency": "INR"
},
"max_limit_amount": {
"value": 210,
"currency": "INR"
},
"initial_debit_amount": {
"value": 110,
"currency": "INR"
},
"trial_period_in_days": 0,
"end_date": "2026-10-21T12:02:28Z",
"merchant_metadata": {
"key1": "DD"
},
"merchant_plan_reference": "9856c70c-a0c3-4c03-b537-9ed7c80bc97e",
"auto_debit_ot" : false
}
'
curl --request POST \
--url https://api.pluralpay.in/api/v1/public/plans \
--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 '
{
"plan_name": "Monthly Plan 2025-06-12T06:16:47.175Z",
"plan_description": "Diwali dhammaka plan intended to attract customers on diwali time",
"frequency": "Month",
"amount": {
"value": 100,
"currency": "INR"
},
"max_limit_amount": {
"value": 210,
"currency": "INR"
},
"initial_debit_amount": {
"value": 110,
"currency": "INR"
},
"trial_period_in_days": 0,
"end_date": "2026-10-21T12:02:28Z",
"merchant_metadata": {
"key1": "DD"
},
"merchant_plan_reference": "9856c70c-a0c3-4c03-b537-9ed7c80bc97e",
"auto_debit_ot" : false
}
'
{
"plan_id": "v1-pla-250612061639-aa-666Zge",
"status": "ACTIVE",
"plan_name": "Monthly Plan 2025-06-12T06:16:37.364Z",
"plan_description": "Diwali dhammaka plan intended to attract customers on diwali time",
"frequency": "Month",
"amount": {
"value": 100,
"currency": "INR"
},
"max_limit_amount": {
"value": 210,
"currency": "INR"
},
"trial_period_in_days": 0,
"start_date": "2025-06-12T06:16:39.92710492Z",
"end_date": "2026-10-21T12:02:28Z",
"merchant_metadata": {
"key1": "DD"
},
"merchant_plan_reference": "b41770ac-cd3a-48d3-9e93-7dc9246b4751",
"created_at": "2025-06-12T06:16:39.933117Z",
"modified_at": "2025-06-12T06:16:39.93313Z",
"initial_debit_amount": {
"value": 110,
"currency": "INR"
},
"auto_debit_ot": false
}
Click here for request and response parameter information.
The table below lists the request parameters of our Create Plan API.
| Parameter | Type | Description |
|---|---|---|
| plan_name* | string |
Subscription plan name. Example: Monthly Plan
|
| plan_description | string |
Corresponding description for a plan. Example: Diwali Dhammaka plan intended to attract customers on Diwali time
|
| frequency* | string |
Frequency of recurring transactions for this particular plan. Possible values:
Day
|
| amount* | object |
An object that contains the amount details. Learn more about the amount child object.
|
| max_limit_amount* | object |
An object that contains the maximum limit amount details. Learn more about the max_limit_amoun child object.
|
| trial_period_in_days | integer |
When a trial period is offered for the plan, this defines the duration of the trial period. Example: 1
|
| start_date | string |
The ISO 8601 UTC Timestamp is the date when the subscription plan is active and available for use. Example: 2022-02-01T17:32:28Z
|
| end_date* | string |
The ISO 8601 UTC Timestamp is the date when the subscription plan expires and can no longer be used for new subscriptions. Example: 2022-09-21T17:32:28Z
|
| merchant_metadata | object |
An object of key-value pairs that can be used to store additional information. Constraints:
"key1": "DD"
|
| merchant_plan_reference* | string |
Unique identifier of the merchant plan reference entered while creating a plan. Constraints:
1234567890Supported characters:
|
Amount [Child Object]
The table below lists the various parameters in the amount child object. This object is part of the create plan request object.
| Parameter | Type | Description |
|---|---|---|
| value* | integer |
Transaction amount in Paisa.
1000
|
| currency* | string |
Type of currency. Example: INR
|
Max limit amount [Child Object]
The table below lists the various parameters in the max_limit_amount child object. This object is part of the create plan request object.
| Parameter | Type | Description |
|---|---|---|
| value* | integer |
Transaction amount is Paisa.
100 |
| currency | string |
Type of currency*. Example: INR |
The table below lists the various parameters returned in the Create Plan response objects.
| Parameter | Type | Description |
|---|---|---|
| plan_id | string |
Unique identifier for the subscription plan in the Pine Labs Online database. Example: v1-plan-4405071524-aa-qlAtAf
|
| status | string |
Status of the plan. Possible values:
|
| plan_name | string |
Subscription plan name. Example: Monthly Plan
|
| plan_description | string |
Corresponding description for a plan. Example: Diwali dhammaka plan intended to attract customers on diwali time
|
| frequency | string |
Frequency of recurring transactions for this particular plan. Possible values:
Day
|
| amount | object |
An object that contains the amount details. Learn more about the amount child object.
|
| max_limit_amount | object |
An object that contains the maximum limit amount details. Learn more about the max_limit_amount child object.
|
| trial_period_in_days | integer |
When a trial period is offered for the plan, this defines the duration of the trial period. Example: 1Note: The trial period is always measured in days. |
| start_date | string |
The ISO 8601 UTC Timestamp is the date when the subscription plan is active and available for use. Example: 2022-02-01T17:32:28Z
|
| end_date | string |
The ISO 8601 UTC Timestamp is the date when the subscription plan expires and can no longer be used for new subscriptions. Example: 2022-09-21T17:32:28Z
|
| merchant_metadata | object |
An object of key-value pair that can be used to store additional information.
"key1": "DD"
|
| merchant_plan_reference | string |
Unique identifier of the merchant plan reference entered while creating a plan.
1234567890
|
| created_at | string |
The ISO 8601 UTC Timestamp, when the create plan request was received by Pine Labs Online. Example: 2022-09-21T17:32:28Z
|
| modified_at | string |
The ISO 8601 UTC Timestamp, when the plan object is updated. Example: 2022-09-21T17:32:28Z
|
Amount [Child Object]
The table below lists the various parameters in the amount child object. This object is part of the create plan response object.
| Parameter | Type | Description |
|---|---|---|
| value* | integer |
Transaction amount in Paisa.
1000
|
| currency* | string |
Type of currency. Example: INR
|
Max limit amount [Child Object]
The table below lists the various parameters in the max_limit_amount child object. This object is part of the create plan response object.
| Parameter | Type | Description |
|---|---|---|
| value | integer |
The transaction amount is Paisa.
100 |
| currency | string |
Type of currency. Example: INR
|
Refer to our Create Plan API documentation to learn more.
Note:
- auto_debit_ot is only applicable for One-Time (OT) frequency.
- initial_debit_amount is only valid for non-OT frequency.
3. Create Subscription
To Create Subscription, use our Create subscription API, use the plan_id returned in the response of a Create Plan API to link the subscription with a plan.
For authentication use the generated access token in the headers of the API request.
Below are the sample requests and response for the Create subscription API.
curl --request POST \
--url https://pluraluat.v2.pinepg.in/api/v1/public/subscriptions \
--header 'Authorization: Bearer https://pluraluat.v2.pinepg.in/api/v1/public/plans' \
--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_subscription_reference": "38ed3d71-1b0f-469e-b5e4-67606406f676",
"plan_id": "v1-pla-250612061639-aa-666Zge",
"enable_notification": true,
"start_date": "2025-06-12T06:22:21Z",
"end_date": "2025-06-21T17:32:28Z",
"customer_id": "cust-v1-250519171901-aa-dPF6mg",
"allowed_payment_methods": [
"UPI"
],
"integration_mode": "REDIRECT",
"merchant_metadata": {
"key1": "DD",
"key2": "XOF"
},
"is_tpv_enabled": false,
"callback_url": "www.google.com",
"failure_callback_url":"www.example.com/failure"
}
'
curl --request POST \
--url https://api.pluralpay.in/api/v1/public/subscriptions \
--header 'Authorization: Bearer https://pluraluat.v2.pinepg.in/api/v1/public/plans' \
--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_subscription_reference": "38ed3d71-1b0f-469e-b5e4-67606406f676",
"plan_id": "v1-pla-250612061639-aa-666Zge",
"enable_notification": true,
"start_date": "2025-06-12T06:22:21Z",
"end_date": "2025-06-21T17:32:28Z",
"customer_id": "cust-v1-250519171901-aa-dPF6mg",
"allowed_payment_methods": [
"UPI"
],
"integration_mode": "REDIRECT",
"merchant_metadata": {
"key1": "DD",
"key2": "XOF"
},
"is_tpv_enabled": false,
"callback_url": "www.google.com",
"failure_callback_url":"www.example.com/failure"
}
'
{
"callback_url": "www.google.com",
"failure_callback_url": "www.example.com/failure",
"redirect_url": "https://api.pluralonline.com/api/v3/checkout-bff/redirect/checkout?token=V3_ye7V868X7DP92HQCSnVq7XZNlxvVhOQ3OgXGt96Buwfc53BwN9mUDwJsOcr%2Fw5uq&subscription_id=v1-sub-250612062122-aa-3HLXL5",
"order_id": "v1-250612062122-aa-UZyPbu",
"subscription_id": "v1-sub-250612062122-aa-3HLXL5",
"merchant_subscription_reference": "f5d77ef9-fa11-4f58-a9f4-543e4a7022c5",
"enable_notification": true,
"plan_details": {
"plan_id": "v1-pla-250612061639-aa-666Zge",
"status": "ACTIVE",
"plan_name": "Monthly Plan 2025-06-12T06:16:37.364Z",
"plan_description": "Diwali dhammaka plan intended to attract customers on diwali time",
"frequency": "Month",
"amount": {
"value": 100,
"currency": "INR"
},
"max_limit_amount": {
"value": 210,
"currency": "INR"
},
"trial_period_in_days": 0,
"start_date": "2025-06-12T06:16:39.927105Z",
"end_date": "2026-10-21T12:02:28Z",
"merchant_metadata": {
"key1": "DD"
},
"merchant_plan_reference": "b41770ac-cd3a-48d3-9e93-7dc9246b4751",
"created_at": null,
"modified_at": null,
"initial_debit_amount": {
"value": 110,
"currency": "INR"
},
"auto_debit_ot": false
},
"start_date": "2025-06-12T06:22:21Z",
"end_date": "2025-06-21T17:32:28Z",
"customer_id": "cust-v1-250519171901-aa-dPF6mg",
"payment_mode": null,
"allowed_payment_methods": [
"UPI"
],
"integration_mode": "REDIRECT",
"merchant_metadata": {
"key1": "DD",
"key2": "XOF"
},
"status": "CREATED",
"is_tpv_enabled": false,
"bank_account": {
"account_number": null,
"name": null,
"ifsc": null
},
"created_at": "2025-06-12T06:21:22.242344Z",
"modified_at": "2025-06-12T06:21:22.267111Z",
"order_amount": {
"value": 210,
"currency": "INR"
}
}
Click here for request and response parameter information.
The table below lists the request parameters of our Create Subscription API.
| Parameter | Type | Description |
|---|---|---|
| merchant_subscription_reference* | string |
Unique identifier of the merchant order reference entered while creating a plan. Constraints:
1234567890Supported characters:
|
| enable_notification | boolean |
Indicates if notifications are enabled. Example: true |
| plan_id* | string |
Unique identifier for the subscription plan in the Pine Labs Online database. Example: v1-plan-4405071524-aa-qlAtAf
|
| callback_url | string |
Use this URL to redirect your customers to specific success or failure pages based on the order or product details. Example: https\://sample-callback-url>/td>
|
| quantity | integer |
The quantity of the subscription for the selected plan, should be greater than 0. Example: 1
|
| start_date* | string |
The ISO 8601 UTC Timestamp is the date when the subscription plan is active and available for use. Example: 2022-02-01T17:32:28Z
|
| end_date* | string |
The ISO 8601 UTC Timestamp is the date when the subscription plan expires and can no longer be used for new subscriptions. Example: 2022-09-21T17:32:28Z
|
| customer_id* | string |
Unique identifier of the customer in the Pine Labs Online database.
123456
|
| allowed_payment_methods | string |
The type of payment methods you want to offer customers. Accepted values:
UPI |
| integration_mode* | string |
The integration mode for the subscription. Accepted values:
SEAMLESS
|
| merchant_metadata | object |
An object of key-value pairs that can be used to store additional information. Constraints:
"key1": "DD"
|
| is_tpv_enabled | boolean |
Indicates if Third-Party Validation (TPV) is enabled. Example: true |
| bank_account | object |
An object that contains the bank amount details. Learn more about the bank_accountchild object. |
Bank Account [Child Object]
The table below lists the various parameters in the bank_account child object. This object is part of the Create subscription request object.
| Parameter | Type | Description |
|---|---|---|
| account_number* | string |
Customer's bank account number.
04992990009595
|
| name* | string |
Name of Customer. Example: Kevin Bob |
| ifsc* | string |
IFSC code of the bank account.
HDFC0001234Supported Characters:
|
The table below lists the various parameters returned in the Create Subscription response objects.
| Parameter | Type | Description |
|---|---|---|
| subscription_id | string |
Unique identifier for the subscription plan in the Pine Labs Online database.
v1-sub-4405071524-aa-qlAtAf |
| order_id | string |
Unique identifier of the order in the Pine Labs Online database. Example: v1-4405071524-aa-qlAtAf |
| merchant_subscription_reference | string |
Unique identifier of the merchant subscription reference entered while creating a suscription.
1234567890 |
| enable_notification | boolean |
Indicates if notifications are enabled. Example: true |
| plan_details | Array of Objects |
An array of object that contain plan details. Learn more about the plan details child object. |
| quantity | integer |
The quantity of the subscription for the selected plan, should be greater than 0. Example: 1 |
| start_date | string |
The ISO 8601 UTC Timestamp is the date when the subscription plan is active and available for use. Example: 2022-02-01T17:32:28Z |
| end_date | string |
The ISO 8601 UTC Timestamp is the date when the subscription plan expires and can no longer be used for new subscriptions. Example: 2022-09-21T17:32:28Z |
| customer_id | string |
Unique identifier of the customer in the Pine Labs Online database.
123456 |
| payment_mode | string |
Payment methods allowed for subscription. Accepted values:
UPI |
| allowed_payment_methods | string |
The type of payment methods you want to offer customers. Accepted values:
UPI |
| integration_mode | string |
The integration mode for the subscription. Accepted values:
SEAMLESS |
| callback_url | string |
Use this URL to redirect your customers to specific success or failure pages based on the order or product details. Example: https\://sample-callback-url>/td> |
| merchant_metadata | object |
An object of key-value pairs that can be used to store additional information. Constraints:
"key1": "DD |
| status | string |
Status of the Subscription. Possible values:
|
| bank_account | object |
An object that contains the bank amount details. Learn more about the bank_accountchild object. |
| is_tpv_enabled | boolean |
Indicates if Third-Party Validation (TPV) is enabled. Example: true |
| created_at | string |
The ISO 8601 UTC Timestamp, when the create plan request was received by Pine Labs Online. Example: 2022-09-21T17:32:28Z |
| modified_at | string |
The ISO 8601 UTC Timestamp, when the plan object is updated. Example: 2022-09-21T17:32:28Z |
| redirect_url | string |
URL for redirection after checkout. Example: https://api-staging.pluralonline.com/api/v3/checkout-bff/redirect/checkout?...subscription_id=v1-sub-4405071524-aa-qlAtAf> |
Plan details [Child Object]
The table below lists the various parameters in the plan details child object. This object is part of the Create Subscription response object.
| Parameter | Type | Description |
|---|---|---|
| plan_id | string |
Unique identifier for the subscription plan in the Pine Labs Online database. Example: v1-plan-4405071524-aa-qlAtAf |
| status | string |
Status of the plan. Possible values:
|
| plan_name | string |
Subscription plan name. Example: Monthly Plan |
| plan_description | string |
Corresponding description for a plan. Example: Diwali dhammaka plan intended to attract customers on diwali time |
| frequency | string |
Frequency of recurring transactions for this particular plan. Possible values:
Day |
| amount | object |
An object that contains the amount details. Learn more about the amount child object. |
| max_limit_amount | object |
An object that contains the maximum limit amount details. Learn more about the max_limit_amount child object. |
| trial_period_in_days | integer |
When a trial period is offered for the plan, this defines the duration of the trial period. Example: 1 Note: The trial period is always measured in days. |
| start_date | string |
The ISO 8601 UTC Timestamp is the date when the subscription plan is active and available for use. Example: 2022-02-01T17:32:28Z |
| end_date | string |
The ISO 8601 UTC Timestamp is the date when the subscription plan expires and can no longer be used for new subscriptions. Example: 2022-09-21T17:32:28Z |
| merchant_metadata | object |
An object of key-value pair that can be used to store additional information.
"key1": "DD" |
| merchant_plan_reference | string |
Unique identifier of the merchant plan reference entered while creating a plan.
1234567890 |
| created_at | string |
The ISO 8601 UTC Timestamp, when the create plan request was received by Pine Labs Online. Example: 2022-09-21T17:32:28Z |
| modified_at | string |
The ISO 8601 UTC Timestamp, when the plan object is updated. Example: 2022-09-21T17:32:28Z |
Amount [Child Object]
The table below lists the various parameters in the amount child object. This object is part of the create plan response object.
| Parameter | Type | Description |
|---|---|---|
| value | integer |
Transaction amount in Paisa.
1000 |
| currency | string |
Type of currency. Example: INR |
Max limit amount [Child Object]
The table below lists the various parameters in the max_limit_amount child object. This object is part of the create plan response object.
| Parameter | Type | Description |
|---|---|---|
| value | integer |
The transaction amount is Paisa.
100 |
| currency | string |
Type of currency. Example: INR |
Bank Account [Child Object]
The table below lists the various parameters in the bank_account child object. This object is part of the Create subscription request object.
| Parameter | Type | Description |
|---|---|---|
| account_number | string |
Customer's bank account number.
04992990009595 |
| name | string |
Name of Customer. Example: Kevin Bob |
| ifsc | string |
IFSC code of the bank account.
HDFC0001234Supported Characters:
|
Refer to our Create subscription 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 Subscription API to link the payment against an order.
The initial debit amount is the first charge applied to your customers to verify the UPI transaction details. Once the transaction is successful, the subscription will be marked as 'ACTIVE.' You can determine the initial debit amount based on your business needs.
Note:
- The
payment_amount.valuemust match themax_limit_amount.valuespecified in the Create Plan API.- Currently, subscriptions are supported only through
UPIpayments. You can use either the UPI Intent or UPI Collect flow for processing these payments.
Below are the sample requests and sample response for a Create Payment API via Intent Flow.
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": [
{
"payment_method": "UPI",
"merchant_payment_reference": "108cf506-c6a1-4535-9e7f-3af9c6d3d90c",
"payment_amount": {
"value": 100,
"currency": "INR"
},
"payment_option": {
"upi_details": {
"txn_mode": "INTENT"
}
},
"mandate_info": {
"request_type": "CREATE_MANDATE"
}
}
]
}
'
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": [
{
"payment_method": "UPI",
"merchant_payment_reference": "108cf506-c6a1-4535-9e7f-3af9c6d3d90c",
"payment_amount": {
"value": 100,
"currency": "INR"
},
"payment_option": {
"upi_details": {
"txn_mode": "INTENT"
}
},
"mandate_info": {
"request_type": "CREATE_MANDATE"
}
}
]
}
'
{
"data": {
"order_id": "v1-250408102515-aa-x2F8Qw",
"merchant_order_reference": "8b5e2b5b-9fde-4010-af9c-281f9e2fa5af",
"type": "CHARGE",
"status": "PENDING",
"challenge_url": "upi://mandate?pa=PinelabsUat1@icici&pn=PinelabsUat&tr=EZM2025032516184000196272&am=1000.00&cu=INR&orgid=400011&mc=5732&purpose=01&tn=remark&validitystart=25032025&validityend=21062025&amrule=EXACT&Recur=ONETIME&Rev=Y&Share=Y&Block=Y&txnType=CREATE&mode=13&sign=MEYCIQCHkSEsp0e+y2chLL5s+bvkY06b4NbA9gcl9fMykq4WaAIhAJEMQ9h5SOi6/Z+q/9gHGX4cH7RnwacTU5OpZ3nU3C3i",
"callback_url": "www.google.com",
"failure_callback_url": "www.example.com/failure",
"merchant_id": "106639",
"order_amount": {
"value": 100000,
"currency": "INR"
},
"pre_auth": false,
"allowed_payment_methods": [
"UPI"
],
"purchase_details": {
"customer": {
"email_id": "[email protected]",
"first_name": "kevin",
"last_name": "bob",
"mobile_number": "9667195458",
"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"
},
"is_edit_customer_details_allowed": false
},
"merchant_metadata": {
"key1": "DD",
"key2": "XOF"
}
},
"payments": [
{
"id": "v1-250408102515-aa-x2F8Qw-up-c",
"merchant_payment_reference": "6b4d003f-0918-45d3-aef0-e21af0f36771",
"status": "PENDING",
"payment_amount": {
"value": 100000,
"currency": "INR"
},
"payment_method": "UPI",
"payment_option": {
"upi_data": {
"txn_mode": "INTENT"
}
},
"acquirer_data": {
"approval_code": "",
"acquirer_reference": "",
"rrn": "",
"is_aggregator": true
},
"created_at": "2025-04-08T11:54:56.092Z",
"updated_at": "2025-04-08T11:55:00.001Z",
"mandate_info": {
"request_type": "CREATE_MANDATE"
}
}
],
"created_at": "2025-04-08T10:25:15.093Z",
"updated_at": "2025-04-08T11:55:00.001Z",
"integration_mode": "REDIRECT",
"payment_retries_remaining": 7
}
}
Click here for request and response parameter information.
Path Parameters
| 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
| Parameter | Type | Description |
|---|---|---|
| Payments | array of objects |
An array of objects that contains the payment details. Learn more about our payments array of objects. |
Payments [Child Object]
The table below lists the various parameters in the payment child object.
| Parameter | Type | Description |
|---|---|---|
| payment_method required | string |
Type of payment method. Accepted value: UPIExample: UPI |
| merchant_payment_reference required | string |
Unique Payment Reference ID sent by the merchant. Example: 008cf04b-a770-4777-854e-b1e6c1230609 |
| payment_amount required | object |
An object that contains the details of the payment amount details. Learn more about payment_amount child object. |
| payment_option required | object |
An object that contains the details of the payment options details. Learn more about the payment_option 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 transaction amount is in Paisa. Minimum value: 100 (₹1).Maximum value: 100000000 (₹10 lakh).Example: 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 |
|---|---|---|
| upi_details required | object |
An object that contains the UPI details. Learn more about the upi_details child object. |
UPI Details [Child Object]
The table below lists the various parameters in the upi_details child object. This object is part of the payments_option object.
| Parameter | Type | Description |
|---|---|---|
| txn_mode required | string |
The transaction mode in which you want to accept payment. Accepted value: INTENT |
The table below lists the various parameters returned in the Create Payment API response objects.
| Parameter | Type | Description |
|---|---|---|
| order_id | string |
Unique identifier of the order in the Pine Labs Online database. Example: 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 to the checkout page. |
| merchant_id | string |
Unique identifier of the merchant in 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. |
| pre_auth | boolean |
The pre-authorization type. Possible values:
falseLearn more about our pre-authorization. |
| allowed_payment_methods | array of strings |
The type of payment methods you want to offer your customers to accept payments. Accepted values:
UPINote: Before selecting a payment method, ensure it is configured for you. |
| notes | string |
The note you want to show against an order. Example: Order1 |
| callback_url | string |
Use this URL to redirect your customers to specific success or failure pages based on the order or product details. Example: https://sample-callback-url |
| purchase_details | object |
An object that contains the purchase details. Learn more about our purchase_details child object.Note: The presence of the key-values pairs in this object depends on the Input request. |
| payments | array of objects |
An array of objects that contains the payment details. Learn more about our payments child object.Note: Payments response object can vary based on the payment methods and payment status. |
| created_at | string |
The ISO 8601 UTC Timestamp, when the create order request was received by Pine Labs Online. Example: 2024-07-09T07:57:08.022Z |
| updated_at | string |
The ISO 8601 UTC Timestamp, when the order response object is 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 payments sample response object.
| Parameter | Type | Description |
|---|---|---|
| value | integer |
The transaction amount is Paisa.
100 |
| 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 payments sample response object.
| Parameter | Type | Description |
|---|---|---|
| customer | Object |
An object that contains the customer details. Learn more about our 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 |
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:
UPI |
| 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 |
|---|---|---|
| upi_details | object |
An object that contains the UPI details. Learn more about our upi_details child object. |
UPI Details [Child Object]
The table below lists the various parameters in the upi_details child object. This object is part of the payment_option object.
| Parameter | Type | Description |
|---|---|---|
| txn_mode | string |
Type of UPI transaction. Accepted values:
INTENT |
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:
|
Refer to our Create Payment API documentation to learn more.
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:
- This
challenge_urlis applicable only for UPI Intent flow.- For UPI Collect flow, the customer will receive a notification in their UPI app to authorize the payment.
Note:
- On successful payment we send the webhook event
ORDER_AUTHORIZEDand 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
AUTHORIZEDyou can either capture or cancel an order.
Pre-Debit Notification Flow
Learn how you can process the Pre-Debit notifications and debit execution request for As Presented and One Time Payments using Pine Labs Online APIs.
Note:
- For recurring mandates (e.g., Weekly, Monthly, etc.), Pine Labs handles both Pre-Debit Notification and debit execution automatically.
- The process for creating a Mandate Registration remains unchanged. Once a subscription becomes ACTIVE, you can use the Presentation APIs to initiate or present payments as required.
Pine Labs Online now supports the execution of mandates for existing subscriptions through the Presentation feature, enabling you to collect payments against active mandates. This functionality is available only in the following modes:
- As Presented (AS)
- One-Time (OT)
Important
- This feature can only be utilized when the subscription status is in
ACTIVEorHALTED.
There are two modes to initiate customer debits, depending on who controls the Pre-Debit Notification (PDN) process:
A. Customer Debit with PDN Controlled by Pine Labs:
In this flow, Pine Labs manages the pre-debit notification and execution process.
Steps:
- Use the Create Presentation API to debit the customer.
- This API enables merchants to present a mandate debit request for both:
- As & When Presented (AS) frequency transactions.
- One-Time (OT) frequency transactions.
- Pine Labs automatically sends the Pre-Debit Notification (PDN) to the customer at least 24 hours in advance on the merchant’s behalf.
Create Presentation API
Use this API to allow you to submit mandate debit requests for both AS and OT frequency transactions. This API is an essential part of Pine Labs Online mandate management system, enabling you to initiate debit requests based on existing customer mandates.
Below are the sample requests and sample response for a Create Presentation API.
curl --request POST \
--url https://pluraluat.v2.pinepg.in/ps/api/v1/public/subscriptions/{subscription_id}/presentations \
--header 'Authorization: Bearer token' \
--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 '
{
"subscription_id": "v1-sub-4405071524-aa-qlAtAf",
"due_date": "2022-09-21T17:32:28Z",
"amount": {
"value": 100,
"currency": "INR"
},
"merchant_presentation_reference": "1234567890"
}
'
curl --location 'https://api.pluralpay.in/ps/api/v1/public/subscriptions/{subscription_id}/presentations
' \
--header 'Authorization: Bearer token' \
--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 '
{
"subscription_id": "v1-sub-4405071524-aa-qlAtAf",
"due_date": "2022-09-21T17:32:28Z",
"amount": {
"value": 100,
"currency": "INR"
},
"merchant_presentation_reference": "1234567890"
}
'
{
"subscription_id": "v1-sub-250612062122-aa-3HLXL5",
"presentation_id": "v1-bil-250612063111-aa-FJIBcB",
"due_date": "2025-06-05T06:14:21.72036Z",
"amount": {
"value": 100,
"currency": "INR"
},
"status": "CREATED",
"merchant_presentation_reference": "9caa061f-0e50-494b-aa13-8e902b0bef03"
}
Click here for request and response parameter information.
The table below lists the request parameters of our Create Presentation API.
| Parameter | Type | Description |
|---|---|---|
| subscription_id | string |
Unique identifier for the subscription plan in the Pine Labs Online database.
v1-sub-4405071524-aa-qlAtAf
|
| due_date | string |
The ISO 8601 UTC Timestamp is the date & time at which the payment is due. Example: 2022-09-21T17:32:28Z
|
| amount | object |
An object that contains the amount details. Learn more about the amount child object.
|
| merchant_presentation_reference | string |
Unique identifier of the merchant presentation reference entered while creating a presentation. Constraints:
1234567890Supported characters:
|
Amount [Child Object]
The table below lists the various parameters in the amount child object. This object is part of the Create Presentation request object.
| Parameter | Type | Description |
|---|---|---|
| value* | integer |
Transaction amount in Paisa.
1000
|
| currency* | string |
Type of currency. Example: INR
|
The table below lists the various parameters returned in the Create Presentation response objects.
| Parameter | Type | Description |
|---|---|---|
| subscription_id | string |
Unique identifier for the subscription plan in the Pine Labs Online database.
v1-sub-4405071524-aa-qlAtAf
|
| presentation_id | string |
A Unique identifier for the presentation provided by the Pine Labs Online.
v1-pre-4405071524-aa-qlAtAf |
| due_date | string |
The ISO 8601 UTC Timestamp is the date & time at which the payment is due. Example: 2022-09-21T17:32:28Z
|
| amount | object |
An object that contains the amount details. Learn more about the amount child object.
|
| status | string |
Presentation Status.
|
| merchant_presentation_reference | string |
Unique identifier of the merchant presentation reference entered while creating a presentation.
1234567890
|
Amount [Child Object]
The table below lists the various parameters in the amount child object. This object is part of the Create Presentation response object.
| Parameter | Type | Description |
|---|---|---|
| value | integer |
Transaction amount in Paisa.
1000
|
| currency | string |
Type of currency. Example: INR
|
Refer to our Create Presentation API documentation to learn more.
Use the Get Presentation and Get Presentation by Subscription ID APIs to retrieve the debit status.
B. Customer Debit with PDN Controlled by Merchant:
In this flow, merchants manage the pre-debit notification and debit initiation process.
Steps:
- Send Notification using the Subscription Notification API.
- Merchants must send the PDN to the customer before initiating a debit.
- Execute Debit Request using the Create Debit API.
- This API is used to initiate the actual debit after sending the PDN.
Note:
- For recurring mandates (e.g., Weekly, Monthly, etc.), Pine Labs handles both Pre-Debit Notification and execution automatically.
- Merchants only need to manage PDN for As Presented and One-Time frequencies.
Subscription Notification API
Use this API to send a pre-debit notification for a given subscription ID.
Below are the sample requests and sample response for a Subscription Notification API.
curl --request POST \
--url https://pluraluat.v2.pinepg.in/ps/api/v1/public/subscriptions/notify \
--header 'Authorization: Bearer token' \
--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 '
{
"subscription_id": "v1-sub-4405071524-aa-qlAtAf",
"due_date": "2022-09-21T17:32:28Z",
"amount": {
"value": 50000,
"currency": "INR"
},
"merchant_presentation_reference": "1234567890"
}
'
curl --location 'https://api.pluralpay.in/ps/api/v1/public/subscriptions/notify' \
--header 'Authorization: Bearer token' \
--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 '
{
"subscription_id": "v1-sub-4405071524-aa-qlAtAf",
"due_date": "2022-09-21T17:32:28Z",
"amount": {
"value": 50000,
"currency": "INR"
},
"merchant_presentation_reference": "1234567890"
}
'
{
"subscription_id": "v1-sub-4405071524-aa-qlAtAf",
"due_date": "2022-09-21T17:32:28Z",
"presentation_id": "v1-pre-4405071524-aa-qlAtAf",
"amount": {
"value": 50000,
"currency": "INR"
},
"merchant_presentation_reference": "1234567890",
"status": "NOTIFIED"
}
Click here for request and response parameter information.
The table below lists the request parameters of our Subscription Notification API.
| Parameter | Type | Description |
|---|---|---|
| subscription_id | string |
Unique identifier for the subscription plan in the Pine Labs Online database.
v1-sub-4405071524-aa-qlAtAf
|
| due_date | string |
The ISO 8601 UTC Timestamp is the date & time at which the payment is due. Example: 2022-09-21T17:32:28Z
|
| amount | object |
An object that contains the amount details. Learn more about the amount child object.
|
| merchant_presentation_reference | string |
Unique identifier of the merchant presentation reference entered while creating a subscription notification. Constraints:
1234567890Supported characters:
|
Amount [Child Object]
The table below lists the various parameters in the amount child object. This object is part of the Subscription Notification request object.
| Parameter | Type | Description |
|---|---|---|
| value* | integer |
Transaction amount in Paisa.
1000
|
| currency* | string |
Type of currency. Example: INR
|
The table below lists the various parameters returned in the Subscription Notification response objects.
| Parameter | Type | Description |
|---|---|---|
| subscription_id | string |
Unique identifier for the subscription plan in the Pine Labs Online database.
v1-sub-4405071524-aa-qlAtAf
|
| presentation_id | string |
A Unique identifier for the presentation provided by the Pine Labs Online.
v1-pre-4405071524-aa-qlAtAf |
| due_date | string |
The ISO 8601 UTC Timestamp is the date & time at which the payment is due. Example: 2022-09-21T17:32:28Z
|
| amount | object |
An object that contains the amount details. Learn more about the amount child object.
|
| status | string |
Subscription notification status. Possible values:
|
| merchant_presentation_reference | string |
Unique identifier of the merchant presentation reference entered while creating a subscription notification.
1234567890
|
Amount [Child Object]
The table below lists the various parameters in the amount child object. This object is part of the Subscription Notification response object.
| Parameter | Type | Description |
|---|---|---|
| value | integer |
Transaction amount in Paisa.
1000
|
| currency | string |
Type of currency. Example: INR
|
Refer to our Subscription Notification API documentation to learn more.
Create Debit API
Use this API to execute a debit against a subscription ID.
Below are the sample requests and sample response for a Create Debit API.
curl --request POST \
--url https://pluraluat.v2.pinepg.in/ps/api/v1/public/subscriptions/execute \
--header 'Authorization: Bearer token' \
--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 '
{
"subscription_id": "v1-sub-4405071524-aa-qlAtAf",
"due_date": "2022-09-21T17:32:28Z",
"amount": {
"value": 100,
"currency": "INR"
},
"merchant_presentation_reference": "1234567890"
}
'
curl --location 'https://api.pluralpay.in/ps/api/v1/public/subscriptions/execute' \
--header 'Authorization: Bearer token' \
--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 '
{
"subscription_id": "v1-sub-4405071524-aa-qlAtAf",
"due_date": "2022-09-21T17:32:28Z",
"amount": {
"value": 100,
"currency": "INR"
},
"merchant_presentation_reference": "1234567890"
}
'
{
"subscription_id": "v1-sub-4405071524-aa-qlAtAf",
"presentation_id": "v1-pre-4405071524-aa-qlAtAf",
"due_date": "2024-03-15T10:30:00Z",
"amount": {
"value": 50000,
"currency": "INR"
},
"merchant_presentation_reference": "1234567890",
"status": "CREATED"
}
Click here for request and response parameter information.
The table below lists the request parameters of our Create Debit API.
| Parameter | Type | Description |
|---|---|---|
| subscription_id | string |
Unique identifier for the subscription plan in the Pine Labs Online database.
v1-sub-4405071524-aa-qlAtAf
|
| due_date | string |
The ISO 8601 UTC Timestamp is the date & time at which the payment is due. Example: 2022-09-21T17:32:28Z
|
| amount | object |
An object that contains the amount details. Learn more about the amount child object.
|
| merchant_presentation_reference | string |
Unique identifier of the merchant presentation reference entered while creating a Debit. Constraints:
1234567890Supported characters:
|
Amount [Child Object]
The table below lists the various parameters in the amount child object. This object is part of the Create Debit request object.
| Parameter | Type | Description |
|---|---|---|
| value* | integer |
Transaction amount in Paisa.
1000
|
| currency* | string |
Type of currency. Example: INR
|
The table below lists the various parameters returned in the Create Debit response objects.
| Parameter | Type | Description |
|---|---|---|
| subscription_id | string |
Unique identifier for the subscription plan in the Pine Labs Online database.
v1-sub-4405071524-aa-qlAtAf
|
| presentation_id | string |
A Unique identifier for the presentation provided by the Pine Labs Online.
v1-pre-4405071524-aa-qlAtAf |
| due_date | string |
The ISO 8601 UTC Timestamp is the date & time at which the payment is due. Example: 2022-09-21T17:32:28Z
|
| amount | object |
An object that contains the amount details. Learn more about the amount child object.
|
| status | string |
Debit status. Possible values:
|
| merchant_presentation_reference | string |
Unique identifier of the merchant presentation reference entered while creating a Debit.
1234567890
|
Amount [Child Object]
The table below lists the various parameters in the amount child object. This object is part of the Create Debit response object.
| Parameter | Type | Description |
|---|---|---|
| value | integer |
Transaction amount in Paisa.
1000
|
| currency | string |
Type of currency. Example: INR
|
Refer to our Create Debit API documentation to learn more.
Use the Get Presentation and Get Presentation by Subscription ID APIs to retrieve the debit status.
Manage subscription
- Manage Plan: Listed below are the various options available to manage a plan.
Update Plan: Use our Update Plan API to update plan details.Delete Plan: Use our Delete Plan API to delete a plan.
- Manage Subscription: Listed below are the various options available to manage subscription.
Pause Subscription: Use our Pause Subscription API to pause a subscription.Resume Subscription: Use our Resume Subscription API to resume a subscription.Cancel Subscription: Use our Cancel Subscription API to cancel a subscription.Update Subscription: Use our Update Subscription API to update the subscription.
- Manage Presentation: Listed below are the various options available to manage Presentation.
Delete Presentation: Use our Delete Presentation API to Delete a presentation.Merchant Retry: Use our Merchant Retry API. This API allows you to retry mandate execution for subscriptions that are in theDEBIT FAILEDstage. You can retry up to three times before the mandate moves to theHALTEDstage. After that, you can present the transaction again with a new debit date.Subscription Notification: Use our Subscription Notification API to send a pre-debit notification for a given subscription ID.
To Know Your Payment Status
To check your payment status, you can rely on Webhook events.
- Webhook Notification: We send Webhook notifications on the successful payment or any changes to the payments object. Refer to our Webhooks documentation to learn more.
- Use Fetch APIs: You can use the below list of APIs to fetch the status of Plan, Subscription, and Presentation.
- Plans
Get All Plans: Use our Get All Plans API to fetch all the plan details.Get Specific Plan: Use our Get Specific Plan API to get the specific plan among the plans available.
- Subscriptions
Get All Subscriptions: Use our Get All Subscriptions API to get the list of available subscriptions.Get Specific Subscription: Use our Get Specific Subscription API to get the list of available subscriptions.
- Presentations
Get Presentation: Use our Get Presentation API to get a presentation request.Get Presentation by Subscription ID: Use our Get Presentation by Subscription ID API to get a presentation request by subscription Id.
- Plans
Updated 23 days ago
