{"id":23845866,"url":"https://github.com/shalomobongo/quantum-pay-daraja","last_synced_at":"2025-07-28T14:08:13.528Z","repository":{"id":266184240,"uuid":"897637325","full_name":"ShalomObongo/quantum-pay-daraja","owner":"ShalomObongo","description":"A modern, secure, and lightning-fast M-PESA payment integration built with Next.js","archived":false,"fork":false,"pushed_at":"2024-12-04T19:51:13.000Z","size":953,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-05T18:07:38.565Z","etag":null,"topics":["daraja","daraja-api","daraja-mpesa","daraja-nextjs"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ShalomObongo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-03T01:12:10.000Z","updated_at":"2024-12-04T19:51:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"a730db6e-69b1-4661-9660-b9ff5a0e7fb3","html_url":"https://github.com/ShalomObongo/quantum-pay-daraja","commit_stats":null,"previous_names":["shalomobongo/quantum-pay-daraja"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ShalomObongo/quantum-pay-daraja","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShalomObongo%2Fquantum-pay-daraja","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShalomObongo%2Fquantum-pay-daraja/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShalomObongo%2Fquantum-pay-daraja/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShalomObongo%2Fquantum-pay-daraja/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ShalomObongo","download_url":"https://codeload.github.com/ShalomObongo/quantum-pay-daraja/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShalomObongo%2Fquantum-pay-daraja/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267527835,"owners_count":24102019,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-28T02:00:09.689Z","response_time":68,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["daraja","daraja-api","daraja-mpesa","daraja-nextjs"],"created_at":"2025-01-02T20:48:26.179Z","updated_at":"2025-07-28T14:08:13.500Z","avatar_url":"https://github.com/ShalomObongo.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Quantum Pay - Safaricom Daraja Integration\n\n\u003cdiv align=\"center\"\u003e\n\n```\n  ██████  ██    ██  █████  ███    ██ ████████ ██    ██ ███    ███ \n ██    ██ ██    ██ ██   ██ ████   ██    ██    ██    ██ ████  ████ \n ██    ██ ██    ██ ███████ ██ ██  ██    ██    ██    ██ ██ ████ ██ \n ██ ▄▄ ██ ██    ██ ██   ██ ██  ██ ██    ██    ██    ██ ██  ██  ██ \n  ██████   ██████  ██   ██ ██   ████    ██     ██████  ██      ██ \n     ▀▀                                                            \n                                                                  \n    ██████   █████  ██    ██ \n    ██   ██ ██   ██  ██  ██  \n    ██████  ███████   ████   \n    ██      ██   ██    ██    \n    ██      ██   ██    ██    \n```\n\n```\n     [○] M-PESA Integration\n     └── Next.js + TypeScript + Tailwind\n```\n\n  \u003cp align=\"center\"\u003e\n    \u003cem\u003eA modern, secure, and lightning-fast M-PESA payment integration built with Next.js\u003c/em\u003e\n  \u003c/p\u003e\n\n  \u003cp\u003e\n    \u003ca href=\"#features\"\u003eFeatures\u003c/a\u003e •\n    \u003ca href=\"#tech-stack\"\u003eTech Stack\u003c/a\u003e •\n    \u003ca href=\"#getting-started\"\u003eGetting Started\u003c/a\u003e •\n    \u003ca href=\"#environment-variables\"\u003eEnvironment Setup\u003c/a\u003e •\n    \u003ca href=\"#api-reference\"\u003eAPI Reference\u003c/a\u003e •\n    \u003ca href=\"#contributing\"\u003eContributing\u003c/a\u003e\n  \u003c/p\u003e\n\u003c/div\u003e\n\n## ✨ Features\n\n```\n┌─────────────────────────────────────────────────────┐\n│ 🚀 Lightning Fast │ Built with Next.js 13           │\n│ 🔒 Secure         │ Safaricom's Daraja 2.0 API      │\n│ 🌓 Theme Support  │ Dark/Light mode with animation  │\n│ 🎨 Modern UI      │ Glass morphism \u0026 animations     │\n│ 📱 Responsive     │ Mobile-first design             │\n│ 🔄 Real-time      │ Live transaction tracking       │\n│ 📝 Logging        │ Comprehensive debug support     │\n│ 🔐 Type Safe      │ Full TypeScript integration     │\n└─────────────────────────────────────────────────────┘\n```\n\n## 🛠 Tech Stack\n\n- **Framework**: [Next.js 13](https://nextjs.org/)\n- **Styling**: [Tailwind CSS](https://tailwindcss.com/)\n- **Payment Integration**: [Safaricom Daraja 2.0](https://developer.safaricom.co.ke/)\n- **Type Safety**: [TypeScript](https://www.typescriptlang.org/)\n- **Font**: [Space Grotesk](https://fonts.google.com/specimen/Space+Grotesk)\n\n## 🚀 Getting Started\n\n1. **Clone the repository**\n   ```bash\n   git clone https://github.com/ShalomObongo/quantum-pay-daraja.git\n   cd quantum-pay-daraja\n   ```\n\n2. **Install dependencies**\n   ```bash\n   npm install\n   # or\n   yarn install\n   ```\n\n3. **Set up environment variables**\n   ```bash\n   cp .env.example .env.local   # Copy example env file\n   vim .env.local              # Edit with your credentials\n   ```\n\n4. **Run the development server**\n   ```bash\n   npm run dev\n   # or\n   yarn dev\n   ```\n\n5. **Open [http://localhost:3000](http://localhost:3000)**\n\n## 🔑 Environment Variables\n\nCreate a \\`.env.local\\` file in the root directory with the following variables:\n\n```env\nDARAJA_CONSUMER_KEY=your_consumer_key\nDARAJA_CONSUMER_SECRET=your_consumer_secret\nDARAJA_PASS_KEY=your_pass_key\nDARAJA_BUSINESS_SHORT_CODE=your_shortcode\nDARAJA_API_URL=https://sandbox.safaricom.co.ke\nNEXT_PUBLIC_API_URL=your_callback_url\n```\n\n## 📡 API Reference\n\n### STK Push Endpoint\n```http\nPOST /api/mpesa/stkpush\n\n{\n  \"amount\": number,    // Amount to be paid\n  \"phoneNumber\": string // Format: 254XXXXXXXXX\n}\n```\n\n### Check Transaction Status\n```http\nGET /api/mpesa/status/:checkoutRequestId\n```\n\n### Callback URL\n```http\nPOST /api/mpesa/callback\n```\n\n## 🎨 UI Components\n\n```\nComponents/\n├── PaymentForm/           # Payment input \u0026 validation\n├── TransactionStatus/     # Real-time status updates\n└── ThemeToggle/          # Dark/Light mode switch\n```\n\n## 🔐 Security Features\n\n```\nSecurity/\n├── Environment Variables  # Secure credential storage\n├── Input Validation      # Client \u0026 server validation\n├── API Security          # Secure route handling\n├── HTTPS Only           # Encrypted communication\n└── Rate Limiting        # API request throttling\n```\n\n## 🚧 Error Handling\n\n```\ntry {\n  // Comprehensive error handling for:\n  ├── Input Validation\n  ├── Network Errors\n  ├── M-PESA API Errors\n  └── Transaction Status\n} catch (error) {\n  // Detailed error logging\n}\n```\n\n## 📱 Mobile Responsiveness\n\n```css\n/* Responsive breakpoints */\n├── Mobile:  \u003c 640px\n├── Tablet:  \u003e= 768px\n└── Desktop: \u003e= 1024px\n```\n\n## 🤝 Contributing\n\n```bash\n# Contributing workflow\ngit checkout -b feature/AmazingFeature\ngit commit -m 'Add some AmazingFeature'\ngit push origin feature/AmazingFeature\n# Then open a Pull Request\n```\n\n## 📄 License\n\n```\nMIT License\n└── See LICENSE file for details\n```\n\n## 🙏 Acknowledgments\n\n```\nCredits/\n├── Safaricom Daraja API\n├── Next.js Documentation\n└── Tailwind CSS\n```\n\n---\n\n\u003cdiv align=\"center\"\u003e\n\n```\nMade by Shalom Obongo\n```\n\n\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshalomobongo%2Fquantum-pay-daraja","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshalomobongo%2Fquantum-pay-daraja","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshalomobongo%2Fquantum-pay-daraja/lists"}