Documentation/Client Libraries

SDKs & Libraries

Official PayArk libraries to help you integrate faster and more securely.

TypeScript / Node.js

Official
View on GitHub

The official PayArk Node.js SDK is the easiest way to interact with our API. It includes built-in TypeScript definitions, structured error handling, and robust retry logic.

Installation

Terminal
# Using npm
npm install @payark/sdk

# Using pnpm
pnpm add @payark/sdk

Usage

example.ts
import{ PayArk } from "@payark/sdk";

// Initialize the client
const payark = new PayArk("sk_test_...");

// Create a checkout session
const checkout = await payark.checkout.create({
  amount: 1000,
  currency: "NPR",
  provider: "esewa",
  metadata: { orderId: "ORD-123"}
});

console.log("Pay here:", checkout.checkout_url);

Auto-Retries

Intelligent retry logic with exponential backoff for network flakes.

Fully Typed

Native TypeScript definitions for all request and response payloads.

Community Libraries

More languages are coming soon. Interested in building an official library for your favorite language? Get in touch!

Python
Coming Soon
Go
Coming Soon
PHP
Coming Soon
Ruby
Coming Soon
Java
Coming Soon
C#
Coming Soon