Kyshi MoR SDK

The official TypeScript and Node.js SDK for the Kyshi MoR API.

@kyshi/mor-sdk is the official TypeScript package for the Kyshi MoR API. It covers every public endpoint, so you should not need to drop to raw HTTP.

Use it when you want typed methods, consistent error classes, automatic retries where they are safe, and webhook signature helpers without hand-rolling them.

npm install @kyshi/mor-sdk
import { Kyshi } from '@kyshi/mor-sdk';

const kyshi = new Kyshi({ secretKey: process.env.KYSHI_SECRET_KEY! });

const checkout = await kyshi.transactions.initialize({
  email: '[email protected]',
  amount: 1000,
  localCurrency: 'NGN',
  amountCurrency: 'local',
  reference: 'ORDER-10001',
});

console.log(checkout.authorizationUrl);

Resources

The client exposes one namespace per product area.

NamespaceFor
kyshi.transactionsHosted checkout and bank-transfer charges
kyshi.virtualAccountsVirtual accounts, balances, credit simulation
kyshi.paymentLinksCustomer-specific payment links
kyshi.generalPaymentLinksReusable links with checkout
kyshi.transfersPayouts on the standard rail
kyshi.virtualAccountTransfersPayouts on the VA rail, including bulk
kyshi.plansBilling plans
kyshi.subscriptionsSubscriptions, invoices, payment attempts
kyshi.rates / kyshi.customRatesRate and fee configuration
kyshi.webhooksSignature helpers and delivery inspection
kyshi.clientThe raw HTTP client, for anything not yet typed

Each returns the unwrapped data payload, not the envelope. See Configuration.

What It Does For You

Retries only where safe. GET and DELETE retry automatically. Writes retry only when you pass an idempotencyKey, so a lost response cannot double-send a payout.

Typed errors. KyshiValidationError, KyshiAuthenticationError, KyshiTimeoutError, KyshiNetworkError — catch by type instead of parsing status codes.

Webhook verification. constructEvent verifies the HMAC-SHA256 signature and returns the parsed event, with constant-time comparison.

Envelope unwrapping. You work with the payload; pass unwrap: false when you want the envelope.

Guides Or SDK Pages?

These pages document the SDK surface — namespaces, methods, options.

The product guides document the flows — when to use a virtual account, how to handle an underpayment, what to do when a subscription goes past due. They apply whether or not you use the SDK, and every API Reference page carries an SDK sample alongside curl.

Start with Getting Started if you are choosing a flow. Start here if you have already chosen one.

Next


Did this page help you?