{"info":{"_postman_id":"9a42ecaf-c8a9-4097-a520-901ddb3063c8","name":"MPESA PLUGIN FOR APPGINI","description":"<html><head></head><body><img src=\"https://content.pstmn.io/74623a7d-012f-44f0-9345-3230a712ff9d/bXBlc2EucG5n\" alt=\"\">\n\n<p>Welcome to the <strong>MPESA for Appgini Plugin</strong>. This plugin will enable you easily integrate MPESA into your Appgini application. It has easy to use and well documented APIs, to use across your hosted application.</p>\n<p><strong>NB: This is a third party plugin not provided by or endorsed by BigProf Software.</strong></p>\n<h2 id=\"getting-started\"><strong>Getting Started</strong></h2>\n<p>After purchasing the plugin you will have to extract it inside the <strong>plugins</strong> folder of your Appgini application, you must have at least one official plugin from Appgini installed for you to have the plugins folder .</p>\n<h3 id=\"setting-up\">Setting Up</h3>\n<p>After extracting the plugin, inside the <strong>mobilemoney</strong> folder, find a folder named <strong>credentials</strong> in this folder you will find two JSON files named <strong>b2c.json</strong> and <strong>c2b.json</strong></p>\n<p>In the above named files you will find JSON fields to provide the required MPESA API credentials for each file. Your credentials are safe and can not be directly accessed from the browser.</p>\n<p>In each of the files you will find a field called <strong>callback_secret</strong></p>\n<p>You will have to provide a unique secret of your choice that will be used when initiating your APIs as shown in the documantations.</p>\n<h4 id=\"endpoint-urls\">Endpoint URLs</h4>\n<p>For all endpoint URLS provided here, you will have to replace <strong>http://localhost/nwapp/</strong> With your actual application URL path.</p>\n<p>Incase of any challanges Reach out to me via <strong>+254708344101 or <a href=\"mailto:ronniengoda@gmail.com\">ronniengoda@gmail.com</a></strong></p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"8153370","collectionId":"9a42ecaf-c8a9-4097-a520-901ddb3063c8","publishedId":"2s8YszQqfv","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2022-11-30T13:09:37.000Z"},"item":[{"name":"C2B: Register URLs","id":"344e46c1-d6c5-4dc1-a3b5-8e29a9058660","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost/nwapp/plugins/mobilemoney/c2b.php?action=register&callback_secret=Your Callback Secret","description":"<p>Use this API to register your C2B URLs, simply hit your endpoint URL and provide the action parameter and the callback_secret.</p>\n<p>The required URLS are saved in credentials/c2b.json</p>\n<p>You will have to provide correct URLS.</p>\n<p>Below is a guide for the c2b URLs:</p>\n<ol>\n<li><strong>validation_url</strong></li>\n</ol>\n<p>This you will have it pointed to : <strong>{yourapplicationURL}</strong>/plugins/mobilemoney/c2b.php?action=validate</p>\n<p>Replace: {yourapplicationURL} with your actual application path URL</p>\n<p><strong>2. confirmation_url</strong></p>\n<p>This you will have it pointed to : <strong>{yourapplicationURL}</strong>/plugins/mobilemoney/c2b.php?action=confirm</p>\n<p>Replace: {yourapplicationURL} with your actual application path URL</p>\n<p><strong>3. callback_url</strong></p>\n<p>This you will have it pointed to : <strong>{yourapplicationURL}</strong>/plugins/mobilemoney/c2bcallback.php</p>\n<p>Replace: {yourapplicationURL} with your actual application path URL</p>\n<p><strong>4. timeout_url</strong></p>\n<p>This you will have it pointed to : <strong>{yourapplicationURL}</strong>/plugins/mobilemoney/c2b.php?action=timeout</p>\n<p>Replace: {yourapplicationURL} with your actual application path URL</p>\n<p><strong>5. results_url</strong></p>\n<p>This you will have it pointed to : <strong>{yourapplicationURL}</strong>/plugins/mobilemoney/c2bcallback.php</p>\n<p>Replace: {yourapplicationURL} with your actual application path URL</p>\n","urlObject":{"path":["mobilemoney","c2b.php"],"host":["http://localhost/nwapp/plugins"],"query":[{"key":"action","value":"register"},{"key":"callback_secret","value":"Your Callback Secret"}],"variable":[]}},"response":[],"_postman_id":"344e46c1-d6c5-4dc1-a3b5-8e29a9058660"},{"name":"C2B: Send STK Push Request","id":"648f2e35-7eb8-4344-98bb-30af1243cbdc","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost/nwapp/plugins/mobilemoney/c2b.php?action=push&callback_secret=Your callback secret&phone=0700000000&amount=10&reference=123456","description":"<p>Use this API to initiate MPESA STK push request to a customer registered phone number.</p>\n<p>Simply provide:</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Key</strong></th>\n<th><strong>Value Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>action</td>\n<td>push</td>\n</tr>\n<tr>\n<td>callback_secret</td>\n<td>Your callback secret provided in the c2b.json file in the credentials folder</td>\n</tr>\n<tr>\n<td>phone</td>\n<td>customer MPESA registered phone number</td>\n</tr>\n<tr>\n<td>amount</td>\n<td>amount to be paid</td>\n</tr>\n<tr>\n<td>reference</td>\n<td>payment reference PR account number</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"path":["mobilemoney","c2b.php"],"host":["http://localhost/nwapp/plugins"],"query":[{"key":"action","value":"push"},{"key":"callback_secret","value":"Your callback secret"},{"key":"phone","value":"0700000000"},{"key":"amount","value":"10"},{"key":"reference","value":"123456"}],"variable":[]}},"response":[],"_postman_id":"648f2e35-7eb8-4344-98bb-30af1243cbdc"},{"name":"C2B: Simulation Request","id":"11fa2b00-b3ca-467a-8581-f36c1f1e701b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost/nwapp/plugins/mobilemoney/c2b.php?action=simulate&callback_secret=your callback secret&phone=0700000000&amount=10&reference=1738","description":"<p>Use this API to simulate a C2B request. Simply hit the endpoint and provide the following parameters.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Key</strong></th>\n<th><strong>Value description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>action</td>\n<td>simulate</td>\n</tr>\n<tr>\n<td>callback_secret</td>\n<td>your callback secret provided in the credentials c2b.json</td>\n</tr>\n<tr>\n<td>phone</td>\n<td>customer MPESA registered phone number</td>\n</tr>\n<tr>\n<td>amount</td>\n<td>amount to be paid</td>\n</tr>\n<tr>\n<td>reference</td>\n<td>payment reference or account number</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"path":["mobilemoney","c2b.php"],"host":["http://localhost/nwapp/plugins"],"query":[{"key":"action","value":"simulate"},{"key":"callback_secret","value":"your callback secret"},{"key":"phone","value":"0700000000"},{"key":"amount","value":"10"},{"key":"reference","value":"1738"}],"variable":[]}},"response":[],"_postman_id":"11fa2b00-b3ca-467a-8581-f36c1f1e701b"},{"name":"B2C: Send Money","id":"f95ece76-a6a3-45e0-b1c4-8c3e4aeaa0f5","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost/nwapp/plugins/mobilemoney/b2c.php?action=send&callback_secret=your callback secret&phone=0700000000&amount=200","description":"<p>Use this API to initiate a b2c request. B2C enables an organization to send money to a registered customer.</p>\n<p>Simply hit the endpoint and provide the following parameters.</p>\n<p>NB: In the credentials folder inside the b2c.json file you can provide <strong>{yourApplicationURL}/plugins/mobilemoney/b2ccallback.php</strong> as the value for:</p>\n<p><strong>confirmation_url</strong> parameter replace {yourApplicationURL} with your actual application URL path.</p>\n<p>EndFragment</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Key</strong></th>\n<th><strong>Value Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>action</td>\n<td>send</td>\n</tr>\n<tr>\n<td>callback_secret</td>\n<td>your provided callback secret in credentials b2c.json</td>\n</tr>\n<tr>\n<td>phone</td>\n<td>the customer MPESA phone number.</td>\n</tr>\n<tr>\n<td>amount</td>\n<td>the amount to be sent</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"path":["mobilemoney","b2c.php"],"host":["http://localhost/nwapp/plugins"],"query":[{"key":"action","value":"send"},{"key":"callback_secret","value":"your callback secret"},{"key":"phone","value":"0700000000"},{"key":"amount","value":"200"}],"variable":[]}},"response":[],"_postman_id":"f95ece76-a6a3-45e0-b1c4-8c3e4aeaa0f5"},{"name":"B2C: Balance Inquiry","id":"0f7f5f55-887c-421b-9ad7-0478f17a9c79","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost/nwapp/plugins/mobilemoney/b2c.php?action=balance&callback_secret=your callback secret","description":"<p>Use this API if you want to query your organization B2C account balances.</p>\n<p>Simply hit the endpoint and provide the following parameters:</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Key</strong></th>\n<th><strong>Value Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>action</td>\n<td>balance</td>\n</tr>\n<tr>\n<td>callback_secret</td>\n<td>The callback secret you provided in the credentials b2c.json</td>\n</tr>\n</tbody>\n</table>\n</div><p>This will trigger a request and you will receive a response in your b2c provided confirmation URL.</p>\n","urlObject":{"path":["mobilemoney","b2c.php"],"host":["http://localhost/nwapp/plugins"],"query":[{"key":"action","value":"balance"},{"key":"callback_secret","value":"your callback secret"}],"variable":[]}},"response":[],"_postman_id":"0f7f5f55-887c-421b-9ad7-0478f17a9c79"},{"name":"B2C: Transaction Status","id":"97ab0ca6-8769-4f0a-bb66-0a421ef782a2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost/nwapp/plugins/mobilemoney/b2c.php?action=status&callback_secret=your callback secret&TransactionID=QKU9YK8WBJ","description":"<p>Use this API to query the status of a transaction.</p>\n<p>Simply hit the endpoint and provide the following parameters.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Key</strong></th>\n<th><strong>Value Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>action</td>\n<td>status</td>\n</tr>\n<tr>\n<td>callback_secret</td>\n<td>Your provided secret in credentials b2c.json</td>\n</tr>\n<tr>\n<td>TransactionID</td>\n<td>The TransactionID</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"path":["mobilemoney","b2c.php"],"host":["http://localhost/nwapp/plugins"],"query":[{"key":"action","value":"status"},{"key":"callback_secret","value":"your callback secret"},{"key":"TransactionID","value":"QKU9YK8WBJ"}],"variable":[]}},"response":[],"_postman_id":"97ab0ca6-8769-4f0a-bb66-0a421ef782a2"}],"event":[{"listen":"prerequest","script":{"id":"734a6a3d-047d-410f-82d1-a973851e797f","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"645342b7-c434-4a45-bf8a-324fa11df5ef","type":"text/javascript","exec":[""]}}],"variable":[{"key":"base_url","value":"http://localhost/nwapp/","type":"string"}]}