Socket
Book a DemoInstallSign in
Socket

orchard-api-client

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

orchard-api-client

TypeScript client for appsNmobile Orchard API - Ghana mobile money & payment gateway

1.0.0
latest
Source
npmnpm
Version published
Weekly downloads
12
Maintainers
1
Weekly downloads
 
Created
Source

Orchard API Client

TypeScript/JavaScript client for the appsNmobile Orchard API - Ghana's mobile money & payment gateway.

Installation

npm install orchard-api-client

Quick Start

import { createOrchardClient } from "orchard-api-client";

const orchard = createOrchardClient({
  clientId: "your-client-key",
  clientSecret: "your-secret-key",
  serviceId: 1234,
});

// Send money
const payment = await orchard.sendMoney({
  customer_number: "233241234567",
  amount: 50.0,
  exttrid: orchard.generateTransactionId(),
  reference: "Payment",
  nw: "MTN",
  callback_url: "https://tuagye.com/callback",
});

// Collect money
const collection = await orchard.collectMoney({
  customer_number: "233241234567",
  amount: 25.0,
  exttrid: orchard.generateTransactionId(),
  reference: "Service fee",
  nw: "VOD",
  callback_url: "https://tuagye.com/callback",
});

// Check balance
const balance = await orchard.checkBalance();

// Send SMS
await orchard.sendSMS({
  recipient_number: "233241234567",
  msg_body: "Payment successful!",
  unique_id: orchard.generateTransactionId(),
  sender_id: "tuagye",
});

Networks

  • MTN: Mobile Money
  • VOD: Vodafone Cash
  • AIR: AirtelTigo Money
  • BNK: Bank Transfer
  • MAS: MasterCard
  • VIS: Visa

Bank Transfers

await orchard.sendMoney({
  customer_number: "1234567890",
  amount: 100.0,
  exttrid: orchard.generateTransactionId(),
  reference: "Salary",
  nw: "BNK",
  bank_code: "UBA",
  recipient_name: "John Doe",
  callback_url: "https://tuagye.com/callback",
});

Error Handling

try {
  const result = await orchard.sendMoney({...});

  if (orchard.isTransactionSuccessful(result.resp_code)) {
    console.log('Success:', result);
  } else {
    console.log('Failed:', result.resp_desc);
  }
} catch (error) {
  console.error('Error:', error);
}

API Features

  • ✅ Mobile Money Payments (MTN, Vodafone, AirtelTigo)
  • ✅ Bank Transfers & Card Payments
  • ✅ SMS Notifications
  • ✅ Balance Inquiry
  • ✅ Transaction Status Check
  • ✅ Hosted Checkout Pages
  • ✅ Remittance (International Transfers)
  • ✅ Auto Debit (Recurring Payments)
  • ✅ ID Verification
  • ✅ Full TypeScript Support

Documentation

For complete API documentation, visit: https://docs.anmgw.com/docs-page.html

License

MIT

Keywords

ghana

FAQs

Package last updated on 22 Aug 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.