API Authentication

Learn about the type of authentication used by us and how to generate your access token.

When processing an API, it is important to know who is sending the request and if they have permission to perform the action. API authentication helps us identify who is making the call, if they have the required permissions, and ensure you securely access the requested data.

Pine Labs Online uses bearer tokens to authenticate our API calls. All API calls must include an authorization header in the request.

--header 'Authorization: Bearer <access_token>'
const options = {
  headers: {
    Authorization: 'Bearer <access_token>'
  }
};
request["Authorization"] = 'Bearer <access_token>'
curl_setopt_array($curl, [
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer <access_token>"
  ],
]);
headers = {
    "Authorization": "Bearer  <access_token>"
}

📘

API Calls via Server Only

  • All API calls should be requested from your backend server only.

Generate API Key

Use our Generate Token API to generate the access token and use this access token to authenticate Pine Labs Online APIs.

Use the below endpoint to generate the access key.

POST: https://pluraluat.v2.pinepg.in/api/auth/v1/token
POST: https://api.pluralpay.in/api/auth/v1/token

Shown below is a sample request and sample response for a Generate Token API.

{
  "client_id": "a17ce30e-f88e-4f81-ada1-c3b4909ed232",
  "client_secret": "abcdefgwei7egyhuggwp39w8rh",
  "grant_type": "client_credentials"
}
{
  "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c",
  "expires_at": "2024-08-28T15:00:12.213Z"
}
Response Parameters

The table below lists the various parameters returned in our Generate Token API.

ParameterTypeRequirement TypeDescription
access_tokenstringMThe access token generated by the system.
  • Minimum length: 1 character.
  • Maximum length: 8192 characters.
Example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c

Note: Use this token in the authorization headers to authenticate Pine Labs Online APIs.
expires_atstringMAccess duration timestamp.

Example: 2024-06-28T13:26:06.909140Z

Learn more about our Generate Token API documentation.

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