SDK Installation
Install
bash
npm install @payre/sdk
# or
pnpm add @payre/sdk
# or
yarn add @payre/sdkSetup
typescript
import { PayreClient } from '@payre/sdk';
const payre = new PayreClient({
apiKey: 'pyr_sk_your_api_key',
baseUrl: 'http://localhost:3000', // optional
});Configuration
| Option | Type | Default | Description |
|---|---|---|---|
apiKey | string | (required) | Your Payre API key |
baseUrl | string | http://localhost:3000 | API server URL |
Environment Variables
The SDK also reads from environment variables (used by the CLI):
PAYRE_API_KEY— API keyPAYRE_BASE_URL— API server URL