squad-gateway
v1.0.0
Published
A Node.js wrapper for SquadCo payment gateway API.
Readme
Squad Gateway
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-gatewayUsing npm:
npm install squad-gatewayUsing yarn:
yarn add squad-gatewayUsage
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: '[email protected]'
})
console.log(payment) // Response from SquadCo3. 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
- Fork the repository
- Create a new branch (
git checkout -b feature-name) - Commit your changes (
git commit -m "Added new feature") - Push to your branch (
git push origin feature-name) - Open a Pull Request
License
This project is licensed under the MIT License.
Support & Contact
- 📧 Email: [email protected]
- 📝 Open an issue
