ogateway.io
TypeScript icon, indicating that this package has built-in type declarations

0.0.22 • Public • Published

App Screenshot

OGateway

This library provides a seamless integration with the OGateway payment gateway for handling disbursements, mobile money payments, and bank transfers within your project.

Badges

MIT License
GPLv3 License
AGPL License

API_KEY

  1. Generate your API_KEY here.

Screenshots

App Screenshot

Tech Stack

Client: React, Next.js, etc.

Server: Node, Nest.js, etc.

Features

  • Disbursements: Initiate payments to mobile money wallets or bank accounts.
  • Mobile Money Payments: Facilitate payments to mobile money wallets.
  • Bank Transfers: Enable bank transfers directly to recipients' accounts.
  • Configuration: Easily set and retrieve API keys and callback URLs for secure communication with the OGateway API.

Usage

Signup and generate your API_KEY. this is *required.

Implementation

Installation

   npm i ogateway.io

Configure OGateway

  import { setConfig } from "ogateway.io"
  setConfig('YOUR_API_KEY', 'OPTIONAL_CALLBACK_URL');
  collection.init()

OR

  import { collection } from "ogateway.io"
  collection.init({
    apiKey: 'YOUR_API_KEY',
    callbackUrl: 'OPTIONAL_CALLBACK_URL'
  })

Initiate Payment (MOBILE MONEY)

import { collection } from "ogateway.io"

const paymentInfo: IPaymentInfo = {
  currency: 'GHS',
  network: 'MTN',
  amount: 100,
  reason: 'Testing',
  accountName: 'Sender's Name',
  accountNumber: '02XXXXXXXX',
  reference: '9686749'
};
const result = await collection.initiateRequestFromMobileMoney(paymentInfo);
console.log(result);

Confirm Payment With OTP (Optional)

const otpInfo: IOtp = {
  id: '062dfe51-c1e3-4c7f-adcc-7b8c084ea911',
  otp: 821136,
};
const result = await gateway.collection.confirmPaymentWithOtp(otpInfo);
console.log(result);

Acknowledgements

Feedback

If you have any feedback, please reach out to us at tech@peacemaker.pay

License

MIT

Package Sidebar

Install

npm i ogateway.io

Weekly Downloads

45

Version

0.0.22

License

ISC

Unpacked Size

101 kB

Total Files

19

Last publish

Collaborators

  • octopus22