Type-safe Node.js SDK for the maplerad API.
This package provides both a class-based client and a runtime-first client for working with maplerad customers, wallets, transfers, virtual accounts, bills, FX, crypto, issuing, and supporting lookup endpoints.
- Docs site: https://maplerad.toneflix.net/
- API overview: https://maplerad.toneflix.net/api/overview
- Configuration guide: https://maplerad.toneflix.net/guide/configuration
The package is published as maplerad-sdk.
pnpm add maplerad-sdkimport { createClient } from 'maplerad-sdk';
const sdk = createClient({
environment: 'sandbox',
clientSecret: process.env.MAPLERAD_CLIENT_SECRET!,
});
const wallets = await sdk.api.wallets.list();import { Core } from 'maplerad-sdk';
const sdk = new Core({
environment: 'sandbox',
clientSecret: process.env.MAPLERAD_CLIENT_SECRET!,
});
const customer = await sdk.api.customers.get({ id: 'cus_123' });You can keep SDK defaults in maplerad.config.js using defineConfig from @oapiex/sdk-kit:
import { defineConfig } from '@oapiex/sdk-kit';
export default defineConfig({
clientSecret: process.env.MAPLERAD_CLIENT_SECRET,
environment: 'sandbox',
debugLevel: 3,
});With defaults in place, this works too:
import { createClient } from 'maplerad-sdk';
const sdk = createClient({});import { createClient, type CustomerInput } from 'maplerad-sdk';
const sdk = createClient({
environment: 'sandbox',
clientSecret: process.env.MAPLERAD_CLIENT_SECRET!,
});
const payload: CustomerInput = {
first_name: 'Ada',
last_name: 'Lovelace',
email: '[email protected]',
country: 'NG',
};
const createdCustomer = await sdk.api.customers.create(payload);
const customers = await sdk.api.customers.list({});
const customer = await sdk.api.customers.get({ id: createdCustomer.id! });createClient()for runtime-first usageCorefor class-based usageApiBinderandBaseApifor SDK extension points- Generated schema types exported from
Schema defineConfig,createSdk,Http,Builder, and related runtime helpers re-exported from@oapiex/sdk-kit
This SDK is built on top of @oapiex/sdk-kit, which provides the shared runtime primitives behind configuration, auth handling, transport, and manifest binding.
- SDK Kit reference: https://toneflix.github.io/oapiex/reference/sdk-kit
- Customers and identity
- Wallets and transfers
- Virtual accounts and collections
- Bills and utilities
- FX, crypto, and USD
- Issuing and cards
See the full grouped reference in the docs site:
pnpm install
pnpm lint
pnpm test
pnpm coverage
pnpm build
pnpm docs:dev
pnpm docs:buildMAPLERAD_CLIENT_SECRET=your_client_secret_key
MAPLERAD_CLIENT_ID=your_client_id
MAPLERAD_ENCRYPTION_KEY=your_encryption_keyKeep secrets on the server side. Do not expose Maplerad credentials in client-side applications.