Skip to content

Cryptonly provides an official JavaScript / TypeScript SDK for server-side integrations.

The SDK helps you work with the merchant API faster by giving you a typed client for common operations such as invoice creation, withdrawals, and account access, without having to build raw HTTP requests manually.

It is designed for trusted backend environments only and uses your accounts API key to authorize requests.

You can install the package from npm as @cryptonly/sdk.

Terminal window
npm install @cryptonly/sdk
import { Cryptonly } from '@cryptonly/sdk';
const client = new Cryptonly({
apiKey: process.env.CRYPTONLY_API_KEY!,
defaultAccountId: process.env.CRYPTONLY_ACCOUNT_ID, // optional
});
const invoice = await client.invoice.create({
amount: 100,
fiatCurrencyCode: 'USD',
description: 'Order #123',
orderId: 'order_123',
});