{"info":{"_postman_id":"085b1c73-9bad-4f16-9ce6-c4ecda2eadb1","name":"POKEAPAY API DEVELOPERS","description":"<html><head></head><body><p>PokeaPay API Developers</p>\n<p>INTRODUCTION\nWelcome to PokeaPay! In this release, we have developed simple and secure paymnet gateway that will enable you receive payment online, this can be websites, mobile apps, USSD app using M-Pesa and Cards. We have two types of intergrations:-</p>\n<ol>\n<li>Web based integration</li>\n<li>REST API Integration</li>\n</ol>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"1271703","collectionId":"085b1c73-9bad-4f16-9ce6-c4ecda2eadb1","publishedId":"TVzLozhd","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2021-01-05T12:10:41.000Z"},"item":[{"name":"API Integration","item":[{"name":"Authentication","item":[{"name":"Login","id":"76cdbf91-dada-4c39-9826-3f328cf0cd60","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n\t\"email\": \"jacqchumo@gmail.com\",\n\t\"password\": \"ld@3$ePa#&fdyd\"\n}","options":{"raw":{"language":"json"}}},"url":"https://saf.pokeapay.com/api/v1/login","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"e205162d-d6de-4495-b014-743b56176194","id":"e205162d-d6de-4495-b014-743b56176194","name":"Authentication","type":"folder"}},"urlObject":{"host":["https://saf.pokeapay.com/api/v1/login"],"query":[],"variable":[]}},"response":[{"id":"465c59a7-f806-4159-b927-9a7387f1b144","name":"Login Success Response","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n\t\"email\": \"XXXXXXXXXXXXX\",\n\t\"password\": \"XXXXXXXXXXXX\"\n}","options":{"raw":{"language":"json"}}},"url":"https://saf.pokeapay.com/api/v1//login"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"nginx/1.18.0 (Ubuntu)"},{"key":"Date","value":"Wed, 23 Dec 2020 13:59:53 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"286"},{"key":"Connection","value":"keep-alive"},{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"ETag","value":"W/\"11e-V5xzI88ZQNkhxmnuV5d1ZjuVFJQ\""}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"message\": \"Login successful\",\n    \"data\": {\n        \"token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySW5mbyI6eyJ1c2VySWQiOjIsInJvbGVzIjpbeyJpZCI6Miwicm9sZU5hbWUiOiJBZG1pbmlzdHJhdG9yIn1dfSwiaWF0IjoxNjA4NzMxOTkzLCJleHAiOjE2MDg3MzU1OTN9.1YUH0_2oAICeJx4yLKGzd1uN3FA2IoGHL9lnzBf8_hE\"\n    }\n}"},{"id":"b905ae11-4e87-42df-ad16-3cae0f658b10","name":"Login Error Response","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n\t\"email\": \"email\",\n\t\"password\": \"password\"\n}","options":{"raw":{"language":"json"}}},"url":"https://saf.pokeapay.com/api/v1//login"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"nginx/1.18.0 (Ubuntu)"},{"key":"Date","value":"Wed, 23 Dec 2020 14:00:59 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"70"},{"key":"Connection","value":"keep-alive"},{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"ETag","value":"W/\"46-cn0Ii30gF6i/fWEsK/YA+wbv7+I\""}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": false,\n    \"error\": \"The credentials you provided are incorrect\"\n}"}],"_postman_id":"76cdbf91-dada-4c39-9826-3f328cf0cd60"}],"id":"e205162d-d6de-4495-b014-743b56176194","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"event":[{"listen":"prerequest","script":{"type":"text/javascript","exec":[""],"id":"cecf3aac-b1fd-4204-9019-94bed5a9265b"}},{"listen":"test","script":{"type":"text/javascript","exec":[""],"id":"ce2cf953-048b-485d-a343-d63a41d163cd"}}],"_postman_id":"e205162d-d6de-4495-b014-743b56176194","description":""},{"name":"STK Push","item":[{"name":"STK Push Transaction Post","id":"ef92cbe9-85e4-4677-ac8c-94c05287006e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Accept","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"amount\": 1,\n    \"phone\": \"2547xxxxxxxx\",\n    \"callBackUrl\": \"call back url\",\n    \"outletCode\": \"outlet code\",\n    \"orderRef\": \"some_order\",\n    \"variable1\": \"v1\",\n    \"variable2\": \"v2\",\n    \"customerName\": \"customer name\",\n    \"customerEmail\": \"customer email\"\n}","options":{"raw":{"language":"json"}}},"url":"https://saf.pokeapay.com/api/v1//stkPush/transaction","urlObject":{"path":["stkPush","transaction"],"host":["https://saf.pokeapay.com/api/v1/"],"query":[],"variable":[]}},"response":[{"id":"73c846d8-4a8c-432a-b753-6983b188d82e","name":"Error","originalRequest":{"method":"POST","header":[{"key":"Authorization","value":"BFarsabdsgahbjkvasvmsa bjkgbweBBIciOiJkaXJlY3RvciBwYXJraW5nIHNlcnZpY2VzIiwibW9iaWxlX251bWJlciI6IjA3MTc4OTIwMTgiLCJ","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"amount\": 1,\n    \"phone\": \"254717892018\",\n    \"callBackUrl\": \"https://sandbox.safaricom.co.ke/mpesa/b2c/v1\",\n    \"outletCode\": \"OTC100001\",\n    \"orderRef\": \"some_order\",\n    \"variable1\": \"v1\",\n    \"variable2\": \"v2\",\n    \"customerName\": \"Bolton\",\n    \"customerEmail\": \"bolt@gmail.com\"\n}","options":{"raw":{"language":"json"}}},"url":"https://saf.pokeapay.com/api/v1//stkPush/transaction"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"nginx/1.18.0 (Ubuntu)"},{"key":"Date","value":"Wed, 23 Dec 2020 14:08:54 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"130"},{"key":"Connection","value":"keep-alive"},{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"ETag","value":"W/\"82-ipAmgA0CLML0g43D+y1Bbwtyoao\""}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"message\": \"Transaction initiated successfully\",\n    \"data\": {\n        \"orderRef\": \"some_order\",\n        \"amount\": 1,\n        \"phone\": \"254717892018\"\n    }\n}"},{"id":"7628fdd9-c0ca-4151-a05a-f367c13a4261","name":"Invalid/Missing Inputs","originalRequest":{"method":"POST","header":[{"key":"Authorization","value":"BFarsabdsgahbjkvasvmsa bjkgbweBBIciOiJkaXJlY3RvciBwYXJraW5nIHNlcnZpY2VzIiwibW9iaWxlX251bWJlciI6IjA3MTc4OTIwMTgiLCJ","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"amount\": 1,\n    \"phone\": \"254717892018\",\n    \"callBackUrl\": \"https://sandbox.safaricom.co.ke/mpesa/b2c/v1\",\n    \"outletCode\": \"OTC100001\",\n    \"orderRef\": \"some_order\",\n    \"variable1\": \"v1\",\n    \"variable2\": \"v2\",\n    \"customerName\": \"Bolton\",\n    \"customerEmail\": \"bolt@gmail.com\"\n}","options":{"raw":{"language":"json"}}},"url":"https://saf.pokeapay.com/api/v1//stkPush/transaction"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"nginx/1.18.0 (Ubuntu)"},{"key":"Date","value":"Wed, 23 Dec 2020 14:08:54 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"130"},{"key":"Connection","value":"keep-alive"},{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"ETag","value":"W/\"82-ipAmgA0CLML0g43D+y1Bbwtyoao\""}],"cookie":[],"responseTime":null,"body":"\n{\n    \"success\": false,\n    \"error\": \"\\\"phone\\\" with value \\\"2547xxxxxxxx\\\" fails to match the required pattern: /^(254(7|1)\\\\d{8})$/\",\n    \"data\": {\n        \"amount\": 1,\n        \"phone\": \"2547xxxxxxxx\",\n        \"callBackUrl\": \"call back url\",\n        \"outletCode\": \"outlet code\",\n        \"orderRef\": \"order\",\n        \"variable1\": \"v1\",\n        \"variable2\": \"v2\",\n        \"customerName\": \"customer name\",\n        \"customerEmail\": \"customer email\"\n    }\n}"},{"id":"b9ea14cc-64c0-4b07-9816-38a58abe6175","name":"Success","originalRequest":{"method":"POST","header":[{"key":"Authorization","value":"BFarsabdsgahbjkvasvmsa bjkgbweBBIciOiJkaXJlY3RvciBwYXJraW5nIHNlcnZpY2VzIiwibW9iaWxlX251bWJlciI6IjA3MTc4OTIwMTgiLCJ","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"amount\": 1,\n    \"phone\": \"2547xxxxxxxx\",\n    \"callBackUrl\": \"call back url\",\n    \"outletCode\": \"outlet code\",\n    \"orderRef\": \"order\",\n    \"variable1\": \"v1\",\n    \"variable2\": \"v2\",\n    \"customerName\": \"customer name\",\n    \"customerEmail\": \"customer email\"\n}","options":{"raw":{"language":"json"}}},"url":"https://saf.pokeapay.com/api/v1//stkPush/transaction"},"status":"Unprocessable Entity","code":422,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"nginx/1.18.0 (Ubuntu)"},{"key":"Date","value":"Wed, 23 Dec 2020 13:59:06 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"340"},{"key":"Connection","value":"keep-alive"},{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"ETag","value":"W/\"154-0StBrbD9+DAV+jjmRqLfMrmcnrM\""}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": false,\n    \"error\": \"Unableto lock subscriber, a transaction is already in process for the current subscriber\"\n}"}],"_postman_id":"ef92cbe9-85e4-4677-ac8c-94c05287006e"},{"name":"Success Transaction Callback Reponse","id":"5480b3ee-8d52-4fd5-8e6d-3a323db36657","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authorization","type":"text","value":"BFarsabdsgahbjkvasvmsa bjkgbweBBIciOiJkaXJlY3RvciBwYXJraW5nIHNlcnZpY2VzIiwibW9iaWxlX251bWJlciI6IjA3MTc4OTIwMTgiLCJ"}],"body":{"mode":"raw","raw":"{\n    \"success\": true,\n    \"message\": \"Transaction completed successfully\",\n    \"data\": {\n        \"receipt\": \"receipt\",\n        \"firstname\": \"firstname\",\n        \"middlename\": \"middlename\",\n        \"lastname\": \"lastname\",\n        \"orderRef\": \"some_order\",\n        \"amount\": 1,\n        \"phone\": \"2547xxxxxxxx\",\n        \"outletCode\": \"outlet code\",\n        \"variable1\": \"v1\",\n        \"variable2\": \"v2\"\n    }\n}","options":{"raw":{"language":"json"}}},"url":"https://saf.pokeapay.com/api/v1//your-callback-url","urlObject":{"path":["your-callback-url"],"host":["https://saf.pokeapay.com/api/v1/"],"query":[],"variable":[]}},"response":[{"id":"54eb2b08-a232-4c7d-95c8-f9d2c88b195e","name":"Error","originalRequest":{"method":"POST","header":[{"key":"Authorization","value":"BFarsabdsgahbjkvasvmsa bjkgbweBBIciOiJkaXJlY3RvciBwYXJraW5nIHNlcnZpY2VzIiwibW9iaWxlX251bWJlciI6IjA3MTc4OTIwMTgiLCJ","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"amount\": 1,\n    \"phone\": \"2547xxxxxxxx\",\n    \"callBackUrl\": \"call back url\",\n    \"outletCode\": \"outlet code\",\n    \"orderRef\": \"order\",\n    \"variable1\": \"v1\",\n    \"variable2\": \"v2\",\n    \"customerName\": \"customer name\",\n    \"customerEmail\": \"customer email\"\n}","options":{"raw":{"language":"json"}}},"url":"https://saf.pokeapay.com/api/v1//stkPush/transaction"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"nginx/1.18.0 (Ubuntu)"},{"key":"Date","value":"Wed, 23 Dec 2020 14:08:54 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"130"},{"key":"Connection","value":"keep-alive"},{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"ETag","value":"W/\"82-ipAmgA0CLML0g43D+y1Bbwtyoao\""}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": false,\n    \"error\": \"Unableto lock subscriber, a transaction is already in process for the current subscriber\"\n}"},{"id":"7f18d77f-2e1c-47fa-a106-9f3c47fd9637","name":"Success","originalRequest":{"method":"POST","header":[{"key":"Authorization","value":"BFarsabdsgahbjkvasvmsa bjkgbweBBIciOiJkaXJlY3RvciBwYXJraW5nIHNlcnZpY2VzIiwibW9iaWxlX251bWJlciI6IjA3MTc4OTIwMTgiLCJ","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"amount\": 1,\n    \"phone\": \"2547xxxxxxxx\",\n    \"callBackUrl\": \"call back url\",\n    \"outletCode\": \"outlet code\",\n    \"orderRef\": \"some_order\",\n    \"variable1\": \"v1\",\n    \"variable2\": \"v2\",\n    \"customerName\": \"customer name\",\n    \"customerEmail\": \"customer email\"\n}","options":{"raw":{"language":"json"}}},"url":"https://saf.pokeapay.com/api/v1//stkPush/transaction"},"status":"Ok","code":200,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"nginx/1.18.0 (Ubuntu)"},{"key":"Date","value":"Wed, 23 Dec 2020 13:59:06 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"340"},{"key":"Connection","value":"keep-alive"},{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"ETag","value":"W/\"154-0StBrbD9+DAV+jjmRqLfMrmcnrM\""}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"message\": \"Transaction initiated successfully\",\n    \"data\": {\n        \"orderRef\": \"some_order\",\n        \"amount\": 1,\n        \"phone\": \"2547xxxxxx\"\n    }\n}"},{"id":"9c7a090d-9cf1-4048-95cf-a766e2f7e5a7","name":"Invalid/Missing Inputs","originalRequest":{"method":"POST","header":[{"key":"Authorization","value":"BFarsabdsgahbjkvasvmsa bjkgbweBBIciOiJkaXJlY3RvciBwYXJraW5nIHNlcnZpY2VzIiwibW9iaWxlX251bWJlciI6IjA3MTc4OTIwMTgiLCJ","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"amount\": 1,\n    \"phone\": \"2547xxxxxxxx\",\n    \"callBackUrl\": \"call back url\",\n    \"outletCode\": \"outlet code\",\n    \"orderRef\": \"order\",\n    \"variable1\": \"v1\",\n    \"variable2\": \"v2\",\n    \"customerName\": \"customer name\",\n    \"customerEmail\": \"customer email\"\n}","options":{"raw":{"language":"json"}}},"url":"https://saf.pokeapay.com/api/v1//stkPush/transaction"},"status":"Unprossed Entity","code":422,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"nginx/1.18.0 (Ubuntu)"},{"key":"Date","value":"Wed, 23 Dec 2020 14:08:54 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"130"},{"key":"Connection","value":"keep-alive"},{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"ETag","value":"W/\"82-ipAmgA0CLML0g43D+y1Bbwtyoao\""}],"cookie":[],"responseTime":null,"body":"\n{\n    \"success\": false,\n    \"error\": \"\\\"phone\\\" with value \\\"2547xxxxxxxx\\\" fails to match the required pattern: /^(254(7|1)\\\\d{8})$/\",\n    \"data\": {\n        \"amount\": 1,\n        \"phone\": \"2547xxxxxxxx\",\n        \"callBackUrl\": \"call back url\",\n        \"outletCode\": \"outlet code\",\n        \"orderRef\": \"order\",\n        \"variable1\": \"v1\",\n        \"variable2\": \"v2\",\n        \"customerName\": \"customer name\",\n        \"customerEmail\": \"customer email\"\n    }\n}"}],"_postman_id":"5480b3ee-8d52-4fd5-8e6d-3a323db36657"},{"name":"Failed Transaction Callback Reponse","id":"94c948bd-ecfa-4102-890a-cb354cbcf4d5","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authorization","type":"text","value":"BFarsabdsgahbjkvasvmsa bjkgbweBBIciOiJkaXJlY3RvciBwYXJraW5nIHNlcnZpY2VzIiwibW9iaWxlX251bWJlciI6IjA3MTc4OTIwMTgiLCJ"}],"body":{"mode":"raw","raw":"{\n    \"success\": false,\n    \"message\": \"Failed Reason\",\n    \"data\": {\n        \"orderRef\": \"some_order\",\n        \"amount\": 1,\n        \"phone\": \"2547xxxxxxxx\",\n        \"outletCode\": \"outlet code\",\n        \"variable1\": \"v1\",\n        \"variable2\": \"v2\"\n    }\n}","options":{"raw":{"language":"json"}}},"url":"https://saf.pokeapay.com/api/v1//your-callback-url","urlObject":{"path":["your-callback-url"],"host":["https://saf.pokeapay.com/api/v1/"],"query":[],"variable":[]}},"response":[{"id":"4be71b43-097e-4887-9996-2e12785398bd","name":"Success","originalRequest":{"method":"POST","header":[{"key":"Authorization","value":"BFarsabdsgahbjkvasvmsa bjkgbweBBIciOiJkaXJlY3RvciBwYXJraW5nIHNlcnZpY2VzIiwibW9iaWxlX251bWJlciI6IjA3MTc4OTIwMTgiLCJ","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"amount\": 1,\n    \"phone\": \"2547xxxxxxxx\",\n    \"callBackUrl\": \"call back url\",\n    \"outletCode\": \"outlet code\",\n    \"orderRef\": \"some_order\",\n    \"variable1\": \"v1\",\n    \"variable2\": \"v2\",\n    \"customerName\": \"customer name\",\n    \"customerEmail\": \"customer email\"\n}","options":{"raw":{"language":"json"}}},"url":"https://saf.pokeapay.com/api/v1//stkPush/transaction"},"status":"Ok","code":200,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"nginx/1.18.0 (Ubuntu)"},{"key":"Date","value":"Wed, 23 Dec 2020 13:59:06 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"340"},{"key":"Connection","value":"keep-alive"},{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"ETag","value":"W/\"154-0StBrbD9+DAV+jjmRqLfMrmcnrM\""}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"message\": \"Transaction initiated successfully\",\n    \"data\": {\n        \"orderRef\": \"some_order\",\n        \"amount\": 1,\n        \"phone\": \"2547xxxxxx\"\n    }\n}"},{"id":"94d5a780-fa7a-40e4-85ab-c1dcfa3411b2","name":"Error","originalRequest":{"method":"POST","header":[{"key":"Authorization","value":"BFarsabdsgahbjkvasvmsa bjkgbweBBIciOiJkaXJlY3RvciBwYXJraW5nIHNlcnZpY2VzIiwibW9iaWxlX251bWJlciI6IjA3MTc4OTIwMTgiLCJ","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"amount\": 1,\n    \"phone\": \"2547xxxxxxxx\",\n    \"callBackUrl\": \"call back url\",\n    \"outletCode\": \"outlet code\",\n    \"orderRef\": \"order\",\n    \"variable1\": \"v1\",\n    \"variable2\": \"v2\",\n    \"customerName\": \"customer name\",\n    \"customerEmail\": \"customer email\"\n}","options":{"raw":{"language":"json"}}},"url":"https://saf.pokeapay.com/api/v1//stkPush/transaction"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"nginx/1.18.0 (Ubuntu)"},{"key":"Date","value":"Wed, 23 Dec 2020 14:08:54 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"130"},{"key":"Connection","value":"keep-alive"},{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"ETag","value":"W/\"82-ipAmgA0CLML0g43D+y1Bbwtyoao\""}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": false,\n    \"error\": \"Unableto lock subscriber, a transaction is already in process for the current subscriber\"\n}"},{"id":"c20970fd-0b11-4e5f-a68c-daacb21cac1e","name":"Invalid/Missing Inputs","originalRequest":{"method":"POST","header":[{"key":"Authorization","value":"BFarsabdsgahbjkvasvmsa bjkgbweBBIciOiJkaXJlY3RvciBwYXJraW5nIHNlcnZpY2VzIiwibW9iaWxlX251bWJlciI6IjA3MTc4OTIwMTgiLCJ","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"amount\": 1,\n    \"phone\": \"2547xxxxxxxx\",\n    \"callBackUrl\": \"call back url\",\n    \"outletCode\": \"outlet code\",\n    \"orderRef\": \"order\",\n    \"variable1\": \"v1\",\n    \"variable2\": \"v2\",\n    \"customerName\": \"customer name\",\n    \"customerEmail\": \"customer email\"\n}","options":{"raw":{"language":"json"}}},"url":"https://saf.pokeapay.com/api/v1//stkPush/transaction"},"status":"Unprossed Entity","code":422,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"nginx/1.18.0 (Ubuntu)"},{"key":"Date","value":"Wed, 23 Dec 2020 14:08:54 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"130"},{"key":"Connection","value":"keep-alive"},{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"ETag","value":"W/\"82-ipAmgA0CLML0g43D+y1Bbwtyoao\""}],"cookie":[],"responseTime":null,"body":"\n{\n    \"success\": false,\n    \"error\": \"\\\"phone\\\" with value \\\"2547xxxxxxxx\\\" fails to match the required pattern: /^(254(7|1)\\\\d{8})$/\",\n    \"data\": {\n        \"amount\": 1,\n        \"phone\": \"2547xxxxxxxx\",\n        \"callBackUrl\": \"call back url\",\n        \"outletCode\": \"outlet code\",\n        \"orderRef\": \"order\",\n        \"variable1\": \"v1\",\n        \"variable2\": \"v2\",\n        \"customerName\": \"customer name\",\n        \"customerEmail\": \"customer email\"\n    }\n}"}],"_postman_id":"94c948bd-ecfa-4102-890a-cb354cbcf4d5"},{"name":"Transaction Query","id":"11a33ca4-e849-45b4-9e61-cd07a30dc9f3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authorization","type":"text","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySW5mbyI6eyJ1c2VySWQiOjUsInJvbGVzIjpbXX0sImlhdCI6MTY0OTY4MTI5MywiZXhwIjoxNjQ5Njg0ODkzfQ.vZ5j-n0pNjXeglAvHrEkY1ZpHNzr0CDnArgnph5QGYs"}],"body":{"mode":"raw","raw":"{\n    \"amount\": 1,\n    \"phone\": \"254722705138\",\n    \"outletCode\": \"OTC8\",\n    \"orderRef\": \"some_order\"\n}","options":{"raw":{"language":"json"}}},"url":"https://saf.pokeapay.com/api/v1/transaction/query","urlObject":{"protocol":"https","path":["api","v1","transaction","query"],"host":["saf","pokeapay","com"],"query":[],"variable":[]}},"response":[{"id":"495abf25-dfd7-4998-9bb7-fbd9d3fe493b","name":"Error","originalRequest":{"method":"POST","header":[{"key":"Authorization","value":"BFarsabdsgahbjkvasvmsa bjkgbweBBIciOiJkaXJlY3RvciBwYXJraW5nIHNlcnZpY2VzIiwibW9iaWxlX251bWJlciI6IjA3MTc4OTIwMTgiLCJ","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"amount\": 1,\n    \"phone\": \"2547xxxxxxxx\",\n    \"callBackUrl\": \"call back url\",\n    \"outletCode\": \"outlet code\",\n    \"orderRef\": \"order\",\n    \"variable1\": \"v1\",\n    \"variable2\": \"v2\",\n    \"customerName\": \"customer name\",\n    \"customerEmail\": \"customer email\"\n}","options":{"raw":{"language":"json"}}},"url":"https://saf.pokeapay.com/api/v1//stkPush/transaction"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"nginx/1.18.0 (Ubuntu)"},{"key":"Date","value":"Wed, 23 Dec 2020 14:08:54 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"130"},{"key":"Connection","value":"keep-alive"},{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"ETag","value":"W/\"82-ipAmgA0CLML0g43D+y1Bbwtyoao\""}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": false,\n    \"error\": \"Unableto lock subscriber, a transaction is already in process for the current subscriber\"\n}"},{"id":"be6558ab-c7f4-4806-82cb-dc34246adec9","name":"Invalid/Missing Inputs","originalRequest":{"method":"POST","header":[{"key":"Authorization","value":"BFarsabdsgahbjkvasvmsa bjkgbweBBIciOiJkaXJlY3RvciBwYXJraW5nIHNlcnZpY2VzIiwibW9iaWxlX251bWJlciI6IjA3MTc4OTIwMTgiLCJ","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"amount\": 1,\n    \"phone\": \"2547xxxxxxxx\",\n    \"callBackUrl\": \"call back url\",\n    \"outletCode\": \"outlet code\",\n    \"orderRef\": \"order\",\n    \"variable1\": \"v1\",\n    \"variable2\": \"v2\",\n    \"customerName\": \"customer name\",\n    \"customerEmail\": \"customer email\"\n}","options":{"raw":{"language":"json"}}},"url":"https://saf.pokeapay.com/api/v1//stkPush/transaction"},"status":"Unprossed Entity","code":422,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"nginx/1.18.0 (Ubuntu)"},{"key":"Date","value":"Wed, 23 Dec 2020 14:08:54 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"130"},{"key":"Connection","value":"keep-alive"},{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"ETag","value":"W/\"82-ipAmgA0CLML0g43D+y1Bbwtyoao\""}],"cookie":[],"responseTime":null,"body":"\n{\n    \"success\": false,\n    \"error\": \"\\\"phone\\\" with value \\\"2547xxxxxxxx\\\" fails to match the required pattern: /^(254(7|1)\\\\d{8})$/\",\n    \"data\": {\n        \"amount\": 1,\n        \"phone\": \"2547xxxxxxxx\",\n        \"callBackUrl\": \"call back url\",\n        \"outletCode\": \"outlet code\",\n        \"orderRef\": \"order\",\n        \"variable1\": \"v1\",\n        \"variable2\": \"v2\",\n        \"customerName\": \"customer name\",\n        \"customerEmail\": \"customer email\"\n    }\n}"},{"id":"cac04ec4-e4f1-4f7c-aee3-f723bdafe9c8","name":"stkPush Transaction POST Success","originalRequest":{"method":"POST","header":[{"key":"Authorization","value":"BFarsabdsgahbjkvasvmsa bjkgbweBBIciOiJkaXJlY3RvciBwYXJraW5nIHNlcnZpY2VzIiwibW9iaWxlX251bWJlciI6IjA3MTc4OTIwMTgiLCJ","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"amount\": 1,\n    \"phone\": \"2547xxxxxxxx\",\n    \"callBackUrl\": \"call back url\",\n    \"outletCode\": \"outlet code\",\n    \"orderRef\": \"some_order\",\n    \"variable1\": \"v1\",\n    \"variable2\": \"v2\",\n    \"customerName\": \"customer name\",\n    \"customerEmail\": \"customer email\"\n}","options":{"raw":{"language":"json"}}},"url":"https://saf.pokeapay.com/api/v1//stkPush/transaction"},"status":"Ok","code":200,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"nginx/1.18.0 (Ubuntu)"},{"key":"Date","value":"Wed, 23 Dec 2020 13:59:06 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"340"},{"key":"Connection","value":"keep-alive"},{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"ETag","value":"W/\"154-0StBrbD9+DAV+jjmRqLfMrmcnrM\""}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"message\": \"Transaction initiated successfully\",\n    \"data\": {\n        \"orderRef\": \"some_order\",\n        \"amount\": 1,\n        \"phone\": \"2547xxxxxx\"\n    }\n}"},{"id":"f07460d9-9472-46a9-bbdd-18d835196f4b","name":"Transaction Query Success","originalRequest":{"method":"POST","header":[{"key":"Authorization","type":"text","value":"BFarsabdsgahbjkvasvmsa bjkgbweBBIciOiJkaXJlY3RvciBwYXJraW5nIHNlcnZpY2VzIiwibW9iaWxlX251bWJlciI6IjA3MTc4OTIwMTgiLCJ"}],"body":{"mode":"raw","raw":"{\n    \"amount\": 1,\n    \"phone\": \"2547xxxxxxxx\",\n    \"outletCode\": \"outlet code\",\n    \"orderRef\": \"some_order\"\n}","options":{"raw":{"language":"json"}}},"url":"https://saf.pokeapay.com/api/v1//transaction/query"},"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"message\": \"Transaction completed successfully\",\n    \"data\": {\n        \"receipt\": \"receipt\",\n        \"firstname\": \"firstname\",\n        \"middlename\": \"middlename\",\n        \"lastname\": \"lastname\",\n        \"orderRef\": \"some_order\",\n        \"amount\": 1,\n        \"phone\": \"2547xxxxxxxx\",\n        \"outletCode\": \"outlet code\",\n        \"variable1\": \"v1\",\n        \"variable2\": \"v2\"\n    }\n}"}],"_postman_id":"11a33ca4-e849-45b4-9e61-cd07a30dc9f3"}],"id":"c0b87cd0-fc9a-4394-bafb-79fa1947e47a","event":[{"listen":"prerequest","script":{"type":"text/javascript","exec":[""],"id":"36675d1a-c7b2-4fc2-a396-f6d8a5999251"}},{"listen":"test","script":{"type":"text/javascript","exec":[""],"id":"cbe2eaf9-4675-44c2-9378-136c8c645ab9"}}],"_postman_id":"c0b87cd0-fc9a-4394-bafb-79fa1947e47a","description":""}],"id":"32568a07-2e2e-43f7-934f-85828cbfc111","description":"<p>Rest Api </p>\n","event":[{"listen":"prerequest","script":{"id":"4dcd28b0-bbf1-48ca-b4f0-ceedc54e291c","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"ab1333e0-8795-46f3-9de8-5aa4d76269e1","type":"text/javascript","exec":[""]}}],"_postman_id":"32568a07-2e2e-43f7-934f-85828cbfc111"},{"name":"Payment Gateway Integration","item":[{"name":"Checkout ","id":"2331894e-98ef-40f4-823b-dd7b864b0262","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"formdata","formdata":[{"description":"<p>outlet code assigned by pokeapay.(UPPERCASE ACCEPTED ONLY)</p>\n","key":"oc","type":"text","value":"OCT00001"},{"description":"<p>LIVE or DEMO mode (1 or 0). “1” By Default (live)</p>\n","key":"live","type":"text","value":"1"},{"description":"<p>Customer name</p>\n","key":"cn","type":"text","value":"John Doe"},{"description":"<p>Customer email addresss</p>\n","key":"eml","type":"text","value":"john@email.com"},{"description":"<p>Customer Telephone number</p>\n","key":"tel","type":"text","value":"254722 XXX XXX"},{"description":"<p>Currency Type (KES) * KES By Default</p>\n","key":"curr","type":"text","value":"KES"},{"description":"<p>Order Reference or OrderID</p>\n","key":"oref","type":"text","value":"11"},{"description":"<p>This parameter holds the value of the URL on your server to which wigoPay will send back payment status.</p>\n","key":"cb","type":"text","value":"http://examplecallback.com"},{"description":"<p>Order total amount (DO NOT PASS any commas as a thousands separator). e.g. amt=1234.00 and NOT amt=1,234.00</p>\n","key":"amt","type":"text","value":"1"},{"description":"<p> Generated Hashed string</p>\n","key":"hsh","type":"text","value":"e8e66bedc4826ead9fb41d09aef8ebc2c13f27c1"},{"description":"<p>Optional field. allows sending &amp; receiving your custom variables</p>\n","key":"v1","type":"text","value":""},{"description":"<p>Optional field. allows sending &amp; receiving your custom variables</p>\n","key":"v2","type":"text","value":""}]},"url":"https://pay.pokeapay.com/","description":"<h4>Generate Hash Variable</h4>\n<p>We need to generate the hash signature id that is to be sent to the PokeaPay system for authentication against the transaction values that are also to be received on the same URL call.</p>\n\n<p>We are using the hash_hmac function in PHP to digitally sign the transaction data.</p>\n\n<p>Here is a PHP example below: There are two important parameters that are required by this function.</p>\n<p>The string to be hashed - $datastring - this string is composed of <strong>SELECT</strong> the parameters you are passing to PokeaPay in the following CONCATENATED format. The order of the transaction variables is VERY IMPORTANT and MUST be followed. There are NO SPACES between the different values below.</p>\n\n<h4>Sample PHP hashing</h4>\n<hr />\n<code>\n$data_string =$live. $oref .$amount.$phone.$email.$outlet_code;<br />\n$hash = hash_hmac('sha1', $data_string,$hash_key);<br />\n</code>\n<br />\n\n","urlObject":{"protocol":"https","path":[""],"host":["pay","pokeapay","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"2331894e-98ef-40f4-823b-dd7b864b0262"},{"name":"HTTP Call back response / Return URL","id":"cd511402-7382-45af-a883-e9be58ad0817","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"www.website.co.ke/returnpage/?oref=23&hsh=aei7p7yrx4ae34&type=m&amount=100&sstatus=1","description":"<p>These parameters will be sent back to your website via your return URL, using the GET method after successful payment.</p>\n<h5>These parameter are:</h5>\n<p>1).oref=11 : Order Reference or OrderID passed at checkout.</p>\n<p>2).hsh=aei7p7yrx4ae34 :generated hashed form concatinated string oref and outlet code.\n<code>\n$data_string=$oref.$outlet<br />\n$generated_hash = hash_hmac('sha1',$datastring , $hashkey);\n</code>\n</p>\n<p>3).status=1 :1-paid ,0-pending.</p>\n<p>4).type=m :m-m-pesa ,c-card.</p>\n<p>5).amount=100:amount paid by the customer</p>\n<br />\n<h3>example of return url</h3>\n<code>www.website.co.ke/returnpage/?oref=23&amp;hsh=aei7p7yrx4ae34&amp;type=m&amp;amount=100&amp;status=1</code>","urlObject":{"path":["returnpage",""],"host":["www","website","co","ke"],"query":[{"key":"oref","value":"23"},{"key":"hsh","value":"aei7p7yrx4ae34"},{"key":"type","value":"m"},{"key":"amount","value":"100"},{"key":"sstatus","value":"1"}],"variable":[]}},"response":[],"_postman_id":"cd511402-7382-45af-a883-e9be58ad0817"},{"name":"Payment Verification","id":"03638842-b3a6-4af8-8fab-a031c09c25d1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"raw","raw":""},"url":"https://core.pokeapay.com/api/payment/status?amount=10&hash=easddd&type=m&bill_ref=949&oc=OTC100014","description":"<p>The variables that wiGopay returns on Callback :</p>\n<p>(a) The status variable has the following possible values:-</p>\n<p>ccc0377a8afbf50e7094f5c23a8af223 = Failed transaction. Not all parameters fulfilled. A notification of this transaction sent to the merchant.</p>\n\n<p>c4812ee2b789226193ad2511495fa559 = Success: The transaction is valid. Therefore you can update this transaction.</p>\n\n<p>c69f06e1a9b016d133907b4e5f5864d2 = Pending: Incoming Mobile Money Transaction Not found. Please try again in 5 minutes.&lt;.p&gt;\n\n\n</p><p>(b) oref =order Reference or orderID.</p>\n","urlObject":{"protocol":"https","path":["api","payment","status"],"host":["core","pokeapay","com"],"query":[{"key":"amount","value":"10"},{"key":"hash","value":"easddd"},{"key":"type","value":"m"},{"key":"bill_ref","value":"949"},{"key":"oc","value":"OTC100014"}],"variable":[]}},"response":[],"_postman_id":"03638842-b3a6-4af8-8fab-a031c09c25d1"}],"id":"e9f47eb3-a4f5-42c7-bcde-99c9362d0b99","description":"<p>Web Based Integration\nCustomer checks out from merchant website and selects PokeaPay as the preferred payment method\nCustomer is redirected to the PokeaPay payment gateway where they will be presented with an interface containing the various payment channels.\nThe customer selects mode of payment, follows the instructions and pays.\nIf the transaction has successfully been processed customer is redirected to the merchants website through Callback URL. During the redirected PokeaPay send payment status to Callback URL</p>\n","_postman_id":"e9f47eb3-a4f5-42c7-bcde-99c9362d0b99"},{"name":"IPN","item":[{"name":"Instant Payment Notication","id":"bd201569-5ef3-412c-a2d3-362e2c4b071b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n     \"billreference\":\"\",\r\n     \"amount\":\"\",\r\n     \"accountname\":\"\",\r\n     \"accountno\":\"\",\r\n     \"fees\":\"\",\r\n     \"referenceno\":\"\",\r\n     \"method\":\"\"\r\n}","options":{"raw":{"language":"json"}}},"url":"https://youcallbackurl","urlObject":{"protocol":"https","host":["youcallbackurl"],"query":[],"variable":[]}},"response":[],"_postman_id":"bd201569-5ef3-412c-a2d3-362e2c4b071b"}],"id":"8f2441b9-003a-4837-bf18-d269b5a57623","_postman_id":"8f2441b9-003a-4837-bf18-d269b5a57623","description":""}],"event":[{"listen":"prerequest","script":{"id":"7359d06d-cd27-4ee5-a00c-506564399599","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"c8b14905-fa5c-418e-b2f4-1118b6fbde79","type":"text/javascript","exec":[""]}}],"variable":[{"key":"URL","value":"https://saf.pokeapay.com/api/v1/","type":"string"}]}