Skip to main content

Payment SDK

The Payment SDK is Oak Network's toolkit for integrating payments, transfers, subscriptions, and crypto on/off-ramp flows into your application.

Packages

The Payment SDK is split into focused packages. Use the one that fits your integration.

PackagenpmWhat it does
API SDK@oaknetwork/apiTypeScript client for the Oak Network payment API — customers, payments, webhooks, transfers, subscriptions, and crypto on/off-ramp
Contract SDK@oaknetwork/contractsTypeScript bindings for Oak Network smart contracts — coming soon

API SDK

The API SDK is production-ready. It wraps the Oak Network REST API with type-safe methods, automatic OAuth2 authentication, and built-in retry logic.

import { createOakClient, createPaymentService } from '@oaknetwork/api';

const client = createOakClient({
environment: 'sandbox',
clientId: process.env.CLIENT_ID!,
clientSecret: process.env.CLIENT_SECRET!,
});

const payments = createPaymentService(client);
const result = await payments.create({ ... });

Start here:

  • API SDK Overview — highlights, services table, quick example
  • Installation — install the package and configure credentials
  • Quickstart — your first working integration in under 5 minutes

Contract SDK

The Contract SDK will provide TypeScript bindings for interacting with Oak Network smart contracts on-chain. It is currently under development.

For direct smart contract integration today, see the Smart Contracts documentation.