{"info":{"_postman_id":"b23e2b92-17dd-42d6-8910-a459f5289e25","name":"Q-wallet","description":"<html><head></head><body><h4 id=\"q-wallet\">Q-wallet</h4>\n<p>Base url: Not yet available</p>\n<h4 id=\"response-format\">Response format</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"message\": [relevant message],\n  \"status\": [\"success\" or \"failed\"],\n  \"data\": {\n    [object containing relevant data]\n  }\n}\n\n</code></pre>\n<h4 id=\"common-errors\"><strong>Common errors:</strong></h4>\n<p>status code: <code>403</code></p>\n<p>description: This error is returned when the user is not authorised. Could be missing or invalid access token</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">  \"message\": \"Not allowed. Please supply a token\",,\n  \"status\": \"failed\",\n  \"data\": {\n  }\n}\n\n</code></pre>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"11384363","collectionId":"b23e2b92-17dd-42d6-8910-a459f5289e25","publishedId":"Uz5GpGGp","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2022-06-04T19:44:19.000Z"},"item":[{"name":"Get account balance","id":"27aaa446-86af-48c7-8ada-d31cdf1e8095","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"x-auth","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6Im9taWxvc2FtdWVsQGdtYWlsLmNvbSIsImlkIjoyLCJmaXJzdE5hbWUiOiJTYW11ZWwiLCJsYXN0TmFtZSI6Ik9taWxvIiwiaWF0IjoxNjU0NzAwMDYwLCJleHAiOjE2NTQ3MTgwNjB9.fKn2a2PLnCY4BJrY5QD2eyFjgt_qRq5847z5NFriuhc","type":"text"}],"url":"{{url}}/api/account/balance","description":"<p>Summary: Get wallet balance for a user</p>\n<p>Description: Use this endpoint to get the current wallet balance of the user. This should be a source of truth for the current account balance of the user</p>\n<blockquote>\n<p>Requires authentication. A valid access token should be passed with the x-auth header</p>\n</blockquote>\n<h4 id=\"requests\">Requests</h4>\n<p><strong>URL parameters</strong></p>\n<p>None</p>\n<p><strong>Request body params</strong></p>\n<p>None</p>\n<h4 id=\"responses\">Responses</h4>\n<p>status code: <code>200</code><br />description: Successfully got an account's balance</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"message\": \"Balance\",\n    \"status\": \"success\",\n    \"data\": {\n        \"balance\": 66500\n    }\n}\n\n</code></pre>\n","urlObject":{"path":["api","account","balance"],"host":["{{url}}"],"query":[],"variable":[]}},"response":[{"id":"6f69007c-a762-42de-b304-0ba83599029c","name":"Get account balance - successful","originalRequest":{"method":"GET","header":[{"key":"x-auth","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6Im9taWxvc2FtdWVsQGdtYWlsLmNvbSIsImlkIjoyLCJmaXJzdE5hbWUiOiJTYW11ZWwiLCJsYXN0TmFtZSI6Ik9taWxvIiwiaWF0IjoxNjU0NzAwMDYwLCJleHAiOjE2NTQ3MTgwNjB9.fKn2a2PLnCY4BJrY5QD2eyFjgt_qRq5847z5NFriuhc","type":"text"}],"url":"{{url}}/api/account/balance"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"65"},{"key":"ETag","value":"W/\"41-2txkUBQ8n1TBNvJJywViO7qhFPY\""},{"key":"Date","value":"Wed, 08 Jun 2022 14:57:04 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Balance\",\n    \"status\": \"success\",\n    \"data\": {\n        \"balance\": 66500\n    }\n}"}],"_postman_id":"27aaa446-86af-48c7-8ada-d31cdf1e8095"},{"name":"Make wallet transfer","id":"84d31e26-1a0e-4700-9dc8-664c54276ff8","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"x-auth","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6Im9taWxvc2FtdWVsQGdtYWlsLmNvbSIsImlkIjoyLCJmaXJzdE5hbWUiOiJTYW11ZWwiLCJsYXN0TmFtZSI6Ik9taWxvIiwiaWF0IjoxNjU0NDI4NTA2LCJleHAiOjE2NTQ0NDY1MDZ9.gsNCjww0LmWYyPdbZvDp14XBVqFr87ax8rX_Cc83v74","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"userId\": \"3\",\r\n    \"amount\": \"500\"\r\n}","options":{"raw":{"language":"json"}}},"url":"{{url}}/api/account/transfer","description":"<p>Summary: Make inter-wallet transfer</p>\n<p>Description: Use this endpoint to transfer from authenticated user's account to another user's account.</p>\n<blockquote>\n<p>Requires authentication. A valid access token should be passed with the x-auth header</p>\n</blockquote>\n<h4 id=\"request-parameters\">Request parameters</h4>\n<p><strong>URL Parameters</strong></p>\n<p>None</p>\n<p><strong>Request body</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>name</strong></th>\n<th><strong>type</strong></th>\n<th><strong>required</strong></th>\n<th><strong>validation</strong></th>\n<th><strong>description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>amount</td>\n<td>number</td>\n<td>yes</td>\n<td>a number not less than 50</td>\n<td>Amount to be transferred</td>\n</tr>\n<tr>\n<td>userId</td>\n<td>string</td>\n<td>yes</td>\n<td>Should be an actual id of a user on the platfom</td>\n<td>The Id of the user you want to transfer to</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"responses\">Responses</h4>\n<p>status code: <code>200</code></p>\n<p>description: The transfer was successful</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"message\": \"Transfer successful\",\n    \"data\": {\n        \"balance\": 65500\n    }\n}\n\n</code></pre>\n<p>status code: <code>400</code></p>\n<p>description: A client error occurred. Refer to validation above to make sure everything is correct</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"status\": \"error\",\n    \"message\": \"amount must be greater than or equal to 50\",\n    \"data\": {}\n}\n\n</code></pre>\n","urlObject":{"path":["api","account","transfer"],"host":["{{url}}"],"query":[],"variable":[]}},"response":[{"id":"f20e0cb8-455f-4e35-9509-ae627ba0f344","name":"Make wallet transfer - invalid amount","originalRequest":{"method":"POST","header":[{"key":"x-auth","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6Im9taWxvc2FtdWVsQGdtYWlsLmNvbSIsImlkIjoyLCJmaXJzdE5hbWUiOiJTYW11ZWwiLCJsYXN0TmFtZSI6Ik9taWxvIiwiaWF0IjoxNjU0NzAwMDYwLCJleHAiOjE2NTQ3MTgwNjB9.fKn2a2PLnCY4BJrY5QD2eyFjgt_qRq5847z5NFriuhc","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"userId\": \"3\",\r\n    \"amount\": \"10\"\r\n}","options":{"raw":{"language":"json"}}},"url":"{{url}}/api/account/transfer"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"83"},{"key":"ETag","value":"W/\"53-7t1SjafWehlHzOyYgDYDtPD2KT4\""},{"key":"Date","value":"Wed, 08 Jun 2022 17:48:37 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"error\",\n    \"message\": \"amount must be greater than or equal to 50\",\n    \"data\": {}\n}"},{"id":"db74cbbe-9c38-4ab5-999e-baccf0f66ae8","name":"Make wallet transfer - successful","originalRequest":{"method":"POST","header":[{"key":"x-auth","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6Im9taWxvc2FtdWVsQGdtYWlsLmNvbSIsImlkIjoyLCJmaXJzdE5hbWUiOiJTYW11ZWwiLCJsYXN0TmFtZSI6Ik9taWxvIiwiaWF0IjoxNjU0NzAwMDYwLCJleHAiOjE2NTQ3MTgwNjB9.fKn2a2PLnCY4BJrY5QD2eyFjgt_qRq5847z5NFriuhc","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"userId\": \"3\",\r\n    \"amount\": \"100\"\r\n}","options":{"raw":{"language":"json"}}},"url":"{{url}}/api/account/transfer"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"58"},{"key":"ETag","value":"W/\"3a-AMd0RrERAgWcRwTJLUJI0szTmew\""},{"key":"Date","value":"Wed, 08 Jun 2022 17:50:45 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Transfer successful\",\n    \"data\": {\n        \"balance\": 65400\n    }\n}"}],"_postman_id":"84d31e26-1a0e-4700-9dc8-664c54276ff8"},{"name":"Auth user","id":"e581e5c5-f19f-4a90-8c02-089e0120ad38","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"email\": \"samuel@gmail.com\",\n    \"password\": \"wonderful.\"\n}","options":{"raw":{"language":"json"}}},"url":"{{url}}/api/users/auth","description":"<p>Summary: Authenticate the user</p>\n<p>Description: Use this endpoint to get an access token for a user. An access token is required to make requests going forward.</p>\n<h4 id=\"request-parameters\">Request parameters</h4>\n<p><strong>URL parameters</strong></p>\n<p><em>None</em></p>\n<p><strong>Request body</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>name</strong></th>\n<th><strong>type</strong></th>\n<th><strong>description</strong></th>\n<th><strong>required</strong></th>\n<th><strong>validation</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>email</td>\n<td>string</td>\n<td>The email of the user</td>\n<td>yes</td>\n<td>standard email validation</td>\n</tr>\n<tr>\n<td>password</td>\n<td>string</td>\n<td>The password of the user</td>\n<td>yes</td>\n<td>Min of 6 characters</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"responses\">Responses</h4>\n<ul>\n<li><p>status code: <code>200</code><br />description: Successfully authenticated the user</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n\"status\": \"success\",\n\"message\": \"User auth successful\",\n\"data\": {\n    \"token\": \"[access-token]\",\n    \"user\": {\n        \"id\": [userId],\n        \"firstName\": \"[firstName]\",\n        \"lastName\": \"[lastName]\",\n        \"email\": \"[email],\n        \"phoneNumber\": \"[phoneNumber]\"\n    }\n}\n}\n\n</code></pre>\n</li>\n<li><p>status code: <code>401</code><br />description: Could not authenticate the user. Usually as a result of an invalid password</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"status\": \"failed\",\n  \"message\": \"Invalid password\",\n  \"data\": {}\n}\n\n</code></pre>\n</li>\n</ul>\n<p>```</p>\n","urlObject":{"path":["api","users","auth"],"host":["{{url}}"],"query":[],"variable":[]}},"response":[{"id":"41b8d1fe-e0f1-4d46-a9c0-71414d1a5ab3","name":"Auth user - Invalid password","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"email\": \"samuel@gmail.com\",\n    \"password\": \"wonderful?\"\n}","options":{"raw":{"language":"json"}}},"url":"{{url}}/api/users/auth"},"status":"Unauthorized","code":401,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"58"},{"key":"ETag","value":"W/\"3a-UVQ/qVFxTf+LrnFMBdlr2R29YbE\""},{"key":"Date","value":"Wed, 08 Jun 2022 14:38:01 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"failed\",\n    \"message\": \"Invalid password\",\n    \"data\": {}\n}"}],"_postman_id":"e581e5c5-f19f-4a90-8c02-089e0120ad38"},{"name":"Create user","id":"b05633a5-a743-439e-a7f3-253a8f92e25e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"url":"{{url}}/api/users","description":"<p>Summary: Create a new user</p>\n<p>Description: Use this endpoint to create a new user. This immediately creates a account/wallet for the user.</p>\n<h4 id=\"request-parameters\">Request parameters</h4>\n<p><strong>URL parameters</strong></p>\n<p><em>None</em></p>\n<p><strong>Request body</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>name</strong></th>\n<th><strong>type</strong></th>\n<th><strong>description</strong></th>\n<th><strong>required</strong></th>\n<th><strong>validation</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>email</td>\n<td>string</td>\n<td>The email of the user</td>\n<td>yes</td>\n<td>standard email validation</td>\n</tr>\n<tr>\n<td>password</td>\n<td>string</td>\n<td>The password of the user</td>\n<td>yes</td>\n<td>Min of 6 characters</td>\n</tr>\n<tr>\n<td>firstName</td>\n<td>string</td>\n<td>The first name of the user</td>\n<td>Yes</td>\n<td>Just a string</td>\n</tr>\n<tr>\n<td>lastName</td>\n<td>string</td>\n<td>The last name of the user</td>\n<td>Yes</td>\n<td>Just a string</td>\n</tr>\n<tr>\n<td>phoneNumber</td>\n<td>string</td>\n<td>The phone number of the user.</td>\n<td>yes</td>\n<td>Might be adding a min of 10 characters validation</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"responses\">Responses</h4>\n<p>status code: <code>201</code></p>\n<p>description: Successfully created a user</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"status\": \"success\",\n  \"message\": \"User created\",\n  \"data\": {\n    \"user\": {\n      \"firstName\": \"[firstName]\",\n      \"lastName\": \"[firstName]\",\n      \"email\": \"[email]\",\n      \"phoneNumber\": \"08025031902\",\n  }\n}\n\n</code></pre>\n<p>status code: <code>409</code></p>\n<p>description: User with the email already exists</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"status\": \"failed\",\n    \"message\": \"User with this email already exists\",\n    \"data\": {}\n}\n\n</code></pre>\n","urlObject":{"path":["api","users"],"host":["{{url}}"],"query":[],"variable":[]}},"response":[{"id":"146e05fb-7093-4048-a94a-bbdd10b27f94","name":"Create user - user already exists","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"email\": \"milzthe4th@gmail.com\",\n    \"password\": \"password\",\n    \"firstName\": \"Lawrence\",\n    \"lastName\": \"Tedd\",\n    \"phoneNumber\": \"08074362822\"\n}","options":{"raw":{"language":"json"}}},"url":"{{url}}/api/users"},"status":"Conflict","code":409,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"77"},{"key":"ETag","value":"W/\"4d-LFPNvJs9EiwGAD1JgQRGmRNSE9A\""},{"key":"Date","value":"Sat, 04 Jun 2022 19:32:40 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"failed\",\n    \"message\": \"User with this email already exists\",\n    \"data\": {}\n}"},{"id":"be2fb199-c093-488e-8f08-013d1f673f6d","name":"Create user - success","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"email\": \"samuel4th@gmail.com\",\n    \"password\": \"password\",\n    \"firstName\": \"Lawrence\",\n    \"lastName\": \"Tedd\",\n    \"phoneNumber\": \"27276228920\"\n}","options":{"raw":{"language":"json"}}},"url":"{{url}}/api/users"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"170"},{"key":"ETag","value":"W/\"aa-hulo+FYW2c1v5QVjoYyAvF1AKPM\""},{"key":"Date","value":"Sat, 04 Jun 2022 19:34:35 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"User created\",\n    \"status\": \"success\",\n    \"data\": {\n        \"user\": {\n            \"firstName\": \"Lawrence\",\n            \"lastName\": \"Tedd\",\n            \"email\": \"samuel4th@gmail.com\",\n            \"phoneNumber\": \"27276228920\",\n            \"id\": 5\n        }\n    }\n}"}],"_postman_id":"b05633a5-a743-439e-a7f3-253a8f92e25e"},{"name":"fund account","id":"81aa75bc-13de-4236-950a-788179b239ba","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"x-auth","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6Im9taWxvc2FtdWVsQGdtYWlsLmNvbSIsImlkIjoyLCJmaXJzdE5hbWUiOiJTYW11ZWwiLCJsYXN0TmFtZSI6Ik9taWxvIiwiaWF0IjoxNjUzMTY0Mzg3LCJleHAiOjE2NTMxODIzODd9.5r9iBmyIgB55B65kpEnEwZJirgIoNiGX5M0YchybaP4","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"amount\": 5000\n}","options":{"raw":{"language":"json"}}},"url":"localhost:3000/api/account/fund?method=card","description":"<p>Summary: fund account/wallet</p>\n<p>Description: Use this endpoint to fund an account. This endpoint uses a number of payment methods for funding.</p>\n<blockquote>\n<p>Requires authentication. A valid access token should be passed with the x-auth header</p>\n</blockquote>\n<h4 id=\"request\">Request</h4>\n<p><strong>URL query parameters</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Name</strong></th>\n<th><strong>Validation</strong></th>\n<th><strong>Type</strong></th>\n<th><strong>Required</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>method</td>\n<td>limited options. one of: transfer,</td>\n<td>string</td>\n<td>yes</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Request body</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Name</strong></th>\n<th><strong>type</strong></th>\n<th><strong>required</strong></th>\n<th><strong>validation</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>amount</td>\n<td>number</td>\n<td>yes</td>\n<td>Min of 100 Naira</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"responses\">Responses</h4>\n<p>status code: <code>200</code></p>\n<p>description: Transfer method of funding account was successful</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"message\": \"Transfer initiated. Make transfer to details\",\n    \"status\": \"success\",\n    \"data\": {\n        \"bank_account\": \"1234567890\",\n        \"bank_name\": \"TEST BANK\",\n        \"amount\": \"50000.00\"\n    }\n}\n\n</code></pre>\n<p>status code: <code>400</code></p>\n<p>describe: A client error. Please ensure all parameters and their validation is satisfied</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"status\": \"error\",\n    \"message\": \"\",\n    \"data\": {}\n}\n\n</code></pre>\n","urlObject":{"port":"3000","path":["api","account","fund"],"host":["localhost"],"query":[{"key":"method","value":"card"}],"variable":[]}},"response":[{"id":"c6e7bc06-242d-4d67-818e-dd63294ad8b8","name":"Amount must not be less than 50","originalRequest":{"method":"POST","header":[{"key":"x-auth","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6Im9taWxvc2FtdWVsQGdtYWlsLmNvbSIsImlkIjoyLCJmaXJzdE5hbWUiOiJTYW11ZWwiLCJsYXN0TmFtZSI6Ik9taWxvIiwiaWF0IjoxNjU1MDUzNDI4LCJleHAiOjE2NTUwNzE0Mjh9.vVQ625LCuizISDsMk45Cqh2mJXCeCah9kU5M15-jAIs","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"amount\": 40\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"{{url}}/api/account/fund?method=transfer","host":["{{url}}"],"path":["api","account","fund"],"query":[{"key":"method","value":"transfer"}]}},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"83"},{"key":"ETag","value":"W/\"53-7t1SjafWehlHzOyYgDYDtPD2KT4\""},{"key":"Date","value":"Sun, 12 Jun 2022 17:07:30 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"error\",\n    \"message\": \"amount must be greater than or equal to 50\",\n    \"data\": {}\n}"}],"_postman_id":"81aa75bc-13de-4236-950a-788179b239ba"},{"name":"Create beneficiary","id":"5558ed6d-cdde-4dd8-a2ba-58b44e459db1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"description":"<p>Summary: Create a beneficiary</p>\n<p>Description: Use this endpoint to create a new beneficiary. A beneficiary is a bank account that a user will like to make withdrawals to.</p>\n<h4 id=\"request-parameters\">Request parameters</h4>\n<p><strong>URL parameters</strong></p>\n<p><em>None</em></p>\n<p><strong>Request body</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>name</strong></th>\n<th><strong>type</strong></th>\n<th><strong>description</strong></th>\n<th><strong>required</strong></th>\n<th><strong>validation</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>bank_account</td>\n<td>string</td>\n<td>The bank account</td>\n<td>yes</td>\n<td>a minimum of 10 chars string. Should be an actual bank account number</td>\n</tr>\n<tr>\n<td>bank_code</td>\n<td>string</td>\n<td>The bank code</td>\n<td>yes</td>\n<td>Should be a valid bank code</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"responses\">Responses</h4>\n<p>status code: <code>201</code></p>\n<p>description: Successfully created beneficiary</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"status\": \"success\",\n    \"message\": \"Beneficiaries\",\n    \"data\": {\n        \"beneficiaries\": [\n            {\n                \"id\": \"[beneficiary-id]\",\n                \"userId\": 2,\n                \"bank_account\": \"[bank-account-number]\",\n                \"account_name\": \"[bank-account-name]\",\n                \"bank_code\": \"[bank-code]\"\n            }\n        ]\n    }\n}\n\n\n</code></pre>\n<p>status code: <code>409</code></p>\n<p>description: Beneficiary with account number already exists</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"status\": \"failed\",\n    \"message\": \"Beneficiary already exists\",\n    \"data\": {}\n}\n\n</code></pre>\n","urlObject":{"query":[],"variable":[]},"url":""},"response":[{"id":"3a774c0f-71d9-4196-8131-43db9255f497","name":"Beneficiary created","originalRequest":{"method":"POST","header":[{"key":"x-auth","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6Im9taWxvc2FtdWVsQGdtYWlsLmNvbSIsImlkIjoyLCJmaXJzdE5hbWUiOiJTYW11ZWwiLCJsYXN0TmFtZSI6Ik9taWxvIiwiaWF0IjoxNjU1MDUzNDI4LCJleHAiOjE2NTUwNzE0Mjh9.vVQ625LCuizISDsMk45Cqh2mJXCeCah9kU5M15-jAIs","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"bank_account\": \"0826783142\",\n    \"bank_code\": \"044\"\n}","options":{"raw":{"language":"json"}}},"url":"{{url}}/api/beneficiaries"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"217"},{"key":"ETag","value":"W/\"d9-d6o9GoyVAq30vzCgGungUDaTo5o\""},{"key":"Date","value":"Sun, 12 Jun 2022 17:18:54 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Beneficiary created\",\n    \"status\": \"success\",\n    \"data\": {\n        \"beneficiary\": {\n            \"userId\": 2,\n            \"bank_account\": \"0826783142\",\n            \"account_name\": \"SAMUEL TEDD\",\n            \"bank_code\": \"044\",\n            \"id\": \"70f7622a-7fa0-4779-8f91-4bc0213e206d\"\n        }\n    }\n}"}],"_postman_id":"5558ed6d-cdde-4dd8-a2ba-58b44e459db1"},{"name":"Get beneficiaries","id":"dad0dc3e-ea18-4703-b998-5340ceb7feaf","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"description":"<p>Summary: Get a user's beneficiaries</p>\n<p>Description: This is mostly required when a withdrawal is about to be made by the user. This returns the list of all beneficiaries created by user</p>\n<blockquote>\n<p>Requires authentication. A valid access token should be passed with the x-auth header</p>\n</blockquote>\n<h4 id=\"requests\">Requests</h4>\n<p><strong>URL parameters</strong></p>\n<p>None</p>\n<p><strong>Request body params</strong></p>\n<p>None</p>\n<h4 id=\"responses\">Responses</h4>\n<p>status code: <code>200</code><br />description: Successfully got all beneficiaries</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"status\": \"success\",\n    \"message\": \"Beneficiaries\",\n    \"data\": {\n        \"beneficiaries\": [\n            {\n                \"id\": \"[beneficiary-id]\",\n                \"userId\": 2,\n                \"bank_account\": \"[bank-account-number]\",\n                \"account_name\": \"[bank-account-name]\",\n                \"bank_code\": \"[bank-code]\"\n            }\n        ]\n    }\n}\n\n</code></pre>\n","urlObject":{"query":[],"variable":[]},"url":""},"response":[{"id":"29631332-6557-4c86-98a3-dec1f69ae38c","name":"Get all beneficiaries","originalRequest":{"method":"GET","header":[{"key":"x-auth","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6Im9taWxvc2FtdWVsQGdtYWlsLmNvbSIsImlkIjoyLCJmaXJzdE5hbWUiOiJTYW11ZWwiLCJsYXN0TmFtZSI6Ik9taWxvIiwiaWF0IjoxNjU1MDUzNDI4LCJleHAiOjE2NTUwNzE0Mjh9.vVQ625LCuizISDsMk45Cqh2mJXCeCah9kU5M15-jAIs","type":"text"}],"url":"{{url}}/api/beneficiaries"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"215"},{"key":"ETag","value":"W/\"d7-QtYSHDfIfKb/cHkmswWDP2TTXRs\""},{"key":"Date","value":"Sun, 12 Jun 2022 17:25:12 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"success\",\n    \"message\": \"Beneficiaries\",\n    \"data\": {\n        \"beneficiaries\": [\n            {\n                \"id\": \"70f7622a-7fa0-4779-8f91-4bc0213e206d\",\n                \"userId\": 2,\n                \"bank_account\": \"0826773142\",\n                \"account_name\": \"SAMUEL TEDD\",\n                \"bank_code\": \"044\"\n            }\n        ]\n    }\n}"}],"_postman_id":"dad0dc3e-ea18-4703-b998-5340ceb7feaf"},{"name":"Withdraw funds","id":"2d7c54a6-26a2-4e03-8bfb-518c35654c1e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"urlObject":{"query":[],"variable":[]},"url":""},"response":[],"_postman_id":"2d7c54a6-26a2-4e03-8bfb-518c35654c1e"}]}