@oaknetwork/payments-sdk package is published on npm. Install it with your preferred package manager.
You can also usenpm install @oaknetwork/payments-sdkoryarn add @oaknetwork/payments-sdk.
Requirements
@oaknetwork/payments-sdk>= 1.0.0- Node.js 18 or later
- TypeScript 5.x recommended (the SDK ships type declarations)
Environment variables
The SDK authenticates using OAuth2 client credentials. Store your credentials in environment variables — never hardcode them.Installdotenvif you want to load variables from a.envfile:pnpm add dotenv. Then addimport 'dotenv/config'at the top of your entry file.
Environments
The SDK supports two built-in environments. Pass theenvironment field when creating a client.
customUrl — it overrides the built-in environment URL:
For a full breakdown of environment behavior, sandbox-only restrictions, and the @SandboxOnly decorator, see Environments.