|
| 1 | +# Server Configuration |
| 2 | +PORT=3000 |
| 3 | + |
| 4 | +# Database Configuration |
| 5 | +DATABASE_URL="mysql://user:password@localhost:3306/mpesa_db" |
| 6 | + |
| 7 | +# M-Pesa Environment (SANDBOX or PRODUCTION) |
| 8 | +MPESA_ENV=SANDBOX |
| 9 | + |
| 10 | +# Safaricom Daraja API Credentials |
| 11 | +CONSUMER_KEY=YOUR_CONSUMER_KEY |
| 12 | +CONSUMER_SECRET=YOUR_CONSUMER_SECRET |
| 13 | + |
| 14 | +# STK Push Configuration |
| 15 | +PASS_KEY=YOUR_PASSKEY |
| 16 | +STK_SHORTCODE=174379 |
| 17 | +STK_CALLBACK_URL=https://yourdomain.com/api/mpesa/callback |
| 18 | + |
| 19 | +# Initiator Credentials (for B2C, B2B, Balance, Status, Reversal) |
| 20 | +INITIATOR_NAME=YOUR_INITIATOR_NAME |
| 21 | +INITIATOR_PASSWORD=YOUR_INITIATOR_PASSWORD |
| 22 | + |
| 23 | +# M-Pesa Certificate Path |
| 24 | +MPESA_CERT_PATH=./certificates/ProductionCertificate.cer |
| 25 | + |
| 26 | +# C2B Configuration |
| 27 | +C2B_SHORTCODE=600496 |
| 28 | +C2B_VALIDATION_URL=https://yourdomain.com/api/c2b/validation |
| 29 | +C2B_CONFIRMATION_URL=https://yourdomain.com/api/c2b/confirmation |
| 30 | + |
| 31 | +# B2C Configuration |
| 32 | +B2C_SHORTCODE=YOUR_B2C_SHORTCODE |
| 33 | +B2C_RESULT_URL=https://yourdomain.com/api/b2c/callback/result |
| 34 | +B2C_TIMEOUT_URL=https://yourdomain.com/api/b2c/callback/timeout |
| 35 | + |
| 36 | +# B2B Configuration |
| 37 | +B2B_SHORTCODE=YOUR_B2B_SHORTCODE |
| 38 | +B2B_RESULT_URL=https://yourdomain.com/api/b2b/callback/result |
| 39 | +B2B_TIMEOUT_URL=https://yourdomain.com/api/b2b/callback/timeout |
| 40 | + |
| 41 | +# Account Balance Configuration |
| 42 | +BALANCE_SHORTCODE=YOUR_SHORTCODE |
| 43 | +BALANCE_RESULT_URL=https://yourdomain.com/api/account-balance/callback |
| 44 | +BALANCE_TIMEOUT_URL=https://yourdomain.com/api/account-balance/timeout |
| 45 | + |
| 46 | +# Transaction Status Configuration |
| 47 | +STATUS_SHORTCODE=YOUR_SHORTCODE |
| 48 | +STATUS_RESULT_URL=https://yourdomain.com/api/transaction-status/callback |
| 49 | +STATUS_TIMEOUT_URL=https://yourdomain.com/api/transaction-status/timeout |
| 50 | + |
| 51 | +# Reversal Configuration |
| 52 | +REVERSAL_RESULT_URL=https://yourdomain.com/api/reversal/callback |
| 53 | +REVERSAL_TIMEOUT_URL=https://yourdomain.com/api/reversal/timeout |
| 54 | + |
| 55 | +# Dynamic QR Configuration |
| 56 | +QR_MERCHANT_NAME=YOUR_MERCHANT_NAME |
| 57 | + |
| 58 | +# Bill Manager Configuration |
| 59 | +BILL_SHORTCODE=YOUR_BILL_SHORTCODE |
| 60 | +BILL_EMAIL=your-email@example.com |
| 61 | +BILL_OFFICIAL_CONTACT=YOUR_CONTACT |
| 62 | +BILL_CALLBACK_URL=https://yourdomain.com/api/bill-manager/callback |
| 63 | + |
| 64 | +# Redis Configuration |
| 65 | +REDIS_URL=redis://localhost:6379 |
0 commit comments