{"openapi":"3.0.3","info":{"title":"Abujaloans","description":"## Abujaloans API\n\nThis collection covers the complete API surface for the **Abujaloans** lending platform, supporting three distinct account types — **Personal**, **Business**, and **Admin** — across the full user and loan lifecycle.\n\n### Authentication & Account Management\n\nEndpoints for registering and authenticating Personal and Business users, as well as Admin login. Includes OTP sending and verification, login status checks, and forgot-password flows.\n\n### Profile & Security\n\nAllows users to update their profile records, change or validate their email and password, and upload or manage profile pictures and supporting files (upload, retrieve secure files, delete).\n\n### Loan Operations\n\nCore lending functionality: applying for a loan, retrieving all loans or a specific loan by ID, viewing total loan counts, paginating through loan records, and repaying a loan.\n\n### Payments\n\nFetch all payments, retrieve a payment by ID, or get all payments associated with a specific loan.\n\n### Admin\n\nAdmin-specific endpoints for logging in and registering additional admin users.\n\n### General\n\nA contact/messaging endpoint for reaching Abujaloans support.\n\n---\n\n**Authentication:** All requests are secured with an API key passed via the `X-API-Key` header. Set the `token` environment variable to your API key before making requests.\n\n**Base URL:** Configure the `baseURL` environment variable to point to the appropriate server (development, staging, or production).","version":"1.0.0","contact":{}},"servers":[{"url":"{{baseURL}}"}],"paths":{"/auth/business/register":{"post":{"tags":["Business"],"summary":"Register","description":"Register","operationId":"register","requestBody":{"content":{"application/json":{"examples":{"Register":{"value":"{   \r\n    \"businessName\": \"Hepdex\",\r\n    \"fullName\": \"Nicholas Agbo\",\r\n    \"email\": \"agbonicholas3@gmail.com\",\r\n    \"password\": \"agbonicholas3\",\r\n    \"bvn\": \"string\",// Optional\r\n    \"address\": \"string\",// Optional\r\n    \"phoneNumber\": \"string\",// Optional\r\n    \"gender\": \"string\",// Optional\r\n    \"dob\": \"string\",// Optional\r\n    \"profileImage\": \"string\", // Optional\r\n    \"termsAgreed\": true // Optional (true or false) Default: true\r\n}"}}}}},"responses":{"200":{"description":"Response","headers":{"Connection":{"schema":{"type":"string","example":"keep-alive"}},"Content-Length":{"schema":{"type":"string","example":"597"}},"Content-Security-Policy":{"schema":{"type":"string","example":"default-src 'self';base-uri 'self';font-src 'self' https: data:;form-action 'self';frame-ancestors 'self';img-src 'self' data:;object-src 'none';script-src 'self';script-src-attr 'none';style-src 'self' https: 'unsafe-inline';upgrade-insecure-requests"}},"Cross-Origin-Opener-Policy":{"schema":{"type":"string","example":"same-origin"}},"Cross-Origin-Resource-Policy":{"schema":{"type":"string","example":"same-origin"}},"Date":{"schema":{"type":"string","example":"Tue, 17 Mar 2026 12:04:40 GMT"}},"ETag":{"schema":{"type":"string","example":"W/\"255-PqzSb28gKCK6JuEV1HKe1AKNmps\""}},"Keep-Alive":{"schema":{"type":"string","example":"timeout=5"}},"Origin-Agent-Cluster":{"schema":{"type":"string","example":"?1"}},"Referrer-Policy":{"schema":{"type":"string","example":"no-referrer"}},"Strict-Transport-Security":{"schema":{"type":"string","example":"max-age=31536000; includeSubDomains"}},"Vary":{"schema":{"type":"string","example":"Accept-Encoding"}},"X-Content-Type-Options":{"schema":{"type":"string","example":"nosniff"}},"X-DNS-Prefetch-Control":{"schema":{"type":"string","example":false}},"X-Download-Options":{"schema":{"type":"string","example":"noopen"}},"X-Frame-Options":{"schema":{"type":"string","example":"SAMEORIGIN"}},"X-Permitted-Cross-Domain-Policies":{"schema":{"type":"string","example":"none"}},"X-XSS-Protection":{"schema":{"type":"string","example":"0"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"token":{"type":"string","example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjZhMGFkYWUwZDI2NDg0ODEzMDE2NTlmOCIsImJ1c2luZXNzTmFtZSI6IkhlcGRleCIsImZ1bGxOYW1lIjoiTmljaG9sYXMgQWdibyIsImVtYWlsIjoiYWdib25pY2hvbGFzM0BnbWFpbC5jb20iLCJidm4iOiJzdHJpbmciLCJhZGRyZXNzIjoic3RyaW5nIiwicGhvbmVOdW1iZXIiOiJzdHJpbmciLCJnZW5kZXIiOiJzdHJpbmciLCJkb2IiOiJzdHJpbmciLCJwcm9maWxlSW1hZ2UiOiJzdHJpbmciLCJ0ZXJtc0FncmVlZCI6dHJ1ZSwiaXNFbWFpbFZlcmlmaWVkIjpmYWxzZSwiZGVsZXRlZCI6ZmFsc2UsInJvbGUiOiJidXNpbmVzcyIsImNyZWF0ZWRBdCI6IjIwMjYtMDUtMThUMDk6MjQ6NDguMjI2WiIsInVwZGF0ZWRBdCI6IjIwMjYtMDUtMThUMDk6MjQ6NDguMjI2WiIsImlhdCI6MTc3OTA5NjI4OSwiZXhwIjoxNzc5MTgyNjg5fQ.DYSAGJdB0rElIV3fmBWiYEtF1XJZaWOl8JxnliUFzLw"}}},"examples":{"Response":{"value":{"success":true,"token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjZhMGFkYWUwZDI2NDg0ODEzMDE2NTlmOCIsImJ1c2luZXNzTmFtZSI6IkhlcGRleCIsImZ1bGxOYW1lIjoiTmljaG9sYXMgQWdibyIsImVtYWlsIjoiYWdib25pY2hvbGFzM0BnbWFpbC5jb20iLCJidm4iOiJzdHJpbmciLCJhZGRyZXNzIjoic3RyaW5nIiwicGhvbmVOdW1iZXIiOiJzdHJpbmciLCJnZW5kZXIiOiJzdHJpbmciLCJkb2IiOiJzdHJpbmciLCJwcm9maWxlSW1hZ2UiOiJzdHJpbmciLCJ0ZXJtc0FncmVlZCI6dHJ1ZSwiaXNFbWFpbFZlcmlmaWVkIjpmYWxzZSwiZGVsZXRlZCI6ZmFsc2UsInJvbGUiOiJidXNpbmVzcyIsImNyZWF0ZWRBdCI6IjIwMjYtMDUtMThUMDk6MjQ6NDguMjI2WiIsInVwZGF0ZWRBdCI6IjIwMjYtMDUtMThUMDk6MjQ6NDguMjI2WiIsImlhdCI6MTc3OTA5NjI4OSwiZXhwIjoxNzc5MTgyNjg5fQ.DYSAGJdB0rElIV3fmBWiYEtF1XJZaWOl8JxnliUFzLw"}}}}}}}}},"/business/email/validate":{"post":{"tags":["Business"],"summary":"Validate email before change Copy","description":"Validate email before change Copy","operationId":"validateEmailBeforeChangeCopy","requestBody":{"content":{"application/json":{"examples":{"Validate email before change Copy":{"value":"{\r\n    \"email\": \"agbonicholas3@gmail.com\" //active current email\r\n}\r\n// NOTE: OTP WILL BE SENT"}}}}},"responses":{"200":{"description":""}},"security":[{"bearerAuth":[]}]}},"/business/change-email":{"post":{"tags":["Business"],"summary":"Change email","description":"Change email","operationId":"changeEmail","requestBody":{"content":{"application/json":{"examples":{"Change email":{"value":"{\r\n    \"email\": \"new_agbonicholas3@gmail.com\", //NEW EMAIL\r\n    \"otp\": \"12345\"\r\n}\r\n// NOTE: INCLUDES OTP VERIFICATION"}}}}},"responses":{"200":{"description":""}},"security":[{"bearerAuth":[]}]}},"/business/password/validate":{"post":{"tags":["Business"],"summary":"Validate password before change","description":"Validate password before change","operationId":"validatePasswordBeforeChange","requestBody":{"content":{"application/json":{"examples":{"Validate password before change":{"value":"{\r\n    \"password\": \"agbonicholas3\" //active current password\r\n}\r\n// NOTE: OTP WILL BE SENT"}}}}},"responses":{"200":{"description":""}},"security":[{"bearerAuth":[]}]}},"/business/change-password":{"post":{"tags":["Business"],"summary":"Change password","description":"Change password","operationId":"changePassword","requestBody":{"content":{"application/json":{"examples":{"Change password":{"value":"{\r\n    \"new_password\": \"agbonicholas3\",\r\n    \"otp\": \"12345\"\r\n}\r\n// NOTE: INCLUDES OTP VERIFICATION"}}}}},"responses":{"200":{"description":""}},"security":[{"bearerAuth":[]}]}},"/business/record/update":{"put":{"tags":["Business"],"summary":"Update Record","description":"Update Record","operationId":"updateRecord","requestBody":{"content":{"application/json":{"examples":{"Update Record":{"value":"{//NOTE ALL FIELDS ARE OPTIONAL BUT VALUE MUST BE PROVIDED FOR SUBMISSION\r\n    \"businessName\": \"Hepdex\",\r\n    \"fullName\": \"Nicholas Agbo\",\r\n    \"bvn\": \"string\",\r\n    \"address\": \"string\",\r\n    \"phoneNumber\": \"string\",\r\n    \"gender\": \"string\",\r\n    \"dob\": \"string\",\r\n    \"profileImage\": \"string\"\r\n}"}}}}},"responses":{"200":{"description":"Response","headers":{"Connection":{"schema":{"type":"string","example":"keep-alive"}},"Content-Length":{"schema":{"type":"string","example":"616"}},"Content-Security-Policy":{"schema":{"type":"string","example":"default-src 'self';base-uri 'self';font-src 'self' https: data:;form-action 'self';frame-ancestors 'self';img-src 'self' data:;object-src 'none';script-src 'self';script-src-attr 'none';style-src 'self' https: 'unsafe-inline';upgrade-insecure-requests"}},"Cross-Origin-Opener-Policy":{"schema":{"type":"string","example":"same-origin"}},"Cross-Origin-Resource-Policy":{"schema":{"type":"string","example":"same-origin"}},"Date":{"schema":{"type":"string","example":"Wed, 18 Mar 2026 05:00:29 GMT"}},"ETag":{"schema":{"type":"string","example":"W/\"268-zsV5WV12gUHsAHvQZV7wQEt8+8w\""}},"Keep-Alive":{"schema":{"type":"string","example":"timeout=5"}},"Origin-Agent-Cluster":{"schema":{"type":"string","example":"?1"}},"Referrer-Policy":{"schema":{"type":"string","example":"no-referrer"}},"Strict-Transport-Security":{"schema":{"type":"string","example":"max-age=31536000; includeSubDomains"}},"Vary":{"schema":{"type":"string","example":"Accept-Encoding"}},"X-Content-Type-Options":{"schema":{"type":"string","example":"nosniff"}},"X-DNS-Prefetch-Control":{"schema":{"type":"string","example":false}},"X-Download-Options":{"schema":{"type":"string","example":"noopen"}},"X-Frame-Options":{"schema":{"type":"string","example":"SAMEORIGIN"}},"X-Permitted-Cross-Domain-Policies":{"schema":{"type":"string","example":"none"}},"X-XSS-Protection":{"schema":{"type":"string","example":"0"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"address":{"type":"string","example":"string"},"businessName":{"type":"string","example":"Hepdex"},"bvn":{"type":"string","example":"string"},"createdAt":{"type":"string","example":"2026-05-18T09:24:48.226Z"},"deleted":{"type":"boolean","example":false},"dob":{"type":"string","example":"string"},"email":{"type":"string","example":"agbonicholas3@gmail.com"},"fullName":{"type":"string","example":"Nicholas Agbo"},"gender":{"type":"string","example":"string"},"id":{"type":"string","example":"6a0adae0d2648481301659f8"},"isEmailVerified":{"type":"boolean","example":false},"phoneNumber":{"type":"string","example":"string"},"profileImage":{"type":"string","example":"string"},"role":{"type":"string","example":"business"},"termsAgreed":{"type":"boolean","example":true},"updatedAt":{"type":"string","example":"2026-05-18T09:24:48.226Z"}}},"examples":{"Response":{"value":{"address":"string","businessName":"Hepdex","bvn":"string","createdAt":"2026-05-18T09:24:48.226Z","deleted":false,"dob":"string","email":"agbonicholas3@gmail.com","fullName":"Nicholas Agbo","gender":"string","id":"6a0adae0d2648481301659f8","isEmailVerified":false,"phoneNumber":"string","profileImage":"string","role":"business","termsAgreed":true,"updatedAt":"2026-05-18T09:24:48.226Z"}}}}}}},"security":[{"bearerAuth":[]}]}},"/auth/user/register":{"post":{"tags":["Personal"],"summary":"Register","description":"Register","operationId":"register1","requestBody":{"content":{"application/json":{"examples":{"Register":{"value":"{\r\n    \"firstName\": \"Nicholas\",\r\n    \"lastName\": \"Agbo\",\r\n    \"email\": \"agbonicholas33@gmail.com\",\r\n    \"password\": \"agbonicholas33\",\r\n    \"bvn\": \"string\",// Optional\r\n    \"address\": \"string\",// Optional\r\n    \"phoneNumber\": \"string\",// Optional\r\n    \"gender\": \"string\",// Optional\r\n    \"dob\": \"string\",// Optional\r\n    \"profileImage\": \"string\", // Optional\r\n    \"termsAgreed\": true // Optional (true or false) Default: true\r\n}"}}}}},"responses":{"200":{"description":"Response","headers":{"Connection":{"schema":{"type":"string","example":"keep-alive"}},"Content-Length":{"schema":{"type":"string","example":"729"}},"Content-Security-Policy":{"schema":{"type":"string","example":"default-src 'self';base-uri 'self';font-src 'self' https: data:;form-action 'self';frame-ancestors 'self';img-src 'self' data:;object-src 'none';script-src 'self';script-src-attr 'none';style-src 'self' https: 'unsafe-inline';upgrade-insecure-requests"}},"Cross-Origin-Opener-Policy":{"schema":{"type":"string","example":"same-origin"}},"Cross-Origin-Resource-Policy":{"schema":{"type":"string","example":"same-origin"}},"Date":{"schema":{"type":"string","example":"Tue, 17 Mar 2026 12:34:09 GMT"}},"ETag":{"schema":{"type":"string","example":"W/\"2d9-2xcMolNPLwqM7P5T2wqQumnhsSU\""}},"Keep-Alive":{"schema":{"type":"string","example":"timeout=5"}},"Origin-Agent-Cluster":{"schema":{"type":"string","example":"?1"}},"Referrer-Policy":{"schema":{"type":"string","example":"no-referrer"}},"Strict-Transport-Security":{"schema":{"type":"string","example":"max-age=31536000; includeSubDomains"}},"Vary":{"schema":{"type":"string","example":"Accept-Encoding"}},"X-Content-Type-Options":{"schema":{"type":"string","example":"nosniff"}},"X-DNS-Prefetch-Control":{"schema":{"type":"string","example":false}},"X-Download-Options":{"schema":{"type":"string","example":"noopen"}},"X-Frame-Options":{"schema":{"type":"string","example":"SAMEORIGIN"}},"X-Permitted-Cross-Domain-Policies":{"schema":{"type":"string","example":"none"}},"X-XSS-Protection":{"schema":{"type":"string","example":"0"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"token":{"type":"string","example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjZhMGFkYWUwZDI2NDg0ODEzMDE2NTlmOCIsImJ1c2luZXNzTmFtZSI6IkhlcGRleCIsImZ1bGxOYW1lIjoiTmljaG9sYXMgQWdibyIsImVtYWlsIjoiYWdib25pY2hvbGFzM0BnbWFpbC5jb20iLCJidm4iOiJzdHJpbmciLCJhZGRyZXNzIjoic3RyaW5nIiwicGhvbmVOdW1iZXIiOiJzdHJpbmciLCJnZW5kZXIiOiJzdHJpbmciLCJkb2IiOiJzdHJpbmciLCJwcm9maWxlSW1hZ2UiOiJzdHJpbmciLCJ0ZXJtc0FncmVlZCI6dHJ1ZSwiaXNFbWFpbFZlcmlmaWVkIjpmYWxzZSwiZGVsZXRlZCI6ZmFsc2UsInJvbGUiOiJidXNpbmVzcyIsImNyZWF0ZWRBdCI6IjIwMjYtMDUtMThUMDk6MjQ6NDguMjI2WiIsInVwZGF0ZWRBdCI6IjIwMjYtMDUtMThUMDk6MjQ6NDguMjI2WiIsImlhdCI6MTc3OTA5NjI4OSwiZXhwIjoxNzc5MTgyNjg5fQ.DYSAGJdB0rElIV3fmBWiYEtF1XJZaWOl8JxnliUFzLw"}}},"examples":{"Response":{"value":{"success":true,"token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjZhMGFkYWUwZDI2NDg0ODEzMDE2NTlmOCIsImJ1c2luZXNzTmFtZSI6IkhlcGRleCIsImZ1bGxOYW1lIjoiTmljaG9sYXMgQWdibyIsImVtYWlsIjoiYWdib25pY2hvbGFzM0BnbWFpbC5jb20iLCJidm4iOiJzdHJpbmciLCJhZGRyZXNzIjoic3RyaW5nIiwicGhvbmVOdW1iZXIiOiJzdHJpbmciLCJnZW5kZXIiOiJzdHJpbmciLCJkb2IiOiJzdHJpbmciLCJwcm9maWxlSW1hZ2UiOiJzdHJpbmciLCJ0ZXJtc0FncmVlZCI6dHJ1ZSwiaXNFbWFpbFZlcmlmaWVkIjpmYWxzZSwiZGVsZXRlZCI6ZmFsc2UsInJvbGUiOiJidXNpbmVzcyIsImNyZWF0ZWRBdCI6IjIwMjYtMDUtMThUMDk6MjQ6NDguMjI2WiIsInVwZGF0ZWRBdCI6IjIwMjYtMDUtMThUMDk6MjQ6NDguMjI2WiIsImlhdCI6MTc3OTA5NjI4OSwiZXhwIjoxNzc5MTgyNjg5fQ.DYSAGJdB0rElIV3fmBWiYEtF1XJZaWOl8JxnliUFzLw"}}}}}}}}},"/user/email/validate":{"post":{"tags":["Personal"],"summary":"Validate email before change","description":"Validate email before change","operationId":"validateEmailBeforeChange","requestBody":{"content":{"application/json":{"examples":{"Validate email before change":{"value":"{\r\n    \"email\": \"agbonicholas3@gmail.com\" //active current email\r\n}\r\n// NOTE: OTP WILL BE SENT"}}}}},"responses":{"200":{"description":""}},"security":[{"bearerAuth":[]}]}},"/user/change-email":{"post":{"tags":["Personal"],"summary":"Change email","description":"Change email","operationId":"changeEmail1","requestBody":{"content":{"application/json":{"examples":{"Change email":{"value":"{\r\n    \"email\": \"new_agbonicholas3@gmail.com\", //NEW EMAIL\r\n    \"otp\": \"12345\"\r\n}\r\n// NOTE: INCLUDES OTP VERIFICATION"}}}}},"responses":{"200":{"description":""}},"security":[{"bearerAuth":[]}]}},"/user/password/validate":{"post":{"tags":["Personal"],"summary":"Validate password before change","description":"Validate password before change","operationId":"validatePasswordBeforeChange1","requestBody":{"content":{"application/json":{"examples":{"Validate password before change":{"value":"{\r\n    \"password\": \"agbonicholas3\" //active current password\r\n}\r\n// NOTE: OTP WILL BE SENT"}}}}},"responses":{"200":{"description":""}},"security":[{"bearerAuth":[]}]}},"/user/change-password":{"post":{"tags":["Personal"],"summary":"Change password","description":"Change password","operationId":"changePassword1","requestBody":{"content":{"application/json":{"examples":{"Change password":{"value":"{\r\n    \"new_password\": \"agbonicholas3\",\r\n    \"otp\": \"12345\"\r\n}\r\n// NOTE: INCLUDES OTP VERIFICATION"}}}}},"responses":{"200":{"description":""}},"security":[{"bearerAuth":[]}]}},"/user/record/update":{"put":{"tags":["Personal"],"summary":"Update Record","description":"Update Record","operationId":"updateRecord1","requestBody":{"content":{"application/json":{"examples":{"Update Record":{"value":"{//NOTE ALL FIELDS ARE OPTIONAL BUT VALUE MUST BE PROVIDED FOR SUBMISSION\r\n    \"firstName\": \"Nicholas\",\r\n    \"lastName\": \"Agbo\",\r\n    \"bvn\": \"string\",\r\n    \"address\": \"string\",\r\n    \"phoneNumber\": \"string\",\r\n    \"gender\": \"string\",\r\n    \"dob\": \"string\",\r\n    \"profileImage\": \"string\"\r\n}"}}}}},"responses":{"200":{"description":"Response","headers":{"Connection":{"schema":{"type":"string","example":"keep-alive"}},"Content-Length":{"schema":{"type":"string","example":"638"}},"Content-Security-Policy":{"schema":{"type":"string","example":"default-src 'self';base-uri 'self';font-src 'self' https: data:;form-action 'self';frame-ancestors 'self';img-src 'self' data:;object-src 'none';script-src 'self';script-src-attr 'none';style-src 'self' https: 'unsafe-inline';upgrade-insecure-requests"}},"Cross-Origin-Opener-Policy":{"schema":{"type":"string","example":"same-origin"}},"Cross-Origin-Resource-Policy":{"schema":{"type":"string","example":"same-origin"}},"Date":{"schema":{"type":"string","example":"Wed, 18 Mar 2026 05:24:20 GMT"}},"ETag":{"schema":{"type":"string","example":"W/\"27e-+WBBWrMVqkidxDb1of7d0QXL+qk\""}},"Keep-Alive":{"schema":{"type":"string","example":"timeout=5"}},"Origin-Agent-Cluster":{"schema":{"type":"string","example":"?1"}},"Referrer-Policy":{"schema":{"type":"string","example":"no-referrer"}},"Strict-Transport-Security":{"schema":{"type":"string","example":"max-age=31536000; includeSubDomains"}},"Vary":{"schema":{"type":"string","example":"Accept-Encoding"}},"X-Content-Type-Options":{"schema":{"type":"string","example":"nosniff"}},"X-DNS-Prefetch-Control":{"schema":{"type":"string","example":false}},"X-Download-Options":{"schema":{"type":"string","example":"noopen"}},"X-Frame-Options":{"schema":{"type":"string","example":"SAMEORIGIN"}},"X-Permitted-Cross-Domain-Policies":{"schema":{"type":"string","example":"none"}},"X-XSS-Protection":{"schema":{"type":"string","example":"0"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"address":{"type":"string","example":"string"},"bvn":{"type":"string","example":"string"},"createdAt":{"type":"string","example":"2026-05-18T09:24:48.226Z"},"deleted":{"type":"boolean","example":false},"dob":{"type":"string","example":"string"},"email":{"type":"string","example":"agbonicholas3@gmail.com"},"firstName":{"type":"string","example":"Nicholas"},"gender":{"type":"string","example":"string"},"id":{"type":"string","example":"6a0adae0d2648481301659f8"},"isEmailVerified":{"type":"boolean","example":false},"lastName":{"type":"string","example":"Agbo"},"phoneNumber":{"type":"string","example":"string"},"profileImage":{"type":"string","example":"string"},"role":{"type":"string","example":"user"},"termsAgreed":{"type":"boolean","example":true},"updatedAt":{"type":"string","example":"2026-05-18T09:24:48.226Z"}}},"examples":{"Response":{"value":{"address":"string","bvn":"string","createdAt":"2026-05-18T09:24:48.226Z","deleted":false,"dob":"string","email":"agbonicholas3@gmail.com","firstName":"Nicholas","gender":"string","id":"6a0adae0d2648481301659f8","isEmailVerified":false,"lastName":"Agbo","phoneNumber":"string","profileImage":"string","role":"user","termsAgreed":true,"updatedAt":"2026-05-18T09:24:48.226Z"}}}}}}},"security":[{"bearerAuth":[]}]}},"/auth/admin/login":{"post":{"tags":["Admin"],"summary":"Login","description":"Login","operationId":"login","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","example":"admin@abujaloans.com"},"password":{"type":"string","example":"Ayodeji@1990"}}},"examples":{"Login":{"value":{"email":"admin@abujaloans.com","password":"Ayodeji@1990"}}}}}},"responses":{"200":{"description":"Login","headers":{"Connection":{"schema":{"type":"string","example":"keep-alive"}},"Content-Length":{"schema":{"type":"string","example":"603"}},"Content-Security-Policy":{"schema":{"type":"string","example":"default-src 'self';base-uri 'self';font-src 'self' https: data:;form-action 'self';frame-ancestors 'self';img-src 'self' data:;object-src 'none';script-src 'self';script-src-attr 'none';style-src 'self' https: 'unsafe-inline';upgrade-insecure-requests"}},"Cross-Origin-Opener-Policy":{"schema":{"type":"string","example":"same-origin"}},"Cross-Origin-Resource-Policy":{"schema":{"type":"string","example":"same-origin"}},"Date":{"schema":{"type":"string","example":"Tue, 19 May 2026 05:35:06 GMT"}},"ETag":{"schema":{"type":"string","example":"W/\"25b-ArU/RFFstsDV1QZkJZl3ksKe/sI\""}},"Keep-Alive":{"schema":{"type":"string","example":"timeout=5"}},"Origin-Agent-Cluster":{"schema":{"type":"string","example":"?1"}},"Referrer-Policy":{"schema":{"type":"string","example":"no-referrer"}},"Strict-Transport-Security":{"schema":{"type":"string","example":"max-age=31536000; includeSubDomains"}},"Vary":{"schema":{"type":"string","example":"Accept-Encoding"}},"X-Content-Type-Options":{"schema":{"type":"string","example":"nosniff"}},"X-DNS-Prefetch-Control":{"schema":{"type":"string","example":false}},"X-Download-Options":{"schema":{"type":"string","example":"noopen"}},"X-Frame-Options":{"schema":{"type":"string","example":"SAMEORIGIN"}},"X-Permitted-Cross-Domain-Policies":{"schema":{"type":"string","example":"none"}},"X-XSS-Protection":{"schema":{"type":"string","example":"0"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"token":{"type":"string","example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY4OWI3NTU1NTY3OTA4NTA0ODRlYTcxNyIsImZpcnN0TmFtZSI6IkNoaW5hIiwibGFzdE5hbWUiOiJNdWtvIiwiZW1haWwiOiJhZG1pbkBhYnVqYWxvYW5zLmNvbSIsInBhc3N3b3JkIjoiJDJiJDE1JG1BMWlFV1VnOUtQVUdKbnM2M2NSeC5uRzFQLm5QMTMyQXY2L1lEVlZnL0FvemtYRTBCS01lIiwib3RwIjpudWxsLCJwaG9uZU51bWJlciI6bnVsbCwiZ2VuZGVyIjpudWxsLCJpc0VtYWlsVmVyaWZpZWQiOmZhbHNlLCJyb2xlIjoiYWRtaW4iLCJjcmVhdGVkQXQiOiIyMDI2LTA1LTE4VDE3OjA4OjMyLjMyNVoiLCJ1cGRhdGVkQXQiOiIyMDI2LTA1LTE4VDE3OjA4OjMyLjMyNVoiLCJpYXQiOjE3NzkxNjg5MDYsImV4cCI6MTc3OTI1NTMwNn0.RmzSHJrldLDXyYPXpPT9lQqLxgMjO3-Xb-wvP0dK8iQ"}}},"examples":{"Login":{"value":{"success":true,"token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY4OWI3NTU1NTY3OTA4NTA0ODRlYTcxNyIsImZpcnN0TmFtZSI6IkNoaW5hIiwibGFzdE5hbWUiOiJNdWtvIiwiZW1haWwiOiJhZG1pbkBhYnVqYWxvYW5zLmNvbSIsInBhc3N3b3JkIjoiJDJiJDE1JG1BMWlFV1VnOUtQVUdKbnM2M2NSeC5uRzFQLm5QMTMyQXY2L1lEVlZnL0FvemtYRTBCS01lIiwib3RwIjpudWxsLCJwaG9uZU51bWJlciI6bnVsbCwiZ2VuZGVyIjpudWxsLCJpc0VtYWlsVmVyaWZpZWQiOmZhbHNlLCJyb2xlIjoiYWRtaW4iLCJjcmVhdGVkQXQiOiIyMDI2LTA1LTE4VDE3OjA4OjMyLjMyNVoiLCJ1cGRhdGVkQXQiOiIyMDI2LTA1LTE4VDE3OjA4OjMyLjMyNVoiLCJpYXQiOjE3NzkxNjg5MDYsImV4cCI6MTc3OTI1NTMwNn0.RmzSHJrldLDXyYPXpPT9lQqLxgMjO3-Xb-wvP0dK8iQ"}}}}}}},"security":[{}]}},"/admin/register":{"post":{"tags":["Admin"],"summary":"Register Other Admins","description":"Register Other Admins","operationId":"registerOtherAdmins","requestBody":{"content":{"application/json":{"examples":{"Register Other Admins":{"value":"{\r\n    \"firstName\": \"China\",\r\n    \"lastName\": \"Muoka\",\r\n    \"email\": \"admin2@abujaloans.com\",\r\n    \"password\": \"myPassWord\",\r\n    \"gender\": \"male\", // OPTIONAL\r\n    \"phoneNumber\": \"083736782828\" // OPTIONAL\r\n}"}}}}},"responses":{"200":{"description":"Response","headers":{"Connection":{"schema":{"type":"string","example":"keep-alive"}},"Content-Length":{"schema":{"type":"string","example":"358"}},"Content-Security-Policy":{"schema":{"type":"string","example":"default-src 'self';base-uri 'self';font-src 'self' https: data:;form-action 'self';frame-ancestors 'self';img-src 'self' data:;object-src 'none';script-src 'self';script-src-attr 'none';style-src 'self' https: 'unsafe-inline';upgrade-insecure-requests"}},"Cross-Origin-Opener-Policy":{"schema":{"type":"string","example":"same-origin"}},"Cross-Origin-Resource-Policy":{"schema":{"type":"string","example":"same-origin"}},"Date":{"schema":{"type":"string","example":"Tue, 19 May 2026 05:49:54 GMT"}},"ETag":{"schema":{"type":"string","example":"W/\"166-eDiPrge/kJyO3FGS34nOWYId3XI\""}},"Keep-Alive":{"schema":{"type":"string","example":"timeout=5"}},"Origin-Agent-Cluster":{"schema":{"type":"string","example":"?1"}},"Referrer-Policy":{"schema":{"type":"string","example":"no-referrer"}},"Strict-Transport-Security":{"schema":{"type":"string","example":"max-age=31536000; includeSubDomains"}},"Vary":{"schema":{"type":"string","example":"Accept-Encoding"}},"X-Content-Type-Options":{"schema":{"type":"string","example":"nosniff"}},"X-DNS-Prefetch-Control":{"schema":{"type":"string","example":false}},"X-Download-Options":{"schema":{"type":"string","example":"noopen"}},"X-Frame-Options":{"schema":{"type":"string","example":"SAMEORIGIN"}},"X-Permitted-Cross-Domain-Policies":{"schema":{"type":"string","example":"none"}},"X-XSS-Protection":{"schema":{"type":"string","example":"0"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"createdAt":{"type":"string","example":"2026-05-19T05:49:53.469Z"},"email":{"type":"string","example":"admin2@abujaloans.com"},"firstName":{"type":"string","example":"China"},"gender":{"nullable":true,"example":null},"id":{"type":"string","example":"6a0bfa0181c0fa4ab1ba2645"},"isBlocked":{"type":"boolean","example":false},"isEmailVerified":{"type":"boolean","example":true},"lastName":{"type":"string","example":"Muoka"},"otp":{"nullable":true,"example":null},"password":{"type":"string","example":"$2b$10$UYfe5MT0h6nJMur8K4Wh9.0LW1OQ9E7fcpoQ4gcTsFd7vtKDIjhsu"},"phoneNumber":{"nullable":true,"example":null},"role":{"type":"string","example":"manager"},"updatedAt":{"type":"string","example":"2026-05-19T05:49:53.469Z"}}},"examples":{"Response":{"value":{"createdAt":"2026-05-19T05:49:53.469Z","email":"admin2@abujaloans.com","firstName":"China","gender":null,"id":"6a0bfa0181c0fa4ab1ba2645","isBlocked":false,"isEmailVerified":true,"lastName":"Muoka","otp":null,"password":"$2b$10$UYfe5MT0h6nJMur8K4Wh9.0LW1OQ9E7fcpoQ4gcTsFd7vtKDIjhsu","phoneNumber":null,"role":"manager","updatedAt":"2026-05-19T05:49:53.469Z"}}}}}}},"security":[{"bearerAuth":[]}]}},"/auth/status":{"get":{"summary":"Query Login status","description":"Query Login status","operationId":"queryLoginStatus","requestBody":{"content":{"application/json":{"examples":{"Query Login status":{"value":""}}}}},"responses":{"200":{"description":"Token","headers":{"Connection":{"schema":{"type":"string","example":"keep-alive"}},"Content-Length":{"schema":{"type":"string","example":"354"}},"Content-Security-Policy":{"schema":{"type":"string","example":"default-src 'self';base-uri 'self';font-src 'self' https: data:;form-action 'self';frame-ancestors 'self';img-src 'self' data:;object-src 'none';script-src 'self';script-src-attr 'none';style-src 'self' https: 'unsafe-inline';upgrade-insecure-requests"}},"Cross-Origin-Opener-Policy":{"schema":{"type":"string","example":"same-origin"}},"Cross-Origin-Resource-Policy":{"schema":{"type":"string","example":"same-origin"}},"Date":{"schema":{"type":"string","example":"Tue, 14 Oct 2025 09:11:53 GMT"}},"ETag":{"schema":{"type":"string","example":"W/\"162-TY7Rx6g/mG5eFCcved3KXkCMKTI\""}},"Keep-Alive":{"schema":{"type":"string","example":"timeout=5"}},"Origin-Agent-Cluster":{"schema":{"type":"string","example":"?1"}},"Referrer-Policy":{"schema":{"type":"string","example":"no-referrer"}},"Strict-Transport-Security":{"schema":{"type":"string","example":"max-age=31536000; includeSubDomains"}},"Vary":{"schema":{"type":"string","example":"Accept-Encoding"}},"X-Content-Type-Options":{"schema":{"type":"string","example":"nosniff"}},"X-DNS-Prefetch-Control":{"schema":{"type":"string","example":false}},"X-Download-Options":{"schema":{"type":"string","example":"noopen"}},"X-Frame-Options":{"schema":{"type":"string","example":"SAMEORIGIN"}},"X-Permitted-Cross-Domain-Policies":{"schema":{"type":"string","example":"none"}},"X-XSS-Protection":{"schema":{"type":"string","example":"0"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"address":{"type":"string","example":"string"},"businessName":{"type":"string","example":"Hepdex"},"bvn":{"type":"string","example":"string"},"createdAt":{"type":"string","example":"2026-05-18T09:24:48.226Z"},"deleted":{"type":"boolean","example":false},"dob":{"type":"string","example":"string"},"email":{"type":"string","example":"agbonicholas3@gmail.com"},"exp":{"type":"number","example":1779182689},"fullName":{"type":"string","example":"Nicholas Agbo"},"gender":{"type":"string","example":"string"},"iat":{"type":"number","example":1779096289},"id":{"type":"string","example":"6a0adae0d2648481301659f8"},"isEmailVerified":{"type":"boolean","example":false},"phoneNumber":{"type":"string","example":"string"},"profileImage":{"type":"string","example":"string"},"role":{"type":"string","example":"business"},"termsAgreed":{"type":"boolean","example":true},"updatedAt":{"type":"string","example":"2026-05-18T09:24:48.226Z"}}},"examples":{"Token":{"value":{"address":"string","businessName":"Hepdex","bvn":"string","createdAt":"2026-05-18T09:24:48.226Z","deleted":false,"dob":"string","email":"agbonicholas3@gmail.com","exp":1779182689,"fullName":"Nicholas Agbo","gender":"string","iat":1779096289,"id":"6a0adae0d2648481301659f8","isEmailVerified":false,"phoneNumber":"string","profileImage":"string","role":"business","termsAgreed":true,"updatedAt":"2026-05-18T09:24:48.226Z"}}}}}}},"security":[{"bearerAuth":[]}]}},"/auth/login":{"post":{"summary":"Login","description":"Login","operationId":"login1","requestBody":{"content":{"application/json":{"examples":{"Login":{"value":"{\r\n    \"email\": \"agbonicholas3@gmail.com\",\r\n    \"password\": \"agbonicholas3\",\r\n    \"remember\": true // Optional (true or false) Default: false\r\n}"}}}}},"responses":{"200":{"description":"Response","headers":{"Connection":{"schema":{"type":"string","example":"keep-alive"}},"Content-Length":{"schema":{"type":"string","example":"948"}},"Content-Security-Policy":{"schema":{"type":"string","example":"default-src 'self';base-uri 'self';font-src 'self' https: data:;form-action 'self';frame-ancestors 'self';img-src 'self' data:;object-src 'none';script-src 'self';script-src-attr 'none';style-src 'self' https: 'unsafe-inline';upgrade-insecure-requests"}},"Cross-Origin-Opener-Policy":{"schema":{"type":"string","example":"same-origin"}},"Cross-Origin-Resource-Policy":{"schema":{"type":"string","example":"same-origin"}},"Date":{"schema":{"type":"string","example":"Tue, 17 Mar 2026 12:42:34 GMT"}},"ETag":{"schema":{"type":"string","example":"W/\"3b4-Y6VMGOzrxeTrVQBZCnhWrZgSKc4\""}},"Keep-Alive":{"schema":{"type":"string","example":"timeout=5"}},"Origin-Agent-Cluster":{"schema":{"type":"string","example":"?1"}},"Referrer-Policy":{"schema":{"type":"string","example":"no-referrer"}},"Set-Cookie":{"schema":{"type":"string","example":"token=s%3AeyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJub3RpZmljYXRpb25zIjp7ImludmVzdG1lbnQiOnRydWUsImNhbXBhaWduIjp0cnVlLCJwcm9kdWN0IjpmYWxzZSwicmV0dXJucyI6dHJ1ZSwib3Bwb3J0dW5pdGllcyI6dHJ1ZSwidGlwcyI6ZmFsc2V9LCJpZCI6IjY5Yjk0MzU3YjNiYjk3NTA2NmY4MzhhNCIsImZpcnN0TmFtZSI6Ik5pY2hvbGFzIiwibGFzdE5hbWUiOiJBZ2JvIiwiZnVsbE5hbWUiOiJOaWNob2xhcyBBZ2JvIiwiY29tcGFueU5hbWUiOiJIZXBkZXggSW5jIiwidGl0bGUiOiJGb3VuZGVyIiwiY291bnRyeSI6Ik5pZ2VyaWEiLCJlbWFpbCI6ImFnYm9uaWNob2xhczNAZ21haWwuY29tIiwicGFzc3dvcmQiOiIkMmIkMTAkaE9wUWlQR05oVnE4cW03dXZkRTBYdTdtbU5icXozdE5YVVYyaDBISC8wVm91VGtURFpsTC4iLCJwcm9maWxlSW1hZ2UiOm51bGwsIndlYnNpdGUiOiJodHRwczovL2hlcGRleC5jb20iLCJpc0VtYWlsVmVyaWZpZWQiOmZhbHNlLCJpc0FwcHJvdmVkIjpmYWxzZSwiZGVsZXRlZCI6ZmFsc2UsInJvbGUiOiJzdGFydHVwIiwiY3JlYXRlZEF0IjoiMjAyNi0wMy0xN1QxMjowNDozOS44NzBaIiwidXBkYXRlZEF0IjoiMjAyNi0wMy0xN1QxMjowNDozOS44NzBaIiwiaWF0IjoxNzczNzUxMzU0LCJleHAiOjE3NzM4Mzc3NTR9.GqJ06X_e6sGcJAi7OVrux27qErKzQo0IOTVreDBuigc.C5M%2FSAxh6mQtPcXWY5RRFq0oOplUmi83IKXK7IEBsR8; Domain=localhost; Path=/; Expires=Mon, 01 Jun 2082 01:25:02 GMT; HttpOnly; Secure; Priority=High; SameSite=Strict"}},"Strict-Transport-Security":{"schema":{"type":"string","example":"max-age=31536000; includeSubDomains"}},"Vary":{"schema":{"type":"string","example":"Accept-Encoding"}},"X-Content-Type-Options":{"schema":{"type":"string","example":"nosniff"}},"X-DNS-Prefetch-Control":{"schema":{"type":"string","example":false}},"X-Download-Options":{"schema":{"type":"string","example":"noopen"}},"X-Frame-Options":{"schema":{"type":"string","example":"SAMEORIGIN"}},"X-Permitted-Cross-Domain-Policies":{"schema":{"type":"string","example":"none"}},"X-XSS-Protection":{"schema":{"type":"string","example":"0"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"token":{"type":"string","example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJub3RpZmljYXRpb25zIjp7ImludmVzdG1lbnQiOnRydWUsImNhbXBhaWduIjp0cnVlLCJwcm9kdWN0IjpmYWxzZSwicmV0dXJucyI6dHJ1ZSwib3Bwb3J0dW5pdGllcyI6dHJ1ZSwidGlwcyI6ZmFsc2V9LCJpZCI6IjY5Yjk0MzU3YjNiYjk3NTA2NmY4MzhhNCIsImZpcnN0TmFtZSI6Ik5pY2hvbGFzIiwibGFzdE5hbWUiOiJBZ2JvIiwiZnVsbE5hbWUiOiJOaWNob2xhcyBBZ2JvIiwiY29tcGFueU5hbWUiOiJIZXBkZXggSW5jIiwidGl0bGUiOiJGb3VuZGVyIiwiY291bnRyeSI6Ik5pZ2VyaWEiLCJlbWFpbCI6ImFnYm9uaWNob2xhczNAZ21haWwuY29tIiwicGFzc3dvcmQiOiIkMmIkMTAkaE9wUWlQR05oVnE4cW03dXZkRTBYdTdtbU5icXozdE5YVVYyaDBISC8wVm91VGtURFpsTC4iLCJwcm9maWxlSW1hZ2UiOm51bGwsIndlYnNpdGUiOiJodHRwczovL2hlcGRleC5jb20iLCJpc0VtYWlsVmVyaWZpZWQiOmZhbHNlLCJpc0FwcHJvdmVkIjpmYWxzZSwiZGVsZXRlZCI6ZmFsc2UsInJvbGUiOiJzdGFydHVwIiwiY3JlYXRlZEF0IjoiMjAyNi0wMy0xN1QxMjowNDozOS44NzBaIiwidXBkYXRlZEF0IjoiMjAyNi0wMy0xN1QxMjowNDozOS44NzBaIiwiaWF0IjoxNzczNzUxMzU0LCJleHAiOjE3NzM4Mzc3NTR9.GqJ06X_e6sGcJAi7OVrux27qErKzQo0IOTVreDBuigc"}}},"examples":{"Response":{"value":{"success":true,"token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJub3RpZmljYXRpb25zIjp7ImludmVzdG1lbnQiOnRydWUsImNhbXBhaWduIjp0cnVlLCJwcm9kdWN0IjpmYWxzZSwicmV0dXJucyI6dHJ1ZSwib3Bwb3J0dW5pdGllcyI6dHJ1ZSwidGlwcyI6ZmFsc2V9LCJpZCI6IjY5Yjk0MzU3YjNiYjk3NTA2NmY4MzhhNCIsImZpcnN0TmFtZSI6Ik5pY2hvbGFzIiwibGFzdE5hbWUiOiJBZ2JvIiwiZnVsbE5hbWUiOiJOaWNob2xhcyBBZ2JvIiwiY29tcGFueU5hbWUiOiJIZXBkZXggSW5jIiwidGl0bGUiOiJGb3VuZGVyIiwiY291bnRyeSI6Ik5pZ2VyaWEiLCJlbWFpbCI6ImFnYm9uaWNob2xhczNAZ21haWwuY29tIiwicGFzc3dvcmQiOiIkMmIkMTAkaE9wUWlQR05oVnE4cW03dXZkRTBYdTdtbU5icXozdE5YVVYyaDBISC8wVm91VGtURFpsTC4iLCJwcm9maWxlSW1hZ2UiOm51bGwsIndlYnNpdGUiOiJodHRwczovL2hlcGRleC5jb20iLCJpc0VtYWlsVmVyaWZpZWQiOmZhbHNlLCJpc0FwcHJvdmVkIjpmYWxzZSwiZGVsZXRlZCI6ZmFsc2UsInJvbGUiOiJzdGFydHVwIiwiY3JlYXRlZEF0IjoiMjAyNi0wMy0xN1QxMjowNDozOS44NzBaIiwidXBkYXRlZEF0IjoiMjAyNi0wMy0xN1QxMjowNDozOS44NzBaIiwiaWF0IjoxNzczNzUxMzU0LCJleHAiOjE3NzM4Mzc3NTR9.GqJ06X_e6sGcJAi7OVrux27qErKzQo0IOTVreDBuigc"}}}}}}},"security":[{}]}},"/auth/otp/send":{"post":{"summary":"Send/Resend OTP","description":"Send/Resend OTP","operationId":"sendResendOtp","requestBody":{"content":{"application/json":{"examples":{"Send/Resend OTP":{"value":"{\r\n    \"email\": \"agbonicholas3@gmail.com\"\r\n}\r\n\r\n// IF LOGGED IN: No email param required"}}}}},"responses":{"200":{"description":""}},"security":[{}]}},"/auth/otp/verify":{"post":{"summary":"Verify OTP","description":"Verify OTP","operationId":"verifyOtp","requestBody":{"content":{"application/json":{"examples":{"Verify OTP":{"value":"{\r\n    \"email\": \"agbonicholas3@gmail.com\",\r\n    \"role\": \"investor\", // STARTUP OR INVESTOR\r\n    \"otp\": \"12345\"\r\n}\r\n// NOTE: INCLUDES EMAIL VERIFICATION"}}}}},"responses":{"200":{"description":""}},"security":[{}]}},"/forgot-password/change":{"post":{"summary":"Forgot password for Business/Personal","description":"Forgot password for Business/Personal","operationId":"forgotPasswordForBusinessPersonal","requestBody":{"content":{"application/json":{"examples":{"Forgot password for Business/Personal":{"value":"{\r\n    \"email\": \"agbonicholas3@gmail.com\",\r\n    \"role\": \"business\", // BUSINESS OR PERSONAL\r\n    \"new_password\": \"agbonicholas3\",\r\n    \"otp\": \"12345\"\r\n}\r\n// NOTE: INCLUDES OTP VERIFICATION"}}}}},"responses":{"200":{"description":""}},"security":[{}]}},"/contact/message":{"post":{"summary":"Contact Abujaloans","description":"Contact Abujaloans","operationId":"contactAbujaloans","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"companyName":{"type":"string","example":"Kaystaff LLC"},"email":{"type":"string","example":"AGBO"},"fullName":{"type":"string","example":"NICHOLAS"},"iam":{"type":"string","example":"Developer"},"location":{"type":"string","example":"Nigeria"},"message":{"type":"string","example":"Someone qualified"},"phoneNumber":{"type":"string","example":"08184846371"}}},"examples":{"Contact Abujaloans":{"value":{"companyName":"Kaystaff LLC","email":"AGBO","fullName":"NICHOLAS","iam":"Developer","location":"Nigeria","message":"Someone qualified","phoneNumber":"08184846371"}}}}}},"responses":{"200":{"description":"Response","headers":{"Connection":{"schema":{"type":"string","example":"keep-alive"}},"Content-Length":{"schema":{"type":"string","example":"66"}},"Content-Security-Policy":{"schema":{"type":"string","example":"default-src 'self';base-uri 'self';font-src 'self' https: data:;form-action 'self';frame-ancestors 'self';img-src 'self' data:;object-src 'none';script-src 'self';script-src-attr 'none';style-src 'self' https: 'unsafe-inline';upgrade-insecure-requests"}},"Cross-Origin-Opener-Policy":{"schema":{"type":"string","example":"same-origin"}},"Cross-Origin-Resource-Policy":{"schema":{"type":"string","example":"same-origin"}},"Date":{"schema":{"type":"string","example":"Tue, 14 Oct 2025 09:45:38 GMT"}},"ETag":{"schema":{"type":"string","example":"W/\"42-iuIQdZhlXRukttj/hI+11YznRIs\""}},"Keep-Alive":{"schema":{"type":"string","example":"timeout=5"}},"Origin-Agent-Cluster":{"schema":{"type":"string","example":"?1"}},"Referrer-Policy":{"schema":{"type":"string","example":"no-referrer"}},"Strict-Transport-Security":{"schema":{"type":"string","example":"max-age=31536000; includeSubDomains"}},"Vary":{"schema":{"type":"string","example":"Accept-Encoding"}},"X-Content-Type-Options":{"schema":{"type":"string","example":"nosniff"}},"X-DNS-Prefetch-Control":{"schema":{"type":"string","example":false}},"X-Download-Options":{"schema":{"type":"string","example":"noopen"}},"X-Frame-Options":{"schema":{"type":"string","example":"SAMEORIGIN"}},"X-Permitted-Cross-Domain-Policies":{"schema":{"type":"string","example":"none"}},"X-XSS-Protection":{"schema":{"type":"string","example":"0"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Contact message received successfully"},"success":{"type":"boolean","example":true}}},"examples":{"Response":{"value":{"message":"Contact message received successfully","success":true}}}}}}},"security":[{}]}},"/apply/loan":{"post":{"summary":"Apply for Loan","description":"## Apply for Loan\n\nSubmits a loan application on behalf of an authenticated user. This endpoint is available to both **business** and **individual (user)** roles.\n\n**Method:** POST  \n**Endpoint:** `{{baseURL}}/apply/loan`  \n**Authentication:** Bearer Token (`{{token}}`)\n\n---\n\n### Request Body\n\nThe request body must be sent as JSON with the following fields:\n\n| Field | Type | Required | Description |\n| --- | --- | --- | --- |\n| `amount` | Number | Yes | The loan amount being requested (e.g. `20000`) |\n| `purpose` | String | Yes | The reason/purpose for the loan (e.g. `\"For my business\"`) |\n| `duration` | String | Yes | The repayment duration (e.g. `\"6 months\"`) |\n| `govID` | String | Yes | A URL pointing to the applicant's government-issued ID document |\n| `collateral` | Object | Yes | Details of the collateral being offered |\n| `collateral.type` | String | Yes | Type of collateral — either `\"car\"` or `\"jewelry\"` |\n| `collateral.details` | Object | Yes | Additional details about the collateral (JSON object) |\n| `bank` | Object | Yes | The applicant's bank account information |\n| `bank.bankName` | String | Yes | Name of the bank (e.g. `\"UBA\"`) |\n| `bank.accountNumber` | String | Yes | Bank account number |\n| `bank.accountName` | String | Yes | Name on the bank account |\n| `guarantor` | Object | Yes | Information about the loan guarantor |\n| `guarantor.fullName` | String | Yes | Full name of the guarantor |\n| `guarantor.phoneNumber` | String | Yes | Guarantor's phone number |\n| `guarantor.relationship` | String | Yes | Guarantor's relationship to the applicant (e.g. `\"father\"`) |\n\n---\n\n### Example Request Body\n\n``` json\n{\n    \"amount\": 20000,\n    \"purpose\": \"For my business\",\n    \"duration\": \"6 months\",\n    \"govID\": \"https://example.com/gov-id.jpg\",\n    \"collateral\": {\n        \"type\": \"car\",\n        \"details\": {}\n    },\n    \"bank\": {\n        \"bankName\": \"UBA\",\n        \"accountNumber\": \"1234567891\",\n        \"accountName\": \"NICHOLAS AGBO\"\n    },\n    \"guarantor\": {\n        \"fullName\": \"Nick Dad\",\n        \"phoneNumber\": \"08104284095\",\n        \"relationship\": \"father\"\n    }\n}\n\n ```\n\n---\n\n### Authentication\n\nThis endpoint requires a valid Bearer Token passed via the `Authorization` header. The token is referenced using the `{{token}}` variable. Both **business** and **individual (user)** accounts must authenticate with a valid token before submitting a loan application.\n\n---\n\n### Notes\n\n- This endpoint supports loan applications for both **individual users** and **business accounts**. The authenticated role is determined by the Bearer Token provided.\n    \n- Ensure the `govID` field contains a valid, accessible URL to the government ID document.\n    \n- The `collateral.details` field accepts any valid JSON object with additional collateral information.\n    \n- The `duration` field is a string and should specify the repayment period clearly (e.g. `\"6 months\"`, `\"1 year\"`).","operationId":"applyForLoan","requestBody":{"content":{"application/json":{"examples":{"Apply for Loan":{"value":"{\r\n    \"amount\": 20000,\r\n    \"purpose\": \"For my business\",\r\n    \"duration\": \"6 months\",\r\n    \"govID\": \"https://\",\r\n    \"collateral\": {\r\n        \"type\": \"car\", //car or jewelry\r\n        \"details\": {} //Json Value\r\n    },\r\n    \"bank\": {\r\n        \"bankName\": \"UBA\",\r\n        \"accountNumber\": \"1234567891\",\r\n        \"accountName\": \"NICHOLAS AGBO\"\r\n    },\r\n    \"guarantor\": {\r\n        \"fullName\": \"Nick Dad\",\r\n        \"phoneNumber\": \"08104284095\",\r\n        \"relationship\": \"father\"\r\n    }\r\n}"}}}}},"responses":{"200":{"description":"Response","headers":{"Connection":{"schema":{"type":"string","example":"keep-alive"}},"Content-Length":{"schema":{"type":"string","example":"483"}},"Content-Security-Policy":{"schema":{"type":"string","example":"default-src 'self';base-uri 'self';font-src 'self' https: data:;form-action 'self';frame-ancestors 'self';img-src 'self' data:;object-src 'none';script-src 'self';script-src-attr 'none';style-src 'self' https: 'unsafe-inline';upgrade-insecure-requests"}},"Cross-Origin-Opener-Policy":{"schema":{"type":"string","example":"same-origin"}},"Cross-Origin-Resource-Policy":{"schema":{"type":"string","example":"same-origin"}},"Date":{"schema":{"type":"string","example":"Mon, 18 May 2026 11:31:11 GMT"}},"ETag":{"schema":{"type":"string","example":"W/\"1e3-LS83pv2LstPCa00kA8XNx8CXGdY\""}},"Keep-Alive":{"schema":{"type":"string","example":"timeout=5"}},"Origin-Agent-Cluster":{"schema":{"type":"string","example":"?1"}},"Referrer-Policy":{"schema":{"type":"string","example":"no-referrer"}},"Strict-Transport-Security":{"schema":{"type":"string","example":"max-age=31536000; includeSubDomains"}},"Vary":{"schema":{"type":"string","example":"Accept-Encoding"}},"X-Content-Type-Options":{"schema":{"type":"string","example":"nosniff"}},"X-DNS-Prefetch-Control":{"schema":{"type":"string","example":false}},"X-Download-Options":{"schema":{"type":"string","example":"noopen"}},"X-Frame-Options":{"schema":{"type":"string","example":"SAMEORIGIN"}},"X-Permitted-Cross-Domain-Policies":{"schema":{"type":"string","example":"none"}},"X-XSS-Protection":{"schema":{"type":"string","example":"0"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"accountID":{"type":"string","example":"6a0adae0d2648481301659f8"},"allowed":{"type":"array","items":{},"example":[]},"amount":{"type":"number","example":20000},"bank":{"type":"object","properties":{"accountName":{"type":"string","example":"NICHOLAS AGBO"},"accountNumber":{"type":"string","example":"1234567891"},"bankName":{"type":"string","example":"UBA"}}},"collateral":{"type":"object","properties":{"details":{"type":"object","properties":{}},"type":{"type":"string","example":"car"}}},"createdAt":{"type":"string","example":"2026-05-24T12:10:19.693Z"},"duration":{"type":"string","example":"6 months"},"govID":{"type":"string","example":"https://"},"guarantor":{"type":"object","properties":{"fullName":{"type":"string","example":"Nick Dad"},"phoneNumber":{"type":"string","example":"08104284095"},"relationship":{"type":"string","example":"father"}}},"id":{"type":"string","example":"6a12eaac5fe11d3431d63f9f"},"isRepaid":{"type":"boolean","example":false},"purpose":{"type":"string","example":"For Renovation"},"schedule":{"nullable":true,"example":null},"signedAgreement":{"nullable":true,"example":null},"status":{"type":"string","example":"pending"},"updatedAt":{"type":"string","example":"2026-05-24T12:10:19.693Z"}}},"examples":{"Response":{"value":{"accountID":"6a0adae0d2648481301659f8","allowed":[],"amount":20000,"bank":{"accountName":"NICHOLAS AGBO","accountNumber":"1234567891","bankName":"UBA"},"collateral":{"details":{},"type":"car"},"createdAt":"2026-05-24T12:10:19.693Z","duration":"6 months","govID":"https://","guarantor":{"fullName":"Nick Dad","phoneNumber":"08104284095","relationship":"father"},"id":"6a12eaac5fe11d3431d63f9f","isRepaid":false,"purpose":"For Renovation","schedule":null,"signedAgreement":null,"status":"pending","updatedAt":"2026-05-24T12:10:19.693Z"}}}}}}},"security":[{"bearerAuth":[]}]}},"/repay/loan/{id}":{"post":{"summary":"Repay Loan","description":"## Apply for Loan\n\nSubmits a loan application on behalf of an authenticated user. This endpoint is available to both **business** and **individual (user)** roles.\n\n**Method:** POST  \n**Endpoint:** `{{baseURL}}/apply/loan`  \n**Authentication:** Bearer Token (`{{token}}`)\n\n---\n\n### Request Body\n\nThe request body must be sent as JSON with the following fields:\n\n| Field | Type | Required | Description |\n| --- | --- | --- | --- |\n| `amount` | Number | Yes | The loan amount being requested (e.g. `20000`) |\n| `purpose` | String | Yes | The reason/purpose for the loan (e.g. `\"For my business\"`) |\n| `duration` | String | Yes | The repayment duration (e.g. `\"6 months\"`) |\n| `govID` | String | Yes | A URL pointing to the applicant's government-issued ID document |\n| `collateral` | Object | Yes | Details of the collateral being offered |\n| `collateral.type` | String | Yes | Type of collateral — either `\"car\"` or `\"jewelry\"` |\n| `collateral.details` | Object | Yes | Additional details about the collateral (JSON object) |\n| `bank` | Object | Yes | The applicant's bank account information |\n| `bank.bankName` | String | Yes | Name of the bank (e.g. `\"UBA\"`) |\n| `bank.accountNumber` | String | Yes | Bank account number |\n| `bank.accountName` | String | Yes | Name on the bank account |\n| `guarantor` | Object | Yes | Information about the loan guarantor |\n| `guarantor.fullName` | String | Yes | Full name of the guarantor |\n| `guarantor.phoneNumber` | String | Yes | Guarantor's phone number |\n| `guarantor.relationship` | String | Yes | Guarantor's relationship to the applicant (e.g. `\"father\"`) |\n\n---\n\n### Example Request Body\n\n``` json\n{\n    \"amount\": 20000,\n    \"purpose\": \"For my business\",\n    \"duration\": \"6 months\",\n    \"govID\": \"https://example.com/gov-id.jpg\",\n    \"collateral\": {\n        \"type\": \"car\",\n        \"details\": {}\n    },\n    \"bank\": {\n        \"bankName\": \"UBA\",\n        \"accountNumber\": \"1234567891\",\n        \"accountName\": \"NICHOLAS AGBO\"\n    },\n    \"guarantor\": {\n        \"fullName\": \"Nick Dad\",\n        \"phoneNumber\": \"08104284095\",\n        \"relationship\": \"father\"\n    }\n}\n\n ```\n\n---\n\n### Authentication\n\nThis endpoint requires a valid Bearer Token passed via the `Authorization` header. The token is referenced using the `{{token}}` variable. Both **business** and **individual (user)** accounts must authenticate with a valid token before submitting a loan application.\n\n---\n\n### Notes\n\n- This endpoint supports loan applications for both **individual users** and **business accounts**. The authenticated role is determined by the Bearer Token provided.\n    \n- Ensure the `govID` field contains a valid, accessible URL to the government ID document.\n    \n- The `collateral.details` field accepts any valid JSON object with additional collateral information.\n    \n- The `duration` field is a string and should specify the repayment period clearly (e.g. `\"6 months\"`, `\"1 year\"`).","operationId":"repayLoan","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"amount":{"type":"number","example":200000},"senderName":{"type":"string","example":"string"},"sessionID":{"type":"string","example":"string"}}},"examples":{"Repay Loan":{"value":{"amount":200000,"senderName":"string","sessionID":"string"}}}}}},"responses":{"200":{"description":"Response","headers":{"Connection":{"schema":{"type":"string","example":"keep-alive"}},"Content-Length":{"schema":{"type":"string","example":"225"}},"Content-Security-Policy":{"schema":{"type":"string","example":"default-src 'self';base-uri 'self';font-src 'self' https: data:;form-action 'self';frame-ancestors 'self';img-src 'self' data:;object-src 'none';script-src 'self';script-src-attr 'none';style-src 'self' https: 'unsafe-inline';upgrade-insecure-requests"}},"Cross-Origin-Opener-Policy":{"schema":{"type":"string","example":"same-origin"}},"Cross-Origin-Resource-Policy":{"schema":{"type":"string","example":"same-origin"}},"Date":{"schema":{"type":"string","example":"Mon, 18 May 2026 12:18:18 GMT"}},"ETag":{"schema":{"type":"string","example":"W/\"e1-mYrgsOMjvmyoul0p5mmMF0p+7Ug\""}},"Keep-Alive":{"schema":{"type":"string","example":"timeout=5"}},"Origin-Agent-Cluster":{"schema":{"type":"string","example":"?1"}},"Referrer-Policy":{"schema":{"type":"string","example":"no-referrer"}},"Strict-Transport-Security":{"schema":{"type":"string","example":"max-age=31536000; includeSubDomains"}},"Vary":{"schema":{"type":"string","example":"Accept-Encoding"}},"X-Content-Type-Options":{"schema":{"type":"string","example":"nosniff"}},"X-DNS-Prefetch-Control":{"schema":{"type":"string","example":false}},"X-Download-Options":{"schema":{"type":"string","example":"noopen"}},"X-Frame-Options":{"schema":{"type":"string","example":"SAMEORIGIN"}},"X-Permitted-Cross-Domain-Policies":{"schema":{"type":"string","example":"none"}},"X-XSS-Protection":{"schema":{"type":"string","example":"0"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"amount":{"type":"number","example":200000},"createdAt":{"type":"string","example":"2026-05-24T12:11:15.715Z"},"id":{"type":"string","example":"6a12eae45fe11d3431d63fa0"},"loanID":{"type":"string","example":"6a0af87ea1bc557b14ff4a49"},"senderName":{"type":"string","example":"string"},"sessionID":{"type":"string","example":"string"},"status":{"type":"string","example":"pending"},"updatedAt":{"type":"string","example":"2026-05-24T12:11:15.715Z"}}},"examples":{"Response":{"value":{"amount":200000,"createdAt":"2026-05-24T12:11:15.715Z","id":"6a12eae45fe11d3431d63fa0","loanID":"6a0af87ea1bc557b14ff4a49","senderName":"string","sessionID":"string","status":"pending","updatedAt":"2026-05-24T12:11:15.715Z"}}}}}}},"security":[{"bearerAuth":[]}]},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","example":"6a0af87ea1bc557b14ff4a49"}}]},"/loans":{"get":{"summary":"Get Loans","description":"## Get Loans\n\nFetches loan records from the system. The behavior of this endpoint is **role-dependent**:\n\n- **Business** users retrieve only the loans they have applied for.\n    \n- **User (individual)** role retrieves only their own loan applications.\n    \n- **Admin** fetches all loan records across both roles, with full borrower details attached to each record.\n    \n\n---\n\n### HTTP Method & URL\n\n```\nGET {{baseURL}}/loans\n\n ```\n\n---\n\n### Authentication\n\nThis request requires a valid authentication token. Ensure the `token` variable is set in your active environment or globals before sending.\n\n| Type | Variable | Usage |\n| --- | --- | --- |\n| Bearer | `{{token}}` | Authorization header |\n\n---\n\n### Query Parameters\n\n| Parameter | Type | Required | Description |\n| --- | --- | --- | --- |\n| `pg` | Integer | No | Page number for pagination (e.g. `1`) |\n| `max` | Integer | No | Maximum number of loan records to return per page (e.g. `10`) |\n| `count` | Boolean | No | Whether to include the total record count in the response (e.g. `true`) |\n\n---\n\n### Role-Based Behavior\n\n| Role | Records Returned |\n| --- | --- |\n| `user` | Only loans applied by the authenticated individual user |\n| `business` | Only loans applied by the authenticated business account |\n| `admin` | All loan records from both users and businesses, with full details attached |\n\n---\n\n### Response Structure\n\nEach loan object in the response contains the following fields:\n\n| Field | Description |\n| --- | --- |\n| `id` | Unique identifier for the loan |\n| `accountID` | ID of the account (user or business) associated with the loan |\n| `amount` | The loan amount requested |\n| `purpose` | The stated purpose of the loan |\n| `duration` | Loan duration/tenure |\n| `govID` | Government-issued ID reference for the borrower |\n| `status` | Current loan status (e.g. `pending`, rejected, approved, schedule) |\n| `schedule` | Repayment schedule details |\n| `isRepaid` | Boolean indicating whether the loan has been fully repaid |\n| `createdAt` | Timestamp when the loan record was created |\n| `updatedAt` | Timestamp when the loan record was last updated |\n| `collateral` | Object with `type` and `details` of any provided collateral |\n| `bank` | Object with `bankName`, `accountNumber`, and `accountName` |\n| `guarantor` | Object with `fullName`, `phoneNumber`, and `relationship` |\n\n> **Note:** Admin responses include full borrower details attached to each loan record, while user and business responses are scoped to their own applications only. \n  \n\n---\n\n### Example Request\n\n``` http\nGET {{baseURL}}/loans?pg=1&max=10&count=true\nAuthorization: Bearer {{token}}\n\n ```","operationId":"getLoans","parameters":[{"name":"count","in":"query","schema":{"type":"string","example":"true"}},{"name":"pg","in":"query","schema":{"type":"string","example":"1"}},{"name":"max","in":"query","schema":{"type":"string","example":"10"}}],"responses":{"200":{"description":"Response / Response / Response","headers":{"Connection":{"schema":{"type":"string","example":"keep-alive"}},"Content-Encoding":{"schema":{"type":"string","example":"br"}},"Content-Security-Policy":{"schema":{"type":"string","example":"default-src 'self';base-uri 'self';font-src 'self' https: data:;form-action 'self';frame-ancestors 'self';img-src 'self' data:;object-src 'none';script-src 'self';script-src-attr 'none';style-src 'self' https: 'unsafe-inline';upgrade-insecure-requests"}},"Cross-Origin-Opener-Policy":{"schema":{"type":"string","example":"same-origin"}},"Cross-Origin-Resource-Policy":{"schema":{"type":"string","example":"same-origin"}},"Date":{"schema":{"type":"string","example":"Thu, 19 Mar 2026 17:19:05 GMT"}},"ETag":{"schema":{"type":"string","example":"W/\"1482-PHJeQIs92AzuAfY3rkfNyhPP9M8\""}},"Keep-Alive":{"schema":{"type":"string","example":"timeout=5"}},"Origin-Agent-Cluster":{"schema":{"type":"string","example":"?1"}},"Referrer-Policy":{"schema":{"type":"string","example":"no-referrer"}},"Strict-Transport-Security":{"schema":{"type":"string","example":"max-age=31536000; includeSubDomains"}},"Transfer-Encoding":{"schema":{"type":"string","example":"chunked"}},"Vary":{"schema":{"type":"string","example":"Accept-Encoding"}},"X-Content-Type-Options":{"schema":{"type":"string","example":"nosniff"}},"X-DNS-Prefetch-Control":{"schema":{"type":"string","example":false}},"X-Download-Options":{"schema":{"type":"string","example":"noopen"}},"X-Frame-Options":{"schema":{"type":"string","example":"SAMEORIGIN"}},"X-Permitted-Cross-Domain-Policies":{"schema":{"type":"string","example":"none"}},"X-XSS-Protection":{"schema":{"type":"string","example":"0"}}},"content":{"application/json":{"schema":{"example":[{"accountID":"6a0adae0d2648481301659f8","allowed":[],"amount":20000,"bank":{"accountName":"NICHOLAS AGBO","accountNumber":"1234567891","bankName":"UBA"},"collateral":{"details":{},"type":"car"},"createdAt":"2026-05-18T11:31:07.781Z","duration":"6 months","govID":"https://","guarantor":{"fullName":"Nick Dad","phoneNumber":"08104284095","relationship":"father"},"id":"6a0af87ea1bc557b14ff4a49","isRepaid":false,"purpose":"For my business","schedule":null,"signedAgreement":null,"status":"pending","updatedAt":"2026-05-18T11:31:07.781Z"}],"anyOf":[{"type":"array","items":{"type":"object","properties":{"accountID":{"type":"string","example":"6a0adae0d2648481301659f8"},"allowed":{"type":"array","items":{},"example":[]},"amount":{"type":"number","example":20000},"bank":{"type":"object","properties":{"accountName":{"type":"string","example":"NICHOLAS AGBO"},"accountNumber":{"type":"string","example":"1234567891"},"bankName":{"type":"string","example":"UBA"}}},"collateral":{"type":"object","properties":{"details":{"type":"object","properties":{}},"type":{"type":"string","example":"car"}}},"createdAt":{"type":"string","example":"2026-05-18T11:31:07.781Z"},"duration":{"type":"string","example":"6 months"},"govID":{"type":"string","example":"https://"},"guarantor":{"type":"object","properties":{"fullName":{"type":"string","example":"Nick Dad"},"phoneNumber":{"type":"string","example":"08104284095"},"relationship":{"type":"string","example":"father"}}},"id":{"type":"string","example":"6a0af87ea1bc557b14ff4a49"},"isRepaid":{"type":"boolean","example":false},"purpose":{"type":"string","example":"For my business"},"schedule":{"nullable":true,"example":null},"signedAgreement":{"nullable":true,"example":null},"status":{"type":"string","example":"pending"},"updatedAt":{"type":"string","example":"2026-05-18T11:31:07.781Z"}}},"example":[{"accountID":"6a0adae0d2648481301659f8","allowed":[],"amount":20000,"bank":{"accountName":"NICHOLAS AGBO","accountNumber":"1234567891","bankName":"UBA"},"collateral":{"details":{},"type":"car"},"createdAt":"2026-05-18T11:31:07.781Z","duration":"6 months","govID":"https://","guarantor":{"fullName":"Nick Dad","phoneNumber":"08104284095","relationship":"father"},"id":"6a0af87ea1bc557b14ff4a49","isRepaid":false,"purpose":"For my business","schedule":null,"signedAgreement":null,"status":"pending","updatedAt":"2026-05-18T11:31:07.781Z"}]},{"type":"object","properties":{"total":{"type":"number","example":1}}},{"type":"object","properties":{"total":{"type":"number","example":1}}}]},"examples":{"Response":{"value":{"total":1}}}}}}},"security":[{"bearerAuth":[]}]}},"/loans/{id}":{"get":{"summary":"Get Loan by ID","description":"## Get Loan by ID\n\nFetches a single loan record by its unique identifier. Unlike the **Get Loans** endpoint which returns a list, this endpoint returns the full details of one specific loan.\n\n---\n\n### HTTP Method & URL\n\n```\nGET {{baseURL}}/loans/:id\n\n ```\n\n---\n\n### Authentication\n\nThis request requires a valid authentication token. Ensure the `token` variable is set in your active environment or globals before sending.\n\n| Type | Variable | Usage |\n| --- | --- | --- |\n| Bearer | `{{token}}` | Authorization header |\n\n---\n\n### Path Variable\n\n| Variable | Example Value | Description |\n| --- | --- | --- |\n| `id` | `6a0af87ea1bc557b14ff4a49` | The unique identifier of the loan to retrieve. |\n\n---\n\n### Response Structure\n\nA successful request returns a single loan object with the following fields:\n\n| Field | Type | Description |\n| --- | --- | --- |\n| `id` | String | Unique identifier for the loan |\n| `accountID` | String | ID of the account (user or business) associated with the loan |\n| `amount` | Number | The loan amount requested |\n| `purpose` | String | The stated purpose of the loan |\n| `duration` | String | Loan duration/tenure (e.g. `\"6 months\"`) |\n| `govID` | String | URL to the government-issued ID document uploaded by the borrower |\n| `status` | String | Current loan status (e.g. `pending`, `approved`, `rejected`, `schedule`) |\n| `schedule` | Object | null | Repayment schedule details, or `null` if not yet generated |\n| `isRepaid` | Boolean | Whether the loan has been fully repaid |\n| `collateral` | Object | Collateral info — includes `type` (e.g. `\"car\"`) and `details` |\n| `bank` | Object | Bank account details — `bankName`, `accountNumber`, `accountName` |\n| `guarantor` | Object | Guarantor details — `fullName`, `phoneNumber`, `relationship` |\n| `createdAt` | String | ISO 8601 timestamp of when the loan was created |\n| `updatedAt` | String | ISO 8601 timestamp of the last update to the loan record |","operationId":"getLoanById","responses":{"200":{"description":"Response","headers":{"Connection":{"schema":{"type":"string","example":"keep-alive"}},"Content-Length":{"schema":{"type":"string","example":"502"}},"Content-Security-Policy":{"schema":{"type":"string","example":"default-src 'self';base-uri 'self';font-src 'self' https: data:;form-action 'self';frame-ancestors 'self';img-src 'self' data:;object-src 'none';script-src 'self';script-src-attr 'none';style-src 'self' https: 'unsafe-inline';upgrade-insecure-requests"}},"Cross-Origin-Opener-Policy":{"schema":{"type":"string","example":"same-origin"}},"Cross-Origin-Resource-Policy":{"schema":{"type":"string","example":"same-origin"}},"Date":{"schema":{"type":"string","example":"Mon, 18 May 2026 12:46:51 GMT"}},"ETag":{"schema":{"type":"string","example":"W/\"1f6-NjJJwIXiE/+kXFQY6U2+uRK4cxg\""}},"Keep-Alive":{"schema":{"type":"string","example":"timeout=5"}},"Origin-Agent-Cluster":{"schema":{"type":"string","example":"?1"}},"Referrer-Policy":{"schema":{"type":"string","example":"no-referrer"}},"Strict-Transport-Security":{"schema":{"type":"string","example":"max-age=31536000; includeSubDomains"}},"Vary":{"schema":{"type":"string","example":"Accept-Encoding"}},"X-Content-Type-Options":{"schema":{"type":"string","example":"nosniff"}},"X-DNS-Prefetch-Control":{"schema":{"type":"string","example":false}},"X-Download-Options":{"schema":{"type":"string","example":"noopen"}},"X-Frame-Options":{"schema":{"type":"string","example":"SAMEORIGIN"}},"X-Permitted-Cross-Domain-Policies":{"schema":{"type":"string","example":"none"}},"X-XSS-Protection":{"schema":{"type":"string","example":"0"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"accountID":{"type":"string","example":"6a0adae0d2648481301659f8"},"allowed":{"type":"array","items":{},"example":[]},"amount":{"type":"number","example":20000},"bank":{"type":"object","properties":{"accountName":{"type":"string","example":"NICHOLAS AGBO"},"accountNumber":{"type":"string","example":"1234567891"},"bankName":{"type":"string","example":"UBA"}}},"collateral":{"type":"object","properties":{"details":{"type":"object","properties":{}},"type":{"type":"string","example":"car"}}},"createdAt":{"type":"string","example":"2026-05-18T11:31:07.781Z"},"duration":{"type":"string","example":"6 months"},"govID":{"type":"string","example":"https://"},"guarantor":{"type":"object","properties":{"fullName":{"type":"string","example":"Nick Dad"},"phoneNumber":{"type":"string","example":"08104284095"},"relationship":{"type":"string","example":"father"}}},"id":{"type":"string","example":"6a0af87ea1bc557b14ff4a49"},"isRepaid":{"type":"boolean","example":false},"purpose":{"type":"string","example":"For my business"},"schedule":{"nullable":true,"example":null},"signedAgreement":{"nullable":true,"example":null},"status":{"type":"string","example":"pending"},"updatedAt":{"type":"string","example":"2026-05-18T11:31:07.781Z"}}},"examples":{"Response":{"value":{"accountID":"6a0adae0d2648481301659f8","allowed":[],"amount":20000,"bank":{"accountName":"NICHOLAS AGBO","accountNumber":"1234567891","bankName":"UBA"},"collateral":{"details":{},"type":"car"},"createdAt":"2026-05-18T11:31:07.781Z","duration":"6 months","govID":"https://","guarantor":{"fullName":"Nick Dad","phoneNumber":"08104284095","relationship":"father"},"id":"6a0af87ea1bc557b14ff4a49","isRepaid":false,"purpose":"For my business","schedule":null,"signedAgreement":null,"status":"pending","updatedAt":"2026-05-18T11:31:07.781Z"}}}}}}},"security":[{"bearerAuth":[]}]},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","example":"6a0af87ea1bc557b14ff4a49"}}]},"/payments":{"get":{"summary":"Get Payments","description":"## Get Payments\n\nRetrieves payment records based on the authenticated user's role. Each role fetches only its own payment records independently, while an **admin** can fetch all payment records across all roles.\n\n---\n\n### HTTP Method & URL\n\n| Method | URL |\n| --- | --- |\n| `GET` | `{{baseURL}}/payments` |\n\n---\n\n### Path Variables\n\nNone.\n\n---\n\n### Query Parameters\n\nNone.\n\n---\n\n### Request Headers\n\nNo custom headers are required beyond authentication.\n\n---\n\n### Authentication\n\nThis request uses **Bearer Token** authentication. The token is stored in the `{{token}}` variable. Ensure `token` and `{{baseURL}}` are set in your active environment before sending.\n\n---\n\n### Role-Based Behavior\n\n| Role | Behavior |\n| --- | --- |\n| **User** | Fetches only the payment records associated with that user |\n| **Business** | Fetches only the payment records associated with that business |\n| **Admin** | Fetches all payment records across all roles |\n\n---\n\n### Response\n\nA successful request returns `200 OK` with a JSON array of payment objects.\n\n#### Payment Object\n\n| Field | Type | Description |\n| --- | --- | --- |\n| `id` | string | Unique payment ID |\n| `loanID` | string | ID of the associated loan |\n| `amount` | number | Payment amount |\n| `senderName` | string | Name of the sender |\n| `sessionID` | string | Payment session identifier |\n| `status` | string | Payment status (e.g. `pending`) |\n| `createdAt` | string (ISO 8601) | Timestamp when the payment was created |\n| `updatedAt` | string (ISO 8601) | Timestamp when the payment was last updated |\n| `Loan` | object | The associated loan record (see below) |\n\n#### Loan Object (`Loan`)\n\n| Field | Type | Description |\n| --- | --- | --- |\n| `id` | string | Unique loan ID |\n| `accountID` | string | ID of the account that applied for the loan |\n| `amount` | number | Loan amount requested |\n| `purpose` | string | Stated purpose of the loan |\n| `duration` | string | Loan repayment duration (e.g. `6 months`) |\n| `govID` | string | URL to the uploaded government ID |\n| `status` | string | Loan status (e.g. `pending`) |\n| `schedule` | any | Repayment schedule (null if not yet set) |\n| `isRepaid` | boolean | Whether the loan has been fully repaid |\n| `createdAt` | string (ISO 8601) | Timestamp when the loan was created |\n| `updatedAt` | string (ISO 8601) | Timestamp when the loan was last updated |\n| `collateral` | object | Collateral details (see below) |\n| `bank` | object | Bank account details (see below) |\n| `guarantor` | object | Guarantor details (see below) |\n\n#### Collateral Object (`Loan.collateral`)\n\n| Field | Type | Description |\n| --- | --- | --- |\n| `type` | string | Type of collateral (e.g. `car`) |\n| `details` | object | Additional collateral details |\n\n#### Bank Object (`Loan.bank`)\n\n| Field | Type | Description |\n| --- | --- | --- |\n| `bankName` | string | Name of the bank |\n| `accountNumber` | string | Bank account number |\n| `accountName` | string | Name on the bank account |\n\n#### Guarantor Object (`Loan.guarantor`)\n\n| Field | Type | Description |\n| --- | --- | --- |\n| `fullName` | string | Full name of the guarantor |\n| `phoneNumber` | string | Guarantor's phone number |\n| `relationship` | string | Relationship to the applicant (e.g. `father`) |\n\n---\n\n#### Example Response\n\n``` json\n{\n  \"id\": \"6a0b0389f6f445af220a8b0d\",\n  \"loanID\": \"6a0af87ea1bc557b14ff4a49\",\n  \"amount\": 200000,\n  \"senderName\": \"string\",\n  \"sessionID\": \"string\",\n  \"status\": \"pending\",\n  \"createdAt\": \"2026-05-18T12:18:11.433Z\",\n  \"updatedAt\": \"2026-05-18T12:18:11.433Z\",\n  \"Loan\": {\n    \"collateral\": {\n      \"type\": \"car\",\n      \"details\": {}\n    },\n    \"bank\": {\n      \"bankName\": \"UBA\",\n      \"accountNumber\": \"1234567891\",\n      \"accountName\": \"NICHOLAS AGBO\"\n    },\n    \"guarantor\": {\n      \"fullName\": \"Nick Dad\",\n      \"phoneNumber\": \"08104284095\",\n      \"relationship\": \"father\"\n    },\n    \"id\": \"6a0af87ea1bc557b14ff4a49\",\n    \"accountID\": \"6a0adae0d2648481301659f8\",\n    \"amount\": 20000,\n    \"purpose\": \"For my business\",\n    \"duration\": \"6 months\",\n    \"govID\": \"https://\",\n    \"status\": \"pending\",\n    \"schedule\": null,\n    \"isRepaid\": false,\n    \"createdAt\": \"2026-05-18T11:31:07.781Z\",\n    \"updatedAt\": \"2026-05-18T11:31:07.781Z\"\n  }\n}\n\n ```","operationId":"getPayments","responses":{"200":{"description":"Response","headers":{"Connection":{"schema":{"type":"string","example":"keep-alive"}},"Content-Length":{"schema":{"type":"string","example":"735"}},"Content-Security-Policy":{"schema":{"type":"string","example":"default-src 'self';base-uri 'self';font-src 'self' https: data:;form-action 'self';frame-ancestors 'self';img-src 'self' data:;object-src 'none';script-src 'self';script-src-attr 'none';style-src 'self' https: 'unsafe-inline';upgrade-insecure-requests"}},"Cross-Origin-Opener-Policy":{"schema":{"type":"string","example":"same-origin"}},"Cross-Origin-Resource-Policy":{"schema":{"type":"string","example":"same-origin"}},"Date":{"schema":{"type":"string","example":"Mon, 18 May 2026 13:32:16 GMT"}},"ETag":{"schema":{"type":"string","example":"W/\"2df-TGbQQnX5TZ505bPMMgBHpFk1hHo\""}},"Keep-Alive":{"schema":{"type":"string","example":"timeout=5"}},"Origin-Agent-Cluster":{"schema":{"type":"string","example":"?1"}},"Referrer-Policy":{"schema":{"type":"string","example":"no-referrer"}},"Strict-Transport-Security":{"schema":{"type":"string","example":"max-age=31536000; includeSubDomains"}},"Vary":{"schema":{"type":"string","example":"Accept-Encoding"}},"X-Content-Type-Options":{"schema":{"type":"string","example":"nosniff"}},"X-DNS-Prefetch-Control":{"schema":{"type":"string","example":false}},"X-Download-Options":{"schema":{"type":"string","example":"noopen"}},"X-Frame-Options":{"schema":{"type":"string","example":"SAMEORIGIN"}},"X-Permitted-Cross-Domain-Policies":{"schema":{"type":"string","example":"none"}},"X-XSS-Protection":{"schema":{"type":"string","example":"0"}}},"content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"Loan":{"type":"object","properties":{"accountID":{"type":"string","example":"6a0adae0d2648481301659f8"},"amount":{"type":"number","example":20000},"bank":{"type":"object","properties":{"accountName":{"type":"string","example":"NICHOLAS AGBO"},"accountNumber":{"type":"string","example":"1234567891"},"bankName":{"type":"string","example":"UBA"}}},"collateral":{"type":"object","properties":{"details":{"type":"object","properties":{}},"type":{"type":"string","example":"car"}}},"createdAt":{"type":"string","example":"2026-05-18T11:31:07.781Z"},"duration":{"type":"string","example":"6 months"},"govID":{"type":"string","example":"https://"},"guarantor":{"type":"object","properties":{"fullName":{"type":"string","example":"Nick Dad"},"phoneNumber":{"type":"string","example":"08104284095"},"relationship":{"type":"string","example":"father"}}},"id":{"type":"string","example":"6a0af87ea1bc557b14ff4a49"},"isRepaid":{"type":"boolean","example":false},"purpose":{"type":"string","example":"For my business"},"schedule":{"nullable":true,"example":null},"status":{"type":"string","example":"pending"},"updatedAt":{"type":"string","example":"2026-05-18T11:31:07.781Z"}}},"amount":{"type":"number","example":200000},"createdAt":{"type":"string","example":"2026-05-18T12:18:11.433Z"},"id":{"type":"string","example":"6a0b0389f6f445af220a8b0d"},"loanID":{"type":"string","example":"6a0af87ea1bc557b14ff4a49"},"senderName":{"type":"string","example":"string"},"sessionID":{"type":"string","example":"string"},"status":{"type":"string","example":"pending"},"updatedAt":{"type":"string","example":"2026-05-18T12:18:11.433Z"}}},"example":[{"Loan":{"accountID":"6a0adae0d2648481301659f8","amount":20000,"bank":{"accountName":"NICHOLAS AGBO","accountNumber":"1234567891","bankName":"UBA"},"collateral":{"details":{},"type":"car"},"createdAt":"2026-05-18T11:31:07.781Z","duration":"6 months","govID":"https://","guarantor":{"fullName":"Nick Dad","phoneNumber":"08104284095","relationship":"father"},"id":"6a0af87ea1bc557b14ff4a49","isRepaid":false,"purpose":"For my business","schedule":null,"status":"pending","updatedAt":"2026-05-18T11:31:07.781Z"},"amount":200000,"createdAt":"2026-05-18T12:18:11.433Z","id":"6a0b0389f6f445af220a8b0d","loanID":"6a0af87ea1bc557b14ff4a49","senderName":"string","sessionID":"string","status":"pending","updatedAt":"2026-05-18T12:18:11.433Z"}]},"examples":{"Response":{"value":[{"Loan":{"accountID":"6a0adae0d2648481301659f8","amount":20000,"bank":{"accountName":"NICHOLAS AGBO","accountNumber":"1234567891","bankName":"UBA"},"collateral":{"details":{},"type":"car"},"createdAt":"2026-05-18T11:31:07.781Z","duration":"6 months","govID":"https://","guarantor":{"fullName":"Nick Dad","phoneNumber":"08104284095","relationship":"father"},"id":"6a0af87ea1bc557b14ff4a49","isRepaid":false,"purpose":"For my business","schedule":null,"status":"pending","updatedAt":"2026-05-18T11:31:07.781Z"},"amount":200000,"createdAt":"2026-05-18T12:18:11.433Z","id":"6a0b0389f6f445af220a8b0d","loanID":"6a0af87ea1bc557b14ff4a49","senderName":"string","sessionID":"string","status":"pending","updatedAt":"2026-05-18T12:18:11.433Z"}]}}}}}},"security":[{"bearerAuth":[]}]}},"/payments/{id}":{"get":{"summary":"Get Payment by ID","description":"## Get Payment by ID\n\nRetrieves a single payment record by its unique identifier. Access is role-based — each role can only retrieve its own payment records, while an **admin** can retrieve any payment record.\n\n---\n\n### HTTP Method & URL\n\n| Method | URL |\n| --- | --- |\n| `GET` | `{{baseURL}}/payments/:id` |\n\n---\n\n### Path Variables\n\n| Parameter | Type | Required | Description |\n| --- | --- | --- | --- |\n| `id` | `string` | Yes | The unique identifier of the payment record to retrieve. |\n\n---\n\n### Query Parameters\n\nNone.\n\n---\n\n### Request Headers\n\nNo custom headers are required beyond authentication.\n\n---\n\n### Authentication\n\nThis request uses **Bearer Token** authentication. The token is sourced from the `{{token}}` environment variable and must be included in the `Authorization` header.\n\n---\n\n### Response\n\nReturns a single payment object along with its associated loan details.\n\n**Sample Response (200 OK):**\n\n```json\n{\n  \"id\": \"6a0b0389f6f445af220a8b0d\",\n  \"loanID\": \"6a0af87ea1bc557b14ff4a49\",\n  \"amount\": 200000,\n  \"senderName\": \"string\",\n  \"sessionID\": \"string\",\n  \"status\": \"pending\",\n  \"createdAt\": \"2026-05-18T12:18:11.433Z\",\n  \"updatedAt\": \"2026-05-18T12:18:11.433Z\",\n  \"Loan\": {\n    \"collateral\": {\n      \"type\": \"car\",\n      \"details\": {}\n    },\n    \"bank\": {\n      \"bankName\": \"UBA\",\n      \"accountNumber\": \"1234567891\",\n      \"accountName\": \"NICHOLAS AGBO\"\n    },\n    \"guarantor\": {\n      \"fullName\": \"Nick Dad\",\n      \"phoneNumber\": \"08104284095\",\n      \"relationship\": \"father\"\n    },\n    \"id\": \"6a0af87ea1bc557b14ff4a49\",\n    \"amount\": 20000,\n    \"purpose\": \"For my business\",\n    \"duration\": \"6 months\",\n    \"status\": \"pending\",\n    \"isRepaid\": false,\n    \"createdAt\": \"2026-05-18T11:31:07.781Z\",\n    \"updatedAt\": \"2026-05-18T11:31:07.781Z\"\n  }\n}\n```\n\n#### Response Fields\n\n| Field | Type | Description |\n| --- | --- | --- |\n| `id` | `string` | Unique identifier of the payment record. |\n| `loanID` | `string` | The ID of the associated loan. |\n| `amount` | `number` | Payment amount in the smallest currency unit. |\n| `senderName` | `string` | Name of the payment sender. |\n| `sessionID` | `string` | Session identifier for the transaction. |\n| `status` | `string` | Current status of the payment (e.g., `pending`). |\n| `createdAt` | `string` | ISO 8601 timestamp of when the payment was created. |\n| `updatedAt` | `string` | ISO 8601 timestamp of the last update. |\n| `Loan` | `object` | The associated loan object with full loan details. |","operationId":"getPaymentById","responses":{"200":{"description":"Response","headers":{"Connection":{"schema":{"type":"string","example":"keep-alive"}},"Content-Length":{"schema":{"type":"string","example":"735"}},"Content-Security-Policy":{"schema":{"type":"string","example":"default-src 'self';base-uri 'self';font-src 'self' https: data:;form-action 'self';frame-ancestors 'self';img-src 'self' data:;object-src 'none';script-src 'self';script-src-attr 'none';style-src 'self' https: 'unsafe-inline';upgrade-insecure-requests"}},"Cross-Origin-Opener-Policy":{"schema":{"type":"string","example":"same-origin"}},"Cross-Origin-Resource-Policy":{"schema":{"type":"string","example":"same-origin"}},"Date":{"schema":{"type":"string","example":"Mon, 18 May 2026 13:32:16 GMT"}},"ETag":{"schema":{"type":"string","example":"W/\"2df-TGbQQnX5TZ505bPMMgBHpFk1hHo\""}},"Keep-Alive":{"schema":{"type":"string","example":"timeout=5"}},"Origin-Agent-Cluster":{"schema":{"type":"string","example":"?1"}},"Referrer-Policy":{"schema":{"type":"string","example":"no-referrer"}},"Strict-Transport-Security":{"schema":{"type":"string","example":"max-age=31536000; includeSubDomains"}},"Vary":{"schema":{"type":"string","example":"Accept-Encoding"}},"X-Content-Type-Options":{"schema":{"type":"string","example":"nosniff"}},"X-DNS-Prefetch-Control":{"schema":{"type":"string","example":false}},"X-Download-Options":{"schema":{"type":"string","example":"noopen"}},"X-Frame-Options":{"schema":{"type":"string","example":"SAMEORIGIN"}},"X-Permitted-Cross-Domain-Policies":{"schema":{"type":"string","example":"none"}},"X-XSS-Protection":{"schema":{"type":"string","example":"0"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"Loan":{"type":"object","properties":{"accountID":{"type":"string","example":"6a0adae0d2648481301659f8"},"amount":{"type":"number","example":20000},"bank":{"type":"object","properties":{"accountName":{"type":"string","example":"NICHOLAS AGBO"},"accountNumber":{"type":"string","example":"1234567891"},"bankName":{"type":"string","example":"UBA"}}},"collateral":{"type":"object","properties":{"details":{"type":"object","properties":{}},"type":{"type":"string","example":"car"}}},"createdAt":{"type":"string","example":"2026-05-18T11:31:07.781Z"},"duration":{"type":"string","example":"6 months"},"govID":{"type":"string","example":"https://"},"guarantor":{"type":"object","properties":{"fullName":{"type":"string","example":"Nick Dad"},"phoneNumber":{"type":"string","example":"08104284095"},"relationship":{"type":"string","example":"father"}}},"id":{"type":"string","example":"6a0af87ea1bc557b14ff4a49"},"isRepaid":{"type":"boolean","example":false},"purpose":{"type":"string","example":"For my business"},"schedule":{"nullable":true,"example":null},"status":{"type":"string","example":"pending"},"updatedAt":{"type":"string","example":"2026-05-18T11:31:07.781Z"}}},"amount":{"type":"number","example":200000},"createdAt":{"type":"string","example":"2026-05-18T12:18:11.433Z"},"id":{"type":"string","example":"6a0b0389f6f445af220a8b0d"},"loanID":{"type":"string","example":"6a0af87ea1bc557b14ff4a49"},"senderName":{"type":"string","example":"string"},"sessionID":{"type":"string","example":"string"},"status":{"type":"string","example":"pending"},"updatedAt":{"type":"string","example":"2026-05-18T12:18:11.433Z"}}},"examples":{"Response":{"value":{"Loan":{"accountID":"6a0adae0d2648481301659f8","amount":20000,"bank":{"accountName":"NICHOLAS AGBO","accountNumber":"1234567891","bankName":"UBA"},"collateral":{"details":{},"type":"car"},"createdAt":"2026-05-18T11:31:07.781Z","duration":"6 months","govID":"https://","guarantor":{"fullName":"Nick Dad","phoneNumber":"08104284095","relationship":"father"},"id":"6a0af87ea1bc557b14ff4a49","isRepaid":false,"purpose":"For my business","schedule":null,"status":"pending","updatedAt":"2026-05-18T11:31:07.781Z"},"amount":200000,"createdAt":"2026-05-18T12:18:11.433Z","id":"6a0b0389f6f445af220a8b0d","loanID":"6a0af87ea1bc557b14ff4a49","senderName":"string","sessionID":"string","status":"pending","updatedAt":"2026-05-18T12:18:11.433Z"}}}}}}},"security":[{"bearerAuth":[]}]},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","example":"6a0b0389f6f445af220a8b0d"}}]},"/loan/payments/{id}":{"get":{"summary":"Get Payments by Loan ID","description":"## Get Payments by Loan ID\n\nRetrieves all payment records associated with a specific loan. Access is role-based — each role can only retrieve payment records for loans they are associated with, while an **admin** can retrieve payment records for any loan.\n\n---\n\n### HTTP Method & URL\n\n| Method | URL |\n| --- | --- |\n| `GET` | `{{baseURL}}/loan/payments/:id` |\n\n---\n\n### Path Variables\n\n| Parameter | Type | Required | Description |\n| --- | --- | --- | --- |\n| `id` | `string` | Yes | The unique identifier of the loan whose payments are to be retrieved. |\n\n---\n\n### Query Parameters\n\nNone.\n\n---\n\n### Request Headers\n\nNo custom headers are required beyond authentication.\n\n---\n\n### Authentication\n\nThis request uses **Bearer Token** authentication. The token is referenced via the `{{token}}` variable.\n\n---\n\n### Response\n\nReturns an array of payment objects associated with the specified loan.\n\n#### Response Body (200 OK)\n\n| Field | Type | Description |\n| --- | --- | --- |\n| `id` | `string` | Unique identifier of the payment record. |\n| `loanID` | `string` | The ID of the loan this payment belongs to. |\n| `amount` | `number` | The payment amount. |\n| `senderName` | `string` | Name of the sender who made the payment. |\n| `sessionID` | `string` | Session identifier for the payment transaction. |\n| `status` | `string` | Current status of the payment (e.g., `pending`, `completed`). |\n| `createdAt` | `string` | ISO 8601 timestamp of when the payment was created. |\n| `updatedAt` | `string` | ISO 8601 timestamp of the last update to the payment record. |\n| `Loan` | `object` | Nested loan object containing details about the associated loan. |\n| `Loan.collateral` | `object` | Collateral information for the loan (e.g., type, details). |\n| `Loan.bank` | `object` | Bank details associated with the loan (bank name, account number, account name). |\n| `Loan.guarantor` | `object` | Guarantor details (full name, phone number, relationship). |\n\n---\n\n### Example Response\n\n``` json\n[\n  {\n    \"id\": \"6a0b0389f6f445af220a8b0d\",\n    \"loanID\": \"6a0af87ea1bc557b14ff4a49\",\n    \"amount\": 200000,\n    \"senderName\": \"string\",\n    \"sessionID\": \"string\",\n    \"status\": \"pending\",\n    \"createdAt\": \"2026-05-18T12:18:11.433Z\",\n    \"updatedAt\": \"2026-05-18T12:18:11.433Z\",\n    \"Loan\": {\n      \"collateral\": {\n        \"type\": \"car\",\n        \"details\": {}\n      },\n      \"bank\": {\n        \"bankName\": \"UBA\",\n        \"accountNumber\": \"1234567891\",\n        \"accountName\": \"NICHOLAS AGBO\"\n      },\n      \"guarantor\": {\n        \"fullName\": \"Nick Dad\",\n        \"phoneNumber\": \"08104284095\",\n        \"relationship\": \"father\"\n      },\n      \"id\": \"6a0af87ea1bc557b14ff4a49\"\n    }\n  }\n]\n\n ```","operationId":"getPaymentsByLoanId","responses":{"200":{"description":"Response","headers":{"Connection":{"schema":{"type":"string","example":"keep-alive"}},"Content-Length":{"schema":{"type":"string","example":"735"}},"Content-Security-Policy":{"schema":{"type":"string","example":"default-src 'self';base-uri 'self';font-src 'self' https: data:;form-action 'self';frame-ancestors 'self';img-src 'self' data:;object-src 'none';script-src 'self';script-src-attr 'none';style-src 'self' https: 'unsafe-inline';upgrade-insecure-requests"}},"Cross-Origin-Opener-Policy":{"schema":{"type":"string","example":"same-origin"}},"Cross-Origin-Resource-Policy":{"schema":{"type":"string","example":"same-origin"}},"Date":{"schema":{"type":"string","example":"Mon, 18 May 2026 13:32:16 GMT"}},"ETag":{"schema":{"type":"string","example":"W/\"2df-TGbQQnX5TZ505bPMMgBHpFk1hHo\""}},"Keep-Alive":{"schema":{"type":"string","example":"timeout=5"}},"Origin-Agent-Cluster":{"schema":{"type":"string","example":"?1"}},"Referrer-Policy":{"schema":{"type":"string","example":"no-referrer"}},"Strict-Transport-Security":{"schema":{"type":"string","example":"max-age=31536000; includeSubDomains"}},"Vary":{"schema":{"type":"string","example":"Accept-Encoding"}},"X-Content-Type-Options":{"schema":{"type":"string","example":"nosniff"}},"X-DNS-Prefetch-Control":{"schema":{"type":"string","example":false}},"X-Download-Options":{"schema":{"type":"string","example":"noopen"}},"X-Frame-Options":{"schema":{"type":"string","example":"SAMEORIGIN"}},"X-Permitted-Cross-Domain-Policies":{"schema":{"type":"string","example":"none"}},"X-XSS-Protection":{"schema":{"type":"string","example":"0"}}},"content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"Loan":{"type":"object","properties":{"accountID":{"type":"string","example":"6a0adae0d2648481301659f8"},"amount":{"type":"number","example":20000},"bank":{"type":"object","properties":{"accountName":{"type":"string","example":"NICHOLAS AGBO"},"accountNumber":{"type":"string","example":"1234567891"},"bankName":{"type":"string","example":"UBA"}}},"collateral":{"type":"object","properties":{"details":{"type":"object","properties":{}},"type":{"type":"string","example":"car"}}},"createdAt":{"type":"string","example":"2026-05-18T11:31:07.781Z"},"duration":{"type":"string","example":"6 months"},"govID":{"type":"string","example":"https://"},"guarantor":{"type":"object","properties":{"fullName":{"type":"string","example":"Nick Dad"},"phoneNumber":{"type":"string","example":"08104284095"},"relationship":{"type":"string","example":"father"}}},"id":{"type":"string","example":"6a0af87ea1bc557b14ff4a49"},"isRepaid":{"type":"boolean","example":false},"purpose":{"type":"string","example":"For my business"},"schedule":{"nullable":true,"example":null},"status":{"type":"string","example":"pending"},"updatedAt":{"type":"string","example":"2026-05-18T11:31:07.781Z"}}},"amount":{"type":"number","example":200000},"createdAt":{"type":"string","example":"2026-05-18T12:18:11.433Z"},"id":{"type":"string","example":"6a0b0389f6f445af220a8b0d"},"loanID":{"type":"string","example":"6a0af87ea1bc557b14ff4a49"},"senderName":{"type":"string","example":"string"},"sessionID":{"type":"string","example":"string"},"status":{"type":"string","example":"pending"},"updatedAt":{"type":"string","example":"2026-05-18T12:18:11.433Z"}}},"example":[{"Loan":{"accountID":"6a0adae0d2648481301659f8","amount":20000,"bank":{"accountName":"NICHOLAS AGBO","accountNumber":"1234567891","bankName":"UBA"},"collateral":{"details":{},"type":"car"},"createdAt":"2026-05-18T11:31:07.781Z","duration":"6 months","govID":"https://","guarantor":{"fullName":"Nick Dad","phoneNumber":"08104284095","relationship":"father"},"id":"6a0af87ea1bc557b14ff4a49","isRepaid":false,"purpose":"For my business","schedule":null,"status":"pending","updatedAt":"2026-05-18T11:31:07.781Z"},"amount":200000,"createdAt":"2026-05-18T12:18:11.433Z","id":"6a0b0389f6f445af220a8b0d","loanID":"6a0af87ea1bc557b14ff4a49","senderName":"string","sessionID":"string","status":"pending","updatedAt":"2026-05-18T12:18:11.433Z"}]},"examples":{"Response":{"value":[{"Loan":{"accountID":"6a0adae0d2648481301659f8","amount":20000,"bank":{"accountName":"NICHOLAS AGBO","accountNumber":"1234567891","bankName":"UBA"},"collateral":{"details":{},"type":"car"},"createdAt":"2026-05-18T11:31:07.781Z","duration":"6 months","govID":"https://","guarantor":{"fullName":"Nick Dad","phoneNumber":"08104284095","relationship":"father"},"id":"6a0af87ea1bc557b14ff4a49","isRepaid":false,"purpose":"For my business","schedule":null,"status":"pending","updatedAt":"2026-05-18T11:31:07.781Z"},"amount":200000,"createdAt":"2026-05-18T12:18:11.433Z","id":"6a0b0389f6f445af220a8b0d","loanID":"6a0af87ea1bc557b14ff4a49","senderName":"string","sessionID":"string","status":"pending","updatedAt":"2026-05-18T12:18:11.433Z"}]}}}}}},"security":[{"bearerAuth":[]}]},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","example":"6a0af87ea1bc557b14ff4a49"}}]},"/image/profile":{"put":{"summary":"Upload profile picture","description":"Upload profile picture","operationId":"uploadProfilePicture","requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"image":{"description":"single image","type":"string","format":"binary"}}}}}},"responses":{"200":{"description":"Response","headers":{"Connection":{"schema":{"type":"string","example":"keep-alive"}},"Content-Length":{"schema":{"type":"string","example":"127"}},"Content-Security-Policy":{"schema":{"type":"string","example":"default-src 'self';base-uri 'self';font-src 'self' https: data:;form-action 'self';frame-ancestors 'self';img-src 'self' data:;object-src 'none';script-src 'self';script-src-attr 'none';style-src 'self' https: 'unsafe-inline';upgrade-insecure-requests"}},"Cross-Origin-Opener-Policy":{"schema":{"type":"string","example":"same-origin"}},"Cross-Origin-Resource-Policy":{"schema":{"type":"string","example":"same-origin"}},"Date":{"schema":{"type":"string","example":"Tue, 17 Mar 2026 12:43:17 GMT"}},"ETag":{"schema":{"type":"string","example":"W/\"7f-zbQSaBC1LTCmutUoAVm2eYu34NY\""}},"Keep-Alive":{"schema":{"type":"string","example":"timeout=5"}},"Origin-Agent-Cluster":{"schema":{"type":"string","example":"?1"}},"Referrer-Policy":{"schema":{"type":"string","example":"no-referrer"}},"Strict-Transport-Security":{"schema":{"type":"string","example":"max-age=31536000; includeSubDomains"}},"Vary":{"schema":{"type":"string","example":"Accept-Encoding"}},"X-Content-Type-Options":{"schema":{"type":"string","example":"nosniff"}},"X-DNS-Prefetch-Control":{"schema":{"type":"string","example":false}},"X-Download-Options":{"schema":{"type":"string","example":"noopen"}},"X-Frame-Options":{"schema":{"type":"string","example":"SAMEORIGIN"}},"X-Permitted-Cross-Domain-Policies":{"schema":{"type":"string","example":"none"}},"X-XSS-Protection":{"schema":{"type":"string","example":"0"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"url":{"type":"string","example":"https://afroinvestor-bucket.s3.us-east-1.amazonaws.com/profile-images/img-69b94357b3bb975066f838a4.jpg"}}},"examples":{"Response":{"value":{"success":true,"url":"https://afroinvestor-bucket.s3.us-east-1.amazonaws.com/profile-images/img-69b94357b3bb975066f838a4.jpg"}}}}}}},"security":[{"bearerAuth":[]}]}},"/file/upload":{"put":{"summary":"Upload file","description":"Upload file","operationId":"uploadFile","requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"category":{"description":"file/image","type":"string","example":"image"},"file":{"description":"file to upload","type":"string","format":"binary"},"mime":{"description":"file type (optional)","type":"string","example":"image/jpg"},"sizes":{"description":"Width and Height (IF IMAGE)","type":"string","example":"{\"width\":500,\"height\":500}"}}}}}},"responses":{"200":{"description":"Response","headers":{"Connection":{"schema":{"type":"string","example":"keep-alive"}},"Content-Length":{"schema":{"type":"string","example":"156"}},"Content-Security-Policy":{"schema":{"type":"string","example":"default-src 'self';base-uri 'self';font-src 'self' https: data:;form-action 'self';frame-ancestors 'self';img-src 'self' data:;object-src 'none';script-src 'self';script-src-attr 'none';style-src 'self' https: 'unsafe-inline';upgrade-insecure-requests"}},"Cross-Origin-Opener-Policy":{"schema":{"type":"string","example":"same-origin"}},"Cross-Origin-Resource-Policy":{"schema":{"type":"string","example":"same-origin"}},"Date":{"schema":{"type":"string","example":"Sun, 29 Mar 2026 04:56:22 GMT"}},"ETag":{"schema":{"type":"string","example":"W/\"9c-q1xAo9aQiho0nYRCRxf80DxQ/ys\""}},"Keep-Alive":{"schema":{"type":"string","example":"timeout=5"}},"Origin-Agent-Cluster":{"schema":{"type":"string","example":"?1"}},"Referrer-Policy":{"schema":{"type":"string","example":"no-referrer"}},"Strict-Transport-Security":{"schema":{"type":"string","example":"max-age=31536000; includeSubDomains"}},"Vary":{"schema":{"type":"string","example":"Accept-Encoding"}},"X-Content-Type-Options":{"schema":{"type":"string","example":"nosniff"}},"X-DNS-Prefetch-Control":{"schema":{"type":"string","example":false}},"X-Download-Options":{"schema":{"type":"string","example":"noopen"}},"X-Frame-Options":{"schema":{"type":"string","example":"SAMEORIGIN"}},"X-Permitted-Cross-Domain-Policies":{"schema":{"type":"string","example":"none"}},"X-XSS-Protection":{"schema":{"type":"string","example":"0"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"etag":{"type":"string","example":"\"72de2ea3a55aee6aa923ddc14a412862\""},"location":{"type":"string","example":"https://afroinvestor-bucket.s3.us-east-1.amazonaws.com/stocks/img-GMcP4isb67.jpg"},"success":{"type":"boolean","example":true}}},"examples":{"Response":{"value":{"etag":"\"72de2ea3a55aee6aa923ddc14a412862\"","location":"https://afroinvestor-bucket.s3.us-east-1.amazonaws.com/stocks/img-GMcP4isb67.jpg","success":true}}}}}}},"security":[{"bearerAuth":[]}]}},"/file/delete":{"post":{"summary":"Delete uploaded file","description":"Delete uploaded file","operationId":"deleteUploadedFile","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","example":"https://afroinvestor-bucket.s3.us-east-1.amazonaws.com/docs/fl-g97HUYNR2G-ff36542e-e86b-4a13-8502-3bd389f76f13.pdf"}}},"examples":{"Delete uploaded file":{"value":{"url":"https://afroinvestor-bucket.s3.us-east-1.amazonaws.com/docs/fl-g97HUYNR2G-ff36542e-e86b-4a13-8502-3bd389f76f13.pdf"}}}}}},"responses":{"200":{"description":""}},"security":[{"bearerAuth":[]}]}},"/file/secure":{"post":{"summary":"Get secure file","description":"Get secure file","operationId":"getSecureFile","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","example":"https://afroinvestor-bucket.s3.us-east-1.amazonaws.com/docs/img-ckiWrgNV3j-4c404641-1831-470e-b305-41339e6530b2.pdf"}}},"examples":{"Get secure file":{"value":{"url":"https://afroinvestor-bucket.s3.us-east-1.amazonaws.com/docs/img-ckiWrgNV3j-4c404641-1831-470e-b305-41339e6530b2.pdf"}}}}}},"responses":{"200":{"description":"Response","headers":{"Connection":{"schema":{"type":"string","example":"keep-alive"}},"Content-Length":{"schema":{"type":"string","example":"488"}},"Content-Security-Policy":{"schema":{"type":"string","example":"default-src 'self';base-uri 'self';font-src 'self' https: data:;form-action 'self';frame-ancestors 'self';img-src 'self' data:;object-src 'none';script-src 'self';script-src-attr 'none';style-src 'self' https: 'unsafe-inline';upgrade-insecure-requests"}},"Cross-Origin-Opener-Policy":{"schema":{"type":"string","example":"same-origin"}},"Cross-Origin-Resource-Policy":{"schema":{"type":"string","example":"same-origin"}},"Date":{"schema":{"type":"string","example":"Sun, 29 Mar 2026 05:27:36 GMT"}},"ETag":{"schema":{"type":"string","example":"W/\"1e8-MVOEzUpG/6oEvPJ+aWZqGN6vChg\""}},"Keep-Alive":{"schema":{"type":"string","example":"timeout=5"}},"Origin-Agent-Cluster":{"schema":{"type":"string","example":"?1"}},"Referrer-Policy":{"schema":{"type":"string","example":"no-referrer"}},"Strict-Transport-Security":{"schema":{"type":"string","example":"max-age=31536000; includeSubDomains"}},"Vary":{"schema":{"type":"string","example":"Accept-Encoding"}},"X-Content-Type-Options":{"schema":{"type":"string","example":"nosniff"}},"X-DNS-Prefetch-Control":{"schema":{"type":"string","example":false}},"X-Download-Options":{"schema":{"type":"string","example":"noopen"}},"X-Frame-Options":{"schema":{"type":"string","example":"SAMEORIGIN"}},"X-Permitted-Cross-Domain-Policies":{"schema":{"type":"string","example":"none"}},"X-XSS-Protection":{"schema":{"type":"string","example":"0"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"url":{"type":"string","example":"https://abujaloans-bucket.s3.us-east-1.amazonaws.com/docs/img-ckiWrgNV3j-4c404641-1831-470e-b305-41339e6530b2.pdf?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIAYROMDPPV5LQUUJU5%2F20260329%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20260329T052735Z&X-Amz-Expires=1800&X-Amz-Signature=8b589e23144156f55003e9278744cb273fe9a43fb400e3939e3d19c70939eb3b&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject"}}},"examples":{"Response":{"value":{"success":true,"url":"https://abujaloans-bucket.s3.us-east-1.amazonaws.com/docs/img-ckiWrgNV3j-4c404641-1831-470e-b305-41339e6530b2.pdf?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIAYROMDPPV5LQUUJU5%2F20260329%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20260329T052735Z&X-Amz-Expires=1800&X-Amz-Signature=8b589e23144156f55003e9278744cb273fe9a43fb400e3939e3d19c70939eb3b&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject"}}}}}}},"security":[{"bearerAuth":[]}]}}},"components":{"securitySchemes":{"apiKey":{"type":"apiKey","name":"X-API-Key","in":"header"},"bearerAuth":{"type":"http","scheme":"bearer"}}},"security":[{"apiKey":[]}],"tags":[{"name":"Business","description":"The `/me` endpoints let you manage information about the authenticated user."},{"name":"Personal","description":"The `/me` endpoints let you manage information about the authenticated user."},{"name":"Admin"}]}