This is a React application for initiating Mpesa Stk Push transactions. It utilizes the Mpesa Stk Push API to submit transactions and provides real-time status updates through recursive validation.
- Submit Mpesa Stk Push transactions with ease.
- Real-time transaction status updates.
- User-friendly notifications for transaction success, failure, and cancellation.
Before running the application, ensure you have the following:
- Node.js installed
- npm (Node Package Manager) installed
- Backend API (Assuming it's available at
http://localhost:5000
) - You can find the backend API here: Domains18/Nodejs/Daraja
-
Clone the repository:
git clone https://github.com/Domains18/SafaricomDarajaFrontEnd.git
-
Navigate to the project directory:
cd client
-
Install dependencies:
npm install
-
Start the React application:
npm run dev
The application should now be running at http://localhost:5173.
- Enter the required details, including phone number and amount.
- Click the "Submit" button to initiate the Mpesa Stk Push transaction.
- Real-time notifications will inform you of the transaction status.
- Loading indicators will appear during the transaction submission.
- This application uses Axios for making HTTP requests.
- Toast notifications are implemented using the
react-toastify
library.
Feel free to customize and extend the application based on your specific requirements.
This project is licensed under the MIT License.