Back to Developers
Backend SDK

TypeScript-First
Node.js SDK

The official library for generating checkouts and subscribing to webhooks. Seamlessly integrate OrvexPay into Express, NestJS, Next.js, or any Node.js backend.

SDK Features

Webhook Security

Validate incoming webhook signatures with a single line of code. Secure your payment callbacks.

UI Kit Compatible

Pairs perfectly with our React UI Kit for rapid component-based checkout integration.

Secure Webhooks

Express Webhook Handler
import { OrvexClient } from 'orvex-pay';

app.post('/webhook', (req, res) => {
  try {
    OrvexClient.webhooks.verifySignature(
      req.rawBody,
      req.headers['x-orvex-signature'],
      process.env.WEBHOOK_SECRET
    );

    // Signature valid, handle event
    console.log(req.body.status);
    res.sendStatus(200);
  } catch (err) {
    res.status(401).send(err.message);
  }
});

Next Level: React UI Kit

Why build checkout screens from scratch? Our React UI Kit provides production-ready components that match the OrvexPay premium aesthetic.

Explore UI Kit

Quick Integration

Terminal
npm install orvex-pay
NPM
Usage Example
import { OrvexClient } from 'orvex-pay';

// Initialize client
const orvex = new OrvexClient({
  apiKey: process.env.ORVEX_API_KEY
});

// Generate a new payment link
const invoice = await orvex.invoices.create({
  priceAmount: '100.00',
  priceCurrency: 'TRY',
  payCurrency: 'USDT',
  orderId: 'ORDER-12345',
  successUrl: 'https://example.com/success',
  cancelUrl: 'https://example.com/cancel',
});

console.log(invoice.payUrl);

Open Source

The SDK is fully open-source. Found a bug or want to add a feature? Create an issue or pull request on GitHub.

View on GitHub

Package Status

Current Version1.2.0
Node.js Support16.x +