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-sdkimport { 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.
| Namespace | For |
|---|---|
kyshi.transactions | Hosted checkout and bank-transfer charges |
kyshi.virtualAccounts | Virtual accounts, balances, credit simulation |
kyshi.paymentLinks | Customer-specific payment links |
kyshi.generalPaymentLinks | Reusable links with checkout |
kyshi.transfers | Payouts on the standard rail |
kyshi.virtualAccountTransfers | Payouts on the VA rail, including bulk |
kyshi.plans | Billing plans |
kyshi.subscriptions | Subscriptions, invoices, payment attempts |
kyshi.rates / kyshi.customRates | Rate and fee configuration |
kyshi.webhooks | Signature helpers and delivery inspection |
kyshi.client | The 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
- Installation — setup and requirements
- Configuration — retries, idempotency, unwrapping
- Webhooks And Errors — verification and error handling
Updated 5 days ago
