Skip to content

haqqman/squad-gateway

Repository files navigation

Squad Gateway

npm version
GitHub issues
GitHub license

A simple and efficient Node.js wrapper for the SquadCo Payment Gateway API.


Features

Easy Integration – Simple API for handling payments
TypeScript Support – Fully typed for better development experience
Lightweight – No unnecessary dependencies


Installation

Using pnpm:

pnpm add squad-gateway

Using npm:

npm install squad-gateway

Using yarn:

yarn add squad-gateway

Usage

1. Import the package

import SquadGateway from 'squad-gateway'

const squad = new SquadGateway('your-api-key')

2. Initialize Payment

const payment = await squad.initializePayment({
  amount: 5000,
  currency: 'NGN',
  email: 'customer@example.com'
})

console.log(payment) // Response from SquadCo

3. Verify Payment

const verification = await squad.verifyPayment('transaction-reference')

console.log(verification)

API Methods

Method Description
initializePayment(data) Creates a new payment request
verifyPayment(ref) Verifies a completed transaction
getTransaction(ref) Fetches transaction details
refundTransaction(ref) Initiates a refund process

More features coming soon! 🚀


Configuration

Set your API key via environment variables:

export SQUAD_API_KEY='your-secret-api-key'

Or pass it as a parameter:

const squad = new SquadGateway('your-api-key')

Contributing

  1. Fork the repository
  2. Create a new branch (git checkout -b feature-name)
  3. Commit your changes (git commit -m "Added new feature")
  4. Push to your branch (git push origin feature-name)
  5. Open a Pull Request

License

This project is licensed under the MIT License.


Support & Contact

About

Squad Payment Gateway

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors