This library provides a seamless integration with the OGateway payment gateway for handling disbursements, mobile money payments, and bank transfers within your project.
Client: React, Next.js, etc.
Server: Node, Nest.js, etc.
- 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.
Signup and generate your API_KEY. this is *required.
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);
If you have any feedback, please reach out to us at tech@peacemaker.pay