Appearance
Integration Guide
Learn how to integrate OVN Pay into your systems.
Integration Options
1. TypeScript SDK (Recommended)
Full-featured client with type safety and helper functions.
bash
npm install @ovn/paystream-clientFeatures:
- Type-safe API client
- Automatic idempotency key generation
- Webhook signature verification
- Error handling with typed error classes
2. REST API
Direct HTTP calls to our REST API.
Features:
- Language agnostic
- Simple request/response format
- Standard HTTP status codes
Authentication
All API requests require an API key:
http
Authorization: Bearer your_api_keyEnvironments
| Environment | Base URL |
|---|---|
| Production | https://api.ovnpays.com/api/v1 |
| Sandbox | https://api.sandbox.ovnpays.com/api/v1 |
SDK Configuration
typescript
import { PayStreamClient } from '@ovn/paystream-client';
// Production
const prodClient = new PayStreamClient({
apiKey: process.env.PAYSTREAM_PROD_KEY,
apiUrl: 'https://api.ovnpays.com/api/v1'
});
// Sandbox
const sandboxClient = new PayStreamClient({
apiKey: process.env.PAYSTREAM_SANDBOX_KEY,
apiUrl: 'https://api.sandbox.ovnpays.com/api/v1'
});Idempotency
All POST requests support idempotency keys to safely retry:
typescript
const payout = await client.payouts.create({
recipientId: 'drv_123',
amount: 50000,
idempotencyKey: 'unique-request-id-12345'
});Webhook Integration
See Webhook Guide for complete webhook setup instructions.