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 ₹2 if 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.

  1. [Prerequisite] Generate Token
  2. Create Plan
  3. Create Subscription
  4. Create Payment
  5. Handle Payment
    1. Store Payment Details on Your Server
    2. Verify Payment Signature

📘

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.
Request Parameters
Response Parameters

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 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.
Request Parameters
Response Parameters

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
  • Week
  • Month
  • Year
  • AS
  • OT
  • Not Applicable
Example: 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:
  • Each pair cannot exceed 256 characters.
  • Maximum 10 key-value pairs.
Example: "key1": "DD"
merchant_plan_reference* string Unique identifier of the merchant plan reference entered while creating a plan.

Constraints:
  • Minimum: 1 character.
  • Maximum: 50 characters.
Example: 1234567890

Supported characters:
  • A-Z
  • a-z
  • 0-9
  • -
  • _

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.

  • Minimum value: 100 (₹1).
  • Maximum value: 100000000 (₹10 lakh).
Example: 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.
  • Minimum value: 100 (₹1).
  • Maximum value: 100000000 (₹10 lakh).
Example: 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:
  • ACTIVE: When the create plan request is successfully created.
  • INACTIVE: When the plan is disabled and cannot be used for new subscriptions.
  • CREATED: When the plan setup is completed but not yet activated.
  • EXPIRED: When the plan has surpassed its validity period and is no longer available.
  • PAUSED: When the plan is temporarily halted and can be resumed later.
  • ARCHIVED: When the plan is permanently deactivated and stored for record-keeping.
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
  • Week
  • Month
  • Year
  • AS
  • OT
  • Not Applicable
Example: 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.

  • Each pair cannot exceed 256 characters.
  • Maximum 10 key-value pairs.
Example: "key1": "DD"
merchant_plan_reference string Unique identifier of the merchant plan reference entered while creating a plan.

  • Minimum length: 1 character.
  • Maximum length: 50 characters.
Example: 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.

  • Minimum value: 100 (₹1).
  • Maximum value: 100000000 (₹10 lakh).
Example: 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.
  • Minimum value: 100 (₹1).
  • Maximum value: 100000000 (₹10 lakh).
Example: 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.
Request Parameters
Response Parameters

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:
  • Minimum: 1 character.
  • Maximum: 50 characters.
Example: 1234567890

Supported characters:
  • A-Z
  • a-z
  • 0-9
  • -
  • _
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.
  • Minimum length: 1 character.
  • Maximum length: 19 characters.
Example: 123456
allowed_payment_methods string The type of payment methods you want to offer customers.

                 Accepted values:
  • CARD
  • UPI
  • POINTS
  • NETBANKING
  • WALLET
Example: UPI
integration_mode* string The integration mode for the subscription.

Accepted values:
  • SEAMLESS
Example: SEAMLESS
merchant_metadata object An object of key-value pairs that can be used to store additional information.

Constraints:
  • Each pair cannot exceed 256 characters.
  • Maximum 10 key-value pairs.
Example: "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.
  • Minimum length: 1 characters
  • Maximum length: 50 characters.
Example: 04992990009595
name* string Name of Customer.

Example: Kevin Bob
ifsc* string IFSC code of the bank account.
  • Minimum: 11 characters
  • Maximum: 11 characters
Example: HDFC0001234

Supported Characters:
  • A-Z (Uppercase letters)
  • 0-9 (Digits)

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.
  • Maximum length: 50 characters.
Example: 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.
  • Minimum length: 1 character.
  • Maximum length: 50 characters.
Example: 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.
  • Minimum length: 1 character.
  • Maximum length: 19 characters.
Example: 123456
payment_mode string Payment methods allowed for subscription.
Accepted values:
  • CARD
  • UP
Example: UPI
allowed_payment_methods string The type of payment methods you want to offer customers.

                 Accepted values:
  • CARD
  • UPI
  • POINTS
  • NETBANKING
  • WALLET
Example: UPI
integration_mode string The integration mode for the subscription.

Accepted values:
  • SEAMLESS
Example: 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:
  • Each pair cannot exceed 256 characters.
  • Maximum 10 key-value pairs.
Example: "key1": "DD
status string Status of the Subscription.

Possible values:
  • ACTIVE: When the subscription is currently active and payments are being processed as per the billing cycle.
  • INACTIVE: When the subscription has been created but is not yet activated.
  • CREATED: When the subscription has been successfully created but is not yet active.
  • REGISTERED: When the subscription has been registered successfully.
  • CANCELLED_BY_CUSTOMER_DURING_PRE_DEBIT_NOTIFICATION: When the customer canceled the subscription during the pre-debit notification stage.
  • ARCHIVED: When the subscription has been archived and is no longer active.
  • CANCELLED_BY_CUSTOMER_DURING_MANDATE_CREATION: When the customer canceled the subscription while setting up the payment mandate.
  • CANCELLED_BY_MERCHANT: When the subscription was canceled by the merchant.
  • DEBIT_FAILED: When the scheduled payment for the subscription failed.
  • PAUSED: When the subscription has been temporarily paused.
  • CANCELLED: When the subscription has been canceled and is no longer active.
  • TRIAL: When the subscription is in its trial period before regular billing starts.
  • REVOKE_INITIATED: When a request to revoke the subscription has been initiated.
  • COMPLETED: When the subscription has successfully completed its billing cycle.
  • CANCELLED_BY_CUSTOME`: When the customer has canceled the subscription.
  • PAUSED_BY_CUSTOMER: When the customer has temporarily paused the subscription.
  • RESUMED_BY_CUSTOMER: When the customer has resumed a previously paused subscription.
  • EXPIRED: When the subscription has reached its end date and expired.
  • HALTED: When the subscription has been stopped due to an issue or external intervention.
  • RESUMED: When the subscription has been resumed after being paused or halted.
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:
  • ACTIVE: When the create plan request is successfully created.
  • INACTIVE: When the plan is disabled and cannot be used for new subscriptions.
  • CREATED: When the plan setup is completed but not yet activated.
  • EXPIRED: When the plan has surpassed its validity period and is no longer available.
  • PAUSED: When the plan is temporarily halted and can be resumed later.
  • ARCHIVED: When the plan is permanently deactivated and stored for record-keeping.
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
  • Week
  • Month
  • Year
  • AS
  • OT
  • Not Applicable
Example: 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.

  • Each pair cannot exceed 256 characters.
  • Maximum 10 key-value pairs.
Example: "key1": "DD"
merchant_plan_reference string Unique identifier of the merchant plan reference entered while creating a plan.

  • Minimum length: 1 character.
  • Maximum length: 50 characters.
Example: 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.

  • Minimum value: 100 (₹1).
  • Maximum value: 100000000 (₹10 lakh).
Example: 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.
  • Minimum value: 100 (₹1).
  • Maximum value: 100000000 (₹10 lakh).
Example: 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.
  • Minimum length: 1 characters
  • Maximum length: 50 characters.
Example: 04992990009595
name string Name of Customer.

Example: Kevin Bob
ifsc string IFSC code of the bank account.
  • Minimum: 11 characters
  • Maximum: 11 characters
Example: HDFC0001234

Supported Characters:
  • A-Z (Uppercase letters)
  • 0-9 (Digits)

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.value must match the max_limit_amount.value specified in the Create Plan API.
  • Currently, subscriptions are supported only through UPI payments. 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.
Request Parameters
Response Parameters

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: UPI

Example: 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.
  • Minimum length: 1 character.
  • Maximum length: 50 characters.
Example: 82d57572-057c-4826-5775-385a52150554
type string Payment type.

Possible values:
  • CHARGE
  • REFUND
status string Order status.

Possible values:
  • CREATED: When the order is successfully created.
  • PENDING: When the order is linked against a payment request.
  • PROCESSED: When the payment is received successfully.
  • AUTHORIZED: Only when pre_auth is true. When the payment is ready for authorization.
  • CANCELLED: When the payment gets cancelled.
  • ATTEMPTED: When the payment is unsuccessful due to incorrect OTP. You can retry OTP verification until the payment gets failed.
  • FAILED: Payment acceptance failed for reasons such as cancel transactions, maximum retries for OTP verification etc.
  • FULLY_REFUNDED: When the payment is completely refunded.
  • PARTIALLY_REFUNDED: When the partial refund is successful.
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:
  • true: When pre-authorization is needed.
  • false: When pre-authorization is not required.
Example: false

Learn 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:
  • CARD
  • UPI
  • POINTS
  • NETBANKING
  • WALLET
  • CREDIT_EMI
  • DEBIT_EMI
Example: UPI

Note: 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.
  • Minimum value: 100 (₹1)
  • Maximum value: 100000000 (₹10 lakh)
Example: 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.
  • Minimum length: 1 character.
  • Maximum length: 50 characters.
Example: [email protected]
first_name string Customer's first name.
  • Minimum length: 1 character.
  • Maximum length: 50 characters.
Example: Kevin
last_name string Customer's last name.
  • Minimum length: 1 character.
  • Maximum length: 50 characters.
Example: Bob
customer_id string Unique identifier of the customer in the Pine Labs Online database.
  • Minimum length: 1 character.
  • Maximum length: 19 characters.
Example: 123456
mobile_number string Customer's mobile number.
  • Minimum length: 9 characters.
  • Maximum length: 20 characters.
Example: 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
address1stringCustomer's billing address1.
  • Max length: 100 characters.
Example: 10 Downing Street Westminster London
address2stringCustomer's billing address2.
  • Max length: 100 characters.
Example: Oxford Street Westminster London
address3stringCustomer's billing address3.
  • Max length: 100 characters.
Example: Baker Street Westminster London
pincodestringPincode of the billing address.
  • Min length: 6 characters.
  • Max length: 10 characters.
Example: 51524036
citystringCity of the billing address.
  • Max length: 50 characters.
Example: Westminster
statestringState of the billing address.
  • Max length: 50 characters.
Example: Westminster
countrystringCountry of the billing address.
  • Max length: 50 characters.
Example: 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
address1stringCustomer's shipping address1.
  • Max length: 100 characters.
Example: 10 Downing Street Westminster London
address2stringCustomer's shipping address2.
  • Max length: 100 characters.
Example: Oxford Street Westminster London
address3stringCustomer's shipping address3.
  • Max length: 100 characters.
Example: Baker Street Westminster London
pincodestringPincode of the shipping address.
  • Min length: 6 characters
  • Max length: 10 characters.
Example: 51524036
citystringCity of the shipping address.
  • Max length: 50 characters.
Example: Westminster
statestringState of the shipping address.
  • Max length: 50 characters.
Example: Westminster
countrystringCountry of the shipping address.
  • Max length: 50 characters.
Example: 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.
  • Maximum length: 50 characters.
Example: 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.
  • AUTHORIZED: Only when pre_auth is true. When the payment is ready for authorization.
  • CANCELLED: When the payment gets cancelled.
  • PROCESSED: When the payment is successfully received by Pine Labs Online.
  • FAILED: When the payment fails, this can be for many reasons such as canceling payments, etc.
Example: 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:
  • CARD
  • UPI
  • POINTS
Example: 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.
  • Minimum value: 100 (₹1).
  • Maximum value: 100000000 (₹10 lakh).
Example: 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:
  • COLLECT
  • INTENT
Example: 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:
  • true - Pine Labs Online is responsible for settling funds related to this payment.
  • false - Pine Labs Online is not responsible for settling funds related to this payment.
Note:
  • When is_aggregator is set to true, Pine Labs Online acts as the acquirer on behalf of merchants, receiving funds from banks into a designated "Nodal Account".
  • When is_aggregator is set to false, the Merchant has a direct relationship with the bank, and the responsibility for settlement of funds lies with both of those parties.

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_url is 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_AUTHORIZED and the status of the payment is updated to authorized.
  • 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.

  1. Create a signature on your server using the following parameters using the SHA256 algorithm.
    1. order_id: Unique Identifier generated for an order request on Pine Labs Online database.
    2. payment_status: Payment status.
    3. error_code: Short code for the error returned.
    4. error_message: Corresponding error message for the code.
    5. 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"]
  1. 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.
  2. Capture the status returned on your database. Once the payment status is AUTHORIZED you 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 ACTIVE or HALTED.

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:

  1. Use the Create Presentation API to debit the customer.
  2. This API enables merchants to present a mandate debit request for both:
    1. As & When Presented (AS) frequency transactions.
    2. One-Time (OT) frequency transactions.
  3. 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.
Request Parameters
Response Parameters

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.
  • Maximum length: 50 characters.
Example: 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:
  • Minimum: 1 character.
  • Maximum: 50 characters.
Example: 1234567890

Supported characters:
  • A-Z
  • a-z
  • 0-9
  • -
  • _

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.

  • Minimum value: 100 (₹1).
  • Maximum value: 100000000 (₹10 lakh).
Example: 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.
  • Maximum length: 50 characters.
Example: v1-sub-4405071524-aa-qlAtAf
presentation_id string A Unique identifier for the presentation provided by the Pine Labs Online.
  • Maximum length: 50 characters.
Example: 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.
  • CREATED: The presentation request has been created successfully.
  • PENDING: The request has been sent to the bank and is awaiting a response.
  • COMPLETED: The presentation was successfully processed.
  • FAILED: The request failed due to an issue at the bank's end.
  • CANCELLED: The presentation request has been cancelled.
  • PAUSED: The subscription is currently paused.
  • PARTIALLY_REFUNDED: A partial refund has been issued for the presentation.
  • REFUNDED: A full refund has been issued for the presentation.
merchant_presentation_reference string Unique identifier of the merchant presentation reference entered while creating a presentation.

  • Minimum length: 1 character.
  • Maximum length: 50 characters.
Example: 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.

  • Minimum value: 100 (₹1).
  • Maximum value: 100000000 (₹10 lakh).
Example: 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:

  1. Send Notification using the Subscription Notification API.
    1. Merchants must send the PDN to the customer before initiating a debit.
  2. Execute Debit Request using the Create Debit API.
    1. 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.
Request Parameters
Response Parameters

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.
  • Maximum length: 50 characters.
Example: 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:
  • Minimum: 1 character.
  • Maximum: 50 characters.
Example: 1234567890

Supported characters:
  • A-Z
  • a-z
  • 0-9
  • -
  • _

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.

  • Minimum value: 100 (₹1).
  • Maximum value: 100000000 (₹10 lakh).
Example: 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.
  • Maximum length: 50 characters.
Example: v1-sub-4405071524-aa-qlAtAf
presentation_id string A Unique identifier for the presentation provided by the Pine Labs Online.
  • Maximum length: 50 characters.
Example: 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:
  • CREATED: When Pine Labs Online successfully receives the request for pre-debit notification.
  • INITIATED: When we have successfully sent the pre-debit notification request to the Bank.
  • NOTIFIED: When the notification is delivered successfully.
  • FAILED: Notification delivery attempt was unsuccessful.
  • CANCELLED: When we cancel the pre-debit notification request to the Bank.
  • PAUSED: Notification is temporarily halted (e.g., due to subscription status).
  • PDN_FAILED: Pre-debit notification failed after all retry attempts.
merchant_presentation_reference string Unique identifier of the merchant presentation reference entered while creating a subscription notification.

  • Minimum length: 1 character.
  • Maximum length: 50 characters.
Example: 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.

  • Minimum value: 100 (₹1).
  • Maximum value: 100000000 (₹10 lakh).
Example: 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.
Request Parameters
Response Parameters

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.
  • Maximum length: 50 characters.
Example: 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:
  • Minimum: 1 character.
  • Maximum: 50 characters.
Example: 1234567890

Supported characters:
  • A-Z
  • a-z
  • 0-9
  • -
  • _

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.

  • Minimum value: 100 (₹1).
  • Maximum value: 100000000 (₹10 lakh).
Example: 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.
  • Maximum length: 50 characters.
Example: v1-sub-4405071524-aa-qlAtAf
presentation_id string A Unique identifier for the presentation provided by the Pine Labs Online.
  • Maximum length: 50 characters.
Example: 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:
  • CREATED: When the create presentation request is successfully received by Pine Labs Online.

    **Note**: You need to use our Presentation API only if notification is handled by Pine Labs Online.
  • PENDING: When we successfully initiate a Pre-debit Notification.
  • PAUSED: When the subscription is Paused.
  • CANCELLED: When the subscription is Cancelled.
  • FAILED: Pre-Debit Notification or customer debit fails, the system will attempt up to three retries—initiated either by the merchant or Pine Labs. After three unsuccessful attempts, the subscription status changes to HALTED. The merchant can then send a new notification and debit request. Once the debit is successful, the subscription returns to the ACTIVE state.
  • COMPLETED: When the debit is successful.
merchant_presentation_reference string Unique identifier of the merchant presentation reference entered while creating a Debit.

  • Minimum length: 1 character.
  • Maximum length: 50 characters.
Example: 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.

  • Minimum value: 100 (₹1).
  • Maximum value: 100000000 (₹10 lakh).
Example: 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

  1. Manage Plan: Listed below are the various options available to manage a plan.
    1. Update Plan: Use our Update Plan API to update plan details.
    2. Delete Plan: Use our Delete Plan API to delete a plan.
  2. Manage Subscription: Listed below are the various options available to manage subscription.
    1. Pause Subscription: Use our Pause Subscription API to pause a subscription.
    2. Resume Subscription: Use our Resume Subscription API to resume a subscription.
    3. Cancel Subscription: Use our Cancel Subscription API to cancel a subscription.
    4. Update Subscription: Use our Update Subscription API to update the subscription.
  3. Manage Presentation: Listed below are the various options available to manage Presentation.
    1. Delete Presentation: Use our Delete Presentation API to Delete a presentation.
    2. Merchant Retry: Use our Merchant Retry API. This API allows you to retry mandate execution for subscriptions that are in the DEBIT FAILED stage. You can retry up to three times before the mandate moves to the HALTED stage. After that, you can present the transaction again with a new debit date.
    3. 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.

  1. 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.
  2. Use Fetch APIs: You can use the below list of APIs to fetch the status of Plan, Subscription, and Presentation.
    1. Plans
      1. Get All Plans: Use our Get All Plans API to fetch all the plan details.
      2. Get Specific Plan: Use our Get Specific Plan API to get the specific plan among the plans available.
    2. Subscriptions
      1. Get All Subscriptions: Use our Get All Subscriptions API to get the list of available subscriptions.
      2. Get Specific Subscription: Use our Get Specific Subscription API to get the list of available subscriptions.
    3. Presentations
      1. Get Presentation: Use our Get Presentation API to get a presentation request.
      2. Get Presentation by Subscription ID: Use our Get Presentation by Subscription ID API to get a presentation request by subscription Id.

Ask AI
Assistant
Hourly Limit
0 / 20000 tokens used Resets in: 60m 0s
Order Lifecycle
Refunds
Settlements
Checkout
Dashboard
International Payments
How do I implement webhook notifications for payment status updates, and what's the recommended way to verify webhook authenticity?
How do I integrate Pine Labs payment gateway with my React Native mobile app and what are the required API credentials?
Can I customize the payment UI for card transactions, and what parameters can I pass to modify the checkout experience for my customers?
Assistant