---
title: Server SDKs
sidebar_label: Server SDKs
slug: server-sdks
excerpt: Integrate Pine Labs payments into your server-side applications.
hidden: false
sidebar_order: 4
metadata:
  title: Server SDKs – Pine Labs Payment Gateway
  description: >-
    Server SDK integration guides for Node.js, Python, PHP, Java, Ruby, Go, and
    .NET.
  keywords: Server SDK
  robots: index
---
The Pine Labs server SDKs let you call the [Online Payment Gateway APIs](/docs/api-reference) from your backend in a type-safe, idiomatic way. Every SDK is generated from the same OpenAPI spec the public API reference is built from, so the operations, request shapes and response models stay in lock-step with the API.

Use a server SDK when you need to:

- Create and manage **orders**, **refunds**, and **settlements**.
- Issue **payment links** (single or bulk) and **payouts**.
- Run **subscriptions**, **plans**, and **presentations** for recurring billing.
- Tokenise cards, manage customers, or call any other Plural API.

Server SDKs are **never** safe to bundle into a browser, mobile app, or other untrusted client — they hold your client credentials. For client-side flows, use the [Web SDK](/docs/web-sdk) or the [Mobile SDKs](/docs/mobile-sdks).

## Available SDKs

| Language       | Package                                                                  | Status        | Guide                                                  |
| -------------- | ------------------------------------------------------------------------ | ------------- | ------------------------------------------------------ |
| Node.js / TS   | [`pinelabs-node`](https://www.npmjs.com/package/pinelabs-node)           | Generally available | [Node.js SDK](sdks/server-sdks/nodejs)         |
| Python         | [`pinelabs-python`](https://pypi.org/project/pinelabs-python/)           | Generally available | [Python SDK](sdks/server-sdks/python)          |
| PHP            | [`plural-pinelabs/pinelabs-php`](https://packagist.org/packages/plural-pinelabs/pinelabs-php) | Generally available | [PHP SDK](sdks/server-sdks/php)    |
| Java           | [`com.pinelabs:pinelabs-java`](https://central.sonatype.com/artifact/com.pinelabs/pinelabs-java) | Generally available | [Java SDK](sdks/server-sdks/java) |
| Ruby           | [`pinelabs`](https://rubygems.org/gems/pinelabs)                        | Generally available | [Ruby SDK](sdks/server-sdks/ruby)              |
| Go             | [`github.com/plural-pinelabs/pinelabs-go`](https://github.com/plural-pinelabs/pinelabs-go) | Generally available | [Go SDK](sdks/server-sdks/go)       |
| .NET           | [`Pinelabs`](https://www.nuget.org/packages/Pinelabs)                   | Generally available | [.NET SDK](sdks/server-sdks/dotnet)            |

<Callout type="info" title="Need an SDK that isn't listed?">
  All SDKs are generated from a single OpenAPI spec, so adding a new language is mostly a configuration change. Open an issue on the [GitHub repo](https://github.com/plural-pinelabs/Pinelabs-Agentic-SDK) and tell us which language you need.
</Callout>

## What every SDK gives you

- **Strongly-typed clients** — request and response models for every operation.
- **Auth helpers** — exchange `client_id` / `client_secret` for an OAuth2 access token via `client_credentials`.
- **Environment switching** — point at UAT (`https://pluraluat.v2.pinepg.in`) or production (`https://api.pluralpay.in`) with one constant.
- **Typed errors** — distinguish HTTP errors, timeouts, and validation issues.
- **Per-request overrides** — set custom timeouts, headers, or AbortSignal on any call.
- **No telemetry** — the SDKs ship with zero phone-home behaviour.

## Authentication

All Plural APIs use **OAuth2 with the `client_credentials` grant**. Every SDK exposes the auth call as `authentication.generateToken` (or its language-idiomatic equivalent). Exchange your credentials for a short-lived `access_token`, then attach it to subsequent requests.

In long-running workers you should cache the token and refresh it ~30 seconds before `expires_in` lapses. Each SDK guide shows the recommended pattern for that language.

<Callout type="warning" title="Keep credentials server-side">
  Never embed `client_id` / `client_secret` in a browser bundle, mobile app, desktop app, CLI distributed to end-users, or any other untrusted environment. Treat them like database passwords — load them from environment variables or a secret manager.
</Callout>

## Environments

| Environment | Base URL                          | When to use                            |
| ----------- | --------------------------------- | -------------------------------------- |
| UAT         | `https://pluraluat.v2.pinepg.in`  | Development, integration, regression   |
| Production  | `https://api.pluralpay.in`        | Live merchant traffic                  |

Switch environments by changing the base URL — no code change is required to your business logic.

## Versioning & support

- SDKs follow **semantic versioning**. While we are pre-1.0, expect occasional small breaking changes between minor versions; these are always called out in the release notes.
- The **API itself is stable** — SDK regenerations track new endpoints additively.
- Issues, feature requests, and PRs: [github.com/plural-pinelabs/Pinelabs-Agentic-SDK](https://github.com/plural-pinelabs/Pinelabs-Agentic-SDK).

## Next steps

Pick your language from the sidebar to get the install command, a copy-pasteable quickstart, and the list of available sub-clients.
 
