SDKs & Libraries
Peak Gateway provides official SDKs for core integration targets.
TypeScript SDK
- Package:
@gateway/sdk - Runtimes: Node.js 18+, Deno, Cloudflare Workers, modern browsers
- Dependencies: None (zero runtime dependencies)
Install:
npm install @gateway/sdk
The TypeScript SDK exposes two client classes:
GatewayAdminClient— Full admin and portal operations (17 API modules)GatewayPayClient— Payment-facing operations for checkout flows and e-commerce (6 API modules)
Quick start:
import { GatewayAdminClient, CardDataSource, IndustryType } from '@gateway/sdk'
const client = new GatewayAdminClient({
clientId: 'your_client_id',
clientSecret: 'sk_live_xxxxxxxxxxxx',
environment: 'production',
})
const result = await client.transactions.sale({
amount: 2500,
currency: 'USD',
cardDataSource: CardDataSource.INTERNET,
industryType: IndustryType.ECOMMERCE,
})
if (result.kind === 'approved') {
console.log(`Approved: ${result.approvalCode}`)
}
For full documentation including authentication, error handling, webhook verification, and all API modules, see the TypeScript SDK reference.
Kotlin SDKs
gateway-sdk-core— KMP core client (JVM, Android, iOS future)gateway-sdk-android— Android ViewModel extensions
Recommended for Android and JVM-based gateway integrations.
For full documentation, see the Kotlin SDK reference.
SDK Guidance
- Keep SDK versions pinned in production workloads
- Use test credentials in non-production environments
- Implement retries and idempotency for create/capture/refund operations
- Both SDKs handle automatic token refresh and exponential backoff retries