Download the PHP package ddevs-20/nomba-php-sdk without Composer
On this page you can find all versions of the php package ddevs-20/nomba-php-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package nomba-php-sdk
Nomba PHP SDK
A PHP SDK for integrating with the Nomba payment API. This SDK provides a convenient way to accept payments, manage transactions, create virtual accounts, handle transfers, and more in your PHP applications.
Features
- Authentication – OAuth2 client-credentials and PKCE flow support
- Accept Payments – Card payments (Visa, Verve, Mastercard), USSD, bank transfers, and QR payments
- Checkout – Seamless checkout integration
- Virtual Accounts – Create and manage dynamic virtual accounts with BVN verification and expected amount support
- Transfers – Initiate and manage transfers (V2 API)
- Direct Debit – Recurring billing and scheduled payments with prior authorization
- Transaction Management – Verify, requery, and fetch transaction history
- Webhooks – Receive and verify webhook events with signature verification
- Sub-Accounts – Manage sub-accounts for split settlements
- Terminal Actions – Inject custom logic at specific transaction stages
- Betting API – Betting-related operations
- Cable TV – Fetch cable TV plans
Requirements
- PHP >= 7.4
- Composer
- cURL extension enabled
Installation
Install via Composer:
Quick Start
1. Obtain API Keys
Sign up at Nomba Developers to get your:
- Client ID
- Client Secret
- Account ID (for sandbox/production environments)
2. Initialize the SDK
3. Create a Payment Order
4. Charge a Card
5. Verify a Transaction
Virtual Accounts
Create a Virtual Account
Fetch Virtual Account Transactions
Lookup Virtual Account
Transfers
Initiate a Transfer
Check Transfer Status
Webhooks
Setup Webhook Handler
Webhook Re-push
Direct Debit
Create a Direct Debit Mandate
Terminal Actions
Frontend Integration (Nomba Checkout Popup)
The SDK includes a premium checkout popup for easy frontend integration.
1. Include the Script
Include the minified script via a CDN or your public assets folder:
Checkout Workflow
- Backend: Create an order using the SDK and return the
orderRefandcheckoutUrl. - Frontend: Initialize
NombaCheckoutwith thecheckoutUrlandorderRef.
Real-time Updates (Backend SSE)
To automatically close the popup on success, set up an SSE (Server-Sent Events) endpoint using the SseHandler.
Example: payment-status.php
Error Handling
The SDK throws exceptions for API errors:
Configuration Options
Testing
Run the test suite:
Run with coverage:
Sandbox Environment
Use the sandbox environment for testing:
Test card details for sandbox:
- Card Number:
5399838383838381 - Expiry:
12/2025 - CVV:
123 - PIN:
1234 - OTP:
123456
Documentation
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Please make sure to update tests as appropriate and follow the existing code style.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Support
For support, please:
- Open an issue on GitHub Issues
- Contact Nomba support at developer.nomba.com
Author
ddevs-20
- GitHub: @ddevs-20
- Repository: nomba-php-sdk
- Demfati
Built with ❤️ by Demfati for the Nomba developer community