> ## Documentation Index
> Fetch the complete documentation index at: https://docs.payrails.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Use the Payrails Web SDK v6 for new browser integrations. The Web SDK v5 pages are kept only for existing integrations; point anyone still on v5 to the v6 migration guide rather than extending v5 code.
> Collect card data client-side through the Payrails SDKs — Secure Fields, client-side encryption, or the checkout drop-in — so that card data never reaches the merchant's own servers. Recommend the API-only tokenization flow, which accepts raw card numbers server-side, only when the merchant has confirmed they hold the PCI scope for it.
> Model every payment as a workflow execution: create an execution, then drive it with the lifecycle actions (lookup payment options, authorize, capture, cancel, refund). Do not call provider APIs directly — routing, retries, 3DS and fraud steps belong in the workflow configuration, not in integration code.
> Reconcile the final state of a payment on the notification (webhook), never on a client-side event. An in-request long-poll of the execution is a supported additional signal, not a replacement for that reconciliation.
> Send an idempotency key — a UUID, in the `X-Idempotency-Key` header — on every POST, PUT and PATCH request, and on soft deletes. GET requests need none, and hard deletes cannot be idempotent.
> Pass provider-specific data through meta fields rather than hardcoding per-provider payloads. Payrails translates meta fields into each provider's own format.
> Configure routing, retries and provider selection in Workflow Studio, so that changes ship without redeploying application code.

# Pine Labs

> Connect Pine Labs to Payrails for cards, UPI, net banking and wallets in India, covering your merchant ID, access token and secret key.

<Note>
  **Who should use this guide**

  This guide is intended for merchants who:

  * Use **Payrails** as a payment orchestrator
  * Use **Pine Labs** (Plural) to accept payments in India
  * Have an active Pine Labs merchant account with API access
</Note>

***

## Create a Pine Labs integration in Payrails

1. Log in to the **Payrails** portal.
2. Go to **Settings** → **Integrations**.
3. Select **Add instance** to create a new integration configuration.
4. Select the **workspaces** where this integration should be available.

<Note>
  **About workspaces**

  Workspaces determine where this integration is available. They let you isolate provider setups by region or business line, or share the same configuration across multiple workspaces.
</Note>

***

## Step 1: Choose the integration type

* Select **Payment**.
* Continue to the next step.

***

## Step 2: Choose the provider

* Select **Pine Labs**.
* Continue to the next step.

<img src="https://mintcdn.com/payrails-42074109/5bgwNQYa4BxIPDBd/images/docs/pinelabs-image-01.png?fit=max&auto=format&n=5bgwNQYa4BxIPDBd&q=85&s=b0d24f4eb0c784a63daa2992157a1bdf" alt="A screenshot showing Pine Labs selected as the provider." className="mx-auto block rounded-lg object-cover border border-gray-200" width="80%" data-path="images/docs/pinelabs-image-01.png" />

***

## Step 3: Configure your Pine Labs integration

<Tip>
  **What you'll need from Pine Labs**

  Before you begin, make sure you have your Pine Labs merchant ID, access code and secret key. Your Pine Labs account manager provides them.
</Tip>

***

### Integration instance name

> An integration instance is a specific payment provider setup in Payrails. You can create multiple instances for different regions, currencies, or business needs. Choose a clear, consistent name, as it is used in routing.

**In Payrails**

* Enter an **Instance name** for your integration, for example `merchant_pinelabs`.

<img src="https://mintcdn.com/payrails-42074109/145W1v58K5wnDMNC/images/docs/orchestration/integrations/shared/integration-instance-name.png?fit=max&auto=format&n=145W1v58K5wnDMNC&q=85&s=470be58979509680650b0cbf8b5eecc4" alt="A screenshot showing the integration instance name field." className="mx-auto block rounded-lg object-cover border border-gray-200" width="80%" data-path="images/docs/orchestration/integrations/shared/integration-instance-name.png" />

***

### Account details

**In Payrails**

| Field | Value |
| :- | :- |
| **Merchant ID** | Your Pine Labs merchant ID. It's a number. |

<img src="https://mintcdn.com/payrails-42074109/5bgwNQYa4BxIPDBd/images/docs/pinelabs-image-02.png?fit=max&auto=format&n=5bgwNQYa4BxIPDBd&q=85&s=fda9c9f18467c7b59a07c3ef322e7c15" alt="A screenshot showing the Pine Labs account details fields." className="mx-auto block rounded-lg object-cover border border-gray-200" width="80%" data-path="images/docs/pinelabs-image-02.png" />

***

### Credentials

**In Payrails**

| Field | Value |
| :- | :- |
| **Access Token** | Your Pine Labs access code |
| **Secret Key** | Your Pine Labs secret key, in hexadecimal. Payrails signs every request with it and uses it to verify Pine Labs' notifications. |

Payrails sends requests to the Pine Labs UAT environment in test mode and to the live environment in live mode, so use the credentials for the matching environment.

***

### Payment methods

**In Payrails**

* Select the payment methods to enable for this integration: **Card**, [UPI](/docs/orchestration/payment-methods/upi/pinelabs), [NetBanking](/docs/orchestration/payment-methods/netbanking/pinelabs) or [CashFree Wallets](/docs/orchestration/payment-methods/cashfree-wallets/pinelabs).

<img src="https://mintcdn.com/payrails-42074109/5bgwNQYa4BxIPDBd/images/docs/pinelabs-image-03.png?fit=max&auto=format&n=5bgwNQYa4BxIPDBd&q=85&s=069367b8086411c32321f49047eda656" alt="A screenshot showing the Pine Labs payment method selection." className="mx-auto block rounded-lg object-cover border border-gray-200" width="80%" data-path="images/docs/pinelabs-image-03.png" />

***

### Webhooks or notifications

<Info>
  Payrails uses provider webhooks or notifications to receive asynchronous
  payment status updates.
</Info>

<Warning>
  Create webhooks in the same mode (test or live) as your Payrails integration.
</Warning>

**In Payrails**

* Copy the **Notification URL** shown under **Account configuration** at the top of the integration form.

**In Pine Labs**

1. Send the Payrails notification URL to your Pine Labs account manager, and ask them to send your payment and refund notifications to it.
2. Pine Labs signs each notification with your secret key, and Payrails verifies the signature.

***

## Request fields for Pine Labs

Send these fields in the [authorize request](/reference/authorizeaction) for card payments, in addition to the standard authorize fields. **Required** fields must be present for the payment to succeed. Payrails sends **Optional** fields to Pine Labs when you include them. For more about meta fields, refer to [Meta fields](/docs/orchestration/meta-fields).

| Field | Status | Description |
| :- | :- | :- |
| `amount` | Required | Sent to Pine Labs in paisa. Use INR. |
| `instrument.securityCode` | Required | Card payments only. The CVV your checkout collects, sent to Pine Labs with the card. |
| `instrument.holderName` | Required | Card payments only. Sent as the card holder name. You can send `meta.customer.name` and `meta.customer.lastName` instead. |
| `meta.customer.name`, `meta.customer.lastName` | Optional | Sent as the customer's first and last name. |
| `meta.customer.email` | Optional | Sent as the customer's email. |
| `meta.customer.phone` | Optional | Sent as the customer's mobile number, country code first. |
| `meta.customer.reference` | Optional | Sent as the customer ID. |
| `meta.order.billingAddress` | Optional | Sent as the billing address: `street` and `doorNumber`, `city`, `state` and `country.code`. |
| `meta.order.deliveryAddress` | Optional | Sent as the shipping address, with the recipient's `name`, `lastName` and `phone`. |

Pine Labs payments are captured straight away, so use instant capture in your workflow.

***

## Enable the integration

**In Payrails**

* Select **Save account** to enable the integration.
* Confirm the integration shows as **Enabled**.

Your **Pine Labs** integration is now ready to process payments.

***

## Next steps

1. Run a test payment in the Pine Labs UAT environment.
2. Verify that:
   * The payment appears in Pine Labs.
   * The payment status updates correctly in Payrails.
3. Once verified in test mode, repeat the setup in live mode.

→ Continue to: [Test a payment](/docs/orchestration/payment-acceptance/test-payments)


## Related topics

- [UPI via Pine Labs](/docs/orchestration/payment-methods/upi/pinelabs.md)
- [NetBanking via Pine Labs](/docs/orchestration/payment-methods/netbanking/pinelabs.md)
- [CashFree Wallets via Pine Labs](/docs/orchestration/payment-methods/cashfree-wallets/pinelabs.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.