Server SDKs
Overview of Pine Labs Server SDKs.
The Pine Labs server SDKs let you call the Online Payment Gateway APIs 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 or the Mobile SDKs.
Available SDKs
| Language | Package | Status | Guide |
|---|---|---|---|
| Node.js / TS | pinelabs-node | Generally available | Node.js SDK |
| Python | pinelabs (PyPI) | Coming soon | Python SDK |
| PHP | pinelabs/pinelabs-php | Coming soon | PHP SDK |
| Java | com.pinelabs:pinelabs-java | Coming soon | Java SDK |
| Ruby | pinelabs (RubyGems) | Coming soon | Ruby SDK |
| Go | github.com/plural-pinelabs/pinelabs-go | Coming soon | Go SDK |
| .NET | Pinelabs (NuGet) | Coming soon | .NET SDK |
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 and tell us which language you need.
What every SDK gives you
- Strongly-typed clients — request and response models for every operation.
- Auth helpers — exchange
client_id/client_secretfor an OAuth2 access token viaclient_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.
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.
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.
Next steps
Pick your language from the sidebar to get the install command, a copy-pasteable quickstart, and the list of available sub-clients.
