diff --git a/.mocharc.json b/.mocharc.json new file mode 100644 index 0000000..4e96785 --- /dev/null +++ b/.mocharc.json @@ -0,0 +1,6 @@ +{ + "extensions": ["ts"], + "reporter": "spec", + "spec": ["test/**/*.ts"], + "import": "tsx" +} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index e297da1..c69e9a1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7,17 +7,78 @@ "": { "name": "paystack-mcp", "version": "1.0.0", - "license": "MTI", + "license": "MIT", "dependencies": { "@modelcontextprotocol/inspector": "^0.18.0", "@modelcontextprotocol/sdk": "^1.25.2", "zod": "^3.25.76" }, + "bin": { + "paystack": "build/index.js" + }, "devDependencies": { + "@apidevtools/swagger-parser": "^12.1.0", + "@types/mocha": "^10.0.10", "@types/node": "^25.0.7", + "js-yaml": "^4.1.1", + "mocha": "^11.7.5", + "openapi-types": "^12.1.3", + "tsx": "^4.21.0", "typescript": "^5.9.3" } }, + "node_modules/@apidevtools/json-schema-ref-parser": { + "version": "14.0.1", + "resolved": "https://registry.npmjs.org/@apidevtools/json-schema-ref-parser/-/json-schema-ref-parser-14.0.1.tgz", + "integrity": "sha512-Oc96zvmxx1fqoSEdUmfmvvb59/KDOnUoJ7s2t7bISyAn0XEz57LCCw8k2Y4Pf3mwKaZLMciESALORLgfe2frCw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/json-schema": "^7.0.15", + "js-yaml": "^4.1.0" + }, + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://github.com/sponsors/philsturgeon" + } + }, + "node_modules/@apidevtools/openapi-schemas": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@apidevtools/openapi-schemas/-/openapi-schemas-2.1.0.tgz", + "integrity": "sha512-Zc1AlqrJlX3SlpupFGpiLi2EbteyP7fXmUOGup6/DnkRgjP9bgMM/ag+n91rsv0U1Gpz0H3VILA/o3bW7Ua6BQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "node_modules/@apidevtools/swagger-methods": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@apidevtools/swagger-methods/-/swagger-methods-3.0.2.tgz", + "integrity": "sha512-QAkD5kK2b1WfjDS/UQn/qQkbwF31uqRjPTrsCs5ZG9BQGAkjwvqGFjjPqAuzac/IYzpPtRzjCP1WrTuAIjMrXg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@apidevtools/swagger-parser": { + "version": "12.1.0", + "resolved": "https://registry.npmjs.org/@apidevtools/swagger-parser/-/swagger-parser-12.1.0.tgz", + "integrity": "sha512-e5mJoswsnAX0jG+J09xHFYQXb/bUc5S3pLpMxUuRUA2H8T2kni3yEoyz2R3Dltw5f4A6j6rPNMpWTK+iVDFlng==", + "dev": true, + "license": "MIT", + "dependencies": { + "@apidevtools/json-schema-ref-parser": "14.0.1", + "@apidevtools/openapi-schemas": "^2.1.0", + "@apidevtools/swagger-methods": "^3.0.2", + "ajv": "^8.17.1", + "ajv-draft-04": "^1.0.0", + "call-me-maybe": "^1.0.2" + }, + "peerDependencies": { + "openapi-types": ">=7" + } + }, "node_modules/@cspotcode/source-map-support": { "version": "0.8.1", "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", @@ -30,6 +91,448 @@ "node": ">=12" } }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.27.2.tgz", + "integrity": "sha512-GZMB+a0mOMZs4MpDbj8RJp4cw+w1WV5NYD6xzgvzUJ5Ek2jerwfO2eADyI6ExDSUED+1X8aMbegahsJi+8mgpw==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.27.2.tgz", + "integrity": "sha512-DVNI8jlPa7Ujbr1yjU2PfUSRtAUZPG9I1RwW4F4xFB1Imiu2on0ADiI/c3td+KmDtVKNbi+nffGDQMfcIMkwIA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.27.2.tgz", + "integrity": "sha512-pvz8ZZ7ot/RBphf8fv60ljmaoydPU12VuXHImtAs0XhLLw+EXBi2BLe3OYSBslR4rryHvweW5gmkKFwTiFy6KA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.27.2.tgz", + "integrity": "sha512-z8Ank4Byh4TJJOh4wpz8g2vDy75zFL0TlZlkUkEwYXuPSgX8yzep596n6mT7905kA9uHZsf/o2OJZubl2l3M7A==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.27.2.tgz", + "integrity": "sha512-davCD2Zc80nzDVRwXTcQP/28fiJbcOwvdolL0sOiOsbwBa72kegmVU0Wrh1MYrbuCL98Omp5dVhQFWRKR2ZAlg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.27.2.tgz", + "integrity": "sha512-ZxtijOmlQCBWGwbVmwOF/UCzuGIbUkqB1faQRf5akQmxRJ1ujusWsb3CVfk/9iZKr2L5SMU5wPBi1UWbvL+VQA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.27.2.tgz", + "integrity": "sha512-lS/9CN+rgqQ9czogxlMcBMGd+l8Q3Nj1MFQwBZJyoEKI50XGxwuzznYdwcav6lpOGv5BqaZXqvBSiB/kJ5op+g==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.27.2.tgz", + "integrity": "sha512-tAfqtNYb4YgPnJlEFu4c212HYjQWSO/w/h/lQaBK7RbwGIkBOuNKQI9tqWzx7Wtp7bTPaGC6MJvWI608P3wXYA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.27.2.tgz", + "integrity": "sha512-vWfq4GaIMP9AIe4yj1ZUW18RDhx6EPQKjwe7n8BbIecFtCQG4CfHGaHuh7fdfq+y3LIA2vGS/o9ZBGVxIDi9hw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.27.2.tgz", + "integrity": "sha512-hYxN8pr66NsCCiRFkHUAsxylNOcAQaxSSkHMMjcpx0si13t1LHFphxJZUiGwojB1a/Hd5OiPIqDdXONia6bhTw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.27.2.tgz", + "integrity": "sha512-MJt5BRRSScPDwG2hLelYhAAKh9imjHK5+NE/tvnRLbIqUWa+0E9N4WNMjmp/kXXPHZGqPLxggwVhz7QP8CTR8w==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.27.2.tgz", + "integrity": "sha512-lugyF1atnAT463aO6KPshVCJK5NgRnU4yb3FUumyVz+cGvZbontBgzeGFO1nF+dPueHD367a2ZXe1NtUkAjOtg==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.27.2.tgz", + "integrity": "sha512-nlP2I6ArEBewvJ2gjrrkESEZkB5mIoaTswuqNFRv/WYd+ATtUpe9Y09RnJvgvdag7he0OWgEZWhviS1OTOKixw==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.27.2.tgz", + "integrity": "sha512-C92gnpey7tUQONqg1n6dKVbx3vphKtTHJaNG2Ok9lGwbZil6DrfyecMsp9CrmXGQJmZ7iiVXvvZH6Ml5hL6XdQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.27.2.tgz", + "integrity": "sha512-B5BOmojNtUyN8AXlK0QJyvjEZkWwy/FKvakkTDCziX95AowLZKR6aCDhG7LeF7uMCXEJqwa8Bejz5LTPYm8AvA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.27.2.tgz", + "integrity": "sha512-p4bm9+wsPwup5Z8f4EpfN63qNagQ47Ua2znaqGH6bqLlmJ4bx97Y9JdqxgGZ6Y8xVTixUnEkoKSHcpRlDnNr5w==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.27.2.tgz", + "integrity": "sha512-uwp2Tip5aPmH+NRUwTcfLb+W32WXjpFejTIOWZFw/v7/KnpCDKG66u4DLcurQpiYTiYwQ9B7KOeMJvLCu/OvbA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-arm64": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.27.2.tgz", + "integrity": "sha512-Kj6DiBlwXrPsCRDeRvGAUb/LNrBASrfqAIok+xB0LxK8CHqxZ037viF13ugfsIpePH93mX7xfJp97cyDuTZ3cw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.27.2.tgz", + "integrity": "sha512-HwGDZ0VLVBY3Y+Nw0JexZy9o/nUAWq9MlV7cahpaXKW6TOzfVno3y3/M8Ga8u8Yr7GldLOov27xiCnqRZf0tCA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.27.2.tgz", + "integrity": "sha512-DNIHH2BPQ5551A7oSHD0CKbwIA/Ox7+78/AWkbS5QoRzaqlev2uFayfSxq68EkonB+IKjiuxBFoV8ESJy8bOHA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.27.2.tgz", + "integrity": "sha512-/it7w9Nb7+0KFIzjalNJVR5bOzA9Vay+yIPLVHfIQYG/j+j9VTH84aNB8ExGKPU4AzfaEvN9/V4HV+F+vo8OEg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openharmony-arm64": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.27.2.tgz", + "integrity": "sha512-LRBbCmiU51IXfeXk59csuX/aSaToeG7w48nMwA6049Y4J4+VbWALAuXcs+qcD04rHDuSCSRKdmY63sruDS5qag==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.27.2.tgz", + "integrity": "sha512-kMtx1yqJHTmqaqHPAzKCAkDaKsffmXkPHThSfRwZGyuqyIeBvf08KSsYXl+abf5HDAPMJIPnbBfXvP2ZC2TfHg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.27.2.tgz", + "integrity": "sha512-Yaf78O/B3Kkh+nKABUF++bvJv5Ijoy9AN1ww904rOXZFLWVc5OLOfL56W+C8F9xn5JQZa3UX6m+IktJnIb1Jjg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.27.2.tgz", + "integrity": "sha512-Iuws0kxo4yusk7sw70Xa2E2imZU5HoixzxfGCdxwBdhiDgt9vX9VUCBhqcwY7/uh//78A1hMkkROMJq9l27oLQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.27.2.tgz", + "integrity": "sha512-sRdU18mcKf7F+YgheI/zGf5alZatMUTKj/jNS6l744f9u3WFu4v7twcUI9vu4mknF4Y9aDlblIie0IM+5xxaqQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, "node_modules/@floating-ui/core": { "version": "1.7.3", "resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.7.3.tgz", @@ -79,6 +582,109 @@ "hono": "^4" } }, + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-regex": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", + "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-styles": { + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz", + "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@isaacs/cliui/node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@isaacs/cliui/node_modules/strip-ansi": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.2.tgz", + "integrity": "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, "node_modules/@jridgewell/resolve-uri": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", @@ -271,6 +877,17 @@ } } }, + "node_modules/@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=14" + } + }, "node_modules/@radix-ui/number": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/@radix-ui/number/-/number-1.1.1.tgz", @@ -1239,11 +1856,24 @@ "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", "license": "MIT" }, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/mocha": { + "version": "10.0.10", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.10.tgz", + "integrity": "sha512-xPyYSz1cMPnJQhl0CLMH68j3gprKZaTjG3s5Vi+fDgx+uhG9NOXwbVt52eFS8ECyXhyKcjDLCBEqBExKuiZb7Q==", + "dev": true, + "license": "MIT" + }, "node_modules/@types/node": { "version": "25.0.7", "resolved": "https://registry.npmjs.org/@types/node/-/node-25.0.7.tgz", "integrity": "sha512-C/er7DlIZgRJO7WtTdYovjIFzGsz0I95UlMyR9anTb4aCpBSRWe5Jc1/RvLKUfzmOxHPGjSE5+63HgLtndxU4w==", - "peer": true, "dependencies": { "undici-types": "~7.16.0" } @@ -1299,6 +1929,21 @@ "url": "https://github.com/sponsors/epoberezkin" } }, + "node_modules/ajv-draft-04": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/ajv-draft-04/-/ajv-draft-04-1.0.0.tgz", + "integrity": "sha512-mv00Te6nmYbRp5DCwclxtt7yV/joXJPGS7nM+97GdxvuttCOfgI3K4U25zboyeX0O+myI8ERluxQe5wljMmVIw==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "ajv": "^8.5.0" + }, + "peerDependenciesMeta": { + "ajv": { + "optional": true + } + } + }, "node_modules/ajv-formats": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-3.0.1.tgz", @@ -1345,6 +1990,13 @@ "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", "license": "MIT" }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true, + "license": "Python-2.0" + }, "node_modules/aria-hidden": { "version": "1.2.6", "resolved": "https://registry.npmjs.org/aria-hidden/-/aria-hidden-1.2.6.tgz", @@ -1396,6 +2048,13 @@ "concat-map": "0.0.1" } }, + "node_modules/browser-stdout": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", + "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", + "dev": true, + "license": "ISC" + }, "node_modules/bundle-name": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/bundle-name/-/bundle-name-4.1.0.tgz", @@ -1446,6 +2105,26 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/call-me-maybe": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.2.tgz", + "integrity": "sha512-HpX65o1Hnr9HH25ojC1YGs7HCQLq0GCOibSaWER0eNpgJ/Z1MZv2mTc7+xh6WOPxbRVcmgbv4hGU+uSQ/2xFZQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", @@ -1474,6 +2153,22 @@ "node": ">=8" } }, + "node_modules/chokidar": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", + "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", + "dev": true, + "license": "MIT", + "dependencies": { + "readdirp": "^4.0.1" + }, + "engines": { + "node": ">= 14.16.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, "node_modules/class-variance-authority": { "version": "0.7.1", "resolved": "https://registry.npmjs.org/class-variance-authority/-/class-variance-authority-0.7.1.tgz", @@ -1674,6 +2369,19 @@ } } }, + "node_modules/decamelize": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", + "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/default-browser": { "version": "5.4.0", "resolved": "https://registry.npmjs.org/default-browser/-/default-browser-5.4.0.tgz", @@ -1750,6 +2458,13 @@ "node": ">= 0.4" } }, + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", + "dev": true, + "license": "MIT" + }, "node_modules/ee-first": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", @@ -1796,6 +2511,48 @@ "node": ">= 0.4" } }, + "node_modules/esbuild": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.27.2.tgz", + "integrity": "sha512-HyNQImnsOC7X9PMNaCIeAm4ISCQXs5a5YasTXVliKv4uuBo1dKrG0A+uQS8M5eXjVMnLg3WgXaKvprHlFJQffw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.27.2", + "@esbuild/android-arm": "0.27.2", + "@esbuild/android-arm64": "0.27.2", + "@esbuild/android-x64": "0.27.2", + "@esbuild/darwin-arm64": "0.27.2", + "@esbuild/darwin-x64": "0.27.2", + "@esbuild/freebsd-arm64": "0.27.2", + "@esbuild/freebsd-x64": "0.27.2", + "@esbuild/linux-arm": "0.27.2", + "@esbuild/linux-arm64": "0.27.2", + "@esbuild/linux-ia32": "0.27.2", + "@esbuild/linux-loong64": "0.27.2", + "@esbuild/linux-mips64el": "0.27.2", + "@esbuild/linux-ppc64": "0.27.2", + "@esbuild/linux-riscv64": "0.27.2", + "@esbuild/linux-s390x": "0.27.2", + "@esbuild/linux-x64": "0.27.2", + "@esbuild/netbsd-arm64": "0.27.2", + "@esbuild/netbsd-x64": "0.27.2", + "@esbuild/openbsd-arm64": "0.27.2", + "@esbuild/openbsd-x64": "0.27.2", + "@esbuild/openharmony-arm64": "0.27.2", + "@esbuild/sunos-x64": "0.27.2", + "@esbuild/win32-arm64": "0.27.2", + "@esbuild/win32-ia32": "0.27.2", + "@esbuild/win32-x64": "0.27.2" + } + }, "node_modules/escalade": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", @@ -1810,6 +2567,19 @@ "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==" }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/etag": { "version": "1.8.1", "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", @@ -1841,7 +2611,6 @@ "version": "5.2.1", "resolved": "https://registry.npmjs.org/express/-/express-5.2.1.tgz", "integrity": "sha512-hIS4idWWai69NezIdRt2xFVofaF4j+6INOpJlVOLDO8zXGpUVEVzIYk12UUi2JzjEzWL3IOAxcTubgz9Po0yXw==", - "peer": true, "dependencies": { "accepts": "^2.0.0", "body-parser": "^2.2.1", @@ -1963,6 +2732,50 @@ "url": "https://opencollective.com/express" } }, + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/flat": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", + "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", + "dev": true, + "license": "BSD-3-Clause", + "bin": { + "flat": "cli.js" + } + }, + "node_modules/foreground-child": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.1.tgz", + "integrity": "sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==", + "dev": true, + "license": "ISC", + "dependencies": { + "cross-spawn": "^7.0.6", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/formdata-polyfill": { "version": "4.0.10", "resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz", @@ -1991,6 +2804,21 @@ "node": ">= 0.8" } }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, "node_modules/function-bind": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", @@ -2052,6 +2880,66 @@ "node": ">= 0.4" } }, + "node_modules/get-tsconfig": { + "version": "4.13.0", + "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.13.0.tgz", + "integrity": "sha512-1VKTZJCwBrvbd+Wn3AOgQP/2Av+TfTCOlE4AcRJE72W1ksZXbAx8PPBR9RzgTeSPzlPMHrbANMH3LbltH73wxQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "resolve-pkg-maps": "^1.0.0" + }, + "funding": { + "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" + } + }, + "node_modules/glob": { + "version": "10.5.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.5.0.tgz", + "integrity": "sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg==", + "dev": true, + "license": "ISC", + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob/node_modules/brace-expansion": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/glob/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/gopd": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", @@ -2094,6 +2982,16 @@ "node": ">= 0.4" } }, + "node_modules/he": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", + "dev": true, + "license": "MIT", + "bin": { + "he": "bin/he" + } + }, "node_modules/hono": { "version": "4.11.4", "resolved": "https://registry.npmjs.org/hono/-/hono-4.11.4.tgz", @@ -2192,11 +3090,44 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-plain-obj": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", + "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/is-promise": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-4.0.0.tgz", "integrity": "sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ==" }, + "node_modules/is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/is-wsl": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-3.1.0.tgz", @@ -2217,6 +3148,22 @@ "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==" }, + "node_modules/jackspeak": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", + "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, "node_modules/jose": { "version": "6.1.3", "resolved": "https://registry.npmjs.org/jose/-/jose-6.1.3.tgz", @@ -2231,6 +3178,19 @@ "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", "license": "MIT" }, + "node_modules/js-yaml": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.1.tgz", + "integrity": "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, "node_modules/json-schema-traverse": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", @@ -2241,6 +3201,39 @@ "resolved": "https://registry.npmjs.org/json-schema-typed/-/json-schema-typed-8.0.2.tgz", "integrity": "sha512-fQhoXdcvc3V28x7C7BMs4P5+kNlgUURe2jmUT1T//oBRMDrqy1QPelJimwZGo7Hg9VPV3EQV5Bnq4hbFy2vetA==" }, + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/log-symbols": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/loose-envify": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", @@ -2253,6 +3246,13 @@ "loose-envify": "cli.js" } }, + "node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "dev": true, + "license": "ISC" + }, "node_modules/lucide-react": { "version": "0.523.0", "resolved": "https://registry.npmjs.org/lucide-react/-/lucide-react-0.523.0.tgz", @@ -2330,6 +3330,89 @@ "node": "*" } }, + "node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/mocha": { + "version": "11.7.5", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-11.7.5.tgz", + "integrity": "sha512-mTT6RgopEYABzXWFx+GcJ+ZQ32kp4fMf0xvpZIIfSq9Z8lC/++MtcCnQ9t5FP2veYEP95FIYSvW+U9fV4xrlig==", + "dev": true, + "license": "MIT", + "dependencies": { + "browser-stdout": "^1.3.1", + "chokidar": "^4.0.1", + "debug": "^4.3.5", + "diff": "^7.0.0", + "escape-string-regexp": "^4.0.0", + "find-up": "^5.0.0", + "glob": "^10.4.5", + "he": "^1.2.0", + "is-path-inside": "^3.0.3", + "js-yaml": "^4.1.0", + "log-symbols": "^4.1.0", + "minimatch": "^9.0.5", + "ms": "^2.1.3", + "picocolors": "^1.1.1", + "serialize-javascript": "^6.0.2", + "strip-json-comments": "^3.1.1", + "supports-color": "^8.1.1", + "workerpool": "^9.2.0", + "yargs": "^17.7.2", + "yargs-parser": "^21.1.1", + "yargs-unparser": "^2.0.0" + }, + "bin": { + "_mocha": "bin/_mocha", + "mocha": "bin/mocha.js" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/mocha/node_modules/brace-expansion": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/mocha/node_modules/diff": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-7.0.0.tgz", + "integrity": "sha512-PJWHUb1RFevKCwaFA9RlG5tCd+FO5iRh9A8HEtkmBH2Li03iJriB6m6JIN4rGz3K3JLawI7/veA1xzRKP6ISBw==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/mocha/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", @@ -2437,6 +3520,52 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/openapi-types": { + "version": "12.1.3", + "resolved": "https://registry.npmjs.org/openapi-types/-/openapi-types-12.1.3.tgz", + "integrity": "sha512-N4YtSYJqghVu4iek2ZUvcN/0aqH1kRDuNqzcycDxhOUpg7GdvLa2F3DgS6yBNhInhv2r/6I0Flkn7CqL8+nIcw==", + "dev": true, + "license": "MIT" + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/package-json-from-dist": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", + "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", + "dev": true, + "license": "BlueOak-1.0.0" + }, "node_modules/parseurl": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", @@ -2445,6 +3574,16 @@ "node": ">= 0.8" } }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/path-is-inside": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", @@ -2459,6 +3598,23 @@ "node": ">=8" } }, + "node_modules/path-scurry": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "engines": { + "node": ">=16 || 14 >=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/path-to-regexp": { "version": "8.3.0", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-8.3.0.tgz", @@ -2468,6 +3624,13 @@ "url": "https://opencollective.com/express" } }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true, + "license": "ISC" + }, "node_modules/pkce-challenge": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/pkce-challenge/-/pkce-challenge-5.0.1.tgz", @@ -2520,6 +3683,16 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "^5.1.0" + } + }, "node_modules/range-parser": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", @@ -2547,7 +3720,6 @@ "resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz", "integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==", "license": "MIT", - "peer": true, "dependencies": { "loose-envify": "^1.1.0" }, @@ -2560,7 +3732,6 @@ "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz", "integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==", "license": "MIT", - "peer": true, "dependencies": { "loose-envify": "^1.1.0", "scheduler": "^0.23.2" @@ -2648,6 +3819,20 @@ } } }, + "node_modules/readdirp": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", + "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 14.18.0" + }, + "funding": { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + }, "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -2665,6 +3850,16 @@ "node": ">=0.10.0" } }, + "node_modules/resolve-pkg-maps": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", + "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" + } + }, "node_modules/router": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/router/-/router-2.2.0.tgz", @@ -2701,6 +3896,27 @@ "tslib": "^2.1.0" } }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, "node_modules/safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", @@ -2740,6 +3956,16 @@ "url": "https://opencollective.com/express" } }, + "node_modules/serialize-javascript": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", + "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "randombytes": "^2.1.0" + } + }, "node_modules/serve-handler": { "version": "6.1.6", "resolved": "https://registry.npmjs.org/serve-handler/-/serve-handler-6.1.6.tgz", @@ -2931,6 +4157,19 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/spawn-rx": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/spawn-rx/-/spawn-rx-5.1.2.tgz", @@ -2963,6 +4202,22 @@ "node": ">=8" } }, + "node_modules/string-width-cjs": { + "name": "string-width", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/strip-ansi": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", @@ -2975,6 +4230,33 @@ "node": ">=8" } }, + "node_modules/strip-ansi-cjs": { + "name": "strip-ansi", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/supports-color": { "version": "8.1.1", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", @@ -3066,6 +4348,26 @@ "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", "license": "0BSD" }, + "node_modules/tsx": { + "version": "4.21.0", + "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.21.0.tgz", + "integrity": "sha512-5C1sg4USs1lfG0GFb2RLXsdpXqBSEhAaA/0kPL01wxzpMqLILNxIxIOKiILz+cdg/pLnOUxFYOR5yhHU666wbw==", + "dev": true, + "license": "MIT", + "dependencies": { + "esbuild": "~0.27.0", + "get-tsconfig": "^4.7.5" + }, + "bin": { + "tsx": "dist/cli.mjs" + }, + "engines": { + "node": ">=18.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + } + }, "node_modules/type-is": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/type-is/-/type-is-2.0.1.tgz", @@ -3083,7 +4385,6 @@ "version": "5.9.3", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", - "peer": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -3194,6 +4495,13 @@ "node": ">= 8" } }, + "node_modules/workerpool": { + "version": "9.3.4", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-9.3.4.tgz", + "integrity": "sha512-TmPRQYYSAnnDiEB0P/Ytip7bFGvqnSU6I2BcuSw7Hx+JSg/DsUi5ebYfc8GYaSdpuvOcEs6dXxPurOYpe9QFwg==", + "dev": true, + "license": "Apache-2.0" + }, "node_modules/wrap-ansi": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", @@ -3211,6 +4519,25 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, + "node_modules/wrap-ansi-cjs": { + "name": "wrap-ansi", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", @@ -3288,6 +4615,22 @@ "node": ">=12" } }, + "node_modules/yargs-unparser": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", + "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", + "dev": true, + "license": "MIT", + "dependencies": { + "camelcase": "^6.0.0", + "decamelize": "^4.0.0", + "flat": "^5.0.2", + "is-plain-obj": "^2.1.0" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/yn": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", @@ -3297,11 +4640,23 @@ "node": ">=6" } }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/zod": { "version": "3.25.76", "resolved": "https://registry.npmjs.org/zod/-/zod-3.25.76.tgz", "integrity": "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==", - "peer": true, "funding": { "url": "https://github.com/sponsors/colinhacks" } diff --git a/package.json b/package.json index bdc1e77..fe91bcc 100644 --- a/package.json +++ b/package.json @@ -3,24 +3,33 @@ "version": "1.0.0", "description": "", "main": "index.js", - "type": "module", "bin": { "paystack": "./build/index.js" }, "scripts": { - "build": "tsc && chmod 755 build/index.js" + "dev": "tsx src/index.ts", + "build": "tsc && chmod 755 build/index.js", + "test": "mocha" }, - "files": ["build"], + "files": [ + "build" + ], "keywords": [], "author": "Andrew-Paystack", "license": "MIT", "dependencies": { + "@modelcontextprotocol/inspector": "^0.18.0", "@modelcontextprotocol/sdk": "^1.25.2", - "zod": "^3.25.76", - "@modelcontextprotocol/inspector": "^0.18.0" + "zod": "^3.25.76" }, "devDependencies": { + "@apidevtools/swagger-parser": "^12.1.0", + "@types/mocha": "^10.0.10", "@types/node": "^25.0.7", + "js-yaml": "^4.1.1", + "mocha": "^11.7.5", + "openapi-types": "^12.1.3", + "tsx": "^4.21.0", "typescript": "^5.9.3" } } diff --git a/src/data/paystack.openapi.yaml b/src/data/paystack.openapi.yaml new file mode 100644 index 0000000..9663923 --- /dev/null +++ b/src/data/paystack.openapi.yaml @@ -0,0 +1,19143 @@ +openapi: 3.0.1 +info: + title: Paystack + description: The OpenAPI specification of the Paystack API that merchants and developers can harness to build financial solutions in Africa. + version: 1.0.0 + contact: + email: techsupport@paystack.com +servers: + - url: https://api.paystack.co + description: Base API endpoint +security: + - bearerAuth: [] +tags: + - name: Transaction + description: | + A collection of endpoints for managing payments + x-product-name: Transactions + - name: Charge + description: | + A collection of endpoints for configuring and managing the payment channels when initiating a payment + x-product-name: Charges + - name: Bulk Charge + description: | + A collection of endpoints for creating and managing multiple recurring payments + x-product-name: Bulk Charges + - name: Subaccount + description: | + A collection of endpoints for creating and managing accounts for sharing a + transaction with + x-product-name: Subaccounts + - name: Split + description: | + A collection of endpoints for spliting a transaction and managing the splits + x-product-name: Transaction Splits + - name: Terminal + description: | + A collection of endpoints for building delightful in-person payment experiences + x-product-name: Terminal + - name: Virtual Terminal + description: | + A collection of endpoints for building in-person payments without a physical terminal + x-product-name: Virtual Terminal + - name: Customer + description: | + A collection of endpoints for creating and managing customers on an integration + x-product-name: Customers + - name: Direct Debit + description: | + A collection of endpoints for managing Direct Debit + x-product-name: Direct Debit + - name: Dedicated Virtual Account + description: | + A collection of endpoints for creating and managing payment accounts for customers + x-product-name: Dedicated Virtual Accounts + - name: Apple Pay + description: | + A collection of endpoints for managing application's top-level domain or subdomain accepting payment via Apple Pay + x-product-name: Apple Pay + - name: Plan + description: | + A collection of endpoints for creating and managing recurring payment + configuration + x-product-name: Plans + - name: Subscription + description: | + A collection of endpoints for creating and managing recurring payments + x-product-name: Subscriptions + - name: Transfer Recipient + description: | + A collection of endpoints for creating and managing beneficiaries that you send money to + x-product-name: Transfer Recipients + - name: Transfer + description: | + A collection of endpoints for automating sending money to beneficiaries + x-product-name: Transfers + - name: Balance + description: | + A collection of endpoints gaining insights into the amount on an integration + x-product-name: Balance + - name: Payment Request + description: | + A collection of endpoints for managing invoices for the payment of goods + and services + x-product-name: Payment Requests + - name: Product + description: | + A collection of endpoints for creating and managing inventories + x-product-name: Products + - name: Storefront + description: | + A collection of endpoints for creating and managing storefronts + x-product-name: Storefronts + - name: Order + description: | + A collection of endpoints for creating and managing orders + x-product-name: Orders + - name: Page + description: | + A collection of endpoints for creating and managing links for the + collection of payment for products + x-product-name: Payment Pages + - name: Settlement + description: | + A collection of endpoints for gaining insights into payouts + x-product-name: Settlements + - name: Integration + description: | + A collection of endpoints for managing some settings on an integration + x-product-name: Integration + - name: Refund + description: | + A collection of endpoints for creating and managing transaction reimbursement + x-product-name: Refunds + - name: Dispute + description: | + A collection of endpoints for managing transactions complaint made by customers + x-product-name: Disputes + - name: Bank + description: | + A collection of endpoints for managing bank details + x-product-name: Banks + - name: Miscellaneous + description: | + A collection of endpoints that provides utility functions + x-product-name: Miscellaneous +paths: + /transaction/initialize: + post: + tags: + - Transaction + summary: Initialize Transaction + operationId: transaction_initialize + description: Create a new transaction + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TransactionInitialize' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/TransactionInitialize' + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/TransactionInitializeResponse' + '400': + $ref: '#/components/responses/TransactionInitializeBadRequestResponse' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + /transaction/charge_authorization: + post: + tags: + - Transaction + summary: Charge Authorization + operationId: transaction_chargeAuthorization + description: Charge all authorizations marked as reusable with this endpoint whenever you need to receive payments + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TransactionChargeAuthorization' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/TransactionChargeAuthorization' + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ChargeAuthorizationResponse' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + /transaction/partial_debit: + post: + tags: + - Transaction + summary: Partial Debit + operationId: transaction_partialDebit + description: Retrieve part of a payment from a customer + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TransactionPartialDebit' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/TransactionPartialDebit' + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/TransactionPartialDebitResponse' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + /transaction/verify/{reference}: + get: + tags: + - Transaction + summary: Verify Transaction + operationId: transaction_verify + description: Verify a previously initiated transaction using it's reference + parameters: + - name: reference + in: path + description: The transaction reference to verify + required: true + schema: + type: string + example: re4lyvq3s3 + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/VerifyResponse' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /transaction: + get: + tags: + - Transaction + summary: List Transactions + operationId: transaction_list + description: List transactions that has occurred on your integration + parameters: + - in: query + name: use_cursor + description: A flag to indicate if cursor based pagination should be used + schema: + type: boolean + example: true + - in: query + name: next + description: | + An alphanumeric value returned for every cursor based retrieval, used to retrieve the next set of data + schema: + type: string + - in: query + name: previous + description: | + An alphanumeric value returned for every cursor based retrieval, used to retrieve the previous set of data + schema: + type: string + - in: query + name: per_page + schema: + type: integer + description: The number of records to fetch per request + - in: query + name: page + schema: + type: integer + description: The offset to retrieve data from + - in: query + name: from + description: The start date + schema: + type: string + format: date-time + - in: query + name: to + description: The end date + schema: + type: string + format: date-time + - in: query + name: status + description: Filter transaction by status + schema: + type: string + enum: + - success + - failed + - abandoned + - reversed + - in: query + name: source + description: The origin of the payment + schema: + type: string + enum: + - merchantApi + - checkout + - pos + - virtualTerminal + - in: query + name: terminal_id + description: Filter transactions by a terminal ID + schema: + type: string + - in: query + name: virtual_account_number + description: Filter transactions by a virtual account number + schema: + type: string + - in: query + name: customer_code + description: Filter transactions by a customer code + schema: + type: string + - in: query + name: amount + description: Filter transactions by a specific amount + schema: + type: integer + format: int64 + - in: query + name: settlement + description: The settlement ID to filter for settled transactions + schema: + type: integer + format: int64 + - in: query + name: channel + description: The payment method the customer used to complete the transaction + schema: + type: string + enum: + - card + - pos + - bank + - dedicated_nuban + - ussd + - bank_transfer + - in: query + name: subaccount_code + description: Filter transaction by subaccount code + schema: + type: string + - in: query + name: split_code + description: Filter transaction by split code + schema: + type: string + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/TransactionListResponse' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /transaction/{id}: + get: + tags: + - Transaction + summary: Fetch Transaction + operationId: transaction_fetch + description: Fetch a transaction to get its details + parameters: + - name: id + in: path + description: The ID of the transaction to fetch + required: true + schema: + type: integer + format: int64 + example: 4099260516 + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/TransactionFetchResponse' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /transaction/timeline/{id}: + get: + tags: + - Transaction + summary: Fetch Transaction Timeline + operationId: transaction_timeline + description: Fetch the steps taken from the initiation to the completion of a transaction + parameters: + - name: id + in: path + required: true + description: The ID of the transaction to fetch + schema: + type: integer + format: int64 + example: 3936799950 + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/TransactionTimelineResponse' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /transaction/totals: + get: + tags: + - Transaction + summary: Transaction Totals + operationId: transaction_totals + description: Get the total amount of all transactions + parameters: + - in: query + description: The start date + name: from + schema: + type: string + format: date-time + example: '2024-06-01T00:00:01Z' + - in: query + name: to + description: The end date + schema: + type: string + format: date-time + example: '2024-06-30T13:36:54Z' + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/TransactionTotalsResponse' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /transaction/export: + get: + tags: + - Transaction + summary: Export Transactions + operationId: transaction_export + x-operationId: transaction_exportTransaction + description: Download transactions that occurred on your integration for a specific timeframe + parameters: + - in: query + name: from + description: The start date + schema: + type: string + format: date-time + example: '2024-06-01T00:00:01Z' + - in: query + name: to + description: The end date + schema: + type: string + format: date-time + example: '2024-06-30T13:36:54Z' + - in: query + name: status + description: Filter by the status of the transaction + schema: + type: string + enum: + - success + - failed + - abandoned + - reversed + - all + example: success + - in: query + name: customer + description: Filter by customer ID + schema: + type: number + example: 123172416 + - in: query + name: subaccount_code + description: Filter by subaccount code + schema: + type: string + example: ACCT_dskvlw3y3dMukmt + - in: query + name: settlement + description: Filter by the settlement ID + schema: + type: integer + format: int64 + example: 5687910 + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/TransactionExportResponse' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /charge: + post: + tags: + - Charge + summary: Create Charge + operationId: charge_create + description: Initiate a payment by integrating the payment channel of your choice. + requestBody: + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/ChargeCreate' + - type: object + properties: + bank: + $ref: '#/components/schemas/Bank' + - type: object + properties: + mobile_money: + $ref: '#/components/schemas/MobileMoney' + - type: object + properties: + ussd: + $ref: '#/components/schemas/USSD' + - type: object + properties: + eft: + $ref: '#/components/schemas/EFT' + application/x-www-form-urlencoded: + schema: + allOf: + - $ref: '#/components/schemas/ChargeCreate' + - type: object + properties: + bank: + $ref: '#/components/schemas/Bank' + - type: object + properties: + mobile_money: + $ref: '#/components/schemas/MobileMoney' + - type: object + properties: + ussd: + $ref: '#/components/schemas/USSD' + - type: object + properties: + eft: + $ref: '#/components/schemas/EFT' + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ChargeCreateResponse' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + /charge/submit_pin: + post: + tags: + - Charge + summary: Submit PIN + operationId: charge_submitPin + description: Submit PIN to continue a charge + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ChargeSubmitPin' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/ChargeSubmitPin' + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ChargeSubmitPinResponse' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + /charge/submit_otp: + post: + tags: + - Charge + summary: Submit OTP + operationId: charge_submitOtp + description: Submit OTP to complete a charge + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ChargeSubmitOTP' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/ChargeSubmitOTP' + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ChargeSubmitOtpResponse' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + /charge/submit_phone: + post: + tags: + - Charge + summary: Submit Phone + operationId: charge_submitPhone + description: Submit phone number when requested + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ChargeSubmitPhone' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/ChargeSubmitPhone' + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ChargeSubmitPhoneResponse' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + /charge/submit_birthday: + post: + tags: + - Charge + summary: Submit Birthday + operationId: charge_submitBirthday + description: Submit the customer's birthday when requested + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ChargeSubmitBirthday' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/ChargeSubmitBirthday' + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ChargeSubmitBirthdayResponse' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + /charge/submit_address: + post: + tags: + - Charge + summary: Submit Address + operationId: charge_submitAddress + description: Send the details of the customer's address for address verification + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ChargeSubmitAddress' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/ChargeSubmitAddress' + responses: + '200': + $ref: '#/components/responses/Ok' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + /charge/{reference}: + get: + tags: + - Charge + summary: Check pending charge + operationId: charge_check + description: | + When you get `pending` as a charge status or if there was an exception when calling any of the `/charge` endpoints, wait 10 seconds or more, then make a check to see if its status has changed. Don't call too early as you may get a lot more pending than you should. + parameters: + - name: reference + in: path + required: true + description: The reference of the ongoing transaction + schema: + type: string + example: 5bwib5v6anhe9xa + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ChargeCheckPendingResponse' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /bulkcharge: + post: + tags: + - Bulk Charge + summary: Initiate Bulk Charge + operationId: bulkCharge_initiate + description: Charge multiple customers in batches + requestBody: + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/BulkChargeInitiate' + application/x-www-form-urlencoded: + schema: + type: array + items: + $ref: '#/components/schemas/BulkChargeInitiate' + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/BulkChargeInitiateResponse' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + get: + tags: + - Bulk Charge + summary: List Bulk Charge Batches + operationId: bulkCharge_list + description: List all bulk charge batches. + parameters: + - in: query + name: perPage + description: Number of records to fetch per page + schema: + type: integer + - in: query + name: page + description: The offset to retrieve data from + schema: + type: integer + - in: query + name: status + description: Filter by the status of the charges + schema: + type: string + enum: + - active + - paused + - complete + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/BulkChargeListResponse' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /bulkcharge/{code}: + parameters: + - name: code + description: The code for the charge whose batches you want to retrieve + in: path + required: true + schema: + type: string + example: BCH_180tl7oq7cayggh + get: + tags: + - Bulk Charge + summary: Fetch Bulk Charge Batch + operationId: bulkCharge_fetch + description: | + This endpoint retrieves a specific batch code. It also returns useful information on its progress by + way of the `total_charges` and `pending_charges` attributes. + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/BulkChargeFetchResponse' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /bulkcharge/{code}/charges: + get: + tags: + - Bulk Charge + summary: List Charges in a Batch + operationId: bulkCharge_charges + description: This endpoint retrieves the charges associated with a specified batch code + parameters: + - name: code + description: An code for the batch whose charges you want to retrieve + in: path + required: true + schema: + type: string + example: BCH_180tl7oq7cayggh + - in: query + name: perPage + description: Number of records to fetch per page + schema: + type: integer + - in: query + name: page + description: The offset to retrieve data from + schema: + type: integer + - in: query + name: status + description: Filter by the status of the charges + schema: + type: string + enum: + - success + - failed + - pending + - error + - inactive_authorization + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/BulkChargeFetchBulkBatchChargesResponse' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /bulkcharge/pause/{code}: + get: + tags: + - Bulk Charge + summary: Pause Bulk Charge Batch + operationId: bulkCharge_pause + description: Pause the processing of a charge batch + parameters: + - name: code + description: The batch code for the bulk charge you want to pause + in: path + required: true + schema: + type: string + example: BCH_180tl7oq7cayggh + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/BulkChargePauseResponse' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /bulkcharge/resume/{code}: + get: + tags: + - Bulk Charge + summary: Resume Bulk Charge Batch + operationId: bulkCharge_resume + description: Resume the processing of a previously paused charge batch + parameters: + - name: code + description: The batch code for the bulk charge you want to pause + in: path + required: true + schema: + type: string + example: BCH_180tl7oq7cayggh + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/BulkChargeResumeResponse' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /subaccount: + post: + tags: + - Subaccount + summary: Create Subaccount + operationId: subaccount_create + description: Create a subacount for a partner + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SubaccountCreate' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/SubaccountCreate' + responses: + '201': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/SubaccountCreateResponse' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + get: + tags: + - Subaccount + summary: List Subaccounts + operationId: subaccount_list + description: List subaccounts available on your integration + parameters: + - in: query + name: perPage + description: Number of records to fetch per request + schema: + type: integer + default: 50 + - in: query + name: page + description: The offset to retrieve data from + schema: + type: integer + default: 1 + - in: query + name: active + description: Filter by the state of the subaccounts + schema: + type: boolean + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/SubaccountListResponse' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /subaccount/{code}: + parameters: + - name: code + in: path + description: The subaccount code you want to fetch + required: true + schema: + type: string + example: ACCT_6uujpqtzmnufzkw + get: + tags: + - Subaccount + summary: Fetch Subaccount + operationId: subaccount_fetch + description: Get details of a subaccount on your integration + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/SubaccountFetchResponse' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + put: + tags: + - Subaccount + summary: Update Subaccount + operationId: subaccount_update + description: Update a subaccount details on your integration + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SubaccountUpdate' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/SubaccountUpdate' + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/SubaccountUpdateResponse' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /split: + post: + tags: + - Split + summary: Create Split + operationId: split_create + description: Create a split configuration for transactions + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SplitCreate' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/SplitCreate' + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/SplitCreateResponse' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + get: + tags: + - Split + summary: List Splits + operationId: split_list + description: List the transaction splits available on your integration + parameters: + - in: query + name: subaccount_code + description: Filter by subaccount code + schema: + type: string + example: ACCT_dskvlw3y3dMukmt + - name: name + description: The name of the split + in: query + schema: + type: string + - name: active + description: The status of the split + in: query + schema: + type: boolean + - in: query + name: per_page + schema: + type: integer + description: The number of records to fetch per request + - in: query + name: page + schema: + type: integer + description: The offset to retrieve data from + - in: query + name: from + description: The start date + schema: + type: string + format: date-time + - in: query + name: to + description: The end date + schema: + type: string + format: date-time + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/SplitListResponse' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /split/{id}: + get: + tags: + - Split + summary: Fetch Split + operationId: split_fetch + description: Get details of a split configuration for a transaction + parameters: + - name: id + in: path + description: The ID of the split configuration to fetch + required: true + schema: + type: integer + example: 4896895 + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/SplitFetchResponse' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + put: + tags: + - Split + summary: Update Split + operationId: split_update + description: Update a split configuration for transactions + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SplitUpdate' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/SplitUpdate' + parameters: + - name: id + in: path + required: true + schema: + type: string + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/SplitUpdateResponse' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /split/{id}/subaccount/add: + post: + tags: + - Split + summary: Add Subaccount to Split + operationId: split_addSubaccount + description: Add a subaccount to a split configuration, or update the share of an existing subaccount + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SplitSubaccounts' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/SplitSubaccounts' + parameters: + - name: id + in: path + required: true + description: The ID of the split configuration to fetch + schema: + type: integer + example: 4896895 + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/SplitAddUpdateSubaccountResponse' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + /split/{id}/subaccount/remove: + post: + tags: + - Split + summary: Remove Subaccount from split + operationId: split_removeSubaccount + description: Remove a subaccount from a split configuration + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SplitSubaccounts' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/SplitSubaccounts' + parameters: + - name: id + in: path + description: The ID of the split configuration to fetch + required: true + schema: + type: integer + example: 4896895 + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/SplitRemoveSubaccountResponse' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + /terminal/{id}/event: + post: + tags: + - Terminal + summary: Send Event + description: Send an event from your application to the Paystack Terminal + operationId: terminal_sendEvent + parameters: + - name: id + in: path + required: true + description: The ID of the Terminal the event should be sent to. + schema: + type: string + example: Z0R4orOU + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TerminalSendEvent' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/TerminalSendEvent' + responses: + '200': + $ref: '#/components/responses/Ok' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + /terminal/{terminal_id}/event/{event_id}: + get: + tags: + - Terminal + summary: Fetch Event Status + description: Check the status of an event sent to the Terminal + operationId: terminal_fetchEventStatus + parameters: + - name: terminal_id + in: path + required: true + description: The ID of the Terminal the event should be sent to. + schema: + type: string + example: Z0R4orOU + - name: event_id + in: path + required: true + description: The ID of the event that was sent to the Terminal + schema: + type: string + example: 616d721e8c5cd40a0cdd54a6 + responses: + '200': + $ref: '#/components/responses/Ok' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /terminal/{terminal_id}/presence: + get: + tags: + - Terminal + summary: Fetch Terminal Status + description: Check the availiability of a Terminal before sending an event to it + operationId: terminal_fetchTerminalStatus + parameters: + - name: terminal_id + in: path + required: true + description: The ID of the Terminal the event should be sent to. + schema: + type: string + example: Z0R4orOU + responses: + '200': + $ref: '#/components/responses/TerminalGetStatusSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /terminal: + get: + tags: + - Terminal + summary: List Terminals + operationId: terminal_list + description: List the Terminals available on your integration + parameters: + - name: next + in: query + description: A cursor that indicates your place in the list. It can be used to fetch the next page of the list + schema: + type: string + - name: previous + in: query + description: A cursor that indicates your place in the list. It should be used to fetch the previous page of the list after an intial next request + schema: + type: string + - name: per_page + in: query + description: Specify how many records you want to retrieve per page + schema: + type: integer + default: 50 + responses: + '200': + $ref: '#/components/responses/TerminalListsSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /terminal/{terminal_id}: + parameters: + - name: terminal_id + in: path + description: The ID of the Terminal the event should be sent to. + required: true + schema: + type: string + example: Z0R4orOU + get: + tags: + - Terminal + summary: Fetch Terminal + description: Get the details of a Terminal + operationId: terminal_fetch + responses: + '200': + $ref: '#/components/responses/TerminalGetSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + put: + tags: + - Terminal + summary: Update Terminal + operationId: terminal_update + description: Update the details of a Terminal + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TerminalUpate' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/TerminalUpate' + responses: + '200': + $ref: '#/components/responses/TerminalUpdateSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /terminal/commission_device: + post: + tags: + - Terminal + summary: Commission Terminal + description: Activate your debug device by linking it to your integration + operationId: terminal_commission + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TerminalActivationToggle' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/TerminalActivationToggle' + responses: + '200': + $ref: '#/components/responses/TerminalCommissionDeviceSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + /terminal/decommission_device: + post: + tags: + - Terminal + summary: Decommission Terminal + description: Unlink your debug device from your integration + operationId: terminal_decommission + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TerminalActivationToggle' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/TerminalActivationToggle' + responses: + '200': + $ref: '#/components/responses/TerminalDecommissionDeviceSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + /virtual_terminal: + post: + tags: + - Virtual Terminal + summary: Create Virtual Terminal + description: Create a Virtual Terminal on your integration + operationId: virtualTerminal_create + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/VirtualTerminalCreate' + responses: + '200': + $ref: '#/components/responses/VirtualTerminalCreateSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + get: + tags: + - Virtual Terminal + summary: List Virtual Terminals + description: List Virtual Terminals on your integration + operationId: virtualTerminal_list + parameters: + - name: perPage + in: query + description: The number of records to fetch per request + schema: + type: integer + example: 75 + - name: page + in: query + description: The offset to retrieve data from + schema: + type: integer + responses: + '200': + $ref: '#/components/responses/VirtualTerminalListSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + /virtual_terminal/{code}: + parameters: + - name: code + in: path + description: Code of the Virtual Terminal + required: true + schema: + type: string + example: VT_MCK5292Z + get: + tags: + - Virtual Terminal + summary: Fetch Virtual Terminal + description: Fetch a Virtual Terminal on your integration + operationId: virtualTerminal_fetch + responses: + '200': + $ref: '#/components/responses/VirtualTerminalFetchSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + put: + tags: + - Virtual Terminal + summary: Update Virtual Terminal + description: Update a Virtual Terminal on your integration + operationId: virtualTerminal_update + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/VirtualTerminalUpdate' + responses: + '200': + $ref: '#/components/responses/VirtualTerminalUpdateSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + /virtual_terminal/{code}/deactivate: + parameters: + - name: code + in: path + description: Code of the Virtual Terminal + required: true + schema: + type: string + example: VT_MCK5292Z + put: + tags: + - Virtual Terminal + summary: Deactivate Virtual Terminal + operationId: virtualTerminal_deactivate + description: Deactivate a Virtual Terminal on your integration + responses: + '200': + $ref: '#/components/responses/VirtualTerminalDeactivateSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + /virtual_terminal/{code}/destination/assign: + parameters: + - name: code + in: path + description: Code of the Virtual Terminal + required: true + schema: + type: string + example: VT_MCK5292Z + post: + tags: + - Virtual Terminal + summary: Assign Destination to Virtual Terminal + operationId: virtualTerminal_destinationAssign + description: Add a destination (WhatsApp number) to a Virtual Terminal on your integration + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/VirtualTerminalDestinationAssign' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/VirtualTerminalDestinationAssign' + responses: + '200': + $ref: '#/components/responses/VirtualTerminalDestinationAssignSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + /virtual_terminal/{code}/destination/unassign: + parameters: + - name: code + in: path + description: Code of the Virtual Terminal + required: true + schema: + type: string + example: VT_MCK5292Z + post: + tags: + - Virtual Terminal + summary: Unassign Destination from Virtual Terminal + operationId: virtualTerminal_destinationUnassign + description: Unassign a destination (WhatsApp Number) from a Virtual Terminal on your integration + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/VirtualTerminalDestinationUnassign' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/VirtualTerminalDestinationUnassign' + responses: + '200': + $ref: '#/components/responses/VirtualTerminalDestinationUnassignSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + /virtual_terminal/{code}/split_code: + parameters: + - name: code + in: path + description: Code of the Virtual Terminal + required: true + schema: + type: string + example: VT_MCK5292Z + put: + tags: + - Virtual Terminal + summary: Add Split Code to Virtual Terminal + description: Add Split Code to Virtual Terminal + operationId: virtualTerminal_addSplitCode + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/VirtualTerminalAddSplitCode' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/VirtualTerminalAddSplitCode' + responses: + '200': + $ref: '#/components/responses/VirtualTerminalAddSplitCodeSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server Error + delete: + tags: + - Virtual Terminal + summary: Remove Split Code from Virtual Terminal + description: Remove Split Code from Virtual Terminal + operationId: virtualTerminal_deleteSplitCode + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/VirtualTerminalDeleteSplitCode' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/VirtualTerminalDeleteSplitCode' + responses: + '200': + $ref: '#/components/responses/VirtualTerminalDeleteSplitCodeSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server Error + /customer: + post: + tags: + - Customer + summary: Create Customer + operationId: customer_create + description: Create a customer on your integration + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CustomerCreate' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/CustomerCreate' + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/CustomerCreateResponse' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + get: + tags: + - Customer + summary: List Customers + operationId: customer_list + description: List customers on your integration + parameters: + - name: use_cursor + description: A flag to indicate if cursor based pagination should be used + in: query + schema: + type: boolean + - name: next + description: | + An alphanumeric value returned for every cursor based retrieval, used to retrieve the next set of data + in: query + schema: + type: string + - name: previous + description: | + An alphanumeric value returned for every cursor based retrieval, used to retrieve the previous set of data + in: query + schema: + type: string + - name: from + description: The start date + in: query + schema: + type: string + format: date-time + - name: to + description: The end date + in: query + schema: + type: string + format: date-time + - name: perPage + description: The number of records to fetch per request + in: query + schema: + type: string + - name: page + in: query + description: The offset to retrieve data from + schema: + type: string + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/CustomerListResponse' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /customer/{code}: + parameters: + - name: code + in: path + required: true + description: The code for the customer gotten from the response of the customer creation + schema: + type: string + example: CUS_c6wqvwmvwopw4ms + get: + tags: + - Customer + summary: Fetch Customer + operationId: customer_fetch + description: Get details of a customer on your integration. + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/CustomerFetchResponse' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + put: + tags: + - Customer + summary: Update Customer + operationId: customer_update + description: Update a customer's details on your integration + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CustomerUpdate' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/CustomerUpdate' + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/CustomerUpdateResponse' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /customer/set_risk_action: + post: + tags: + - Customer + summary: Set Risk Action + description: Set customer's risk action by whitelisting or blacklisting the customer + operationId: customer_riskAction + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CustomerRiskAction' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/CustomerRiskAction' + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/CustomerWhitelistBlacklistResponse' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + /customer/{code}/identification: + parameters: + - name: code + in: path + required: true + description: The code for the customer gotten from the response of the customer creation + schema: + type: string + example: CUS_c6wqvwmvwopw4ms + post: + tags: + - Customer + summary: Validate Customer + operationId: customer_validate + description: Validate a customer's identity + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CustomerValidate' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/CustomerValidate' + responses: + '202': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/CustomerValidateResponse' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + /customer/authorization/initialize: + post: + tags: + - Customer + summary: Initialize Authorization + description: Initiate a request to create a reusable authorization code for recurring transactions + operationId: customer_initializeAuthorization + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/CustomerAuthorizationInitializeRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/CustomerAuthorizationInitializeRequest' + responses: + '200': + $ref: '#/components/responses/CustomerAuthorizationInitializeSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + /customer/authorization/verify/{reference}: + get: + tags: + - Customer + summary: Verify Authorization + description: Check the status of an authorization request + operationId: customer_verifyAuthorization + parameters: + - name: reference + in: path + description: The reference returned in the initialization response + required: true + schema: + type: string + example: dfbzfotsrbv4n5s82t4mp5b5mfn51h + responses: + '200': + $ref: '#/components/responses/CustomerAuthorizationVerifySuccess' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /customer/authorization/deactivate: + post: + tags: + - Customer + summary: Deactivate Authorization + operationId: customer_deactivateAuthorization + description: Deactivate an authorization for any payment channel. + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CustomerDeactivateAuthorization' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/CustomerDeactivateAuthorization' + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/CustomerDeactivateAuthorizationResponse' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + /customer/{id}/initialize-direct-debit: + parameters: + - name: id + in: path + required: true + description: The ID of the customer to initialize the direct debit for + schema: + type: integer + example: 297346561 + post: + tags: + - Customer + summary: Initialize Direct Debit + operationId: customer_initializeDirectDebit + description: Initialize the process of linking an account to a customer for Direct Debit transactions + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CustomerInitializeDirectDebitRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/CustomerInitializeDirectDebitRequest' + responses: + '200': + $ref: '#/components/responses/CustomerInitializeDirectDebitSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + /customer/{id}/directdebit-activation-charge: + put: + tags: + - Customer + summary: Direct Debit Activation Charge + operationId: customer_directDebitActivationCharge + description: Trigger an activation charge on an inactive mandate on behalf of your customer + parameters: + - name: id + in: path + required: true + description: The customer ID attached to the authorization + schema: + type: integer + example: 297346561 + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CustomerDirectDebitActivationChargeRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/CustomerDirectDebitActivationChargeRequest' + responses: + '200': + $ref: '#/components/responses/CustomerDirectDebitActivationChargeSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + /customer/{id}/directdebit-mandate-authorizations: + get: + tags: + - Customer + summary: Fetch Mandate Authorizations + operationId: customer_fetchMandateAuthorizations + description: Get the list of direct debit mandates associated with a customer + parameters: + - name: id + in: path + required: true + description: The customer ID for the authorizations to fetch + schema: + type: integer + example: 297346561 + responses: + '200': + $ref: '#/components/responses/CustomerFetchMandateAuthorizationsSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + /directdebit/activation-charge: + put: + tags: + - Direct Debit + summary: Trigger Activation Charge + description: Trigger activation charge for specified customers + operationId: directdebit_triggerActivationCharge + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/DirectDebitActivationChargeRequest' + responses: + '200': + $ref: '#/components/responses/DirectDebitActivationChargeSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + /directdebit/mandate-authorizations: + get: + tags: + - Direct Debit + summary: List Mandate Authorizations + description: Get a list of all the direct debit mandates on your integration + operationId: directdebit_listMandateAuthorizations + parameters: + - name: cursor + in: query + description: The cursor value of the next set of authorizations to fetch. You can get this from the meta object of the response + schema: + type: string + - name: status + in: query + description: Filter by the authorization status + schema: + type: string + enum: + - pending + - active + - revoked + - name: per_page + in: query + description: The number of authorizations to fetch per request + schema: + type: integer + responses: + '200': + $ref: '#/components/responses/CustomerFetchMandateAuthorizationsSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + /dedicated_account: + post: + tags: + - Dedicated Virtual Account + summary: Create Dedicated Account + operationId: dedicatedAccount_create + description: Create a dedicated virtual account for an existing customer + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DedicatedVirtualAccountCreate' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/DedicatedVirtualAccountCreate' + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/DedicatedNubanCreateResponse' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + get: + tags: + - Dedicated Virtual Account + summary: List Dedicated Accounts + operationId: dedicatedAccount_list + description: List dedicated virtual accounts available on your integration. + parameters: + - name: active + in: query + description: Status of the dedicated virtual account + schema: + type: boolean + example: true + - name: customer + in: query + description: The customer's ID + schema: + type: integer + example: 297346561 + - name: currency + in: query + description: The currency of the dedicated virtual account + schema: + type: string + enum: + - NGN + - GHS + - name: provider_slug + in: query + description: The bank's slug in lowercase, without spaces + schema: + type: string + example: titan-paystack + - name: bank_id + in: query + description: The bank's ID + schema: + type: string + example: '035' + - name: perPage + in: query + description: The number of records to fetch per request + schema: + type: integer + default: 50 + - name: page + in: query + description: The offset to retrieve data from + schema: + type: integer + default: 1 + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/DedicatedNubanListResponse' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /dedicated_account/assign: + post: + tags: + - Dedicated Virtual Account + summary: Assign Dedicated Account + operationId: dedicatedAccount_assign + description: With this endpoint, you can create a customer, validate the customer, and assign a DVA to the customer. + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DedicatedVirtualAccountAssign' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/DedicatedVirtualAccountAssign' + responses: + '200': + $ref: '#/components/responses/Ok' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + /dedicated_account/{id}: + parameters: + - name: id + in: path + required: true + description: ID of dedicated virtual account + schema: + type: string + get: + tags: + - Dedicated Virtual Account + summary: Fetch Dedicated Account + operationId: dedicatedAccount_fetch + description: Get details of a dedicated virtual account on your integration. + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/DedicatedNubanFetchResponse' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + delete: + tags: + - Dedicated Virtual Account + summary: Deactivate Dedicated Account + operationId: dedicatedAccount_deactivate + description: Deactivate a dedicated virtual account on your integration. + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/DedicatedNubanDeactivateResponse' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /dedicated_account/requery: + parameters: + - name: account_number + description: Virtual account number to requery + in: query + schema: + type: string + example: '0033322211' + - name: provider_slug + description: The bank's slug in lowercase, without spaces. + in: query + schema: + type: string + example: titan-paystack + - name: date + description: The day the transfer was made + in: query + schema: + type: string + format: date-time + get: + tags: + - Dedicated Virtual Account + summary: Requery Dedicated Account + operationId: dedicatedAccount_requery + description: Requery Dedicated Virtual Account for new transactions + responses: + '200': + $ref: '#/components/responses/Ok' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /dedicated_account/split: + post: + tags: + - Dedicated Virtual Account + summary: Split Dedicated Account Transaction + operationId: dedicatedAccount_addSplit + description: Split a dedicated virtual account transaction with one or more accounts + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DedicatedVirtualAccountSplit' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/DedicatedVirtualAccountSplit' + responses: + '200': + $ref: '#/components/responses/Ok' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + delete: + tags: + - Dedicated Virtual Account + summary: Remove Split from Dedicated Account + operationId: dedicatedAccount_removeSplit + description: If you've previously set up split payment for transactions on a dedicated virtual account, you can remove it with this endpoint + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DedicatedVirtualAccountRemoveSplit' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/DedicatedVirtualAccountRemoveSplit' + responses: + '200': + $ref: '#/components/responses/Ok' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /dedicated_account/available_providers: + get: + tags: + - Dedicated Virtual Account + summary: Fetch Bank Providers + operationId: dedicatedAccount_availableProviders + description: Get available bank providers for a dedicated virtual account + responses: + '200': + $ref: '#/components/responses/Ok' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /apple-pay/domain: + post: + tags: + - Apple Pay + summary: Register Domain + description: | + Register a top-level domain or subdomain for your Apple Pay integration. + + > This endpoint can only be called with one domain or subdomain at a time. + operationId: applePay_registerDomain + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ApplePayParam' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/ApplePayParam' + responses: + '200': + $ref: '#/components/responses/ApplePayOkResponse' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + get: + tags: + - Apple Pay + summary: List Domains + description: Lists all registered domains on your integration. Returns an empty array if no domains have been added. + operationId: applePay_listDomain + parameters: + - name: use_cursor + in: query + description: A flag to indicate if cursor based pagination should be used + schema: + type: boolean + example: true + - name: next + in: query + description: | + An alphanumeric value returned for every cursor based retrieval, used to retrieve the next set of data + schema: + type: string + - name: previous + in: query + description: | + An alphanumeric value returned for every cursor based retrieval, used to retrieve the previous set of data + schema: + type: string + responses: + '200': + $ref: '#/components/responses/Ok' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + delete: + tags: + - Apple Pay + summary: Unregister Domain + description: | + Unregister a top-level domain or subdomain previously used for your Apple + Pay integration. + operationId: applePay_unregisterDomain + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ApplePayParam' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/ApplePayParam' + responses: + '200': + $ref: '#/components/responses/Ok' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /plan: + post: + tags: + - Plan + summary: Create Plan + operationId: plan_create + description: Create a plan for recurring payments + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PlanCreate' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PlanCreate' + responses: + '200': + $ref: '#/components/responses/PlanCreateSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + get: + tags: + - Plan + summary: List Plans + operationId: plan_list + description: List all recurring payment plans + parameters: + - in: query + name: perPage + description: Number of records to fetch per page + schema: + type: integer + - in: query + name: page + description: The section to retrieve + schema: + type: integer + - in: query + name: interval + description: Specify interval of the plan + schema: + type: string + enum: + - daily + - weekly + - monthly + - biannually + - annually + - in: query + name: amount + schema: + type: integer + description: The amount on the plans to retrieve + - in: query + name: from + schema: + type: string + format: date-time + description: The start date + - in: query + name: to + schema: + type: string + format: date-time + description: The end date + responses: + '200': + $ref: '#/components/responses/PlanListSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /plan/{code}: + parameters: + - name: code + in: path + required: true + description: The plan code you want to fetch + schema: + type: string + example: PLN_gx2wn530m0i3w3m + get: + tags: + - Plan + summary: Fetch Plan + operationId: plan_fetch + description: Get the details of a payment plan + responses: + '200': + $ref: '#/components/responses/PlanFetchSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + put: + tags: + - Plan + summary: Update Plan + description: Update a plan details on your integration + operationId: plan_update + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PlanUpdate' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PlanUpdate' + responses: + '200': + $ref: '#/components/responses/PlanUpdateSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /subscription: + post: + tags: + - Subscription + summary: Create Subscription + description: Create a subscription a customer + operationId: subscription_create + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SubscriptionCreate' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/SubscriptionCreate' + responses: + '200': + $ref: '#/components/responses/SubscriptionCreateSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + get: + tags: + - Subscription + summary: List Subscriptions + description: List all subscriptions available on your integration + operationId: subscription_list + parameters: + - in: query + name: perPage + schema: + type: integer + description: Number of records to fetch per page + - in: query + name: page + schema: + type: integer + description: The section to retrieve + - in: query + name: plan + description: Plan ID + schema: + type: integer + example: 2697466 + - in: query + name: customer + schema: + type: string + description: Customer ID + - in: query + name: from + schema: + type: string + format: date-time + description: The start date + - in: query + name: to + schema: + type: string + format: date-time + description: The end date + responses: + '200': + $ref: '#/components/responses/SubscriptionListSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /subscription/{code}: + parameters: + - name: code + in: path + required: true + description: The subscription code for the subscription you want to fetch + schema: + type: string + example: SUB_5co81xgmwg78x3d + get: + tags: + - Subscription + summary: Fetch Subscription + description: Get details of a customer's subscription + operationId: subscription_fetch + responses: + '200': + $ref: '#/components/responses/SubscriptionFetchSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /subscription/disable: + post: + tags: + - Subscription + summary: Disable Subscription + description: Disable a subscription on your integration + operationId: subscription_disable + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SubscriptionToggle' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/SubscriptionToggle' + responses: + '200': + $ref: '#/components/responses/SubscriptionDisableSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + /subscription/enable: + post: + tags: + - Subscription + summary: Enable Subscription + description: Enable a subscription on your integration + operationId: subscription_enable + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SubscriptionToggle' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/SubscriptionToggle' + responses: + '200': + $ref: '#/components/responses/Ok' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + /subscription/{code}/manage/link: + get: + tags: + - Subscription + summary: Generate Update Subscription Link + description: Generate a link for updating the card on a subscription + operationId: subscription_manageLink + parameters: + - name: code + in: path + required: true + description: Subscription code + schema: + type: string + example: qlgwhpyq1ts9nsw + responses: + '200': + $ref: '#/components/responses/Ok' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + /subscription/{code}/manage/email: + post: + tags: + - Subscription + summary: Send Update Subscription Link + description: Email a customer a link for updating the card on their subscription + operationId: subscription_manageEmail + parameters: + - name: code + in: path + required: true + description: Subscription code + schema: + type: string + example: qlgwhpyq1ts9nsw + responses: + '200': + $ref: '#/components/responses/Ok' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + /transferrecipient: + post: + tags: + - Transfer Recipient + summary: Create Transfer Recipient + description: Creates a new recipient. A duplicate account number will lead to the retrieval of the existing record. + operationId: transferrecipient_create + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TransferRecipientCreate' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/TransferRecipientCreate' + responses: + '201': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/TransferRecipientCreateResponse' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + get: + tags: + - Transfer Recipient + summary: List Transfer Recipients + description: List transfer recipients available on your integration + operationId: transferrecipient_list + parameters: + - in: query + name: use_cursor + description: A flag to indicate if cursor based pagination should be used + schema: + type: boolean + - in: query + name: next + description: | + An alphanumeric value returned for every cursor based retrieval, used to retrieve the next set of data + schema: + type: string + - in: query + name: previous + description: | + An alphanumeric value returned for every cursor based retrieval, used to retrieve the previous set of data + schema: + type: string + - in: query + name: per_page + schema: + type: integer + description: The number of records to fetch per request + - in: query + name: page + schema: + type: integer + description: The offset to retrieve data from + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/TransferRecipientListResponse' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /transferrecipient/bulk: + post: + tags: + - Transfer Recipient + summary: Bulk Create Transfer Recipient + description: | + Create multiple transfer recipients in batches. A duplicate account number will lead to the retrieval of the existing record. + operationId: transferrecipient_bulk + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TransferRecipientBulk' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/TransferRecipientBulk' + responses: + '200': + description: Sucessful response + content: + application/json: + schema: + $ref: '#/components/schemas/TransferRecipientBulkCreateResponse' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + /transferrecipient/{code}: + parameters: + - name: code + description: Transfer recipient code + in: path + required: true + schema: + type: string + example: RCP_5ap8rcimmcj8lbi + get: + tags: + - Transfer Recipient + summary: Fetch Transfer recipient + description: Fetch the details of a transfer recipient + operationId: transferrecipient_fetch + responses: + '200': + description: Successful response + content: + application/json: + schema: + $ref: '#/components/schemas/TransferRecipientFetchResponse' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + put: + tags: + - Transfer Recipient + summary: Update Transfer Recipient + description: Update the details of a transfer recipient + operationId: transferrecipient_update + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TransferRecipientUpdate' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/TransferRecipientUpdate' + responses: + '200': + description: Successful response + content: + application/json: + schema: + $ref: '#/components/schemas/TransferRecipientUpdateResponse' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + delete: + tags: + - Transfer Recipient + summary: Delete Transfer Recipient + description: Delete a transfer recipient (sets the transfer recipient to inactive) + operationId: transferrecipient_delete + responses: + '200': + description: Successful response + content: + application/json: + schema: + $ref: '#/components/schemas/TransferRecipientDeleteResponse' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /transfer: + post: + tags: + - Transfer + summary: Initiate Transfer + description: Send money to your customers + operationId: transfer_initiate + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TransferInitiate' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/TransferInitiate' + responses: + '200': + description: Successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/TransferCreateResponse' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + get: + tags: + - Transfer + summary: List Transfers + description: List the transfers made on your integration + operationId: transfer_list + parameters: + - in: query + name: use_cursor + description: A flag to indicate if cursor based pagination should be used + schema: + type: boolean + example: true + - in: query + name: next + description: | + An alphanumeric value returned for every cursor based retrieval, used to retrieve the next set of data + schema: + type: string + - in: query + name: previous + description: | + An alphanumeric value returned for every cursor based retrieval, used to retrieve the previous set of data + schema: + type: string + - in: query + name: per_page + schema: + type: integer + description: The number of records to fetch per request + - in: query + name: page + schema: + type: integer + description: The offset to retrieve data from + - in: query + name: from + description: The start date + schema: + type: string + format: date-time + - in: query + name: to + description: The end date + schema: + type: string + format: date-time + - in: query + name: recipient + description: Filter transfer by the recipient code + schema: + type: string + - in: query + name: status + description: Filter transfer by status + schema: + type: string + default: pending + enum: + - pending + - success + - failed + - otp + - abandoned + - reversed + - blocked + - rejected + - received + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/TransferListResponse' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /transfer/finalize_transfer: + post: + tags: + - Transfer + summary: Finalize Transfer + description: Finalize an initiated transfer + operationId: transfer_finalize + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TransferFinalize' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/TransferFinalize' + responses: + '200': + $ref: '#/components/responses/Ok' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + /transfer/bulk: + post: + tags: + - Transfer + summary: Initiate Bulk Transfer + description: | + Batch multiple transfers in a single request. + + You need to disable the Transfers OTP requirement to use this endpoint. + operationId: transfer_bulk + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TransferBulk' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/TransferBulk' + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/TransferBulkResponse' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + /transfer/{code}: + parameters: + - name: code + description: Transfer code + in: path + required: true + schema: + type: string + example: TRF_1ptvuv321ahaa7q + get: + tags: + - Transfer + summary: Fetch Transfer + description: Get details of a transfer on your integration + operationId: transfer_fetch + responses: + '200': + description: Succesful operation + content: + application/json: + schema: + $ref: '#/components/schemas/TransferFetchResponse' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /transfer/verify/{reference}: + get: + tags: + - Transfer + summary: Verify Transfer + description: Verify the status of a transfer on your integration + operationId: transfer_verify + parameters: + - name: reference + description: Transfer reference + in: path + required: true + schema: + type: string + example: acv_9ee55786-2323-4760-98e2-6380c9cb3f67 + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/TransferVerifyResponse' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /transfer/export: + get: + tags: + - Transfer + summary: Export Transfers + description: Export a list of transfers carried out on your integration + operationId: transfer_exportTransfer + parameters: + - in: query + name: recipient + description: Export transfer by the recipient code + schema: + type: string + - in: query + name: status + description: Export transfer by status + schema: + type: string + default: pending + enum: + - pending + - success + - failed + - otp + - abandoned + - reversed + - blocked + - rejected + - received + example: success + - in: query + name: from + schema: + type: string + format: date-time + description: The start date + - in: query + name: to + schema: + type: string + format: date-time + description: The end date + responses: + '200': + $ref: '#/components/responses/Ok' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /transfer/resend_otp: + post: + tags: + - Transfer + summary: Resend OTP for Transfer + description: Generates and send a new OTP to customer in the event they are having trouble receiving one. + operationId: transfer_resendOtp + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TransferResendOTP' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/TransferResendOTP' + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/TransferResendsOtpResponse' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + /transfer/disable_otp: + post: + tags: + - Transfer + summary: Disable OTP for Transfers + description: | + This is used in the event that you want to be able to complete transfers programmatically without use of OTPs. + No arguments required. You will get an OTP to complete the request. + operationId: transfer_disableOtp + responses: + '200': + description: Successful response + content: + application/json: + schema: + $ref: '#/components/schemas/TransferDisablesOtpResponse' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + /transfer/disable_otp_finalize: + post: + tags: + - Transfer + summary: Finalize Disabling OTP for Transfers + description: Finalize the request to disable OTP on your transfers + operationId: transfer_disableOtpFinalize + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TransferFinalizeDisableOTP' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/TransferFinalizeDisableOTP' + responses: + '200': + description: Successful response + content: + application/json: + schema: + $ref: '#/components/schemas/TransferFinalizeDisablesOtpResponse' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + /transfer/enable_otp: + post: + tags: + - Transfer + summary: Enable OTP requirement for Transfers + description: | + In the event that a customer wants to stop being able to complete transfers programmatically, this endpoint helps turn OTP requirement back on. + No arguments required. + operationId: transfer_enableOtp + responses: + '200': + description: Successful response + content: + application/json: + schema: + $ref: '#/components/schemas/TransferEnablesOtpResponse' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + /balance: + get: + tags: + - Balance + summary: Fetch Balance + operationId: balance_fetch + description: Fetch the available balance on your integration + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/BalanceCheckResponse' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /balance/ledger: + get: + tags: + - Balance + summary: Balance Ledger + description: Fetch all pay-ins and pay-outs that occured on your integration + operationId: balance_ledger + parameters: + - in: query + name: perPage + schema: + type: integer + description: Number of records to fetch per page + - in: query + name: page + schema: + type: integer + description: The section to retrieve + - in: query + name: from + schema: + type: string + format: date-time + description: The start date + - in: query + name: to + schema: + type: string + format: date-time + description: The end date + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/BalanceFetchLedgerResponse' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /paymentrequest: + post: + tags: + - Payment Request + summary: Create Payment Request + description: Create a new payment request by issuing an invoice to a customer + operationId: paymentRequest_create + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PaymentRequestCreate' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PaymentRequestCreate' + responses: + '200': + $ref: '#/components/responses/PaymentRequestCreateSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + get: + tags: + - Payment Request + summary: List Payment Request + description: List all previously created payment requests to your customers + operationId: paymentRequest_list + parameters: + - in: query + name: perPage + schema: + type: integer + description: Number of records to fetch per page + - in: query + name: page + schema: + type: integer + description: The section to retrieve + - in: query + name: customer + schema: + type: string + description: Customer ID + - in: query + name: status + schema: + type: string + enum: + - draft + - pending + - success + - failed + example: success + description: Invoice status to filter + - in: query + name: currency + schema: + type: string + description: If your integration supports more than one currency, choose the one to filter + - in: query + name: from + schema: + type: string + format: date-time + description: The start date + - in: query + name: to + schema: + type: string + format: date-time + description: The end date + responses: + '200': + $ref: '#/components/responses/PaymentRequestListSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /paymentrequest/{id}: + parameters: + - name: id + description: The unique identifier of a previously created payment request + in: path + required: true + schema: + type: integer + example: 18823736 + get: + tags: + - Payment Request + summary: Fetch Payment Request + description: Fetch a previously created payment request + operationId: paymentRequest_fetch + responses: + '200': + $ref: '#/components/responses/PaymentRequestListSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + put: + tags: + - Payment Request + summary: Update Payment Request + description: Update a previously created payment request + operationId: paymentRequest_update + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PaymentRequestUpdate' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PaymentRequestUpdate' + responses: + '200': + $ref: '#/components/responses/PaymentRequestUpdateSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /paymentrequest/verify/{id}: + parameters: + - name: id + description: The unique identifier of a previously created payment request + in: path + required: true + schema: + type: integer + example: 18823736 + get: + tags: + - Payment Request + summary: Verify Payment Request + description: Verify the status of a previously created payment request + operationId: paymentRequest_verify + responses: + '200': + $ref: '#/components/responses/PaymentRequestVerifySuccess' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /paymentrequest/notify/{id}: + parameters: + - name: id + description: The unique identifier of a previously created payment request + in: path + required: true + schema: + type: integer + example: 18823736 + post: + tags: + - Payment Request + summary: Send Notification + description: Trigger an email reminder to a customer for a previously created payment request + operationId: paymentRequest_notify + responses: + '200': + $ref: '#/components/responses/PaymentRequestSendNotificationSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + /paymentrequest/totals: + get: + tags: + - Payment Request + summary: Payment Request Total + description: Get the metric of all pending and successful payment requests + operationId: paymentRequest_totals + responses: + '200': + $ref: '#/components/responses/PaymentRequestTotalSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /paymentrequest/finalize/{id}: + parameters: + - name: id + description: The unique identifier of a draft payment request + in: path + required: true + schema: + type: integer + example: 18823736 + post: + tags: + - Payment Request + summary: Finalize Payment Request + description: Finalise the creation of a draft payment request for a customer + operationId: paymentRequest_finalize + responses: + '200': + $ref: '#/components/responses/PaymentRequestFinalizeSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + /paymentrequest/archive/{id}: + parameters: + - name: id + description: The unique identifier of a previously created payment request + in: path + required: true + schema: + type: integer + example: 18823736 + post: + tags: + - Payment Request + summary: Archive Payment Request + description: | + Archive a payment request to clean up your records. An archived payment request cannot be verified and will not + be returned when listing all previously created payment requests. + operationId: paymentRequest_archive + responses: + '200': + $ref: '#/components/responses/PaymentRequestArchiveSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + /product: + post: + tags: + - Product + summary: Create Product + description: Create a new product on your integration + operationId: product_create + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ProductCreate' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/ProductCreate' + responses: + '201': + $ref: '#/components/responses/ProductCreateSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + get: + tags: + - Product + summary: List Products + description: List all previously created products + operationId: product_list + parameters: + - name: perPage + description: Number of records to fetch per page + in: query + schema: + type: integer + - name: page + description: The section to retrieve + in: query + schema: + type: integer + - name: active + description: The state of the product + in: query + schema: + type: boolean + example: true + - in: query + name: from + schema: + type: string + format: date-time + description: The start date + - in: query + name: to + schema: + type: string + format: date-time + description: The end date + responses: + '200': + $ref: '#/components/responses/ProductListsSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /product/{id}: + parameters: + - name: id + description: The unique identifier of the product + in: path + required: true + schema: + type: integer + example: 2196244 + get: + tags: + - Product + summary: Fetch Product + description: Fetch a previously created product + operationId: product_fetch + responses: + '200': + $ref: '#/components/responses/ProductFetchSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + put: + tags: + - Product + summary: Update product + description: Update a previously created product + operationId: product_update + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ProductUpdate' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/ProductUpdate' + responses: + '200': + $ref: '#/components/responses/ProductUpdateSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + delete: + tags: + - Product + summary: Delete Product + description: Delete a previously created product + operationId: product_delete + responses: + '200': + $ref: '#/components/responses/ProductDeleteSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /storefront: + post: + tags: + - Storefront + summary: Create Storefront + description: Create a digital shop to manage and display your products + operationId: storefront_create + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/StorefrontCreate' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/StorefrontCreate' + responses: + '200': + $ref: '#/components/responses/StorefrontCreateSuccess' + '400': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + get: + tags: + - Storefront + summary: List Storefronts + description: List the storefronts you previously created + operationId: storefront_list + parameters: + - in: query + name: perPage + description: Number of records to fetch per request + schema: + type: integer + default: 50 + - in: query + name: page + description: The offset to retrieve data from + schema: + type: integer + default: 1 + - name: status + in: query + schema: + type: string + enum: + - active + - inactive + example: active + responses: + '200': + $ref: '#/components/responses/StorefrontListSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /storefront/{id}: + parameters: + - name: id + description: The unique identifier of the Storefront + in: path + required: true + schema: + type: integer + example: 1559046 + get: + tags: + - Storefront + summary: Fetch Storefront + description: Get the details of a previously created Storefront + operationId: storefront_fetch + responses: + '200': + $ref: '#/components/responses/StorefrontFetchSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + put: + tags: + - Storefront + summary: Update Storefront + description: Update the details of a previously created Storefront + operationId: storefront_update + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/StorefrontUpdate' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/StorefrontUpdate' + responses: + '200': + $ref: '#/components/responses/StorefrontUpdateSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + delete: + tags: + - Storefront + summary: Delete Storefront + description: Delete a previously created Storefront + operationId: storefront_delete + responses: + '200': + $ref: '#/components/responses/StorefrontDeleteSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /storefront/verify/{slug}: + parameters: + - name: slug + description: The custom slug to check + in: path + required: true + schema: + type: string + example: struct_and_faces + get: + tags: + - Storefront + summary: Verify Storefront Slug + description: Verify the availability of a slug before using it for your Storefront + operationId: storefront_verifySlug + responses: + '200': + $ref: '#/components/responses/Ok' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /storefront/{id}/order: + get: + tags: + - Storefront + summary: Fetch Storefront Orders + description: Fetch all orders in your Storefront + operationId: storefront_fetchOrders + parameters: + - name: id + description: The unique identifier of the Storefront + in: path + required: true + schema: + type: integer + example: 1559046 + responses: + '200': + $ref: '#/components/responses/Ok' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + /storefront/{id}/product: + parameters: + - name: id + description: The unique identifier of the Storefront + in: path + required: true + schema: + type: integer + example: 1559046 + post: + tags: + - Storefront + summary: Add Products to Storefront + description: Add previously created products to a Storefront + operationId: storefront_addProducts + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/StorefrontAddProducts' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/StorefrontAddProducts' + responses: + '200': + $ref: '#/components/responses/Ok' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + get: + tags: + - Storefront + summary: List Storefront Products + description: List the products in a Storefront + operationId: storefront_listProducts + responses: + '200': + $ref: '#/components/responses/Ok' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /storefront/{id}/publish: + parameters: + - name: id + description: The unique identifier of the Storefront + in: path + required: true + schema: + type: integer + example: 1559046 + post: + tags: + - Storefront + summary: Publish Storefront + description: Make your Storefront publicly available + operationId: storefront_publish + responses: + '200': + $ref: '#/components/responses/Ok' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /storefront/{id}/duplicate: + parameters: + - name: id + description: The unique identifier of the Storefront + in: path + required: true + schema: + type: integer + example: 1559046 + post: + tags: + - Storefront + summary: Duplicate Storefront + description: Duplicate a previously created Storefront + operationId: storefront_duplicate + responses: + '200': + $ref: '#/components/responses/Ok' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /order: + post: + tags: + - Order + summary: Create Order + description: Create an order for selected items + operationId: order_create + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OrderCreate' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/OrderCreate' + responses: + '200': + $ref: '#/components/responses/OrderCreateSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + get: + tags: + - Order + summary: List Orders + description: List the previously created orders + operationId: order_list + parameters: + - in: query + name: perPage + schema: + type: integer + description: Number of records to fetch per page + - in: query + name: page + schema: + type: integer + description: The section to retrieve + - in: query + name: from + schema: + type: string + format: date-time + description: The start date + - in: query + name: to + schema: + type: string + format: date-time + description: The end date + responses: + '200': + $ref: '#/components/responses/OrderListSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /order/{id}: + parameters: + - name: id + description: The unique identifier of the order + in: path + required: true + schema: + type: integer + example: 1559046 + get: + tags: + - Order + summary: Fetch Order + description: Fetch the details of a previously created order + operationId: order_fetch + responses: + '200': + $ref: '#/components/responses/OrderFetchSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /order/product/{id}: + parameters: + - name: id + description: The unique identifier of the order + in: path + required: true + schema: + type: integer + example: 1559046 + get: + tags: + - Order + summary: Fetch Product Orders + description: Fetch all orders for a particular product + operationId: order_product + responses: + '200': + $ref: '#/components/responses/OrderFetchProductSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /order/{code}/validate: + parameters: + - name: code + description: The unique code of a previously created order + in: path + required: true + schema: + type: string + example: ORD_6z0lqwpmxrm7dsp + get: + tags: + - Order + summary: Validate Order + description: Validate a pay for me order + operationId: order_validate + responses: + '200': + $ref: '#/components/responses/OrderValidateSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /page: + post: + tags: + - Page + summary: Create Page + description: Create a webpage to receive payments + operationId: page_create + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PageCreate' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PageCreate' + responses: + '200': + $ref: '#/components/responses/PageCreateSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + get: + tags: + - Page + summary: List Pages + description: List all previously created payment pages + operationId: page_list + parameters: + - in: query + name: perPage + schema: + type: integer + default: 50 + description: Number of records to fetch per page + example: 10 + - in: query + name: page + schema: + type: integer + description: The section to retrieve + - in: query + name: from + schema: + type: string + format: date-time + description: The start date + - in: query + name: to + schema: + type: string + format: date-time + description: The end date + responses: + '200': + $ref: '#/components/responses/PageListSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /page/{id}: + parameters: + - name: id + in: path + description: The unique identifier of a payment page + required: true + schema: + type: integer + example: 1891222 + get: + tags: + - Page + summary: Fetch Page + description: Get a previously created payment page + operationId: page_fetch + responses: + '200': + $ref: '#/components/responses/PageFetchSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + put: + tags: + - Page + summary: Update Page + description: Update a previously created payment page + operationId: page_update + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PageUpdate' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PageUpdate' + responses: + '200': + $ref: '#/components/responses/PageUpdateSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /page/check_slug_availability/{slug}: + parameters: + - name: slug + in: path + description: The custom slug to check + required: true + schema: + type: string + example: risky-burger + get: + tags: + - Page + summary: Check Slug Availability + description: Check if a custom slug is available for use when creating a payment page + operationId: page_checkSlugAvailability + responses: + '200': + $ref: '#/components/responses/PageCheckSlugAvailabilitySuccess' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /page/{id}/product: + parameters: + - name: id + in: path + required: true + schema: + type: string + post: + tags: + - Page + summary: Add Products + description: | + Add products to a previously created payment page. You can only add products to pages + that was created with a `product` type. + operationId: page_addProducts + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PageProduct' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/PageProduct' + responses: + '200': + $ref: '#/components/responses/PageAddProductsSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + /settlement: + get: + tags: + - Settlement + summary: List Settlements + description: List settlements made to your settlement accounts + operationId: settlements_fetch + parameters: + - name: perPage + description: The number of records to fetch per request + in: query + schema: + type: integer + example: 50 + - name: page + description: The offset to retrieve data from + in: query + schema: + type: integer + example: 2 + responses: + '200': + $ref: '#/components/responses/Ok' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /settlement/{id}/transactions: + get: + tags: + - Settlement + summary: Fetch Settlement Transactions + description: Get the transactions that make up a particular settlement + operationId: settlements_transaction + parameters: + - name: id + description: The settlement ID in which you want to fetch its transactions + in: path + required: true + schema: + type: integer + example: 8610870 + responses: + '200': + $ref: '#/components/responses/Ok' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /integration/payment_session_timeout: + get: + tags: + - Integration + summary: Fetch Payment Session Timeout + description: Fetch the session timeout of a transaction + operationId: integration_fetchPaymentSessionTimeout + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ControlPanelFetchPaymentSessionTimeoutResponse' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + put: + tags: + - Integration + summary: Update Payment Session Timeout + description: Update the session timeout of a transaction + operationId: integration_updatePaymentSessionTimeout + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PaymentSession' + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ControlPanelUpdatePaymentSessionTimeoutResponse' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /refund: + post: + tags: + - Refund + summary: Create Refund + description: Initiate a refund for a previously completed transaction + operationId: refund_create + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RefundCreate' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/RefundCreate' + responses: + '200': + $ref: '#/components/responses/RefundCreateSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + get: + tags: + - Refund + summary: List Refunds + description: List previously created refunds + operationId: refund_list + parameters: + - in: query + name: perPage + schema: + type: integer + default: 50 + description: Number of records to fetch per page + example: 10 + - in: query + name: page + schema: + type: integer + description: The section to retrieve + - in: query + name: from + schema: + type: string + format: date-time + description: The start date + - in: query + name: to + schema: + type: string + format: date-time + description: The end date + responses: + '200': + $ref: '#/components/responses/RefundListSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /refund/retry_with_customer_details/{id}: + post: + tags: + - Refund + summary: Retry Refund + description: Retry a refund with a `needs-attention` status by providing the bank account details of a customer. + operationId: refund_retry + parameters: + - name: id + in: path + required: true + description: The identifier of the refund + schema: + type: integer + example: 15581137 + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RefundRetry' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/RefundRetry' + responses: + '200': + $ref: '#/components/responses/RefundRetrySuccess' + '422': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + /refund/{id}: + get: + tags: + - Refund + summary: Fetch Refund + description: Get a previously created refund + operationId: refund_fetch + parameters: + - name: id + in: path + required: true + description: The identifier of the refund + schema: + type: integer + example: 15581137 + responses: + '200': + $ref: '#/components/responses/RefundFetchSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /dispute: + get: + tags: + - Dispute + summary: List Disputes + description: List transaction disputes filed by customers + operationId: dispute_list + parameters: + - in: query + name: perPage + description: Number of records to fetch per page + schema: + type: integer + - in: query + name: page + description: The section to retrieve + schema: + type: integer + - in: query + name: status + description: Dispute status + schema: + type: string + enum: + - awaiting-merchant-feedback + - awaiting-bank-feedback + - pending + - resolved + example: awaiting-merchant-feedback + - in: query + name: transaction + description: Transaction ID + schema: + type: string + - in: query + name: from + schema: + type: string + format: date-time + description: The start date + - in: query + name: to + schema: + type: string + format: date-time + description: The end date + responses: + '200': + $ref: '#/components/responses/DisputeListSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /dispute/{id}: + parameters: + - name: id + description: The unique identifier of the dispute + in: path + required: true + schema: + type: integer + example: 1801929 + get: + tags: + - Dispute + summary: Fetch Dispute + description: Fetch a transaction dispute + operationId: dispute_fetch + responses: + '200': + $ref: '#/components/responses/DisputeFetchSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + put: + tags: + - Dispute + summary: Update Dispute + description: Update a transaction dispute + operationId: dispute_update + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DisputeUpdate' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/DisputeUpdate' + responses: + '200': + $ref: '#/components/responses/DisputeUpdateSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /dispute/{id}/upload_url: + get: + tags: + - Dispute + summary: Fetch Upload URL + description: Get the URL to upload a dispute evidence + operationId: dispute_uploadUrl + parameters: + - name: id + description: The unique identifier of the dispute + in: path + required: true + schema: + type: integer + example: 4734583785 + responses: + '200': + $ref: '#/components/responses/DisputeUploadURLSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /dispute/export: + get: + tags: + - Dispute + summary: Export Disputes + description: Export the disputes available on your integration + operationId: dispute_download + parameters: + - in: query + name: perPage + schema: + type: integer + description: Number of records to fetch per page + - in: query + name: page + schema: + type: integer + description: The section to retrieve + - in: query + name: status + schema: + type: string + enum: + - awaiting-merchant-feedback + - awaiting-bank-feedback + - pending + - resolved + example: awaiting-merchant-feedback + - in: query + name: from + schema: + type: string + format: date-time + description: The start date + - in: query + name: to + schema: + type: string + format: date-time + description: The end date + responses: + '200': + $ref: '#/components/responses/DisputeExportSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /dispute/transaction/{id}: + get: + tags: + - Dispute + summary: List Transaction Disputes + description: List all disputes filed for a transaction + operationId: dispute_transaction + parameters: + - name: id + description: The unique identifier of the transaction + in: path + required: true + schema: + type: integer + example: 4734583785 + responses: + '200': + $ref: '#/components/responses/DisputeListTransactionSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /dispute/{id}/resolve: + put: + tags: + - Dispute + summary: Resolve Dispute + description: Resolve a transaction dispute + operationId: dispute_resolve + parameters: + - name: id + description: The unique identifier of the dispute + in: path + required: true + schema: + type: integer + example: 4734583785 + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DisputeResolve' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/DisputeResolve' + responses: + '200': + $ref: '#/components/responses/DisputeResolveSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /dispute/{id}/evidence: + post: + tags: + - Dispute + summary: Add Evidence + description: Provide evidence for a dispute + operationId: dispute_evidence + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DisputeEvidence' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/DisputeEvidence' + parameters: + - name: id + description: The unique identifier of the dispute + in: path + required: true + schema: + type: integer + example: 4734583785 + responses: + '200': + $ref: '#/components/responses/DisputeAddEvidenceSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + /bank: + get: + tags: + - Bank + summary: List Banks + description: List banks supported on Paystack + operationId: bank_list + parameters: + - in: query + name: country + description: The country from which to obtain the list of supported banks + schema: + type: string + enum: + - ghana + - kenya + - nigeria + - south africa + example: nigeria + - in: query + name: currency + description: The country from which to obtain the list of supported banks + schema: + type: string + enum: + - GHS + - KES + - NGN + - ZAR + example: NGN + - in: query + name: use_cursor + description: A flag to indicate if cursor based pagination should be used + schema: + type: boolean + - in: query + name: perPage + description: The number of records to fetch per request + schema: + type: integer + - name: page + in: query + description: The offset to retrieve data from + schema: + type: integer + - in: query + name: next + description: | + An alphanumeric value returned for every cursor based retrieval, used to + retrieve the next set of data + schema: + type: string + - in: query + name: previous + description: | + An alphanumeric value returned for every cursor based retrieval, used to + retrieve the previous set of data + schema: + type: string + - in: query + name: pay_with_bank_transfer + description: A flag to filter for available banks a customer can make a transfer to complete a payment + schema: + type: boolean + - in: query + name: pay_with_bank + description: A flag to filter for banks a customer can pay directly from + schema: + type: boolean + - in: query + name: enabled_for_verification + description: | + A flag to filter the banks that are supported for account verification in South Africa. + You need to combine this with either the `currency` or `country` filter. + schema: + type: boolean + - in: query + name: gateway + description: The type of gateway for a Nigerian bank + schema: + type: string + enum: + - emandate + - digitalbankmandate + - in: query + name: type + description: Type of financial channel + schema: + type: string + enum: + - ghipps + - mobile_money + - nuban + - kepss + - basa + - in: query + name: include_nip_sort_code + description: | + A flag that returns Nigerian banks with their NIP institution code. + The returned value can be used in identifying institutions on NIP. + schema: + type: boolean + responses: + '200': + $ref: '#/components/responses/MiscellaneousListBanksSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /bank/resolve: + get: + tags: + - Bank + summary: Resolve Account Number + description: Resolve an account number to confirm the name associated with it + operationId: bank_resolveAccountNumber + parameters: + - name: account_number + description: The account number of interest + in: query + schema: + type: integer + example: 22728151 + - name: bank_code + description: The bank code associated with the account number + in: query + schema: + type: integer + example: 63 + responses: + '200': + $ref: '#/components/responses/VerificationResolveAccountNumberSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /bank/validate: + post: + tags: + - Bank + summary: Validate Bank Account + description: Confirm the authenticity of a customer's account number before sending money + operationId: bank_validateAccountNumber + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/BankValidateRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/BankValidateRequest' + responses: + '200': + $ref: '#/components/responses/VerificationValidateAccountSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + default: + description: Server error + /decision/bin/{bin}: + get: + tags: + - Miscellaneous + summary: Resolve Card BIN + description: Get the details of a card BIN + operationId: miscellaneous_resolveCardBin + parameters: + - name: bin + description: The card bank identification number + in: path + required: true + schema: + type: integer + example: 539983 + responses: + '200': + $ref: '#/components/responses/VerificationResolveCardBINSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /country: + get: + tags: + - Miscellaneous + summary: List Countries + description: List all supported countries on Paystack + operationId: miscellaneous_listCountries + responses: + '200': + $ref: '#/components/responses/MiscellaneousListCountriesSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error + /address_verification/states: + get: + tags: + - Miscellaneous + summary: List States (AVS) + operationId: miscellaneous_avs + description: Get a list of states for a country for address verification + parameters: + - in: query + name: country + description: The country code of the states to list. It is gotten after the charge request + schema: + type: string + example: CA + responses: + '200': + $ref: '#/components/responses/MiscellaneousListStatesSuccess' + '401': + $ref: '#/components/responses/Unauthorized' + '404': + $ref: '#/components/responses/NotFound' + default: + description: Server error +components: + securitySchemes: + bearerAuth: + type: http + scheme: bearer + description: Secret key in the format sk_domain_xxxxxx + schemas: + Currency: + description: List of all support currencies + type: string + enum: + - GHS + - KES + - NGN + - ZAR + - USD + example: GHS + SplitSubaccounts: + type: object + properties: + subaccount: + description: Subaccount code of the customer or partner + type: string + share: + description: The percentage or flat quota of the customer or partner + type: integer + example: + subaccount: ACCT_6uujpqtzmnufzkw + share: 50 + SplitCreate: + type: object + description: | + Split configuration for transactions + required: + - name + - type + - subaccounts + - currency + properties: + name: + description: Name of the transaction split + type: string + type: + description: The type of transaction split you want to create. + type: string + enum: + - percentage + - flat + subaccounts: + description: A list of object containing subaccount code and number of shares + type: array + items: + $ref: '#/components/schemas/SplitSubaccounts' + currency: + description: The transaction currency + type: string + enum: + - NGN + - GHS + - ZAR + - USD + bearer_type: + description: This allows you specify how the transaction charge should be processed + type: string + enum: + - subaccount + - account + - all-proportional + - all + bearer_subaccount: + description: This is the subaccount code of the customer or partner that would bear the transaction charge if you specified subaccount as the bearer type + type: string + example: + name: Halfsies + type: percentage + currency: NGN + subaccounts: + - subaccount: ACCT_6uujpqtzmnufzkw + share: 50 + TransactionInitialize: + description: Initialize a transaction + type: object + required: + - email + - amount + properties: + email: + description: Customer's email address + type: string + amount: + description: | + Amount should be in smallest denomination of the currency. + type: integer + currency: + $ref: '#/components/schemas/Currency' + reference: + description: Unique transaction reference. Only -, ., = and alphanumeric characters allowed. + type: string + channels: + description: An array of payment channels to control what channels you want to make available to the user to make a payment with + type: array + items: + type: string + enum: + - card + - bank + - ussd + - qr + - eft + - mobile_money + - bank_transfer + callback_url: + description: | + Fully qualified url, e.g. https://example.com/ to redirect your customers to after a successful payment. Use this to override the callback url provided on the dashboard for this transaction + type: string + plan: + description: | + If transaction is to create a subscription to a predefined plan, provide plan code here. + This would invalidate the value provided in amount + type: string + invoice_limit: + description: Number of times to charge customer during subscription to plan + type: integer + split_code: + description: The split code of the transaction split + type: string + split: + $ref: '#/components/schemas/SplitCreate' + subaccount: + description: The code for the subaccount that owns the payment + type: string + transaction_charge: + description: | + A flat fee to charge the subaccount for a transaction. + This overrides the split percentage set when the subaccount was created + type: string + bearer: + description: The bearer of the transaction charge + type: string + enum: + - account + - subaccount + label: + description: Used to replace the email address shown on the Checkout + type: string + metadata: + description: JSON object of custom data + type: object + example: + email: test@demo.com + amount: 10000 + TransactionInitializeResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + authorization_url: + type: string + access_code: + type: string + reference: + type: string + required: + - authorization_url + - access_code + - reference + required: + - status + - message + - data + ErrorMeta: + type: object + description: Extra details to help with a resolution of the error + properties: + nextStep: + type: string + description: A summarised solution for the error + TransactionInitializeBadRequestModel: + type: object + description: | + Error response returned when a transaction is initialized with incorrect parameters + properties: + status: + type: boolean + description: An indicator for the state of the request + message: + type: string + description: A short description of the error + meta: + $ref: '#/components/schemas/ErrorMeta' + type: + type: string + description: A tag to indicate the type of the error + enum: + - validation_error + - processor_error + - api_error + code: + type: string + description: The error code + errorCodeMappingNotFound: + type: boolean + description: An indicator for error mapping for the request + example: + status: false + message: Duplicate Transaction Reference + meta: + nextStep: Try and create the Transaction or Charge with a new reference + type: validation_error + code: duplicate_reference + errorCodeMappingNotFound: false + Error: + type: object + properties: + status: + type: boolean + description: An indicator for the state of the request + message: + type: string + description: A short description of the error + meta: + $ref: '#/components/schemas/ErrorMeta' + type: + type: string + description: A tag to indicate the type of the error + code: + type: string + description: The error code + enum: + - validation_error + - processor_error + - api_error + errorCodeMappingNotFound: + type: boolean + description: An indicator for error mapping for the request + TransactionChargeAuthorization: + type: object + required: + - email + - amount + - authorization_code + properties: + email: + description: Customer's email address + type: string + amount: + description: Amount in the lower denomination of your currency + type: integer + authorization_code: + description: Valid authorization code to charge + type: string + reference: + description: Unique transaction reference. Only -, ., = and alphanumeric characters allowed. + type: string + currency: + $ref: '#/components/schemas/Currency' + split_code: + description: The split code of the transaction split + type: string + split: + $ref: '#/components/schemas/SplitCreate' + subaccount: + description: The code for the subaccount that owns the payment + type: string + transaction_charge: + description: |- + A flat fee to charge the subaccount for a transaction. + This overrides the split percentage set when the subaccount was created + type: string + bearer: + description: The bearer of the transaction charge + type: string + enum: + - account + - subaccount + metadata: + description: Stringified JSON object of custom data + type: string + queue: + description: If you are making a scheduled charge call, it is a good idea to queue them so the processing system does not get overloaded causing transaction processing errors. + type: boolean + example: + email: jb@email.com + amount: 30000 + authorization_code: AUTH_df1l5ehnym + ChargeAuthorizationResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + amount: + type: integer + currency: + type: string + transaction_date: + type: string + status: + type: string + reference: + type: string + domain: + type: string + metadata: + type: string + gateway_response: + type: string + message: + type: string + nullable: true + channel: + type: string + ip_address: + nullable: true + log: + type: object + properties: + start_time: + type: integer + time_spent: + type: integer + attempts: + type: integer + errors: + type: integer + success: + type: boolean + mobile: + type: boolean + input: + type: array + items: {} + history: + type: array + items: + type: object + properties: + type: + type: string + message: + type: string + time: + type: integer + required: + - type + - message + - time + required: + - start_time + - time_spent + - attempts + - errors + - success + - mobile + - input + - history + nullable: true + fees: + type: integer + nullable: true + authorization: + type: object + properties: + authorization_code: + type: string + bin: + type: string + nullable: true + last4: + type: string + exp_month: + type: string + exp_year: + type: string + channel: + type: string + card_type: + type: string + bank: + type: string + country_code: + type: string + brand: + type: string + reusable: + type: boolean + signature: + type: string + account_name: + nullable: true + required: + - authorization_code + - bin + - last4 + - exp_month + - exp_year + - channel + - card_type + - bank + - country_code + - brand + - reusable + - signature + - account_name + customer: + type: object + properties: + id: + type: integer + first_name: + type: string + nullable: true + last_name: + type: string + nullable: true + email: + type: string + customer_code: + type: string + phone: + type: string + nullable: true + metadata: + type: object + properties: + calling_code: + type: string + nullable: true + risk_action: + type: string + international_format_phone: + type: string + nullable: true + required: + - id + - first_name + - last_name + - email + - customer_code + - phone + - metadata + - risk_action + - international_format_phone + plan: + nullable: true + id: + type: integer + required: + - amount + - currency + - transaction_date + - status + - reference + - domain + - metadata + - gateway_response + - message + - channel + - ip_address + - log + - fees + - authorization + - customer + - plan + - id + required: + - status + - message + - data + TransactionPartialDebit: + type: object + required: + - email + - amount + - authorization_code + - currency + properties: + email: + description: Customer's email address + type: string + amount: + description: Specified in the lowest denomination of your currency + type: integer + format: int64 + authorization_code: + description: Valid authorization code to charge + type: string + currency: + $ref: '#/components/schemas/Currency' + at_least: + description: Minimum amount to charge + type: string + reference: + description: Unique transaction reference. Only -, ., = and alphanumeric characters allowed. + type: string + example: + email: tap@email.com + amount: 40510 + authorization_code: AUTH_df1l5ehnym + currency: ZAR + TransactionPartialDebitResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + amount: + type: integer + currency: + type: string + transaction_date: + type: string + status: + type: string + reference: + type: string + domain: + type: string + metadata: + type: string + gateway_response: + type: string + message: + nullable: true + channel: + type: string + ip_address: + nullable: true + log: + type: object + properties: + start_time: + type: integer + time_spent: + type: integer + attempts: + type: integer + errors: + type: integer + success: + type: boolean + mobile: + type: boolean + input: + type: array + items: {} + history: + type: array + items: + type: object + properties: + type: + type: string + message: + type: string + time: + type: integer + required: + - type + - message + - time + required: + - start_time + - time_spent + - attempts + - errors + - success + - mobile + - input + - history + nullable: true + fees: + type: integer + authorization: + type: object + properties: + authorization_code: + type: string + bin: + type: string + last4: + type: string + exp_month: + type: string + exp_year: + type: string + channel: + type: string + card_type: + type: string + bank: + type: string + country_code: + type: string + brand: + type: string + reusable: + type: boolean + signature: + type: string + account_name: + nullable: true + required: + - authorization_code + - bin + - last4 + - exp_month + - exp_year + - channel + - card_type + - bank + - country_code + - brand + - reusable + - signature + - account_name + customer: + type: object + properties: + id: + type: integer + first_name: + type: string + nullable: true + last_name: + type: string + nullable: true + email: + type: string + customer_code: + type: string + phone: + type: string + nullable: true + metadata: + type: object + nullable: true + risk_action: + type: string + international_format_phone: + type: string + nullable: true + required: + - id + - first_name + - last_name + - email + - customer_code + - phone + - metadata + - risk_action + - international_format_phone + plan: + type: integer + requested_amount: + type: integer + id: + type: integer + required: + - amount + - currency + - transaction_date + - status + - reference + - domain + - gateway_response + - message + - channel + - ip_address + - log + - fees + - authorization + - customer + - metadata + - plan + - requested_amount + - id + required: + - status + - message + - data + VerifyResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + id: + type: integer + domain: + type: string + status: + type: string + reference: + type: string + receipt_number: + type: string + nullable: true + amount: + type: integer + message: + type: string + nullable: true + gateway_response: + type: string + paid_at: + type: string + nullable: true + created_at: + type: string + channel: + type: string + currency: + type: string + ip_address: + type: string + metadata: + anyOf: + - type: string + - type: object + log: + type: object + properties: + start_time: + type: integer + time_spent: + type: integer + attempts: + type: integer + errors: + type: integer + success: + type: boolean + mobile: + type: boolean + input: + type: array + items: {} + history: + type: array + items: + type: object + properties: + type: + type: string + message: + type: string + time: + type: integer + required: + - type + - message + - time + additionalProperties: false + required: + - start_time + - time_spent + - attempts + - errors + - success + - mobile + - input + - history + nullable: true + fees: + type: integer + nullable: true + fees_split: + nullable: true + authorization: + type: object + properties: + authorization_code: + type: string + bin: + nullable: true + last4: + type: string + exp_month: + type: string + exp_year: + type: string + channel: + type: string + card_type: + type: string + bank: + type: string + country_code: + type: string + brand: + type: string + reusable: + type: boolean + signature: + type: string + account_name: + nullable: true + receiver_bank_account_number: + nullable: true + receiver_bank: + nullable: true + customer: + type: object + properties: + id: + type: integer + first_name: + type: string + nullable: true + last_name: + type: string + nullable: true + email: + type: string + customer_code: + type: string + phone: + type: string + nullable: true + metadata: + nullable: true + risk_action: + type: string + international_format_phone: + type: string + nullable: true + required: + - id + - first_name + - last_name + - email + - customer_code + - phone + - metadata + - risk_action + - international_format_phone + plan: + type: string + nullable: true + split: + type: object + order_id: + nullable: true + paidAt: + type: string + nullable: true + createdAt: + type: string + requested_amount: + type: integer + pos_transaction_data: + nullable: true + source: + nullable: true + fees_breakdown: + nullable: true + connect: + nullable: true + transaction_date: + type: string + plan_object: + type: object + properties: + id: + type: integer + name: + type: string + plan_code: + type: string + description: + nullable: true + amount: + type: integer + interval: + type: string + send_invoices: + type: boolean + send_sms: + type: boolean + currency: + type: string + oneOf: + - allOf: + - minProperties: 0 + - {} + - allOf: + - not: + minProperties: 0 + - required: + - id + - name + - plan_code + - description + - amount + - interval + - send_invoices + - send_sms + - currency + additionalProperties: false + subaccount: + type: object + required: + - id + - domain + - status + - reference + - receipt_number + - amount + - message + - gateway_response + - paid_at + - created_at + - channel + - currency + - ip_address + - metadata + - log + - fees + - fees_split + - authorization + - customer + - plan + - split + - order_id + - paidAt + - createdAt + - requested_amount + - pos_transaction_data + - source + - fees_breakdown + - connect + - transaction_date + - plan_object + - subaccount + required: + - status + - message + - data + TransactionListResponseArray: + type: object + properties: + id: + type: integer + domain: + type: string + status: + type: string + reference: + type: string + amount: + type: integer + message: + nullable: true + gateway_response: + type: string + paid_at: + type: string + nullable: true + created_at: + type: string + channel: + type: string + currency: + type: string + ip_address: + type: string + nullable: true + metadata: + type: object + nullable: true + log: + type: object + properties: + start_time: + type: integer + time_spent: + type: integer + attempts: + type: integer + errors: + type: integer + success: + type: boolean + mobile: + type: boolean + input: + type: array + items: {} + history: + type: array + items: + type: object + properties: + type: + type: string + message: + type: string + time: + type: integer + required: + - type + - message + - time + required: + - start_time + - time_spent + - attempts + - errors + - success + - mobile + - input + - history + nullable: true + fees: + type: integer + nullable: true + fees_split: + type: integer + nullable: true + customer: + type: object + properties: + id: + type: integer + first_name: + type: string + nullable: true + last_name: + type: string + nullable: true + email: + type: string + phone: + type: string + nullable: true + metadata: + type: object + nullable: true + customer_code: + type: string + risk_action: + type: string + required: + - id + - first_name + - last_name + - email + - phone + - metadata + - customer_code + - risk_action + authorization: + type: object + properties: + authorization_code: + type: string + nullable: true + bin: + type: string + nullable: true + last4: + type: string + nullable: true + exp_month: + type: string + nullable: true + exp_year: + type: string + nullable: true + channel: + type: string + nullable: true + card_type: + type: string + nullable: true + bank: + type: string + nullable: true + country_code: + type: string + nullable: true + brand: + type: string + nullable: true + reusable: + type: boolean + signature: + type: string + nullable: true + account_name: + type: string + nullable: true + required: + - authorization_code + - bin + - last4 + - exp_month + - exp_year + - channel + - card_type + - bank + - country_code + - brand + - reusable + - signature + - account_name + plan: + type: object + split: + type: object + subaccount: + type: object + order_id: + nullable: true + paidAt: + type: string + createdAt: + type: string + requested_amount: + type: integer + source: + type: object + properties: + source: + type: string + type: + type: string + identifier: + nullable: true + entry_point: + type: string + required: + - source + - type + - identifier + - entry_point + nullable: true + connect: + type: object + nullable: true + pos_transaction_data: + nullable: true + required: + - id + - domain + - status + - reference + - amount + - message + - gateway_response + - paid_at + - created_at + - channel + - currency + - ip_address + - metadata + - log + - fees + - fees_split + - customer + - authorization + - plan + - split + - subaccount + - order_id + - paidAt + - createdAt + - requested_amount + - source + - connect + - pos_transaction_data + TransactionListResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: array + items: + $ref: '#/components/schemas/TransactionListResponseArray' + meta: + type: object + properties: + total: + type: integer + total_volume: + type: number + skipped: + type: integer + perPage: + anyOf: + - type: string + - type: integer + page: + type: integer + pageCount: + type: integer + required: + - total + - total_volume + - skipped + - perPage + - page + - pageCount + additionalProperties: false + required: + - status + - message + - data + - meta + MetadataCustomFieldsArray: + type: object + properties: + value: + type: string + display_name: + type: string + variable_name: + type: string + required: + - value + - display_name + - variable_name + TransactionFetchResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + id: + type: integer + domain: + type: string + status: + type: string + reference: + type: string + receipt_number: + nullable: true + amount: + type: integer + message: + nullable: true + gateway_response: + type: string + helpdesk_link: + nullable: true + paid_at: + type: string + created_at: + type: string + channel: + type: string + currency: + type: string + ip_address: + type: string + metadata: + type: object + properties: + custom_fields: + type: array + items: + $ref: '#/components/schemas/MetadataCustomFieldsArray' + required: + - custom_fields + log: + type: object + properties: + start_time: + type: integer + time_spent: + type: integer + attempts: + type: integer + errors: + type: integer + success: + type: boolean + mobile: + type: boolean + input: + type: array + items: {} + history: + type: array + items: + type: object + properties: + type: + type: string + message: + type: string + time: + type: integer + required: + - type + - message + - time + required: + - start_time + - time_spent + - attempts + - errors + - success + - mobile + - input + - history + nullable: true + fees: + type: integer + fees_split: + type: integer + nullable: true + authorization: + type: object + properties: + authorization_code: + type: string + bin: + type: string + last4: + type: string + exp_month: + type: string + exp_year: + type: string + channel: + type: string + card_type: + type: string + bank: + type: string + country_code: + type: string + brand: + type: string + reusable: + type: boolean + signature: + type: string + account_name: + nullable: true + receiver_bank_account_number: + nullable: true + receiver_bank: + nullable: true + required: + - authorization_code + - bin + - last4 + - exp_month + - exp_year + - channel + - card_type + - bank + - country_code + - brand + - reusable + - signature + - account_name + - receiver_bank_account_number + - receiver_bank + customer: + type: object + properties: + id: + type: integer + first_name: + type: string + last_name: + type: string + email: + type: string + customer_code: + type: string + phone: + type: string + metadata: + type: object + risk_action: + type: string + international_format_phone: + type: string + required: + - id + - first_name + - last_name + - email + - customer_code + - phone + - metadata + - risk_action + - international_format_phone + plan: + type: object + subaccount: + type: object + split: + type: object + order_id: + nullable: true + paidAt: + type: string + createdAt: + type: string + requested_amount: + type: integer + pos_transaction_data: + nullable: true + source: + type: object + properties: + type: + type: string + source: + type: string + identifier: + nullable: true + required: + - type + - source + - identifier + fees_breakdown: + nullable: true + connect: + nullable: true + required: + - id + - domain + - status + - reference + - receipt_number + - amount + - message + - gateway_response + - helpdesk_link + - paid_at + - created_at + - channel + - currency + - ip_address + - metadata + - log + - fees + - fees_split + - authorization + - customer + - plan + - subaccount + - split + - order_id + - paidAt + - createdAt + - requested_amount + - pos_transaction_data + - source + - fees_breakdown + - connect + required: + - status + - message + - data + TransactionTimelineResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + required: + - status + - message + - data + TransactionTotalVolumeByCurrencyArray: + type: object + properties: + currency: + type: string + amount: + type: integer + required: + - currency + - amount + TransactionPendingTransfersByCurrencyArray: + type: object + properties: + currency: + type: string + amount: + type: integer + required: + - currency + - amount + TransactionTotalsResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + total_transactions: + type: integer + total_volume: + type: integer + total_volume_by_currency: + type: array + items: + $ref: '#/components/schemas/TransactionTotalVolumeByCurrencyArray' + pending_transfers: + type: integer + pending_transfers_by_currency: + type: array + items: + $ref: '#/components/schemas/TransactionPendingTransfersByCurrencyArray' + required: + - total_transactions + - total_volume + - total_volume_by_currency + - pending_transfers + - pending_transfers_by_currency + required: + - status + - message + - data + TransactionExportResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + path: + type: string + expiresAt: + type: string + required: + - path + - expiresAt + required: + - status + - message + - data + ChargeCreate: + type: object + required: + - email + - amount + properties: + email: + description: Customer's email address + type: string + amount: + description: Amount should be in kobo if currency is NGN, pesewas, if currency is GHS, and cents, if currency is ZAR + type: integer + authorization_code: + description: An authorization code to charge. + type: string + pin: + description: 4-digit PIN (send with a non-reusable authorization code) + type: string + reference: + description: Unique transaction reference. Only -, .`, = and alphanumeric characters allowed. + type: string + birthday: + description: The customer's birthday in the format YYYY-MM-DD e.g 2017-05-16 + type: string + format: date + device_id: + description: |- + This is the unique identifier of the device a user uses in making payment. + Only -, .`, = and alphanumeric characters are allowed. + type: string + metadata: + description: JSON object of custom data + type: object + example: + email: customer@email.com + amount: 350000 + authorization_code: AUTH_df1l5ehnym + Bank: + type: object + description: The bank object if charging a bank account + properties: + code: + description: Customer's bank code + type: string + account_number: + description: Customer's account number + type: string + MobileMoney: + type: object + description: Details of the mobile service provider + properties: + phone: + description: Customer's phone number + type: string + provider: + description: The telco provider of customer's phone number. This can be fetched from the List Bank endpoint + type: string + USSD: + type: object + description: The USSD code for the provider to charge + properties: + type: + description: The three-digit USSD code. + type: string + enum: + - '737' + - '919' + - '822' + - '966' + EFT: + type: object + description: Details of the EFT provider + properties: + provider: + description: The EFT provider + type: string + ChargeCreateResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + id: + type: integer + domain: + type: string + status: + type: string + reference: + type: string + receipt_number: + nullable: true + amount: + type: integer + message: + type: string + nullable: true + gateway_response: + type: string + paid_at: + type: string + created_at: + type: string + channel: + type: string + currency: + type: string + ip_address: + type: string + metadata: + type: object + properties: + custom_fields: + type: array + items: + $ref: '#/components/schemas/MetadataCustomFieldsArray' + required: + - custom_fields + log: + type: object + properties: + start_time: + type: integer + time_spent: + type: integer + attempts: + type: integer + errors: + type: integer + success: + type: boolean + mobile: + type: boolean + input: + type: array + items: {} + history: + type: array + items: + type: object + properties: + type: + type: string + message: + type: string + time: + type: integer + required: + - type + - message + - time + required: + - start_time + - time_spent + - attempts + - errors + - success + - mobile + - input + - history + nullable: true + fees: + type: integer + fees_split: + type: integer + nullable: true + authorization: + type: object + properties: + authorization_code: + type: string + bin: + type: string + last4: + type: string + exp_month: + type: string + exp_year: + type: string + channel: + type: string + card_type: + type: string + bank: + type: string + country_code: + type: string + brand: + type: string + reusable: + type: boolean + signature: + type: string + account_name: + nullable: true + receiver_bank_account_number: + nullable: true + receiver_bank: + nullable: true + required: + - authorization_code + - bin + - last4 + - exp_month + - exp_year + - channel + - card_type + - bank + - country_code + - brand + - reusable + - signature + - account_name + - receiver_bank_account_number + - receiver_bank + customer: + type: object + properties: + id: + type: integer + first_name: + type: string + last_name: + type: string + email: + type: string + customer_code: + type: string + phone: + type: string + metadata: + type: object + risk_action: + type: string + international_format_phone: + type: string + required: + - id + - first_name + - last_name + - email + - customer_code + - phone + - metadata + - risk_action + - international_format_phone + plan: + nullable: true + split: + type: object + order_id: + nullable: true + paidAt: + type: string + createdAt: + type: string + requested_amount: + type: integer + pos_transaction_data: + nullable: true + source: + nullable: true + fees_breakdown: + nullable: true + connect: + nullable: true + transaction_date: + type: string + plan_object: + type: object + subaccount: + type: object + required: + - id + - domain + - status + - reference + - receipt_number + - amount + - message + - gateway_response + - paid_at + - created_at + - channel + - currency + - ip_address + - metadata + - log + - fees + - fees_split + - authorization + - customer + - plan + - split + - order_id + - paidAt + - createdAt + - requested_amount + - pos_transaction_data + - source + - fees_breakdown + - connect + - transaction_date + - plan_object + - subaccount + required: + - status + - message + - data + ChargeSubmitPin: + type: object + required: + - pin + - reference + properties: + pin: + description: Customer's PIN for the ongoing transaction + type: string + reference: + description: Transaction reference that requires the PIN + type: string + example: + pin: '1234' + reference: 5bwib5v6anhe9xa + ChargeSubmitPinResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + status: + type: string + amount: + type: integer + currency: + type: string + transaction_date: + type: string + reference: + type: string + domain: + type: string + redirect_url: + type: string + nullable: true + metadata: + type: object + gateway_response: + type: string + message: + type: string + nullable: true + channel: + type: string + fees: + type: integer + nullable: true + authorization: + type: object + properties: + authorization_code: + type: string + nullable: true + bin: + type: string + last4: + type: string + exp_month: + type: string + exp_year: + type: string + channel: + type: string + card_type: + type: string + bank: + type: string + country_code: + type: string + brand: + type: string + reusable: + type: boolean + signature: + type: string + required: + - authorization_code + - bin + - last4 + - exp_month + - exp_year + - channel + - card_type + - bank + - country_code + - brand + - reusable + - signature + customer: + type: object + properties: + first_name: + type: string + nullable: true + last_name: + type: string + nullable: true + email: + type: string + customer_code: + type: string + phone: + type: string + nullable: true + risk_action: + type: string + required: + - first_name + - last_name + - email + - customer_code + - phone + - risk_action + required: + - status + - amount + - currency + - transaction_date + - reference + - domain + - redirect_url + - metadata + - gateway_response + - message + - channel + - fees + - authorization + - customer + required: + - status + - message + - data + ChargeSubmitOTP: + type: object + required: + - otp + - reference + properties: + otp: + description: Customer's OTP for ongoing transaction + type: string + reference: + description: The reference of the ongoing transaction + type: string + example: + otp: '123456' + reference: 5bwib5v6anhe9xa + ChargeSubmitOtpResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + status: + type: string + amount: + type: integer + currency: + type: string + transaction_date: + type: string + reference: + type: string + domain: + type: string + redirect_url: + type: string + nullable: true + metadata: + type: object + gateway_response: + type: string + message: + type: string + nullable: true + channel: + type: string + fees: + type: integer + nullable: true + authorization: + type: object + properties: + authorization_code: + type: string + nullable: true + bin: + type: string + last4: + type: string + exp_month: + type: string + exp_year: + type: string + channel: + type: string + card_type: + type: string + bank: + type: string + country_code: + type: string + brand: + type: string + reusable: + type: boolean + signature: + type: string + required: + - authorization_code + - bin + - last4 + - exp_month + - exp_year + - channel + - card_type + - bank + - country_code + - brand + - reusable + - signature + customer: + type: object + properties: + first_name: + type: string + nullable: true + last_name: + type: string + nullable: true + email: + type: string + customer_code: + type: string + phone: + type: string + nullable: true + risk_action: + type: string + required: + - first_name + - last_name + - email + - customer_code + - phone + - risk_action + required: + - status + - amount + - currency + - transaction_date + - reference + - domain + - redirect_url + - metadata + - gateway_response + - message + - channel + - fees + - authorization + - customer + required: + - status + - message + - data + ChargeSubmitPhone: + type: object + required: + - phone + - reference + properties: + phone: + description: Customer's mobile number + type: string + reference: + description: The reference of the ongoing transaction + type: string + example: + phone: '08012345678' + reference: 5bwib5v6anhe9xa + ChargeSubmitPhoneResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + status: + type: string + amount: + type: integer + currency: + type: string + transaction_date: + type: string + reference: + type: string + domain: + type: string + redirect_url: + type: string + nullable: true + metadata: + type: object + gateway_response: + type: string + message: + type: string + nullable: true + channel: + type: string + fees: + type: integer + nullable: true + authorization: + type: object + properties: + authorization_code: + type: string + nullable: true + bin: + type: string + last4: + type: string + exp_month: + type: string + exp_year: + type: string + channel: + type: string + card_type: + type: string + bank: + type: string + country_code: + type: string + brand: + type: string + reusable: + type: boolean + signature: + type: string + required: + - authorization_code + - bin + - last4 + - exp_month + - exp_year + - channel + - card_type + - bank + - country_code + - brand + - reusable + - signature + customer: + type: object + properties: + first_name: + type: string + nullable: true + last_name: + type: string + nullable: true + email: + type: string + customer_code: + type: string + phone: + type: string + nullable: true + risk_action: + type: string + required: + - first_name + - last_name + - email + - customer_code + - phone + - risk_action + display_text: + type: string + required: + - status + - amount + - currency + - transaction_date + - reference + - domain + - redirect_url + - metadata + - gateway_response + - message + - channel + - fees + - authorization + - customer + - display_text + required: + - status + - message + - data + ChargeSubmitBirthday: + type: object + required: + - birthday + - reference + properties: + birthday: + description: Customer's birthday in the format YYYY-MM-DD e.g 2016-09-21 + type: string + format: date + reference: + description: The reference of the ongoing transaction + type: string + example: + birthday: '1961-09-21' + reference: 5bwib5v6anhe9xa + ChargeSubmitBirthdayResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + status: + type: string + display_text: + type: string + required: + - status + - display_text + required: + - status + - message + - data + ChargeSubmitAddress: + type: object + required: + - address + - reference + - city + - state + - zip_code + properties: + address: + description: Customer's address + type: string + city: + description: Customer's city + type: string + state: + description: Customer's state + type: string + zip_code: + description: Customer's zipcode + type: string + reference: + description: The reference of the ongoing transaction + type: string + example: + address: 140 N 2ND ST + city: Stroudsburg + state: PA + zip_code: '18360' + reference: 5bwib5v6anhe9xa + Response: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + ChargeCheckPendingResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + status: + type: string + amount: + type: integer + currency: + type: string + transaction_date: + type: string + reference: + type: string + domain: + type: string + redirect_url: + type: string + nullable: true + metadata: + type: object + gateway_response: + type: string + message: + type: string + nullable: true + channel: + type: string + fees: + type: integer + nullable: true + authorization: + type: object + properties: + authorization_code: + type: string + nullable: true + bin: + type: string + last4: + type: string + exp_month: + type: string + exp_year: + type: string + channel: + type: string + card_type: + type: string + bank: + type: string + country_code: + type: string + brand: + type: string + reusable: + type: boolean + signature: + type: string + required: + - authorization_code + - bin + - last4 + - exp_month + - exp_year + - channel + - card_type + - bank + - country_code + - brand + - reusable + - signature + customer: + type: object + properties: + first_name: + type: string + nullable: true + last_name: + type: string + nullable: true + email: + type: string + customer_code: + type: string + phone: + type: string + nullable: true + risk_action: + type: string + required: + - first_name + - last_name + - email + - customer_code + - phone + - risk_action + required: + - status + - amount + - currency + - transaction_date + - reference + - domain + - redirect_url + - metadata + - gateway_response + - message + - channel + - fees + - authorization + - customer + required: + - status + - message + - data + BulkChargeListResponseArray: + type: object + properties: + integration: + type: integer + domain: + type: string + batch_code: + type: string + status: + type: string + easy_cron_id: + nullable: true + reference: + type: string + id: + type: integer + createdAt: + type: string + updatedAt: + type: string + required: + - integration + - domain + - batch_code + - status + - easy_cron_id + - reference + - id + - createdAt + - updatedAt + BulkChargeListResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: array + items: + $ref: '#/components/schemas/BulkChargeListResponseArray' + meta: + type: object + properties: + total: + type: integer + skipped: + type: integer + perPage: + anyOf: + - type: integer + - type: string + page: + type: integer + pageCount: + type: integer + required: + - total + - skipped + - perPage + - page + - pageCount + additionalProperties: false + required: + - status + - message + - data + - meta + BulkChargeInitiate: + type: object + description: A list of charge object + required: + - authorization + - amount + properties: + authorization: + description: Customer's card authorization code + type: string + amount: + description: Amount to charge on the authorization + type: integer + reference: + description: | + A unique identifier containing lowercase letters `(a-z)`, digits `(0-9)` and these symbols: dash (`-`), underscore(`_`) + type: string + attempt_partial_debit: + description: A flag to indicate if you want us to try recouping lower amounts when the customer has insufficient fund + type: boolean + at_least: + description: Minimum amount to charge if the attempt_partial_debit flag is set + type: integer + metadata: + description: JSON object of custom data + type: object + example: + authorization: AUTH_ncx8hews93 + amount: 250000 + reference: dam1266638dhhd + BulkChargeInitiateResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + batch_code: + type: string + reference: + type: string + id: + type: integer + integration: + type: integer + domain: + type: string + status: + type: string + total_charges: + type: integer + pending_charges: + type: integer + createdAt: + type: string + updatedAt: + type: string + required: + - batch_code + - reference + - id + - integration + - domain + - status + - total_charges + - pending_charges + - createdAt + - updatedAt + required: + - status + - message + - data + BulkChargeFetchResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + batch_code: + type: string + reference: + type: string + id: + type: integer + integration: + type: integer + domain: + type: string + status: + type: string + total_charges: + type: integer + pending_charges: + type: integer + createdAt: + type: string + updatedAt: + type: string + required: + - batch_code + - reference + - id + - integration + - domain + - status + - total_charges + - pending_charges + - createdAt + - updatedAt + required: + - status + - message + - data + BulkChargeFetchBulkBatchChargesResponseArray: + type: object + properties: + integration: + type: integer + bulkcharge: + type: integer + customer: + type: object + properties: + id: + type: integer + first_name: + type: string + last_name: + type: string + email: + type: string + customer_code: + type: string + phone: + type: string + metadata: + type: object + properties: + calling_code: + type: string + risk_action: + type: string + international_format_phone: + type: string + required: + - id + - first_name + - last_name + - email + - customer_code + - phone + - metadata + - risk_action + - international_format_phone + authorization: + type: object + properties: + authorization_code: + type: string + bin: + type: string + last4: + type: string + exp_month: + type: string + exp_year: + type: string + channel: + type: string + card_type: + type: string + bank: + type: string + country_code: + type: string + brand: + type: string + reusable: + type: boolean + signature: + type: string + account_name: + nullable: true + required: + - authorization_code + - bin + - last4 + - exp_month + - exp_year + - channel + - card_type + - bank + - country_code + - brand + - reusable + - signature + - account_name + domain: + type: string + amount: + type: integer + at_least: + type: integer + currency: + type: string + reference: + type: string + metadata: + type: object + properties: + custom_fields: + type: array + items: + $ref: '#/components/schemas/MetadataCustomFieldsArray' + required: + - custom_fields + status: + type: string + message: + type: string + attempt_partial_debit: + type: boolean + id: + type: integer + createdAt: + type: string + updatedAt: + type: string + required: + - integration + - bulkcharge + - customer + - authorization + - domain + - amount + - at_least + - currency + - reference + - metadata + - status + - message + - attempt_partial_debit + - id + - createdAt + - updatedAt + BulkChargeFetchBulkBatchChargesResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: array + items: + $ref: '#/components/schemas/BulkChargeFetchBulkBatchChargesResponseArray' + meta: + type: object + properties: + perPage: + type: string + total: + type: integer + skipped: + type: integer + page: + type: integer + pageCount: + type: integer + required: + - perPage + - total + - skipped + - page + - pageCount + additionalProperties: false + required: + - status + - message + - data + - meta + BulkChargePauseResponse: + type: object + properties: + status: + type: boolean + message: + type: string + required: + - status + - message + BulkChargeResumeResponse: + type: object + properties: + status: + type: boolean + message: + type: string + required: + - status + - message + SubaccountListResponseArray: + type: object + properties: + id: + type: integer + subaccount_code: + type: string + business_name: + type: string + description: + type: string + primary_contact_name: + type: string + primary_contact_email: + type: string + primary_contact_phone: + type: string + metadata: + type: string + percentage_charge: + type: number + settlement_bank: + type: string + bank_id: + type: integer + account_number: + type: string + currency: + type: string + active: + type: integer + is_verified: + type: boolean + required: + - id + - subaccount_code + - business_name + - description + - primary_contact_name + - primary_contact_email + - primary_contact_phone + - metadata + - percentage_charge + - settlement_bank + - bank_id + - account_number + - currency + - active + - is_verified + SubaccountListResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: array + items: + $ref: '#/components/schemas/SubaccountListResponseArray' + meta: + type: object + properties: + total: + type: integer + skipped: + type: integer + perPage: + type: integer + page: + type: integer + pageCount: + type: integer + required: + - total + - skipped + - perPage + - page + - pageCount + additionalProperties: false + required: + - status + - message + - data + - meta + SubaccountCreate: + type: object + required: + - business_name + - settlement_bank + - account_number + - percentage_charge + properties: + business_name: + description: Name of business for subaccount + type: string + settlement_bank: + description: Bank code for the bank. You can get the list of Bank Codes by calling the List Banks endpoint. + type: string + account_number: + description: Bank account number + type: string + percentage_charge: + description: Customer's phone number + type: number + format: float + description: + description: A description for this subaccount + type: string + primary_contact_email: + description: A contact email for the subaccount + type: string + primary_contact_name: + description: The name of the contact person for this subaccount + type: string + primary_contact_phone: + description: A phone number to call for this subaccount + type: string + metadata: + description: Stringified JSON object of custom data + type: string + example: + business_name: Oasis + account_number: '0123456047' + settlement_bank: '058' + percentage_charge: 30 + SubaccountCreateResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + business_name: + type: string + account_name: + type: string + nullable: true + description: + type: string + primary_contact_name: + type: string + primary_contact_email: + type: string + primary_contact_phone: + type: string + metadata: + type: string + account_number: + type: string + percentage_charge: + type: number + settlement_bank: + type: string + currency: + type: string + bank: + type: integer + integration: + type: integer + domain: + type: string + product: + type: string + managed_by_integration: + type: integer + subaccount_code: + type: string + is_verified: + type: boolean + settlement_schedule: + type: string + active: + type: boolean + migrate: + type: boolean + id: + type: integer + createdAt: + type: string + updatedAt: + type: string + required: + - business_name + - description + - primary_contact_name + - primary_contact_email + - primary_contact_phone + - metadata + - account_number + - percentage_charge + - settlement_bank + - currency + - bank + - integration + - domain + - managed_by_integration + - product + - subaccount_code + - is_verified + - settlement_schedule + - active + - migrate + - id + - createdAt + - updatedAt + required: + - status + - message + - data + SubaccountFetchResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + integration: + type: integer + account_name: + type: string + nullable: true + bank: + type: integer + managed_by_integration: + type: integer + domain: + type: string + subaccount_code: + type: string + business_name: + type: string + description: + type: string + primary_contact_name: + type: string + primary_contact_email: + type: string + primary_contact_phone: + type: string + metadata: + type: string + percentage_charge: + type: number + is_verified: + type: boolean + settlement_bank: + type: string + account_number: + type: string + settlement_schedule: + type: string + active: + type: boolean + migrate: + type: boolean + currency: + type: string + product: + type: string + id: + type: integer + createdAt: + type: string + updatedAt: + type: string + required: + - integration + - bank + - managed_by_integration + - domain + - subaccount_code + - business_name + - description + - primary_contact_name + - primary_contact_email + - primary_contact_phone + - metadata + - percentage_charge + - is_verified + - settlement_bank + - account_number + - settlement_schedule + - active + - migrate + - currency + - product + - id + - createdAt + - updatedAt + required: + - status + - message + - data + SubaccountUpdate: + type: object + properties: + business_name: + description: Name of business for subaccount + type: string + settlement_bank: + description: Bank code for the bank. You can get the list of Bank Codes by calling the List Banks endpoint. + type: string + account_number: + description: Bank account number + type: string + active: + description: Activate or deactivate a subaccount + type: boolean + percentage_charge: + description: Customer's phone number + type: number + format: float + description: + description: A description for this subaccount + type: string + primary_contact_email: + description: A contact email for the subaccount + type: string + primary_contact_name: + description: The name of the contact person for this subaccount + type: string + primary_contact_phone: + description: A phone number to call for this subaccount + type: string + metadata: + description: Stringified JSON object of custom data + type: string + example: + business_name: Sandalwood + SubaccountUpdateResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + domain: + type: string + subaccount_code: + type: string + account_name: + type: string + nullable: true + business_name: + type: string + description: + type: string + primary_contact_name: + type: string + primary_contact_email: + type: string + primary_contact_phone: + type: string + metadata: + type: string + percentage_charge: + type: number + is_verified: + type: boolean + settlement_bank: + type: string + account_number: + type: string + settlement_schedule: + type: string + active: + type: boolean + migrate: + type: boolean + currency: + type: string + product: + type: string + id: + type: integer + integration: + type: integer + bank: + type: integer + managed_by_integration: + type: integer + createdAt: + type: string + updatedAt: + type: string + required: + - domain + - subaccount_code + - business_name + - description + - primary_contact_name + - primary_contact_email + - primary_contact_phone + - metadata + - percentage_charge + - is_verified + - settlement_bank + - account_number + - settlement_schedule + - active + - migrate + - currency + - product + - id + - integration + - bank + - managed_by_integration + - createdAt + - updatedAt + required: + - status + - message + - data + SplitSubaccountsArray: + type: object + properties: + subaccount: + type: object + properties: + id: + type: integer + subaccount_code: + type: string + business_name: + type: string + description: + type: string + primary_contact_name: + type: string + primary_contact_email: + type: string + primary_contact_phone: + type: string + metadata: + type: string + settlement_bank: + type: string + currency: + type: string + account_number: + type: string + required: + - id + - subaccount_code + - business_name + - description + - primary_contact_name + - primary_contact_email + - primary_contact_phone + - metadata + - settlement_bank + - currency + - account_number + share: + type: integer + required: + - subaccount + - share + SplitListResponseArray: + type: object + properties: + id: + type: integer + name: + type: string + type: + type: string + currency: + type: string + integration: + type: integer + domain: + type: string + split_code: + type: string + active: + type: boolean + bearer_type: + type: string + bearer_subaccount: + type: integer + nullable: true + createdAt: + type: string + updatedAt: + type: string + is_dynamic: + type: boolean + subaccounts: + type: array + items: + $ref: '#/components/schemas/SplitSubaccountsArray' + total_subaccounts: + type: integer + required: + - id + - name + - type + - currency + - integration + - domain + - split_code + - active + - bearer_type + - bearer_subaccount + - createdAt + - updatedAt + - is_dynamic + - subaccounts + - total_subaccounts + SplitListResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: array + items: + $ref: '#/components/schemas/SplitListResponseArray' + meta: + type: object + properties: + total: + type: integer + skipped: + type: integer + perPage: + type: integer + page: + type: integer + pageCount: + type: integer + required: + - total + - skipped + - perPage + - page + - pageCount + additionalProperties: false + required: + - status + - message + - data + - meta + SplitCreateResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + id: + type: integer + name: + type: string + type: + type: string + currency: + type: string + integration: + type: integer + domain: + type: string + split_code: + type: string + active: + type: boolean + bearer_type: + type: string + bearer_subaccount: + type: integer + createdAt: + type: string + updatedAt: + type: string + is_dynamic: + type: boolean + subaccounts: + type: array + items: + $ref: '#/components/schemas/SplitSubaccountsArray' + total_subaccounts: + type: integer + required: + - id + - name + - type + - currency + - integration + - domain + - split_code + - active + - bearer_type + - createdAt + - updatedAt + - is_dynamic + - subaccounts + - total_subaccounts + required: + - status + - message + - data + SplitFetchResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + id: + type: integer + name: + type: string + type: + type: string + currency: + type: string + integration: + type: integer + domain: + type: string + split_code: + type: string + active: + type: boolean + bearer_type: + type: string + bearer_subaccount: + type: integer + createdAt: + type: string + updatedAt: + type: string + is_dynamic: + type: boolean + subaccounts: + type: array + items: + $ref: '#/components/schemas/SplitSubaccountsArray' + total_subaccounts: + type: integer + required: + - id + - name + - type + - currency + - integration + - domain + - split_code + - active + - bearer_type + - bearer_subaccount + - createdAt + - updatedAt + - is_dynamic + - subaccounts + - total_subaccounts + required: + - status + - message + - data + SplitUpdate: + type: object + properties: + name: + description: Name of the transaction split + type: string + active: + description: Toggle status of split. When true, the split is active, else it's inactive + type: boolean + bearer_type: + description: This allows you specify how the transaction charge should be processed + type: string + enum: + - subaccount + - account + - all-proportional + - all + bearer_subaccount: + description: This is the subaccount code of the customer or partner that would bear the transaction charge if you specified subaccount as the bearer type + type: string + SplitUpdateResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + id: + type: integer + name: + type: string + type: + type: string + currency: + type: string + integration: + type: integer + domain: + type: string + split_code: + type: string + active: + type: boolean + bearer_type: + type: string + bearer_subaccount: + type: integer + createdAt: + type: string + updatedAt: + type: string + is_dynamic: + type: boolean + subaccounts: + type: array + items: + $ref: '#/components/schemas/SplitSubaccountsArray' + total_subaccounts: + type: integer + required: + - id + - name + - type + - currency + - integration + - domain + - split_code + - active + - bearer_type + - bearer_subaccount + - createdAt + - updatedAt + - is_dynamic + - subaccounts + - total_subaccounts + required: + - status + - message + - data + SplitAddUpdateSubaccountResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + id: + type: integer + name: + type: string + type: + type: string + currency: + type: string + integration: + type: integer + domain: + type: string + split_code: + type: string + active: + type: boolean + bearer_type: + type: string + bearer_subaccount: + type: integer + createdAt: + type: string + updatedAt: + type: string + is_dynamic: + type: boolean + subaccounts: + type: array + items: + $ref: '#/components/schemas/SplitSubaccountsArray' + total_subaccounts: + type: integer + required: + - id + - name + - type + - currency + - integration + - domain + - split_code + - active + - bearer_type + - bearer_subaccount + - createdAt + - updatedAt + - is_dynamic + - subaccounts + - total_subaccounts + required: + - status + - message + - data + SplitRemoveSubaccountResponse: + type: object + properties: + status: + type: boolean + message: + type: string + required: + - status + - message + TerminalSendEventData: + type: object + description: The parameters needed to perform the specified action + properties: + id: + description: The invoice or transaction ID you want to push to the Terminal + type: integer + format: int64 + reference: + description: The offline_reference from the Payment Request response + type: string + example: + id: 7895939 + reference: '4634337895939' + TerminalSendEvent: + type: object + properties: + type: + description: The type of event to push + type: string + enum: + - invoice + - transaction + action: + description: | + The action the Terminal needs to perform. For the invoice type, the action can either be process or view. + For the transaction type, the action can either be process or print. + type: string + enum: + - process + - view + - print + data: + $ref: '#/components/schemas/TerminalSendEventData' + example: + type: invoice + action: process + data: + id: 7895939 + reference: '4634337895939' + TerminalGetStatusResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + online: + type: boolean + available: + type: boolean + required: + - online + - available + required: + - status + - message + - data + TerminalListsResponseArray: + type: object + properties: + id: + type: integer + serial_number: + type: string + nullable: true + device_make: + type: string + nullable: true + terminal_id: + type: string + integration: + type: integer + domain: + type: string + name: + type: string + nullable: true + address: + type: string + nullable: true + status: + type: string + required: + - id + - serial_number + - device_make + - terminal_id + - integration + - domain + - name + - address + - status + TerminalListsResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: array + items: + $ref: '#/components/schemas/TerminalListsResponseArray' + meta: + type: object + properties: + next: + type: string + nullable: true + previous: + type: string + nullable: true + perPage: + type: integer + required: + - next + - previous + - perPage + additionalProperties: false + required: + - status + - message + - data + - meta + TerminalGetResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + id: + type: integer + serial_number: + type: string + device_make: + type: string + nullable: true + terminal_id: + type: string + integration: + type: integer + domain: + type: string + name: + type: string + nullable: true + address: + type: string + nullable: true + status: + type: string + split_code: + type: string + nullable: true + required: + - id + - serial_number + - device_make + - terminal_id + - integration + - domain + - name + - address + - status + - split_code + required: + - status + - message + - data + TerminalUpate: + type: object + properties: + name: + description: The new name for the Terminal + type: string + address: + description: The new address for the Terminal + type: string + example: + name: Oreos + address: Somewhere on earth + TerminalUpdateResponse: + type: object + properties: + status: + type: boolean + message: + type: string + required: + - status + - message + TerminalActivationToggle: + type: object + description: Model for activating and deactivating a debug Terminal + required: + - serial_number + properties: + serial_number: + description: Device Serial Number + type: string + example: + serial_number: '1111150412230003899' + TerminalCommissionDeviceResponse: + type: object + properties: + status: + type: boolean + message: + type: string + required: + - status + - message + TerminalDecommissionDeviceResponse: + type: object + properties: + status: + type: boolean + message: + type: string + required: + - status + - message + VirtualTerminalListResponseArray: + type: object + properties: + id: + type: integer + code: + type: string + name: + type: string + integration: + type: integer + domain: + type: string + paymentMethods: + type: array + items: {} + active: + type: boolean + created_at: + type: string + currency: + type: string + required: + - id + - code + - name + - integration + - domain + - paymentMethods + - active + - created_at + - currency + VirtualTerminalListResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: array + items: + $ref: '#/components/schemas/VirtualTerminalListResponseArray' + meta: + type: object + properties: + total: + type: integer + skipped: + type: integer + perPage: + anyOf: + - type: string + - type: integer + page: + type: integer + pageCount: + type: integer + VirtualTerminalCreate: + type: object + required: + - name + - destinations + properties: + name: + type: string + description: The name of the virtual terminal + destinations: + type: array + description: Array of objects containing recipients for payment notifications for the Virtual Terminal. + items: + type: object + properties: + target: + type: string + description: The WhatsApp number to receive payment notifications + name: + type: string + description: The name of the associated WhatsApp number + split_code: + type: string + description: Split code to associate with the virtual terminal + metadata: + type: object + description: Additional custom data as key-value pairs + example: + name: Sample Terminal + destinations: + - target: '+2548012345678' + name: John Doe + - target: '+2548098765432' + name: Jane Smith + VirtualTerminalCreateResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + id: + type: integer + name: + type: string + integration: + type: integer + domain: + type: string + code: + type: string + paymentMethods: + type: array + items: {} + active: + type: boolean + metadata: + nullable: true + destinations: + type: array + items: + type: object + properties: + target: + type: string + type: + type: string + name: + type: string + currency: + type: string + required: + - id + - name + - integration + - domain + - code + - paymentMethods + - active + - metadata + - destinations + - currency + required: + - status + - message + - data + VirtualTerminalFetchResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + id: + type: integer + code: + type: string + name: + type: string + integration: + type: integer + domain: + type: string + paymentMethods: + type: array + items: {} + active: + type: boolean + created_at: + type: string + connect_account_id: + nullable: true + destinations: + type: array + items: + type: object + properties: + target: + type: string + type: + type: string + name: + type: string + created_at: + type: string + currency: + type: string + required: + - id + - code + - name + - integration + - domain + - paymentMethods + - active + - created_at + - connect_account_id + - destinations + - currency + required: + - status + - message + - data + VirtualTerminalUpdate: + type: object + required: + - name + properties: + name: + description: Name of the virtual terminal + type: string + example: + name: Lagos_Mainland_Zone_1 + VirtualTerminalUpdateResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + id: + type: integer + code: + type: string + name: + type: string + integration: + type: integer + domain: + type: string + paymentMethods: + type: array + items: {} + active: + type: boolean + created_at: + type: string + connect_account_id: + nullable: true + destinations: + type: array + items: + type: object + properties: + target: + type: string + type: + type: string + name: + type: string + created_at: + type: string + currency: + type: string + required: + - id + - code + - name + - integration + - domain + - paymentMethods + - active + - created_at + - connect_account_id + - destinations + - currency + required: + - status + - message + - data + VirtualTerminalDeactivateResponse: + type: object + properties: + status: + type: boolean + message: + type: string + required: + - status + - message + VirtualTerminalDestinationAssign: + type: object + required: + - destinations + properties: + destinations: + type: array + description: Array of objects containing recipients for payment notifications for the Virtual Terminal. + items: + type: object + properties: + target: + type: string + description: The WhatsApp number to receive payment notifications + name: + type: string + description: The name of the associated WhatsApp number + required: + - target + - name + example: + destinations: + - target: '+2548012345678' + name: John Doe + - target: '+2548098765432' + name: Jane Smith + VirtualTerminalDestinationAssignResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: array + items: + type: object + properties: + integration: + type: integer + target: + type: string + name: + type: string + type: + type: string + id: + type: integer + createdAt: + type: string + updatedAt: + type: string + required: + - integration + - target + - name + - type + - id + - createdAt + - updatedAt + required: + - status + - message + - data + VirtualTerminalDestinationUnassign: + type: object + properties: + targets: + type: array + description: Array of destination targets to unassign + items: + type: string + required: + - targets + example: + targets: + - '+2548012345678' + - '+2548098765432' + VirtualTerminalDestinationUnassignResponse: + type: object + properties: + status: + type: boolean + message: + type: string + required: + - status + - message + VirtualTerminalAddSplitCode: + type: object + required: + - split_code + properties: + split_code: + description: The split code to assign to the virtual terminal + type: string + example: + split_code: SPL_1234567890abcdef + VirtualTerminalAddSplitCodeResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + id: + type: integer + name: + type: string + type: + type: string + currency: + type: string + integration: + type: integer + domain: + type: string + split_code: + type: string + active: + type: boolean + bearer_type: + type: string + bearer_subaccount: + nullable: true + createdAt: + type: string + updatedAt: + type: string + is_dynamic: + type: boolean + subaccounts: + type: array + items: + $ref: '#/components/schemas/SplitSubaccountsArray' + total_subaccounts: + type: integer + required: + - id + - name + - type + - currency + - integration + - domain + - split_code + - active + - bearer_type + - bearer_subaccount + - createdAt + - updatedAt + - is_dynamic + - subaccounts + - total_subaccounts + required: + - status + - message + - data + VirtualTerminalDeleteSplitCode: + type: object + required: + - split_code + properties: + split_code: + description: The split code to assign to the virtual terminal + type: string + example: + split_code: SPL_1234567890abcdef + VirtualTerminalDeleteSplitCodeResponse: + type: object + properties: + status: + type: boolean + message: + type: string + required: + - status + - message + CustomerListResponseArray: + type: object + properties: + integration: + type: integer + first_name: + type: string + nullable: true + last_name: + type: string + nullable: true + email: + type: string + phone: + type: string + nullable: true + metadata: + type: object + nullable: true + domain: + type: string + customer_code: + type: string + risk_action: + type: string + id: + type: integer + createdAt: + type: string + updatedAt: + type: string + required: + - integration + - first_name + - last_name + - email + - phone + - metadata + - domain + - customer_code + - risk_action + - id + - createdAt + - updatedAt + CustomerListResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: array + items: + $ref: '#/components/schemas/CustomerListResponseArray' + meta: + type: object + properties: + total: + type: integer + skipped: + type: integer + perPage: + anyOf: + - type: string + - type: integer + page: + type: integer + pageCount: + type: integer + required: + - total + - skipped + - perPage + - page + - pageCount + additionalProperties: false + required: + - status + - message + - data + - meta + CustomerCreate: + type: object + required: + - email + properties: + email: + description: Customer's email address + type: string + first_name: + description: Customer's first name + type: string + last_name: + description: Customer's last name + type: string + phone: + description: Customer's phone number + type: string + metadata: + description: Stringified JSON object of custom data + type: string + example: + email: rock@sandy.com + first_name: Rock + last_name: Sandy + CustomerCreateResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + transactions: + type: array + items: {} + subscriptions: + type: array + items: {} + authorizations: + type: array + items: {} + email: + type: string + first_name: + type: string + last_name: + type: string + phone: + type: string + integration: + type: integer + domain: + type: string + metadata: + type: object + properties: + calling_code: + type: string + customer_code: + type: string + risk_action: + type: string + id: + type: integer + createdAt: + type: string + updatedAt: + type: string + identified: + type: boolean + identifications: + nullable: true + required: + - transactions + - subscriptions + - authorizations + - email + - first_name + - last_name + - phone + - integration + - domain + - metadata + - customer_code + - risk_action + - id + - createdAt + - updatedAt + - identified + - identifications + required: + - status + - message + - data + CustomerFetchResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + transactions: + type: array + items: {} + subscriptions: + type: array + items: {} + authorizations: + type: array + items: {} + first_name: + type: string + last_name: + type: string + email: + type: string + phone: + type: string + metadata: + type: object + properties: + calling_code: + type: string + domain: + type: string + customer_code: + type: string + risk_action: + type: string + id: + type: integer + integration: + type: integer + createdAt: + type: string + updatedAt: + type: string + created_at: + type: string + updated_at: + type: string + total_transactions: + type: integer + total_transaction_value: + type: array + items: {} + dedicated_account: + nullable: true + dedicated_accounts: + type: array + items: {} + nullable: true + identified: + type: boolean + identifications: + nullable: true + required: + - transactions + - subscriptions + - authorizations + - first_name + - last_name + - email + - phone + - metadata + - domain + - customer_code + - risk_action + - id + - integration + - createdAt + - updatedAt + - created_at + - updated_at + - total_transactions + - total_transaction_value + - dedicated_account + - dedicated_accounts + - identified + - identifications + required: + - status + - message + - data + CustomerUpdate: + type: object + properties: + first_name: + description: Customer's first name + type: string + last_name: + description: Customer's last name + type: string + phone: + description: Customer's phone number + type: string + metadata: + description: Stringified JSON object of custom data + type: string + example: + first_name: Cecilia + last_name: Jones + CustomerUpdateResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + first_name: + type: string + last_name: + type: string + email: + type: string + phone: + type: string + metadata: + type: object + domain: + type: string + customer_code: + type: string + risk_action: + type: string + id: + type: integer + integration: + type: integer + createdAt: + type: string + updatedAt: + type: string + identified: + type: boolean + identifications: + nullable: true + required: + - first_name + - last_name + - email + - phone + - metadata + - domain + - customer_code + - risk_action + - id + - integration + - createdAt + - updatedAt + - identified + - identifications + required: + - status + - message + - data + CustomerRiskAction: + type: object + required: + - customer + properties: + customer: + description: The customer code from the response of the customer creation + type: string + risk_action: + description: This determines the fraud rules that should be applied to the customer + type: string + default: default + enum: + - allow + - deny + - default + example: + customer: CUS_c6wqvwmvwopw4ms + risk_action: deny + CustomerWhitelistBlacklistResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + transactions: + type: array + items: {} + subscriptions: + type: array + items: {} + authorizations: + type: array + items: {} + first_name: + type: string + last_name: + type: string + email: + type: string + phone: + type: string + metadata: + type: object + domain: + type: string + customer_code: + type: string + risk_action: + type: string + id: + type: integer + integration: + type: integer + createdAt: + type: string + updatedAt: + type: string + identified: + type: boolean + identifications: + nullable: true + required: + - transactions + - subscriptions + - authorizations + - first_name + - last_name + - email + - phone + - metadata + - domain + - customer_code + - risk_action + - id + - integration + - createdAt + - updatedAt + - identified + - identifications + required: + - status + - message + - data + CustomerValidate: + type: object + required: + - first_name + - last_name + - type + - country + - bvn + - bank_code + - account_number + properties: + first_name: + description: Customer's first name + type: string + middle_name: + description: Customer's middle name + type: string + last_name: + description: Customer's last name + type: string + type: + description: Predefined types of identification. + type: string + default: bank_account + value: + description: Customer's identification number. + type: string + country: + description: Two-letter country code of identification issuer + type: string + bvn: + description: Customer's Bank Verification Number + type: string + bank_code: + description: You can get the list of bank codes by calling the List Banks endpoint (https://api.paystack.co/bank). + type: string + account_number: + description: Customer's bank account number. + type: string + example: + first_name: Jabal + last_name: Cedar + country: NG + type: bank_account + account_number: '0123456789' + bank_code: '007' + bvn: '20012345677' + CustomerValidateResponse: + type: object + properties: + status: + type: boolean + message: + type: string + required: + - status + - message + CustomerAuthorizationInitializeAccount: + type: object + properties: + number: + type: string + description: The customer's account number + example: '0123456789' + bank_code: + type: string + description: The code representing the customer's bank + example: '058' + required: + - number + - bank_code + CustomerAuthorizationInitializeAddress: + type: object + properties: + street: + type: string + description: The customer's street + example: 123 Main Street + city: + type: string + description: The customer's city + example: Lagos + state: + type: string + description: The customer's state + example: Lagos + required: + - street + - city + - state + CustomerAuthorizationInitializeRequest: + type: object + required: + - email + - channel + properties: + email: + type: string + description: Customer's email address + example: ravi@demo.com + channel: + type: string + description: direct_debit is the only supported option for now + enum: + - direct_debit + example: direct_debit + callback_url: + type: string + description: Fully qualified url (e.g. https://example.com/) to redirect your customer to + example: http://test.url.com + account: + $ref: '#/components/schemas/CustomerAuthorizationInitializeAccount' + address: + $ref: '#/components/schemas/CustomerAuthorizationInitializeAddress' + CustomerAuthorizationInitializeResponseData: + type: object + properties: + redirect_url: + type: string + example: https://checkout.paystack.com/82t4mp5b5mfn51h + access_code: + type: string + example: 82t4mp5b5mfn51h + reference: + type: string + example: dfbzfotsrbv4n5s82t4mp5b5mfn51h + required: + - redirect_url + - access_code + - reference + CustomerAuthorizationInitializeResponse: + type: object + properties: + status: + type: boolean + example: true + message: + type: string + example: Authorization initialized + data: + $ref: '#/components/schemas/CustomerAuthorizationInitializeResponseData' + required: + - status + - message + - data + CustomerAuthorizationVerifyResponseCustomer: + type: object + properties: + code: + type: string + example: CUS_24lze1c8i2zl76y + email: + type: string + example: ravi@demo.com + required: + - code + - email + CustomerAuthorizationVerifyResponseData: + type: object + properties: + authorization_code: + type: string + example: AUTH_JV4T9Wawdj + channel: + type: string + example: direct_debit + bank: + type: string + example: Guaranty Trust Bank + active: + type: boolean + example: true + customer: + $ref: '#/components/schemas/CustomerAuthorizationVerifyResponseCustomer' + required: + - authorization_code + - channel + - bank + - active + - customer + CustomerAuthorizationVerifyResponse: + type: object + properties: + status: + type: boolean + example: true + message: + type: string + example: Authorization retrieved successfully + data: + $ref: '#/components/schemas/CustomerAuthorizationVerifyResponseData' + required: + - status + - message + - data + CustomerDeactivateAuthorization: + type: object + required: + - authorization_code + properties: + authorization_code: + description: Authorization code to be deactivated + type: string + example: + authorization_code: AUTH_xxxIjkZVj5 + CustomerDeactivateAuthorizationResponse: + type: object + properties: + status: + type: boolean + message: + type: string + required: + - status + - message + CustomerInitializeDirectDebitAccount: + type: object + properties: + number: + type: string + description: The customer's account number + example: '0123456789' + bank_code: + type: string + description: The code representing the customer's bank + example: '058' + required: + - number + - bank_code + CustomerInitializeDirectDebitAddress: + type: object + properties: + street: + type: string + description: The customer's street + example: Some Where + city: + type: string + description: The customer's city + example: Ikeja + state: + type: string + description: The customer's state + example: Lagos + required: + - street + - city + - state + CustomerInitializeDirectDebitRequest: + type: object + required: + - account + - address + properties: + account: + $ref: '#/components/schemas/CustomerInitializeDirectDebitAccount' + address: + $ref: '#/components/schemas/CustomerInitializeDirectDebitAddress' + CustomerInitializeDirectDebitResponseData: + type: object + properties: + redirect_url: + type: string + example: https://link.paystack.com/ll6b0szngj1f27k + access_code: + type: string + example: ll6b0szngj1f27k + reference: + type: string + example: 1er945lpy4txyki + required: + - redirect_url + - access_code + - reference + CustomerInitializeDirectDebitResponse: + type: object + properties: + status: + type: boolean + example: true + message: + type: string + example: Authorization initialized + data: + $ref: '#/components/schemas/CustomerInitializeDirectDebitResponseData' + required: + - status + - message + - data + CustomerDirectDebitActivationChargeRequest: + type: object + required: + - authorization_id + properties: + authorization_id: + type: integer + description: The authorization ID gotten from the initiation response + example: 1069309917 + CustomerDirectDebitActivationChargeResponse: + type: object + properties: + status: + type: boolean + example: true + message: + type: string + example: Mandate is queued for retry + required: + - status + - message + CustomerFetchMandateAuthorizationsResponseData: + type: object + properties: + id: + type: integer + example: 164098 + status: + type: string + example: active + mandate_id: + type: integer + example: 512003 + authorization_id: + type: integer + example: 110049014 + authorization_code: + type: string + example: AUTH_8Lol0pNt14 + integration_id: + type: integer + example: 463433 + account_number: + type: string + example: '0123456789' + bank_code: + type: string + example: '032' + bank_name: + type: string + nullable: true + example: null + customer: + type: object + properties: + id: + type: integer + example: 43975700 + customer_code: + type: string + example: CUS_2eusy8uwe34s23fy + email: + type: string + example: customer@email.com + first_name: + type: string + example: Smith + last_name: + type: string + example: Bel + authorized_at: + type: string + format: date-time + example: '2024-09-27T10:57:53.824Z' + required: + - id + - status + - mandate_id + - authorization_id + - authorization_code + - integration_id + - account_number + - bank_code + - customer + - authorized_at + CustomerFetchMandateAuthorizationsResponseMeta: + type: object + properties: + per_page: + type: integer + example: 50 + next: + type: string + nullable: true + example: null + count: + type: integer + example: 1 + total: + type: integer + example: 1 + required: + - per_page + - count + - total + CustomerFetchMandateAuthorizationsResponse: + type: object + properties: + status: + type: boolean + example: true + message: + type: string + example: Mandate authorizations retrieved successfully + data: + type: array + items: + $ref: '#/components/schemas/CustomerFetchMandateAuthorizationsResponseData' + meta: + $ref: '#/components/schemas/CustomerFetchMandateAuthorizationsResponseMeta' + required: + - status + - message + - data + - meta + DirectDebitActivationChargeRequest: + type: object + required: + - customer_ids + properties: + customer_ids: + type: array + description: Array of customer IDs to trigger activation charge for + items: + type: integer + example: + - 28958104 + - 983697220 + DirectDebitActivationChargeResponse: + type: object + properties: + status: + type: boolean + example: true + message: + type: string + example: Mandate is queued for retry + required: + - status + - message + DedicatedNubanListResponseArray: + type: object + properties: + customer: + type: object + properties: + id: + type: integer + first_name: + type: string + last_name: + type: string + email: + type: string + customer_code: + type: string + phone: + type: string + risk_action: + type: string + international_format_phone: + type: string + nullable: true + bank: + type: object + properties: + name: + type: string + id: + type: integer + slug: + type: string + required: + - name + - id + - slug + id: + type: integer + account_name: + type: string + account_number: + type: string + created_at: + type: string + updated_at: + type: string + currency: + type: string + split_config: + type: object + properties: + subaccount: + type: string + required: + - subaccount + nullable: true + active: + type: boolean + assigned: + type: boolean + required: + - customer + - bank + - id + - account_name + - account_number + - created_at + - updated_at + - currency + - split_config + - active + - assigned + DedicatedNubanListResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: array + items: + $ref: '#/components/schemas/DedicatedNubanListResponseArray' + meta: + type: object + properties: + total: + type: integer + skipped: + type: integer + perPage: + type: integer + page: + type: integer + pageCount: + type: integer + required: + - total + - skipped + - perPage + - page + - pageCount + additionalProperties: false + required: + - status + - message + - data + - meta + DedicatedVirtualAccountCreate: + type: object + required: + - customer + properties: + customer: + description: The code for the previously created customer + type: string + preferred_bank: + description: The bank slug for preferred bank. To get a list of available banks, use the List Providers endpoint + type: string + subaccount: + description: Subaccount code of the account you want to split the transaction with + type: string + split_code: + description: Split code consisting of the lists of accounts you want to split the transaction with + type: string + example: + customer: CUS_bo732eugpb2qrg6 + preferred_bank: titan-paystack + DedicatedNubanCreateResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + bank: + type: object + properties: + name: + type: string + id: + type: integer + slug: + type: string + required: + - name + - id + - slug + account_name: + type: string + account_number: + type: string + assigned: + type: boolean + currency: + type: string + metadata: + nullable: true + active: + type: boolean + id: + type: integer + created_at: + type: string + updated_at: + type: string + assignment: + type: object + properties: + integration: + type: integer + assignee_id: + type: integer + assignee_type: + type: string + expired: + type: boolean + account_type: + type: string + assigned_at: + type: string + expired_at: + nullable: true + required: + - integration + - assignee_id + - assignee_type + - expired + - account_type + - assigned_at + - expired_at + customer: + type: object + properties: + id: + type: integer + first_name: + type: string + last_name: + type: string + email: + type: string + customer_code: + type: string + phone: + type: string + metadata: + type: object + risk_action: + type: string + international_format_phone: + type: string + nullable: true + required: + - id + - first_name + - last_name + - email + - customer_code + - phone + - metadata + - risk_action + - international_format_phone + required: + - bank + - account_name + - account_number + - assigned + - currency + - metadata + - active + - id + - created_at + - updated_at + - assignment + - customer + required: + - status + - message + - data + DedicatedVirtualAccountAssign: + type: object + required: + - email + - first_name + - last_name + - phone + - preferred_bank + - country + properties: + email: + description: Customer's email address + type: string + first_name: + description: Customer's first name + type: string + last_name: + description: Customer's last name + type: string + phone: + description: Customer's phone name + type: string + preferred_bank: + description: | + The bank slug for preferred bank. To get a list of available banks, + use the List Banks endpoint, passing `pay_with_bank_transfer=true` query parameter + type: string + country: + description: The two letter code country + type: string + enum: + - NG + - GH + account_number: + description: Customer's account number + type: string + bvn: + description: Customer's Bank Verification Number + type: string + bank_code: + description: Customer's bank code + type: string + subaccount: + description: Subaccount code of the account you want to split the transaction with + type: string + split_code: + description: Split code consisting of the lists of accounts you want to split the transaction with + type: string + example: + email: salmon.orange@email.com + first_name: Salmon + last_name: Orange + phone: '+2348100000000' + preferred_bank: titan-paystack + country: NG + DedicatedNubanFetchResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + customer: + type: object + properties: + id: + type: integer + first_name: + type: string + last_name: + type: string + email: + type: string + customer_code: + type: string + phone: + type: string + metadata: + type: object + risk_action: + type: string + international_format_phone: + type: string + nullable: true + required: + - id + - first_name + - last_name + - email + - customer_code + - phone + - metadata + - risk_action + - international_format_phone + bank: + type: object + properties: + name: + type: string + id: + type: integer + slug: + type: string + required: + - name + - id + - slug + id: + type: integer + account_name: + type: string + account_number: + type: string + created_at: + type: string + updated_at: + type: string + currency: + type: string + split_config: + nullable: true + active: + type: boolean + assigned: + type: boolean + required: + - customer + - bank + - id + - account_name + - account_number + - created_at + - updated_at + - currency + - split_config + - active + - assigned + required: + - status + - message + - data + DedicatedNubanDeactivateResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + bank: + type: object + properties: + name: + type: string + id: + type: integer + slug: + type: string + required: + - name + - id + - slug + account_name: + type: string + account_number: + type: string + assigned: + type: boolean + currency: + type: string + metadata: + nullable: true + active: + type: boolean + id: + type: integer + created_at: + type: string + updated_at: + type: string + assignment: + type: object + properties: + assignee_id: + type: integer + assignee_type: + type: string + assigned_at: + type: string + integration: + type: integer + account_type: + type: string + required: + - assignee_id + - assignee_type + - assigned_at + - integration + - account_type + required: + - bank + - account_name + - account_number + - assigned + - currency + - metadata + - active + - id + - created_at + - updated_at + - assignment + required: + - status + - message + - data + DedicatedVirtualAccountSplit: + type: object + required: + - account_number + properties: + account_number: + description: Valid Dedicated virtual account + type: string + subaccount: + description: Subaccount code of the account you want to split the transaction with + type: string + split_code: + description: Split code consisting of the lists of accounts you want to split the transaction with + type: string + example: + account_number: '0033322211' + split_code: SPL_e7jnRLtzla + DedicatedVirtualAccountRemoveSplit: + type: object + required: + - account_number + properties: + account_number: + description: Valid Dedicated virtual account + type: string + example: + account_number: '0033322211' + ApplePayParam: + type: object + required: + - domainName + properties: + domainName: + description: The domain or subdomain for your application + type: string + example: + domainName: example.com + ApplePayCreateOkModel: + type: object + properties: + status: + description: An indicator + type: boolean + message: + description: A short description of the response + type: string + example: + status: true + message: Domain successfully registered on Apple Pay + PlanListResponseArray: + type: object + properties: + subscriptions: + type: array + items: {} + pages: + type: array + items: {} + domain: + type: string + name: + type: string + plan_code: + type: string + description: + nullable: true + amount: + type: integer + interval: + type: string + invoice_limit: + type: integer + send_invoices: + type: boolean + send_sms: + type: boolean + hosted_page: + type: boolean + hosted_page_url: + nullable: true + hosted_page_summary: + nullable: true + currency: + type: string + migrate: + type: boolean + is_deleted: + type: boolean + is_archived: + type: boolean + id: + type: integer + integration: + type: integer + createdAt: + type: string + updatedAt: + type: string + total_subscriptions: + type: integer + active_subscriptions: + type: integer + total_subscriptions_revenue: + type: integer + required: + - subscriptions + - pages + - domain + - name + - plan_code + - description + - amount + - interval + - invoice_limit + - send_invoices + - send_sms + - hosted_page + - hosted_page_url + - hosted_page_summary + - currency + - migrate + - is_deleted + - is_archived + - id + - integration + - createdAt + - updatedAt + - total_subscriptions + - active_subscriptions + - total_subscriptions_revenue + PlanListResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: array + items: + $ref: '#/components/schemas/PlanListResponseArray' + meta: + type: object + properties: + total: + type: integer + skipped: + type: integer + perPage: + type: integer + page: + type: integer + pageCount: + type: integer + required: + - total + - skipped + - perPage + - page + - pageCount + additionalProperties: false + required: + - status + - message + - data + - meta + PlanCreate: + type: object + required: + - name + - amount + - interval + properties: + name: + description: Name of plan + type: string + amount: + description: Amount should be in kobo if currency is NGN, pesewas, if currency is GHS, and cents, if currency is ZAR + type: integer + interval: + description: Payment interval + type: string + enum: + - daily + - weekly + - monthly + - biannually + - annually + description: + description: A description for this plan + type: string + send_invoices: + description: Set to false if you don't want invoices to be sent to your customers + type: boolean + send_sms: + description: Set to false if you don't want text messages to be sent to your customers + type: boolean + currency: + description: Currency in which amount is set. Allowed values are NGN, GHS, ZAR or USD + type: string + invoice_limit: + description: |- + Number of invoices to raise during subscription to this plan. + Can be overridden by specifying an invoice_limit while subscribing. + type: integer + example: + name: Basic + amount: 150000 + interval: monthly + PlanCreateResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + currency: + type: string + name: + type: string + amount: + type: integer + interval: + type: string + integration: + type: integer + domain: + type: string + plan_code: + type: string + invoice_limit: + type: integer + send_invoices: + type: boolean + send_sms: + type: boolean + hosted_page: + type: boolean + migrate: + type: boolean + is_archived: + type: boolean + id: + type: integer + createdAt: + type: string + updatedAt: + type: string + required: + - currency + - name + - amount + - interval + - integration + - domain + - plan_code + - invoice_limit + - send_invoices + - send_sms + - hosted_page + - migrate + - is_archived + - id + - createdAt + - updatedAt + required: + - status + - message + - data + PlanFetchResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + subscriptions: + type: array + items: {} + pages: + type: array + items: {} + domain: + type: string + name: + type: string + plan_code: + type: string + description: + nullable: true + amount: + type: integer + interval: + type: string + invoice_limit: + type: integer + send_invoices: + type: boolean + send_sms: + type: boolean + hosted_page: + type: boolean + hosted_page_url: + nullable: true + hosted_page_summary: + nullable: true + currency: + type: string + migrate: + type: boolean + is_deleted: + type: boolean + is_archived: + type: boolean + id: + type: integer + integration: + type: integer + createdAt: + type: string + updatedAt: + type: string + pages_count: + type: integer + subscribers_count: + type: integer + subscriptions_count: + type: integer + active_subscriptions_count: + type: integer + nullable: true + total_revenue: + type: integer + subscribers: + type: array + items: {} + required: + - subscriptions + - pages + - domain + - name + - plan_code + - description + - amount + - interval + - invoice_limit + - send_invoices + - send_sms + - hosted_page + - hosted_page_url + - hosted_page_summary + - currency + - migrate + - is_deleted + - is_archived + - id + - integration + - createdAt + - updatedAt + - pages_count + - subscribers_count + - subscriptions_count + - active_subscriptions_count + - total_revenue + - subscribers + required: + - status + - message + - data + PlanUpdate: + type: object + properties: + name: + description: Name of plan + type: string + amount: + description: Amount should be in kobo if currency is NGN, pesewas, if currency is GHS, and cents, if currency is ZAR + type: integer + interval: + description: Payment interval + type: string + enum: + - daily + - weekly + - monthly + - biannually + - annually + description: + description: A description for this plan + type: boolean + send_invoices: + description: Set to false if you don't want invoices to be sent to your customers + type: boolean + send_sms: + description: Set to false if you don't want text messages to be sent to your customers + type: boolean + currency: + description: Currency in which amount is set. Allowed values are NGN, GHS, ZAR or USD + type: string + invoice_limit: + description: |- + Number of invoices to raise during subscription to this plan. + Can be overridden by specifying an invoice_limit while subscribing. + type: integer + example: + name: Starter + PlanUpdateResponse: + type: object + properties: + status: + type: boolean + message: + type: string + required: + - status + - message + SubscriptionListResponseArray: + type: object + properties: + id: + type: integer + domain: + type: string + status: + type: string + start: + type: integer + quantity: + type: integer + subscription_code: + type: string + email_token: + type: string + amount: + type: integer + cron_expression: + type: string + nullable: true + next_payment_date: + type: string + nullable: true + open_invoice: + nullable: true + createdAt: + type: string + integration: + type: integer + plan: + type: object + properties: + id: + type: integer + domain: + type: string + name: + type: string + plan_code: + type: string + description: + nullable: true + amount: + type: integer + interval: + type: string + send_invoices: + type: boolean + send_sms: + type: boolean + currency: + type: string + integration: + type: integer + createdAt: + type: string + updatedAt: + type: string + required: + - id + - domain + - name + - plan_code + - description + - amount + - interval + - send_invoices + - send_sms + - currency + - integration + - createdAt + - updatedAt + authorization: + type: object + properties: + authorization_code: + type: string + bin: + type: string + nullable: true + last4: + type: string + exp_month: + type: string + exp_year: + type: string + channel: + type: string + card_type: + type: string + nullable: true + bank: + type: string + country_code: + type: string + brand: + type: string + reusable: + type: integer + signature: + type: string + nullable: true + account_name: + nullable: true + required: + - authorization_code + - bin + - last4 + - exp_month + - exp_year + - channel + - card_type + - bank + - country_code + - brand + - reusable + - signature + - account_name + customer: + type: object + properties: + id: + type: integer + first_name: + type: string + last_name: + type: string + email: + type: string + customer_code: + type: string + phone: + type: string + nullable: true + metadata: + type: string + risk_action: + type: string + international_format_phone: + type: string + required: + - id + - first_name + - last_name + - email + - customer_code + - phone + - metadata + - risk_action + - international_format_phone + invoice_limit: + type: integer + split_code: + nullable: true + payments_count: + type: integer + most_recent_invoice: + nullable: true + metadata: + type: object + nullable: true + required: + - id + - domain + - status + - start + - quantity + - subscription_code + - email_token + - amount + - cron_expression + - next_payment_date + - open_invoice + - createdAt + - integration + - plan + - authorization + - customer + - invoice_limit + - split_code + - payments_count + - most_recent_invoice + - metadata + SubscriptionListResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: array + items: + $ref: '#/components/schemas/SubscriptionListResponseArray' + meta: + type: object + properties: + total: + type: integer + skipped: + type: integer + perPage: + type: integer + page: + type: integer + pageCount: + type: integer + required: + - total + - skipped + - perPage + - page + - pageCount + additionalProperties: false + required: + - status + - message + - data + - meta + SubscriptionCreate: + type: object + required: + - customer + - plan + properties: + customer: + description: Customer's email address or customer code + type: string + plan: + description: Plan code + type: string + authorization: + description: |- + If customer has multiple authorizations, you can set the desired authorization you wish to use for this subscription here. + If this is not supplied, the customer's most recent authorization would be used + type: string + start_date: + description: Set the date for the first debit. (ISO 8601 format) e.g. 2017-05-16T00:30:13+01:00 + type: string + format: date-time + example: + customer: CUS_xnxdt6s1zg1f4nx + plan: PLN_gx2wn530m0i3w3m + SubscriptionCreateResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + customer: + type: integer + plan: + type: integer + integration: + type: integer + domain: + type: string + start: + type: integer + status: + type: string + quantity: + type: integer + amount: + type: integer + authorization: + type: integer + invoice_limit: + type: integer + split_code: + nullable: true + subscription_code: + type: string + email_token: + type: string + id: + type: integer + cancelledAt: + nullable: true + createdAt: + type: string + updatedAt: + type: string + cron_expression: + type: string + next_payment_date: + type: string + easy_cron_id: + type: string + nullable: true + open_invoice: + type: string + nullable: true + metadata: + type: object + nullable: true + required: + - customer + - plan + - integration + - domain + - start + - status + - quantity + - amount + - authorization + - invoice_limit + - split_code + - subscription_code + - email_token + - id + - cancelledAt + - createdAt + - updatedAt + - cron_expression + - next_payment_date + - easy_cron_id + - open_invoice + - metadata + required: + - status + - message + - data + SubscriptionFetchResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + id: + type: integer + domain: + type: string + status: + type: string + subscription_code: + type: string + email_token: + type: string + amount: + type: integer + cron_expression: + type: string + next_payment_date: + type: string + open_invoice: + nullable: true + createdAt: + type: string + cancelledAt: + nullable: true + integration: + type: integer + plan: + type: object + properties: + id: + type: integer + name: + type: string + plan_code: + type: string + description: + nullable: true + amount: + type: integer + interval: + type: string + send_invoices: + type: boolean + send_sms: + type: boolean + currency: + type: string + required: + - id + - name + - plan_code + - description + - amount + - interval + - send_invoices + - send_sms + - currency + authorization: + type: object + properties: + authorization_code: + type: string + bin: + type: string + last4: + type: string + exp_month: + type: string + exp_year: + type: string + channel: + type: string + card_type: + type: string + bank: + type: string + country_code: + type: string + brand: + type: string + reusable: + type: boolean + signature: + type: string + account_name: + nullable: true + required: + - authorization_code + - bin + - last4 + - exp_month + - exp_year + - channel + - card_type + - bank + - country_code + - brand + - reusable + - signature + - account_name + customer: + type: object + properties: + id: + type: integer + first_name: + type: string + last_name: + type: string + email: + type: string + customer_code: + type: string + phone: + type: string + metadata: + type: object + risk_action: + type: string + international_format_phone: + type: string + required: + - id + - first_name + - last_name + - email + - customer_code + - phone + - metadata + - risk_action + - international_format_phone + invoices: + type: array + items: {} + invoices_history: + type: array + items: {} + invoice_limit: + type: integer + split_code: + nullable: true + most_recent_invoice: + nullable: true + payments_count: + type: integer + metadata: + type: object + nullable: true + required: + - id + - domain + - status + - subscription_code + - email_token + - amount + - cron_expression + - next_payment_date + - open_invoice + - createdAt + - cancelledAt + - integration + - plan + - authorization + - customer + - invoices + - invoices_history + - invoice_limit + - split_code + - most_recent_invoice + - payments_count + - metadata + required: + - status + - message + - data + SubscriptionToggle: + type: object + required: + - code + - token + properties: + code: + description: Subscription code + type: string + token: + description: Email token + type: string + example: + code: SUB_vsyqdmlzble3uii + token: d7gofp6yppn3qz7 + SubscriptionDisableResponse: + type: object + properties: + status: + type: boolean + message: + type: string + required: + - status + - message + TransferRecipientListResponseArray: + type: object + properties: + active: + type: boolean + createdAt: + type: string + currency: + type: string + description: + type: string + domain: + type: string + email: + type: string + nullable: true + id: + type: integer + integration: + type: integer + metadata: + type: object + nullable: true + name: + type: string + recipient_code: + type: string + type: + type: string + updatedAt: + type: string + is_deleted: + type: boolean + isDeleted: + type: boolean + details: + type: object + properties: + authorization_code: + type: string + nullable: true + account_number: + type: string + nullable: true + account_name: + type: string + nullable: true + bank_code: + type: string + bank_name: + type: string + required: + - authorization_code + - account_number + - account_name + - bank_code + - bank_name + required: + - active + - createdAt + - currency + - description + - domain + - email + - id + - integration + - name + - recipient_code + - type + - updatedAt + - is_deleted + - isDeleted + - details + TransferRecipientListResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: array + items: + $ref: '#/components/schemas/TransferRecipientListResponseArray' + meta: + type: object + properties: + total: + type: integer + skipped: + type: integer + perPage: + type: integer + page: + type: integer + pageCount: + type: integer + required: + - total + - skipped + - perPage + - page + - pageCount + additionalProperties: false + required: + - status + - message + - data + - meta + TransferRecipientCreate: + type: object + required: + - type + - name + - account_number + - bank_code + properties: + type: + description: Recipient Type + type: string + enum: + - nuban + - ghipss + - mobile_money + - basa + - authorization + name: + description: The recipient's name according to their account registration. + type: string + account_number: + description: Recipient's bank account number + type: string + bank_code: + description: Recipient's bank code. You can get the list of Bank Codes by calling the List Banks endpoint + type: string + description: + description: A description for this recipient + type: string + currency: + description: Currency for the account receiving the transfer + type: string + authorization_code: + description: An authorization code from a previous transaction + type: string + metadata: + description: JSON object of custom data + type: object + example: + type: nuban + name: Smith Taplo + account_number: '01000000010' + bank_code: '058' + TransferRecipientCreateResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + active: + type: boolean + createdAt: + type: string + currency: + type: string + description: + type: string + domain: + type: string + email: + type: string + id: + type: integer + integration: + type: integer + metadata: + type: object + nullable: true + name: + type: string + recipient_code: + type: string + type: + type: string + updatedAt: + type: string + is_deleted: + type: boolean + isDeleted: + type: boolean + details: + type: object + properties: + authorization_code: + type: string + nullable: true + account_number: + type: string + nullable: true + account_name: + type: string + nullable: true + bank_code: + type: string + bank_name: + type: string + required: + - authorization_code + - account_number + - account_name + - bank_code + - bank_name + required: + - active + - createdAt + - currency + - description + - domain + - email + - id + - integration + - name + - recipient_code + - type + - updatedAt + - is_deleted + - isDeleted + - details + required: + - status + - message + - data + TransferRecipientBulk: + type: object + required: + - batch + properties: + batch: + description: A list of transfer recipient object. + type: array + items: + $ref: '#/components/schemas/TransferRecipientCreate' + ErrorRecordsArray: + type: object + properties: + type: + type: string + name: + type: string + description: + type: string + account_number: + type: string + bank_code: + type: string + currency: + type: string + email: + type: string + required: + - type + - name + - description + - account_number + - bank_code + - currency + - email + TransferRecipientErrorsArray: + type: object + properties: + message: + type: string + records: + type: array + items: + $ref: '#/components/schemas/ErrorRecordsArray' + required: + - message + - records + TransferRecipientBulkCreateResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + success: + type: array + items: {} + errors: + type: array + items: + $ref: '#/components/schemas/TransferRecipientErrorsArray' + required: + - success + - errors + required: + - status + - message + - data + TransferRecipientFetchResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + integration: + type: integer + domain: + type: string + type: + type: string + currency: + type: string + name: + type: string + details: + type: object + properties: + account_number: + type: string + nullable: true + account_name: + type: string + nullable: true + bank_code: + type: string + bank_name: + type: string + required: + - account_number + - account_name + - bank_code + - bank_name + description: + type: string + metadata: + type: object + nullable: true + recipient_code: + type: string + active: + type: boolean + recipient_account: + type: string + institution_code: + type: string + email: + type: string + id: + type: integer + isDeleted: + type: boolean + createdAt: + type: string + updatedAt: + type: string + required: + - integration + - domain + - type + - currency + - name + - details + - description + - recipient_code + - active + - recipient_account + - institution_code + - email + - id + - isDeleted + - createdAt + - updatedAt + required: + - status + - message + - data + TransferRecipientUpdate: + type: object + properties: + name: + description: Recipient's name + type: string + email: + description: Recipient's email address + type: string + TransferRecipientUpdateResponse: + type: object + properties: + status: + type: boolean + message: + type: string + required: + - status + - message + TransferRecipientDeleteResponse: + type: object + properties: + status: + type: boolean + message: + type: string + required: + - status + - message + TransferListResponseArray: + type: object + properties: + amount: + type: integer + createdAt: + type: string + currency: + type: string + domain: + type: string + failures: + nullable: true + id: + type: integer + integration: + type: integer + reason: + type: string + reference: + type: string + source: + type: string + source_details: + nullable: true + status: + type: string + titan_code: + nullable: true + transfer_code: + type: string + request: + type: integer + transferred_at: + nullable: true + updatedAt: + type: string + recipient: + type: object + properties: + active: + type: boolean + createdAt: + type: string + currency: + type: string + description: + type: string + domain: + type: string + email: + type: string + id: + type: integer + integration: + type: integer + metadata: + type: object + nullable: true + name: + type: string + recipient_code: + type: string + type: + type: string + updatedAt: + type: string + is_deleted: + type: boolean + isDeleted: + type: boolean + details: + type: object + properties: + authorization_code: + nullable: true + account_number: + type: string + account_name: + type: string + nullable: true + bank_code: + type: string + bank_name: + type: string + required: + - authorization_code + - account_number + - account_name + - bank_code + - bank_name + required: + - active + - createdAt + - currency + - description + - domain + - email + - id + - integration + - name + - recipient_code + - type + - updatedAt + - is_deleted + - isDeleted + - details + session: + type: object + properties: + provider: + nullable: true + id: + nullable: true + required: + - provider + - id + fee_charged: + type: integer + fees_breakdown: + type: integer + nullable: true + required: + - amount + - createdAt + - currency + - domain + - failures + - id + - integration + - reason + - reference + - source + - source_details + - status + - titan_code + - request + - transfer_code + - transferred_at + - updatedAt + - recipient + - session + - fee_charged + - fees_breakdown + TransferListResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: array + items: + $ref: '#/components/schemas/TransferListResponseArray' + meta: + type: object + properties: + total: + type: integer + skipped: + type: integer + perPage: + type: integer + page: + type: integer + pageCount: + type: integer + required: + - total + - skipped + - perPage + - page + - pageCount + additionalProperties: false + required: + - status + - message + - data + - meta + TransferBase: + type: object + required: + - amount + - recipient + - reference + properties: + amount: + description: Amount to transfer in kobo if currency is NGN and pesewas if currency is GHS. + type: integer + recipient: + description: The transfer recipient's code + type: string + reference: + description: | + To ensure idempotency, you need to provide e a unique identifier for the request. The identifier should be a lowercase alphanumeric string with only -,_ symbols allowed. + type: string + minimum: 16 + reason: + description: The reason or narration for the transfer. + type: string + example: + amount: 120000 + recipient: RCP_gd9vgag7n5lr5ix + reference: acv_9ee55786-2323-4760-98e2-6380c9cb3f68 + TransferInitiate: + description: Transfer initiation model + allOf: + - $ref: '#/components/schemas/TransferBase' + - type: object + required: + - source + properties: + source: + description: The source of funds to send from + type: string + default: balance + currency: + description: Specify the currency of the transfer. + type: string + default: NGN + enum: + - NGN + - ZAR + - KES + - GHS + example: + source: balance + TransferCreateResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + transfersessionid: + type: array + items: {} + transfertrials: + type: array + items: {} + domain: + type: string + amount: + type: integer + currency: + type: string + reference: + type: string + source: + type: string + source_details: + nullable: true + reason: + type: string + status: + type: string + failures: + nullable: true + transfer_code: + type: string + titan_code: + nullable: true + transferred_at: + nullable: true + id: + type: integer + integration: + type: integer + request: + type: integer + recipient: + type: integer + createdAt: + type: string + updatedAt: + type: string + required: + - transfersessionid + - transfertrials + - domain + - amount + - currency + - reference + - source + - source_details + - reason + - status + - failures + - transfer_code + - titan_code + - transferred_at + - id + - integration + - request + - recipient + - createdAt + - updatedAt + required: + - status + - message + - data + TransferFinalize: + type: object + required: + - transfer_code + - otp + properties: + transfer_code: + description: The transfer code you want to finalize + type: string + otp: + description: OTP sent to business phone to verify transfer + type: string + example: + transfer_code: TRF_vsyqdmlzble3uii + otp: '928783' + TransferBulk: + type: object + required: + - source + - transfers + properties: + source: + description: The source of funds for the transfer. + type: string + default: balance + currency: + description: Specify the currency of the transfer. + type: string + default: NGN + enum: + - NGN + - ZAR + - KES + - GHS + transfers: + description: A list of transfer object + type: array + items: + $ref: '#/components/schemas/TransferBase' + example: + source: balance + transfers: + - amount: 120000 + recipient: RCP_gd9vgag7n5lr5ix + reference: acv_9ee55786-2323-4760-98e2-6380c9cb3f68 + TransferBulkResponseArray: + type: object + properties: + reference: + type: string + recipient: + type: string + amount: + type: integer + transfer_code: + type: string + currency: + type: string + status: + type: string + required: + - reference + - recipient + - amount + - transfer_code + - currency + - status + TransferBulkResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: array + items: + $ref: '#/components/schemas/TransferBulkResponseArray' + required: + - status + - message + - data + TransferFeesBreakdownArray: + type: object + properties: + amount: + type: string + formula: + nullable: true + type: + type: string + required: + - amount + - formula + - type + TransferFetchResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + amount: + type: integer + createdAt: + type: string + currency: + type: string + domain: + type: string + failures: + nullable: true + id: + type: integer + integration: + type: integer + reason: + type: string + reference: + type: string + source: + type: string + source_details: + nullable: true + status: + type: string + titan_code: + nullable: true + transfer_code: + type: string + request: + type: integer + transferred_at: + nullable: true + updatedAt: + type: string + recipient: + type: object + properties: + active: + type: boolean + createdAt: + type: string + currency: + type: string + description: + type: string + domain: + type: string + email: + type: string + id: + type: integer + integration: + type: integer + metadata: + type: object + nullable: true + name: + type: string + recipient_code: + type: string + type: + type: string + updatedAt: + type: string + is_deleted: + type: boolean + isDeleted: + type: boolean + details: + type: object + properties: + authorization_code: + nullable: true + account_number: + type: string + account_name: + type: string + nullable: true + bank_code: + type: string + bank_name: + type: string + required: + - authorization_code + - account_number + - account_name + - bank_code + - bank_name + required: + - active + - createdAt + - currency + - description + - domain + - email + - id + - integration + - name + - recipient_code + - type + - updatedAt + - is_deleted + - isDeleted + - details + session: + type: object + properties: + provider: + nullable: true + id: + nullable: true + required: + - provider + - id + fee_charged: + type: integer + fees_breakdown: + type: array + items: + $ref: '#/components/schemas/TransferFeesBreakdownArray' + nullable: true + gateway_response: + type: string + nullable: true + required: + - amount + - createdAt + - currency + - domain + - failures + - id + - integration + - reason + - reference + - source + - source_details + - status + - titan_code + - transfer_code + - request + - transferred_at + - updatedAt + - recipient + - session + - fee_charged + - fees_breakdown + - gateway_response + required: + - status + - message + - data + TransferVerifyResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + amount: + type: integer + createdAt: + type: string + currency: + type: string + domain: + type: string + failures: + nullable: true + id: + type: integer + integration: + type: integer + reason: + type: string + reference: + type: string + source: + type: string + source_details: + nullable: true + status: + type: string + titan_code: + nullable: true + transfer_code: + type: string + transferred_at: + nullable: true + updatedAt: + type: string + recipient: + type: object + properties: + active: + type: boolean + createdAt: + type: string + currency: + type: string + description: + type: string + domain: + type: string + email: + type: string + id: + type: integer + integration: + type: integer + metadata: + type: object + nullable: true + name: + type: string + recipient_code: + type: string + type: + type: string + updatedAt: + type: string + is_deleted: + type: boolean + details: + type: object + properties: + authorization_code: + nullable: true + account_number: + type: string + account_name: + type: string + bank_code: + type: string + bank_name: + type: string + required: + - authorization_code + - account_number + - account_name + - bank_code + - bank_name + required: + - active + - createdAt + - currency + - description + - domain + - email + - id + - integration + - name + - recipient_code + - type + - updatedAt + - is_deleted + - details + session: + type: object + properties: + provider: + nullable: true + id: + nullable: true + required: + - provider + - id + gateway_response: + type: string + nullable: true + required: + - amount + - createdAt + - currency + - domain + - failures + - id + - integration + - reason + - reference + - source + - source_details + - status + - titan_code + - transfer_code + - transferred_at + - updatedAt + - recipient + - session + - gateway_response + required: + - status + - message + - data + TransferResendOTP: + type: object + required: + - transfer_code + - reason + properties: + transfer_code: + description: The transfer code that requires an OTP validation + type: string + reason: + description: Specify the flag to indicate the purpose of the OTP + type: string + default: transfer + enum: + - disable_otp + - resend_otp + - transfer + example: + transfer_code: TRF_vsyqdmlzble3uii + reason: resend_otp + TransferResendsOtpResponse: + type: object + properties: + status: + type: boolean + message: + type: string + required: + - status + - message + TransferDisablesOtpResponse: + type: object + properties: + status: + type: boolean + message: + type: string + required: + - status + - message + TransferFinalizeDisableOTP: + type: object + required: + - otp + properties: + otp: + description: OTP sent to business phone to verify disabling OTP requirement + type: string + example: + otp: '928783' + TransferFinalizeDisablesOtpResponse: + type: object + properties: + status: + type: boolean + message: + type: string + required: + - status + - message + TransferEnablesOtpResponse: + type: object + properties: + status: + type: boolean + message: + type: string + required: + - status + - message + BalanceCheckResponseArray: + type: object + properties: + currency: + type: string + balance: + type: integer + required: + - currency + - balance + BalanceCheckResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: array + items: + $ref: '#/components/schemas/BalanceCheckResponseArray' + required: + - status + - message + - data + BalanceFetchLedgerResponseArray: + type: object + properties: + integration: + type: integer + domain: + type: string + balance: + type: integer + currency: + type: string + difference: + type: integer + reason: + type: string + model_responsible: + type: string + model_row: + type: integer + id: + type: integer + createdAt: + type: string + updatedAt: + type: string + required: + - integration + - domain + - balance + - currency + - difference + - reason + - model_responsible + - model_row + - id + - createdAt + - updatedAt + BalanceFetchLedgerResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: array + items: + $ref: '#/components/schemas/BalanceFetchLedgerResponseArray' + meta: + type: object + properties: + total: + type: integer + skipped: + type: integer + perPage: + type: integer + page: + type: integer + pageCount: + type: integer + required: + - total + - skipped + - perPage + - page + - pageCount + additionalProperties: false + required: + - status + - message + - data + - meta + PaymentRequestLineItemsArray: + type: object + properties: + name: + type: string + amount: + type: integer + quantity: + type: integer + required: + - name + - amount + - quantity + PaymentRequestTaxArray: + type: object + properties: + name: + type: string + amount: + type: integer + required: + - name + - amount + PaymentRequestListResponseArray: + type: object + properties: + id: + type: integer + integration: + type: integer + domain: + type: string + amount: + type: integer + currency: + type: string + due_date: + type: string + nullable: true + has_invoice: + type: boolean + invoice_number: + type: integer + nullable: true + description: + type: string + nullable: true + pdf_url: + type: string + nullable: true + line_items: + type: array + items: + $ref: '#/components/schemas/PaymentRequestLineItemsArray' + tax: + type: array + items: + $ref: '#/components/schemas/PaymentRequestTaxArray' + request_code: + type: string + status: + type: string + paid: + type: boolean + paid_at: + nullable: true + metadata: + nullable: true + notifications: + type: array + items: {} + offline_reference: + type: string + customer: + type: object + properties: + id: + type: integer + first_name: + type: string + last_name: + type: string + email: + type: string + customer_code: + type: string + phone: + type: string + metadata: + type: object + risk_action: + type: string + international_format_phone: + type: string + required: + - id + - first_name + - last_name + - email + - customer_code + - phone + - metadata + - risk_action + - international_format_phone + created_at: + type: string + discount: + nullable: true + split_code: + type: string + nullable: true + required: + - id + - integration + - domain + - amount + - currency + - due_date + - has_invoice + - invoice_number + - description + - pdf_url + - line_items + - tax + - request_code + - status + - paid + - paid_at + - metadata + - notifications + - offline_reference + - customer + - created_at + - discount + - split_code + PaymentRequestListResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: array + items: + $ref: '#/components/schemas/PaymentRequestListResponseArray' + meta: + type: object + properties: + total: + type: integer + skipped: + type: integer + perPage: + anyOf: + - type: integer + - type: string + page: + type: integer + pageCount: + type: integer + required: + - total + - skipped + - perPage + - page + - pageCount + additionalProperties: false + required: + - status + - message + - data + - meta + PaymentRequestCreate: + type: object + required: + - customer + - amount + properties: + customer: + description: Customer id or code + type: string + amount: + description: |- + Payment request amount. Only useful if line items and tax values are ignored. + The endpoint will throw a friendly warning if neither is available. + type: integer + currency: + description: Specify the currency of the invoice. Allowed values are NGN, GHS, ZAR and USD. Defaults to NGN + type: string + due_date: + description: ISO 8601 representation of request due date + type: string + format: date-time + description: + description: A short description of the payment request + type: string + line_items: + description: Array of line items + type: array + items: + type: object + tax: + description: Array of taxes + type: array + items: + type: object + send_notification: + description: Indicates whether Paystack sends an email notification to customer. Defaults to true + type: boolean + draft: + description: Indicate if request should be saved as draft. Defaults to false and overrides send_notification + type: boolean + has_invoice: + description: Set to true to create a draft invoice (adds an auto incrementing invoice number if none is provided) even if there are no line_items or tax passed + type: boolean + invoice_number: + description: Numeric value of invoice. Invoice will start from 1 and auto increment from there. This field is to help override whatever value Paystack decides. Auto increment for subsequent invoices continue from this point. + type: integer + split_code: + description: The split code of the transaction split. + type: string + example: + customer: CUS_xqp6o5oja5cackf + amount: 10000 + PaymentRequestCreateResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + id: + type: integer + integration: + type: integer + domain: + type: string + amount: + type: integer + currency: + type: string + due_date: + type: string + nullable: true + has_invoice: + type: boolean + invoice_number: + type: integer + nullable: true + description: + type: string + nullable: true + line_items: + type: array + items: {} + tax: + type: array + items: {} + request_code: + type: string + status: + type: string + paid: + type: boolean + metadata: + type: object + nullable: true + notifications: + type: array + items: {} + offline_reference: + type: string + customer: + type: integer + created_at: + type: string + discount: + nullable: true + split_code: + type: string + nullable: true + required: + - id + - integration + - domain + - amount + - currency + - due_date + - has_invoice + - invoice_number + - description + - line_items + - tax + - request_code + - status + - paid + - metadata + - notifications + - offline_reference + - customer + - created_at + - discount + - split_code + required: + - status + - message + - data + PaymentRequestUpdate: + type: object + properties: + customer: + description: Customer id or code + type: string + amount: + description: |- + Payment request amount. Only useful if line items and tax values are ignored. + The endpoint will throw a friendly warning if neither is available. + type: integer + currency: + description: Specify the currency of the invoice. Allowed values are NGN, GHS, ZAR and USD. Defaults to NGN + type: string + due_date: + description: ISO 8601 representation of request due date + type: string + format: date-time + description: + description: A short description of the payment request + type: string + line_items: + description: Array of line items + type: array + items: + type: object + tax: + description: Array of taxes + type: array + items: + type: object + send_notification: + description: Indicates whether Paystack sends an email notification to customer. Defaults to true + type: boolean + draft: + description: Indicate if request should be saved as draft. Defaults to false and overrides send_notification + type: boolean + has_invoice: + description: Set to true to create a draft invoice (adds an auto incrementing invoice number if none is provided) even if there are no line_items or tax passed + type: boolean + items: + type: object + invoice_number: + description: Numeric value of invoice. Invoice will start from 1 and auto increment from there. This field is to help override whatever value Paystack decides. Auto increment for subsequent invoices continue from this point. + type: integer + split_code: + description: The split code of the transaction split. + type: string + example: + amount: 15000 + PaymentRequestNotificationsArray: + type: object + properties: + sent_at: + type: string + channel: + type: string + required: + - sent_at + - channel + PaymentRequestUpdateResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + id: + type: integer + integration: + type: integer + domain: + type: string + amount: + type: integer + currency: + type: string + due_date: + type: string + nullable: true + has_invoice: + type: boolean + invoice_number: + type: integer + nullable: true + description: + nullable: true + pdf_url: + type: string + nullable: true + line_items: + type: array + items: {} + tax: + type: array + items: {} + request_code: + type: string + status: + type: string + paid: + type: boolean + paid_at: + nullable: true + metadata: + nullable: true + notifications: + type: array + items: + $ref: '#/components/schemas/PaymentRequestNotificationsArray' + offline_reference: + type: string + customer: + type: object + properties: + id: + type: integer + first_name: + type: string + last_name: + type: string + email: + type: string + customer_code: + type: string + phone: + type: string + metadata: + type: object + properties: + calling_code: + type: string + risk_action: + type: string + international_format_phone: + type: string + required: + - id + - first_name + - last_name + - email + - customer_code + - phone + - metadata + - risk_action + - international_format_phone + created_at: + type: string + discount: + nullable: true + split_code: + nullable: true + required: + - id + - integration + - domain + - amount + - currency + - due_date + - has_invoice + - invoice_number + - description + - pdf_url + - line_items + - tax + - request_code + - status + - paid + - paid_at + - metadata + - notifications + - offline_reference + - customer + - created_at + - discount + - split_code + required: + - status + - message + - data + PaymentRequestVerifyResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + id: + type: integer + integration: + type: object + properties: + key: + type: string + name: + type: string + logo: + type: string + allowed_currencies: + type: array + items: + type: string + required: + - key + - name + - logo + - allowed_currencies + domain: + type: string + amount: + type: integer + currency: + type: string + due_date: + type: string + nullable: true + has_invoice: + type: boolean + invoice_number: + type: integer + nullable: true + description: + nullable: true + pdf_url: + type: string + nullable: true + line_items: + type: array + items: {} + tax: + type: array + items: {} + request_code: + type: string + status: + type: string + paid: + type: boolean + paid_at: + nullable: true + metadata: + nullable: true + notifications: + type: array + items: + $ref: '#/components/schemas/PaymentRequestNotificationsArray' + offline_reference: + type: string + customer: + type: object + properties: + id: + type: integer + first_name: + type: string + last_name: + type: string + email: + type: string + customer_code: + type: string + phone: + type: string + metadata: + type: object + properties: + calling_code: + type: string + risk_action: + type: string + international_format_phone: + type: string + required: + - id + - first_name + - last_name + - email + - customer_code + - phone + - metadata + - risk_action + - international_format_phone + created_at: + type: string + discount: + nullable: true + split_code: + nullable: true + pending_amount: + type: integer + required: + - id + - integration + - domain + - amount + - currency + - due_date + - has_invoice + - invoice_number + - description + - pdf_url + - line_items + - tax + - request_code + - status + - paid + - paid_at + - metadata + - notifications + - offline_reference + - customer + - created_at + - discount + - split_code + - pending_amount + required: + - status + - message + - data + PaymentRequestSendNotificationResponse: + type: object + properties: + status: + type: boolean + message: + type: string + required: + - status + - message + PaymentRequestPendingArray: + type: object + properties: + currency: + type: string + amount: + type: integer + required: + - currency + - amount + PaymentRequestSuccessfulArray: + type: object + properties: + currency: + type: string + amount: + type: integer + required: + - currency + - amount + PaymentRequestTotalArray: + type: object + properties: + currency: + type: string + amount: + type: integer + required: + - currency + - amount + PaymentRequestTotalResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + pending: + type: array + items: + $ref: '#/components/schemas/PaymentRequestPendingArray' + successful: + type: array + items: + $ref: '#/components/schemas/PaymentRequestSuccessfulArray' + total: + type: array + items: + $ref: '#/components/schemas/PaymentRequestTotalArray' + required: + - pending + - successful + - total + required: + - status + - message + - data + PaymentRequestFinalizeResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + id: + type: integer + integration: + type: integer + domain: + type: string + amount: + type: integer + currency: + type: string + due_date: + type: string + nullable: true + has_invoice: + type: boolean + invoice_number: + type: integer + nullable: true + description: + type: string + nullable: true + pdf_url: + nullable: true + line_items: + type: array + items: + $ref: '#/components/schemas/PaymentRequestLineItemsArray' + tax: + type: array + items: + $ref: '#/components/schemas/PaymentRequestTaxArray' + request_code: + type: string + status: + type: string + paid: + type: boolean + paid_at: + nullable: true + metadata: + nullable: true + notifications: + type: array + items: {} + offline_reference: + type: string + customer: + type: object + properties: + id: + type: integer + first_name: + type: string + last_name: + type: string + email: + type: string + customer_code: + type: string + phone: + type: string + metadata: + type: object + properties: + calling_code: + type: string + risk_action: + type: string + international_format_phone: + type: string + required: + - id + - first_name + - last_name + - email + - customer_code + - phone + - metadata + - risk_action + - international_format_phone + created_at: + type: string + discount: + type: object + properties: + type: + type: string + amount: + type: integer + required: + - type + - amount + nullable: true + split_code: + nullable: true + pending_amount: + type: integer + required: + - id + - integration + - domain + - amount + - currency + - due_date + - has_invoice + - invoice_number + - description + - pdf_url + - line_items + - tax + - request_code + - status + - paid + - paid_at + - metadata + - notifications + - offline_reference + - customer + - created_at + - discount + - split_code + - pending_amount + required: + - status + - message + - data + PaymentRequestArchiveResponse: + type: object + properties: + status: + type: boolean + message: + type: string + required: + - status + - message + ProductListsResponseArray: + type: object + properties: + id: + type: integer + name: + type: string + description: + type: string + product_code: + type: string + slug: + type: string + currency: + type: string + price: + type: integer + quantity: + type: integer + quantity_sold: + type: integer + active: + type: boolean + domain: + type: string + type: + type: string + in_stock: + type: boolean + unlimited: + type: boolean + metadata: + type: object + properties: + background_color: + type: string + required: + - background_color + files: + type: array + items: {} + success_message: + nullable: true + redirect_url: + nullable: true + split_code: + nullable: true + notification_emails: + nullable: true + minimum_orderable: + type: integer + maximum_orderable: + nullable: true + createdAt: + type: string + updatedAt: + type: string + digital_assets: + type: array + items: {} + variant_options: + type: array + items: {} + is_shippable: + type: boolean + shipping_fields: + type: object + properties: + delivery_note: + type: string + shipping_address: + type: string + shipping_fees: + type: array + items: {} + required: + - delivery_note + - shipping_address + - shipping_fees + integration: + type: integer + low_stock_alert: + type: integer + required: + - id + - name + - description + - product_code + - slug + - currency + - price + - quantity + - quantity_sold + - active + - domain + - type + - in_stock + - unlimited + - metadata + - files + - success_message + - redirect_url + - split_code + - notification_emails + - minimum_orderable + - maximum_orderable + - createdAt + - updatedAt + - digital_assets + - variant_options + - is_shippable + - shipping_fields + - integration + - low_stock_alert + ProductListsResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: array + items: + $ref: '#/components/schemas/ProductListsResponseArray' + meta: + type: object + properties: + total: + type: integer + skipped: + type: integer + perPage: + type: string + page: + type: integer + pageCount: + type: integer + required: + - total + - skipped + - perPage + - page + - pageCount + additionalProperties: false + required: + - status + - message + - data + - meta + ProductCreate: + type: object + required: + - name + - description + - price + - currency + properties: + name: + description: Name of product + type: string + description: + description: The description of the product + type: string + price: + description: | + Price should be in kobo if currency is NGN, pesewas, if currency is GHS, + and cents, if currency is ZAR + type: integer + currency: + description: | + Currency in which price is set. Allowed values are: NGN, GHS, ZAR or USD + type: string + unlimited: + description: | + Set to true if the product has unlimited stock. Leave as false if the + product has limited stock + type: boolean + quantity: + description: Number of products in stock. Use if limited is true + type: integer + split_code: + description: The split code if sharing the transaction with partners + type: string + metadata: + description: Stringified JSON object of custom data + type: string + example: + name: Cups + description: Environment friendly paper cups + price: 10000 + currency: NGN + ProductCreateResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + variants_options: + type: array + items: {} + variants: + type: array + items: {} + name: + type: string + description: + type: string + currency: + type: string + price: + type: integer + quantity: + type: integer + type: + type: string + is_shippable: + type: boolean + unlimited: + type: boolean + files: + type: array + items: {} + shipping_fields: + type: object + properties: + delivery_note: + type: string + shipping_address: + type: string + shipping_fees: + type: array + items: {} + required: + - delivery_note + - shipping_address + - shipping_fees + integration: + type: integer + domain: + type: string + metadata: + type: object + properties: + background_color: + type: string + required: + - background_color + slug: + type: string + product_code: + type: string + quantity_sold: + type: integer + active: + type: boolean + deleted_at: + nullable: true + in_stock: + type: boolean + minimum_orderable: + type: integer + maximum_orderable: + type: integer + nullable: true + redirect_url: + type: string + nullable: true + low_stock_alert: + type: boolean + id: + type: integer + createdAt: + type: string + updatedAt: + type: string + required: + - variants_options + - variants + - name + - description + - currency + - price + - quantity + - type + - is_shippable + - unlimited + - files + - shipping_fields + - integration + - domain + - metadata + - slug + - product_code + - quantity_sold + - active + - deleted_at + - in_stock + - minimum_orderable + - maximum_orderable + - low_stock_alert + - id + - createdAt + - updatedAt + required: + - status + - message + - data + ProductFetchResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + digital_assets: + type: array + items: {} + integration: + type: integer + name: + type: string + description: + type: string + product_code: + type: string + price: + type: integer + currency: + type: string + quantity: + type: integer + quantity_sold: + nullable: true + type: + type: string + files: + type: array + items: {} + file_path: + nullable: true + is_shippable: + type: boolean + shipping_fields: + type: object + properties: + delivery_note: + type: string + shipping_address: + type: string + shipping_fees: + type: array + items: {} + required: + - delivery_note + - shipping_address + - shipping_fees + unlimited: + type: boolean + domain: + type: string + active: + type: boolean + features: + nullable: true + in_stock: + type: boolean + metadata: + type: object + properties: + background_color: + type: string + required: + - background_color + slug: + type: string + success_message: + nullable: true + redirect_url: + nullable: true + split_code: + nullable: true + notification_emails: + nullable: true + minimum_orderable: + type: integer + maximum_orderable: + nullable: true + low_stock_alert: + type: boolean + stock_threshold: + nullable: true + expires_in: + nullable: true + id: + type: integer + createdAt: + type: string + updatedAt: + type: string + required: + - digital_assets + - integration + - name + - description + - product_code + - price + - currency + - quantity + - quantity_sold + - type + - files + - file_path + - is_shippable + - shipping_fields + - unlimited + - domain + - active + - features + - in_stock + - metadata + - slug + - success_message + - redirect_url + - split_code + - notification_emails + - minimum_orderable + - maximum_orderable + - low_stock_alert + - stock_threshold + - expires_in + - id + - createdAt + - updatedAt + required: + - status + - message + - data + ProductUpdate: + type: object + properties: + name: + description: Name of product + type: string + description: + description: The description of the product + type: string + price: + description: | + Price should be in kobo if currency is NGN, pesewas, if currency is GHS, + and cents, if currency is ZAR + type: integer + currency: + description: | + Currency in which price is set. Allowed values are: NGN, GHS, ZAR or USD + type: string + unlimited: + description: | + Set to true if the product has unlimited stock. Leave as false if the + product has limited stock + type: boolean + quantity: + description: Number of products in stock. Use if limited is true + type: integer + split_code: + description: The split code if sharing the transaction with partners + type: string + metadata: + description: JSON object of custom data + type: object + example: + name: Spoon + description: Environment friendly paper spoons + price: 5000 + currency: NGN + ProductUpdateResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + name: + type: string + description: + type: string + product_code: + type: string + price: + type: integer + currency: + type: string + quantity: + type: integer + quantity_sold: + type: integer + type: + type: string + files: + type: array + items: {} + file_path: + nullable: true + is_shippable: + type: boolean + shipping_fields: + type: object + properties: + delivery_note: + type: string + shipping_address: + type: string + shipping_fees: + type: array + items: {} + required: + - delivery_note + - shipping_address + - shipping_fees + unlimited: + type: boolean + domain: + type: string + active: + type: boolean + features: + nullable: true + in_stock: + type: boolean + metadata: + type: object + properties: + background_color: + type: string + required: + - background_color + slug: + type: string + success_message: + nullable: true + redirect_url: + nullable: true + split_code: + nullable: true + notification_emails: + nullable: true + minimum_orderable: + type: integer + maximum_orderable: + nullable: true + low_stock_alert: + type: boolean + stock_threshold: + nullable: true + expires_in: + nullable: true + id: + type: integer + integration: + type: integer + createdAt: + type: string + updatedAt: + type: string + required: + - name + - description + - product_code + - price + - currency + - quantity + - quantity_sold + - type + - files + - file_path + - is_shippable + - shipping_fields + - unlimited + - domain + - active + - features + - in_stock + - metadata + - slug + - success_message + - redirect_url + - split_code + - notification_emails + - minimum_orderable + - maximum_orderable + - low_stock_alert + - stock_threshold + - expires_in + - id + - integration + - createdAt + - updatedAt + required: + - status + - message + - data + ProductDeleteResponse: + type: object + properties: + status: + type: boolean + message: + type: string + required: + - status + - message + StorefrontListResponseArray: + type: object + properties: + id: + type: integer + name: + type: string + slug: + type: string + orders_count: + type: integer + status: + type: string + revenue: + nullable: true + currency: + type: string + products: + type: array + items: {} + contacts: + type: array + items: {} + social_media: + type: array + items: {} + shipping_fees: + type: array + items: {} + required: + - id + - name + - slug + - orders_count + - status + - revenue + - currency + - products + - contacts + - social_media + - shipping_fees + StorefrontListResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: array + items: + $ref: '#/components/schemas/StorefrontListResponseArray' + meta: + type: object + properties: + total: + type: integer + skipped: + type: integer + perPage: + type: integer + page: + type: integer + pageCount: + type: integer + required: + - total + - skipped + - perPage + - page + - pageCount + additionalProperties: false + required: + - status + - message + - data + - meta + StorefrontCreate: + type: object + required: + - name + - slug + - currency + properties: + name: + description: Name of the storefront + type: string + slug: + description: | + A unique identifier to access your store. Once the storefront is created, it can be accessed from https://paystack.shop/your-slug + type: string + currency: + description: Currency for prices of products in your storefront. + type: string + enum: + - GHS + - KES + - NGN + - USD + - ZAR + description: + description: The description of the storefront + type: string + example: + name: Obi and Sons + slug: obi_and_sons + currency: NGN + StorefrontContactsArray: + type: object + properties: + value: + type: string + id: + type: integer + type_name: + nullable: true + type: + type: integer + required: + - value + - id + - type_name + - type + StorefrontCreateResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + social_media: + type: array + items: {} + contacts: + type: array + items: + $ref: '#/components/schemas/StorefrontContactsArray' + name: + type: string + slug: + type: string + currency: + type: string + welcome_message: + nullable: true + success_message: + nullable: true + redirect_url: + nullable: true + description: + nullable: true + delivery_note: + type: string + background_color: + type: string + status: + type: string + shippable: + type: boolean + integration: + type: integer + domain: + type: string + digital_product_expiry: + nullable: true + metadata: + type: object + nullable: true + id: + type: integer + createdAt: + type: string + updatedAt: + type: string + products: + type: array + items: {} + shipping_fees: + type: array + items: {} + required: + - social_media + - contacts + - name + - slug + - currency + - welcome_message + - success_message + - redirect_url + - description + - delivery_note + - background_color + - status + - shippable + - integration + - domain + - digital_product_expiry + - id + - createdAt + - updatedAt + - products + - shipping_fees + required: + - status + - message + - data + StorefrontFetchResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + social_media: + type: array + items: {} + contacts: + type: array + items: + $ref: '#/components/schemas/StorefrontContactsArray' + name: + type: string + slug: + type: string + currency: + type: string + welcome_message: + nullable: true + success_message: + nullable: true + redirect_url: + nullable: true + description: + nullable: true + delivery_note: + type: string + background_color: + type: string + status: + type: string + shippable: + type: boolean + integration: + type: integer + domain: + type: string + digital_product_expiry: + nullable: true + metadata: + type: object + nullable: true + id: + type: integer + createdAt: + type: string + updatedAt: + type: string + products: + type: array + items: {} + shipping_fees: + type: array + items: {} + required: + - social_media + - contacts + - name + - slug + - currency + - welcome_message + - success_message + - redirect_url + - description + - delivery_note + - background_color + - status + - shippable + - integration + - domain + - digital_product_expiry + - id + - createdAt + - updatedAt + - products + - shipping_fees + meta: + type: object + properties: + product_count: + type: integer + total: + type: integer + skipped: + type: integer + perPage: + type: integer + page: + type: integer + pageCount: + type: integer + required: + - product_count + - total + - skipped + - perPage + - page + - pageCount + additionalProperties: false + required: + - status + - message + - data + - meta + StorefrontUpdate: + type: object + properties: + name: + description: Name of the storefront + type: string + slug: + description: | + A unique identifier to access your store. Once the storefront is created, it can be accessed from + https://paystack.shop/your-slug + type: string + description: + description: The description of the storefront + type: string + example: + description: Import and Export + StorefrontUpdateResponse: + type: object + properties: + status: + type: boolean + message: + type: string + required: + - status + - message + StorefrontDeleteResponse: + type: object + properties: + status: + type: boolean + message: + type: string + required: + - status + - message + StorefrontAddProducts: + type: object + required: + - products + properties: + products: + description: An array of product IDs + type: array + items: + type: integer + example: + products: + - 2196244 + - 2179824 + OrderItemsArray: + type: object + properties: + order_item_id: + type: integer + orderId: + type: integer + type: + type: string + item: + type: integer + current_total_items_price: + type: integer + files: + type: string + order: + type: integer + amount: + type: integer + quantity: + type: integer + createdAt: + type: string + name: + type: string + product_level_type: + type: string + product_id: + type: integer + product_success_message: + nullable: true + product_redirect_url: + nullable: true + IFNULL(p1.expires_in, p2.expires_in): + nullable: true + product_quantity_sold: + type: integer + product_notification_emails: + nullable: true + IFNULL(p1.metadata, p2.metadata): + type: string + storefront_redirect_url: + nullable: true + storefront_success_message: + nullable: true + required: + - order_item_id + - orderId + - type + - item + - current_total_items_price + - files + - order + - amount + - quantity + - createdAt + - name + - product_level_type + - product_id + - product_success_message + - product_redirect_url + - IFNULL(p1.expires_in, p2.expires_in) + - product_quantity_sold + - product_notification_emails + - IFNULL(p1.metadata, p2.metadata) + - storefront_redirect_url + - storefront_success_message + OrderListResponseArray: + type: object + properties: + id: + type: integer + order_code: + type: string + integration: + type: integer + domain: + type: string + currency: + type: string + amount: + type: integer + transaction: + type: integer + page: + nullable: true + customer: + type: integer + customer_name: + type: string + status: + type: string + shipping_address: + nullable: true + metadata: + type: string + created_at: + type: string + updated_at: + type: string + email: + type: string + paid_at: + type: string + shipping: + nullable: true + shipping_fees: + type: integer + refunded: + type: boolean + is_viewed: + type: boolean + refunded_amount: + nullable: true + discount_amount: + nullable: true + discounts: + nullable: true + items: + type: array + items: + $ref: '#/components/schemas/OrderItemsArray' + fully_refunded: + type: boolean + required: + - id + - order_code + - integration + - domain + - currency + - amount + - transaction + - page + - customer + - customer_name + - status + - shipping_address + - metadata + - created_at + - updated_at + - email + - paid_at + - shipping + - shipping_fees + - refunded + - is_viewed + - refunded_amount + - discount_amount + - discounts + - items + - fully_refunded + OrderListResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: array + items: + $ref: '#/components/schemas/OrderListResponseArray' + meta: + type: object + properties: + total: + type: integer + revenue: + type: object + skipped: + type: integer + perPage: + type: integer + page: + type: integer + pageCount: + type: integer + required: + - total + - revenue + - skipped + - perPage + - page + - pageCount + additionalProperties: false + required: + - status + - message + - data + - meta + OrderItems: + type: object + description: The collection of items that make up the order + required: + - item + - type + - quantity + - amount + properties: + item: + description: The product ID of the item + type: integer + type: + description: The type of the item. `product` is currently the acceptable value + type: string + quantity: + description: The number of items to get + type: integer + amount: + description: The cost of the item + type: integer + example: + item: 2179824 + type: product + quantity: 200000 + amount: 2 + OrderShipping: + type: object + description: The shipping details of the order + required: + - street_line + - city + - state + - country + - shipping_fee + properties: + street_line: + description: The address of for the delivery + type: string + city: + description: The city of the delivery address + type: string + state: + description: The state of the delivery address + type: string + country: + description: The country of the delivery address + type: string + shipping_fee: + description: The cost of delivery + type: integer + delivery_note: + description: Extra details to be aware of for the delivery + type: string + example: + street_line: Somewhere on Earth + city: Atlantic + state: Pacific + country: Equator + shipping_fee: 10000 + OrderCreate: + type: object + required: + - email + - first_name + - last_name + - phone + - currency + - items + - shipping + properties: + email: + description: The email of the customer placing the order + type: string + first_name: + description: The customer's first name + type: string + last_name: + description: The customer's last name + type: string + phone: + description: The customer's mobile number + type: string + currency: + description: Currency in which amount is set + type: string + enum: + - GHS + - KES + - NGN + - USD + - ZAR + items: + type: array + items: + $ref: '#/components/schemas/OrderItems' + shipping: + $ref: '#/components/schemas/OrderShipping' + is_gift: + description: A flag to indicate if the order is for someone else + type: boolean + pay_for_me: + description: A flag to indicate if the someone else should pay for the order + type: boolean + example: + email: test@email.com + first_name: Demo + last_name: User + phone: '+2348031245678' + currency: NGN + items: + - item: 2179824 + type: product + quantity: 200000 + amount: 2 + shipping: + street_line: Somewhere on Earth + city: Atlantic + state: Pacific + country: Equator + shipping_fee: 10000 + OrderCreateResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + discounts: + type: array + items: {} + currency: + type: string + shipping_address: + nullable: true + integration: + type: integer + domain: + type: string + email: + type: string + customer: + type: integer + amount: + type: integer + pay_for_me: + type: boolean + shipping: + type: object + properties: + customer: + type: integer + integration: + type: integer + domain: + type: string + fees: + type: integer + delivery_note: + nullable: true + street_line: + type: string + city: + type: string + state: + type: string + country: + type: string + is_shipped: + type: boolean + delivery_tracking_link: + nullable: true + id: + type: integer + createdAt: + type: string + updatedAt: + type: string + required: + - customer + - integration + - domain + - fees + - delivery_note + - street_line + - city + - state + - country + - is_shipped + - delivery_tracking_link + - id + - createdAt + - updatedAt + nullable: true + shipping_fees: + type: integer + shipping_method: + type: object + properties: + region: + type: string + fee: + type: integer + currency: + type: string + required: + - region + - fee + - currency + metadata: + type: object + order_code: + type: string + status: + type: string + refunded: + type: boolean + is_viewed: + type: boolean + expiration_date: + nullable: true + id: + type: integer + createdAt: + type: string + updatedAt: + type: string + items: + type: array + items: {} + pay_for_me_code: + type: string + discount_amount: + type: integer + required: + - discounts + - currency + - shipping_address + - integration + - domain + - email + - customer + - amount + - pay_for_me + - shipping + - shipping_fees + - metadata + - order_code + - status + - refunded + - is_viewed + - expiration_date + - id + - createdAt + - updatedAt + - items + - pay_for_me_code + - discount_amount + required: + - status + - message + - data + OrderFetchResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + discounts: + type: array + items: {} + order_code: + type: string + domain: + type: string + currency: + type: string + amount: + type: integer + email: + type: string + status: + type: string + refunded: + type: boolean + paid_at: + type: string + shipping_address: + nullable: true + metadata: + type: object + shipping_fees: + type: integer + shipping_method: + nullable: true + is_viewed: + type: boolean + expiration_date: + type: string + pay_for_me: + type: boolean + id: + type: integer + integration: + type: integer + page: + nullable: true + customer: + type: object + properties: + id: + type: integer + first_name: + type: string + last_name: + type: string + email: + type: string + customer_code: + type: string + phone: + type: string + metadata: + type: object + risk_action: + type: string + international_format_phone: + type: string + required: + - id + - first_name + - last_name + - email + - customer_code + - phone + - metadata + - risk_action + - international_format_phone + shipping: + nullable: true + createdAt: + type: string + updatedAt: + type: string + transaction: + type: integer + is_gift: + type: boolean + payer: + type: object + properties: + id: + type: integer + first_name: + type: string + last_name: + type: string + email: + type: string + customer_code: + type: string + phone: + type: string + metadata: + type: object + risk_action: + type: string + international_format_phone: + type: string + required: + - id + - first_name + - last_name + - email + - customer_code + - phone + - metadata + - risk_action + - international_format_phone + fully_refunded: + type: boolean + refunded_amount: + type: integer + items: + type: array + items: + $ref: '#/components/schemas/OrderItemsArray' + discount_amount: + nullable: true + required: + - discounts + - order_code + - domain + - currency + - amount + - email + - status + - refunded + - paid_at + - shipping_address + - metadata + - shipping_fees + - shipping_method + - is_viewed + - expiration_date + - pay_for_me + - id + - integration + - page + - customer + - shipping + - createdAt + - updatedAt + - transaction + - is_gift + - payer + - fully_refunded + - refunded_amount + - items + - discount_amount + required: + - status + - message + - data + OrderFetchProductResponseArray: + type: object + properties: + order_id: + type: integer + transaction: + type: integer + order_code: + type: string + customer: + type: integer + first_name: + type: string + last_name: + type: string + customer_name: + type: string + phone: + type: string + email: + type: string + product_code: + type: string + product_id: + type: integer + product_name: + type: string + price: + type: integer + quantity_sold: + type: integer + currency: + type: string + quantity: + type: integer + variant_id: + nullable: true + variant_price: + nullable: true + variant_code: + nullable: true + amount: + type: integer + shipping_method: + nullable: true + status: + type: string + shipping_address: + nullable: true + refunded: + type: boolean + shipping: + nullable: true + paid_at: + type: string + created_at: + type: string + is_shipped: + type: boolean + is_viewed: + type: integer + delivery_note: + nullable: true + shipping_fee: + nullable: true + amount_paid: + type: integer + storefront_slug: + type: string + required: + - order_id + - transaction + - order_code + - customer + - first_name + - last_name + - customer_name + - phone + - email + - product_code + - product_id + - product_name + - price + - quantity_sold + - currency + - quantity + - variant_id + - variant_price + - variant_code + - amount + - shipping_method + - status + - shipping_address + - refunded + - shipping + - paid_at + - created_at + - is_shipped + - is_viewed + - delivery_note + - shipping_fee + - amount_paid + - storefront_slug + OrderFetchProductResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: array + items: + $ref: '#/components/schemas/OrderFetchProductResponseArray' + meta: + type: object + properties: + quantity_sold: + type: integer + revenue: + type: integer + total: + type: integer + skipped: + type: integer + perPage: + type: integer + pageCount: + type: integer + required: + - quantity_sold + - revenue + - total + - skipped + - perPage + - pageCount + additionalProperties: false + required: + - status + - message + - data + - meta + OrderValidateResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + order_code: + type: string + domain: + type: string + currency: + type: string + amount: + type: integer + email: + type: string + status: + type: string + refunded: + type: boolean + paid_at: + nullable: true + shipping_address: + nullable: true + metadata: + nullable: true + shipping_fees: + type: integer + shipping_method: + nullable: true + is_viewed: + type: boolean + expiration_date: + type: string + pay_for_me: + type: boolean + id: + type: integer + integration: + type: object + properties: + key: + type: string + name: + type: string + logo: + type: string + allowed_currencies: + type: array + items: {} + required: + - key + - name + - logo + - allowed_currencies + transaction: + nullable: true + page: + nullable: true + customer: + type: object + properties: + id: + type: integer + first_name: + type: string + last_name: + type: string + email: + type: string + customer_code: + type: string + phone: + type: string + metadata: + type: object + risk_action: + type: string + international_format_phone: + type: string + required: + - id + - first_name + - last_name + - email + - customer_code + - phone + - metadata + - risk_action + - international_format_phone + shipping: + nullable: true + createdAt: + type: string + updatedAt: + type: string + payer: + nullable: true + required: + - order_code + - domain + - currency + - amount + - email + - status + - refunded + - paid_at + - shipping_address + - metadata + - shipping_fees + - shipping_method + - is_viewed + - expiration_date + - pay_for_me + - id + - integration + - transaction + - page + - customer + - shipping + - createdAt + - updatedAt + - payer + required: + - status + - message + - data + PageListResponseArray: + type: object + properties: + integration: + type: integer + plan: + nullable: true + domain: + type: string + name: + type: string + description: + type: string + nullable: true + amount: + type: integer + nullable: true + currency: + type: string + slug: + type: string + custom_fields: + type: array + nullable: true + items: {} + type: + type: string + redirect_url: + type: string + nullable: true + success_message: + type: string + nullable: true + collect_phone: + type: boolean + active: + type: boolean + published: + type: boolean + migrate: + type: boolean + notification_email: + nullable: true + metadata: + type: object + nullable: true + split_code: + nullable: true + id: + type: integer + createdAt: + type: string + updatedAt: + type: string + required: + - integration + - plan + - domain + - name + - description + - amount + - currency + - slug + - custom_fields + - type + - redirect_url + - success_message + - collect_phone + - active + - published + - migrate + - notification_email + - metadata + - split_code + - id + - createdAt + - updatedAt + PageListResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: array + items: + $ref: '#/components/schemas/PageListResponseArray' + meta: + type: object + properties: + total: + type: integer + skipped: + type: integer + perPage: + type: integer + page: + type: integer + pageCount: + type: integer + required: + - total + - skipped + - perPage + - page + - pageCount + additionalProperties: false + required: + - status + - message + - data + - meta + PageCreate: + type: object + required: + - name + properties: + name: + description: Name of page + type: string + description: + description: The description of the page + type: string + amount: + description: Amount should be in kobo if currency is NGN, pesewas, if currency is GHS, and cents, if currency is ZAR + type: integer + currency: + description: The transaction currency. Defaults to your integration currency. + type: string + enum: + - NGN + - GHS + - ZAR + - KES + - USD + slug: + description: URL slug you would like to be associated with this page. Page will be accessible at `https://paystack.com/pay/[slug]` + type: string + type: + description: | + The type of payment page to create. Defaults to `payment` if no type is specified. + type: string + enum: + - payment + - subscription + - product + - plan + plan: + description: The ID of the plan to subscribe customers on this payment page to when `type` is set to `subscription`. + type: string + fixed_amount: + description: Specifies whether to collect a fixed amount on the payment page. If true, `amount` must be passed. + type: boolean + split_code: + description: The split code of the transaction split. e.g. `SPL_98WF13Eb3w` + type: string + metadata: + description: JSON object of custom data + type: object + redirect_url: + description: | + If you would like Paystack to redirect to a URL upon successful payment, specify the URL here. + type: string + success_message: + description: | + A success message to display to the customer after a successful transaction + type: string + notification_email: + description: | + An email address that will receive transaction notifications for this payment page + type: string + collect_phone: + description: | + Specify whether to collect phone numbers on the payment page + type: boolean + custom_fields: + description: If you would like to accept custom fields, specify them here. + type: array + items: + type: object + example: + name: Extra Charges + amount: 200000 + PageCreateResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + name: + type: string + integration: + type: integer + domain: + type: string + slug: + type: string + currency: + type: string + type: + type: string + collect_phone: + type: boolean + active: + type: boolean + published: + type: boolean + migrate: + type: boolean + id: + type: integer + createdAt: + type: string + updatedAt: + type: string + required: + - name + - integration + - domain + - slug + - currency + - type + - collect_phone + - active + - published + - migrate + - id + - createdAt + - updatedAt + required: + - status + - message + - data + PageFetchResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + integration: + type: integer + domain: + type: string + name: + type: string + description: + nullable: true + amount: + type: integer + nullable: true + currency: + type: string + slug: + type: string + custom_fields: + nullable: true + type: + type: string + redirect_url: + nullable: true + success_message: + nullable: true + collect_phone: + type: boolean + active: + type: boolean + published: + type: boolean + migrate: + type: boolean + notification_email: + nullable: true + metadata: + nullable: true + split_code: + nullable: true + id: + type: integer + createdAt: + type: string + updatedAt: + type: string + required: + - integration + - domain + - name + - description + - amount + - currency + - slug + - custom_fields + - type + - redirect_url + - success_message + - collect_phone + - active + - published + - migrate + - notification_email + - metadata + - split_code + - id + - createdAt + - updatedAt + required: + - status + - message + - data + PageUpdate: + type: object + properties: + name: + description: Name of page + type: string + description: + description: The description of the page + type: string + amount: + description: Amount should be in the subunit of the currency + type: integer + active: + description: Set to false to deactivate page url + type: boolean + example: + name: Backyard Sale + PageUpdateResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + domain: + type: string + name: + type: string + description: + nullable: true + amount: + nullable: true + currency: + type: string + slug: + type: string + custom_fields: + nullable: true + type: + type: string + redirect_url: + nullable: true + success_message: + nullable: true + collect_phone: + type: boolean + active: + type: boolean + published: + type: boolean + migrate: + type: boolean + notification_email: + nullable: true + metadata: + nullable: true + split_code: + nullable: true + id: + type: integer + integration: + type: integer + plan: + nullable: true + createdAt: + type: string + updatedAt: + type: string + required: + - domain + - name + - description + - amount + - currency + - slug + - custom_fields + - type + - redirect_url + - success_message + - collect_phone + - active + - published + - migrate + - notification_email + - metadata + - split_code + - id + - integration + - plan + - createdAt + - updatedAt + required: + - status + - message + - data + PageCheckSlugAvailabilityResponse: + type: object + properties: + status: + type: boolean + message: + type: string + required: + - status + - message + PageProduct: + type: object + required: + - products + properties: + products: + description: A list of IDs of products to add to a page. + type: array + items: + type: integer + example: + products: + - 2196244 + - 2179824 + PageProductsArray: + type: object + properties: + product_id: + type: integer + name: + type: string + description: + type: string + product_code: + type: string + page: + type: integer + price: + type: integer + currency: + type: string + quantity: + type: integer + type: + type: string + features: + nullable: true + is_shippable: + type: integer + domain: + type: string + integration: + type: integer + active: + type: integer + in_stock: + type: integer + required: + - product_id + - name + - description + - product_code + - page + - price + - currency + - quantity + - type + - features + - is_shippable + - domain + - integration + - active + - in_stock + PageAddProductsResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + integration: + type: integer + plan: + nullable: true + domain: + type: string + name: + type: string + description: + nullable: true + amount: + nullable: true + currency: + type: string + slug: + type: string + custom_fields: + nullable: true + type: + type: string + redirect_url: + nullable: true + success_message: + nullable: true + collect_phone: + type: boolean + active: + type: boolean + published: + type: boolean + migrate: + type: boolean + notification_email: + nullable: true + metadata: + nullable: true + split_code: + nullable: true + id: + type: integer + createdAt: + type: string + updatedAt: + type: string + products: + type: array + items: + $ref: '#/components/schemas/PageProductsArray' + required: + - integration + - plan + - domain + - name + - description + - amount + - currency + - slug + - custom_fields + - type + - redirect_url + - success_message + - collect_phone + - active + - published + - migrate + - notification_email + - metadata + - split_code + - id + - createdAt + - updatedAt + - products + required: + - status + - message + - data + ControlPanelFetchPaymentSessionTimeoutResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + payment_session_timeout: + type: integer + required: + - payment_session_timeout + required: + - status + - message + - data + PaymentSession: + type: object + required: + - timeout + properties: + timeout: + description: Time in seconds before a transaction becomes invalid + type: integer + example: 30 + ControlPanelUpdatePaymentSessionTimeoutResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + payment_session_timeout: + type: integer + required: + - payment_session_timeout + required: + - status + - message + - data + RefundListResponseArray: + type: object + properties: + integration: + type: integer + transaction: + type: integer + dispute: + nullable: true + settlement: + nullable: true + id: + type: integer + domain: + type: string + currency: + type: string + amount: + type: integer + status: + type: string + refunded_at: + nullable: true + refunded_by: + type: string + customer_note: + type: string + merchant_note: + type: string + deducted_amount: + type: integer + fully_deducted: + type: integer + createdAt: + type: string + bank_reference: + nullable: true + transaction_reference: + type: string + reason: + type: string + customer: + type: object + properties: + id: + type: integer + first_name: + type: string + last_name: + type: string + email: + type: string + customer_code: + type: string + phone: + type: string + nullable: true + metadata: + type: string + risk_action: + type: string + international_format_phone: + type: string + required: + - id + - first_name + - last_name + - email + - customer_code + - phone + - metadata + - risk_action + - international_format_phone + refund_type: + type: string + transaction_amount: + type: integer + initiated_by: + type: string + refund_channel: + type: string + session_id: + nullable: true + collect_account_number: + type: boolean + required: + - integration + - transaction + - dispute + - settlement + - id + - domain + - currency + - amount + - status + - refunded_at + - refunded_by + - customer_note + - merchant_note + - deducted_amount + - fully_deducted + - createdAt + - bank_reference + - transaction_reference + - reason + - customer + - refund_type + - transaction_amount + - initiated_by + - refund_channel + - session_id + - collect_account_number + RefundListResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: array + items: + $ref: '#/components/schemas/RefundListResponseArray' + meta: + type: object + properties: + total: + type: integer + skipped: + type: integer + perPage: + type: string + page: + type: integer + pageCount: + type: integer + failedRefundCount: + type: integer + required: + - total + - skipped + - perPage + - page + - pageCount + - failedRefundCount + additionalProperties: false + required: + - status + - message + - data + - meta + RefundCreate: + type: object + required: + - transaction + properties: + transaction: + description: The reference of a previosuly completed transaction + type: string + amount: + description: Amount to be refunded to the customer. It cannot be more than the original transaction amount + type: integer + currency: + description: Three-letter ISO currency + type: string + enum: + - GHS + - KES + - NGN + - USD + - ZAR + customer_note: + description: Customer reason + type: string + merchant_note: + description: Merchant reason + type: string + example: + transaction: mpkr39h74k + RefundCreateResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + transaction: + type: object + properties: + id: + type: integer + domain: + type: string + reference: + type: string + amount: + type: integer + paid_at: + type: string + channel: + type: string + currency: + type: string + authorization: + type: object + properties: + exp_month: + nullable: true + exp_year: + nullable: true + account_name: + nullable: true + required: + - exp_month + - exp_year + - account_name + customer: + type: object + properties: + international_format_phone: + type: string + nullable: true + required: + - international_format_phone + plan: + type: object + subaccount: + type: object + properties: + currency: + nullable: true + required: + - currency + split: + type: object + order_id: + nullable: true + paidAt: + type: string + pos_transaction_data: + nullable: true + source: + nullable: true + fees_breakdown: + nullable: true + required: + - id + - domain + - reference + - amount + - paid_at + - channel + - currency + - authorization + - customer + - plan + - subaccount + - split + - order_id + - paidAt + - pos_transaction_data + - source + - fees_breakdown + integration: + type: integer + deducted_amount: + type: integer + channel: + nullable: true + merchant_note: + type: string + customer_note: + type: string + status: + type: string + refunded_by: + type: string + expected_at: + type: string + currency: + type: string + domain: + type: string + amount: + type: integer + fully_deducted: + type: boolean + id: + type: integer + createdAt: + type: string + updatedAt: + type: string + required: + - transaction + - integration + - deducted_amount + - channel + - merchant_note + - customer_note + - status + - refunded_by + - expected_at + - currency + - domain + - amount + - fully_deducted + - id + - createdAt + - updatedAt + required: + - status + - message + - data + RefundRetryAccountDetails: + type: object + description: An object that contains the customer’s account details for refund + required: + - currency + - account_number + - bank_id + properties: + currency: + description: The currency of the customer's bank account. It should be the same as the currency the payment was made + type: string + account_number: + description: The customer's account number + type: string + bank_id: + description: The ID representing the customer's bank. You can get the list of bank IDs by calling the List Banks endpoint. + type: string + example: + currency: NGN + account_number: '1234567890' + bank_id: '9' + RefundRetry: + type: object + required: + - refund_account_details + properties: + refund_account_details: + $ref: '#/components/schemas/RefundRetryAccountDetails' + RefundRetryResponse: + title: Generated schema for Root + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + integration: + type: number + transaction: + type: number + dispute: + type: object + settlement: + type: object + id: + type: number + domain: + type: string + currency: + type: string + amount: + type: number + status: + type: string + refunded_at: + type: string + nullable: true + expected_at: + type: string + channel: + type: string + refunded_by: + type: string + customer_note: + type: string + merchant_note: + type: string + deducted_amount: + type: number + fully_deducted: + type: boolean + bank_reference: + type: string + nullable: true + reason: + type: string + customer: + type: object + initiated_by: + type: string + reversed_at: + type: string + nullable: true + session_id: + type: string + nullable: true + required: + - integration + - transaction + - dispute + - settlement + - id + - domain + - currency + - amount + - status + - refunded_at + - expected_at + - channel + - refunded_by + - customer_note + - merchant_note + - deducted_amount + - fully_deducted + - bank_reference + - reason + - customer + - initiated_by + - reversed_at + - session_id + required: + - status + - message + - data + RefundFetchResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + integration: + type: integer + transaction: + type: integer + dispute: + nullable: true + settlement: + nullable: true + id: + type: integer + domain: + type: string + currency: + type: string + amount: + type: integer + status: + type: string + refunded_at: + nullable: true + refunded_by: + type: string + customer_note: + type: string + merchant_note: + type: string + deducted_amount: + type: integer + fully_deducted: + type: integer + createdAt: + type: string + bank_reference: + nullable: true + transaction_reference: + type: string + reason: + type: string + customer: + type: object + properties: + id: + type: integer + first_name: + type: string + last_name: + type: string + email: + type: string + customer_code: + type: string + phone: + type: string + metadata: + type: string + risk_action: + type: string + international_format_phone: + type: string + required: + - id + - first_name + - last_name + - email + - customer_code + - phone + - metadata + - risk_action + - international_format_phone + refund_type: + type: string + transaction_amount: + type: integer + initiated_by: + type: string + refund_channel: + type: string + session_id: + nullable: true + collect_account_number: + type: boolean + required: + - integration + - transaction + - dispute + - settlement + - id + - domain + - currency + - amount + - status + - refunded_at + - refunded_by + - customer_note + - merchant_note + - deducted_amount + - fully_deducted + - createdAt + - bank_reference + - transaction_reference + - reason + - customer + - refund_type + - transaction_amount + - initiated_by + - refund_channel + - session_id + - collect_account_number + required: + - status + - message + - data + DisputeHistoryArray: + type: object + properties: + status: + type: string + by: + type: string + createdAt: + type: string + required: + - status + - by + - createdAt + DisputeMessagesArray: + type: object + properties: + sender: + type: string + body: + type: string + createdAt: + type: string + required: + - sender + - body + - createdAt + DisputeListResponseArray: + type: object + properties: + id: + type: integer + refund_amount: + type: integer + currency: + type: string + status: + type: string + resolution: + nullable: true + domain: + type: string + transaction: + type: object + properties: + id: + type: integer + domain: + type: string + status: + type: string + reference: + type: string + amount: + type: integer + message: + nullable: true + gateway_response: + type: string + paid_at: + type: string + created_at: + type: string + channel: + type: string + currency: + type: string + ip_address: + type: string + metadata: + type: object + properties: + custom_fields: + type: array + items: + $ref: '#/components/schemas/MetadataCustomFieldsArray' + required: + - custom_fields + log: + type: object + properties: + start_time: + type: integer + time_spent: + type: integer + attempts: + type: integer + errors: + type: integer + success: + type: boolean + mobile: + type: boolean + input: + type: array + items: {} + history: + type: array + items: + type: object + properties: + type: + type: string + message: + type: string + time: + type: integer + required: + - type + - message + - time + required: + - start_time + - time_spent + - attempts + - errors + - success + - mobile + - input + - history + nullable: true + fees: + type: integer + fees_split: + type: integer + nullable: true + authorization: + type: object + customer: + nullable: true + plan: + type: object + subaccount: + type: object + split: + type: object + order_id: + nullable: true + paidAt: + type: string + createdAt: + type: string + pos_transaction_data: + nullable: true + source: + nullable: true + fees_breakdown: + nullable: true + connect: + nullable: true + required: + - id + - domain + - status + - reference + - amount + - message + - gateway_response + - paid_at + - created_at + - channel + - currency + - ip_address + - metadata + - log + - fees + - fees_split + - authorization + - customer + - plan + - subaccount + - split + - order_id + - paidAt + - createdAt + - pos_transaction_data + - source + - fees_breakdown + - connect + transaction_reference: + nullable: true + category: + type: string + customer: + type: object + properties: + id: + type: integer + first_name: + type: string + last_name: + type: string + email: + type: string + customer_code: + type: string + phone: + type: string + nullable: true + metadata: + type: string + risk_action: + type: string + international_format_phone: + type: string + required: + - id + - first_name + - last_name + - email + - customer_code + - phone + - metadata + - risk_action + - international_format_phone + bin: + type: string + last4: + type: string + dueAt: + nullable: true + resolvedAt: + nullable: true + evidence: + nullable: true + attachments: + nullable: true + note: + nullable: true + history: + type: array + items: + $ref: '#/components/schemas/DisputeHistoryArray' + messages: + type: array + items: + $ref: '#/components/schemas/DisputeMessagesArray' + createdAt: + type: string + updatedAt: + type: string + required: + - id + - refund_amount + - currency + - status + - resolution + - domain + - transaction + - transaction_reference + - category + - customer + - bin + - last4 + - dueAt + - resolvedAt + - evidence + - attachments + - note + - history + - messages + - createdAt + - updatedAt + DisputeListResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: array + items: + $ref: '#/components/schemas/DisputeListResponseArray' + meta: + type: object + properties: + total: + type: integer + skipped: + type: integer + perPage: + type: integer + page: + type: integer + pageCount: + type: integer + required: + - total + - skipped + - perPage + - page + - pageCount + additionalProperties: false + required: + - status + - message + - data + - meta + DisputeFetchResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + id: + type: integer + refund_amount: + type: integer + currency: + type: string + status: + type: string + resolution: + nullable: true + domain: + type: string + transaction: + type: object + properties: + id: + type: integer + domain: + type: string + status: + type: string + reference: + type: string + receipt_number: + type: integer + nullable: true + amount: + type: integer + message: + nullable: true + gateway_response: + type: string + paid_at: + type: string + created_at: + type: string + channel: + type: string + currency: + type: string + ip_address: + type: string + metadata: + type: object + properties: + custom_fields: + type: array + items: + $ref: '#/components/schemas/MetadataCustomFieldsArray' + required: + - custom_fields + log: + type: object + properties: + start_time: + type: integer + time_spent: + type: integer + attempts: + type: integer + errors: + type: integer + success: + type: boolean + mobile: + type: boolean + input: + type: array + items: {} + history: + type: array + items: + type: object + properties: + type: + type: string + message: + type: string + time: + type: integer + required: + - type + - message + - time + required: + - start_time + - time_spent + - attempts + - errors + - success + - mobile + - input + - history + nullable: true + fees: + type: integer + fees_split: + type: integer + nullable: true + authorization: + type: object + properties: + receiver_bank_account_number: + nullable: true + receiver_bank: + nullable: true + required: + - receiver_bank_account_number + - receiver_bank + customer: + type: object + properties: + international_format_phone: + nullable: true + required: + - international_format_phone + plan: + type: object + subaccount: + type: object + split: + type: object + order_id: + nullable: true + paidAt: + type: string + createdAt: + type: string + requested_amount: + type: integer + pos_transaction_data: + nullable: true + source: + nullable: true + fees_breakdown: + nullable: true + connect: + nullable: true + required: + - id + - domain + - status + - reference + - amount + - message + - gateway_response + - paid_at + - created_at + - channel + - currency + - ip_address + - metadata + - log + - fees + - fees_split + - authorization + - customer + - plan + - subaccount + - split + - order_id + - paidAt + - createdAt + - requested_amount + - pos_transaction_data + - source + - fees_breakdown + - connect + transaction_reference: + nullable: true + category: + type: string + customer: + type: object + properties: + id: + type: integer + first_name: + type: string + last_name: + type: string + email: + type: string + customer_code: + type: string + phone: + type: string + metadata: + type: object + risk_action: + type: string + international_format_phone: + type: string + required: + - id + - first_name + - last_name + - email + - customer_code + - phone + - metadata + - risk_action + - international_format_phone + bin: + type: string + last4: + type: string + dueAt: + nullable: true + resolvedAt: + nullable: true + evidence: + nullable: true + attachments: + nullable: true + note: + nullable: true + history: + type: array + items: + $ref: '#/components/schemas/DisputeHistoryArray' + messages: + type: array + items: + $ref: '#/components/schemas/DisputeMessagesArray' + createdAt: + type: string + updatedAt: + type: string + required: + - id + - refund_amount + - currency + - status + - resolution + - domain + - transaction + - transaction_reference + - category + - customer + - bin + - last4 + - dueAt + - resolvedAt + - evidence + - attachments + - note + - history + - messages + - createdAt + - updatedAt + required: + - status + - message + - data + DisputeUpdate: + type: object + required: + - refund_amount + properties: + refund_amount: + description: The amount to refund, in the subunit of your currency + type: integer + uploaded_filename: + description: Filename of attachment returned via response from the Dispute upload URL + type: string + example: + refund_amount: 50000 + DisputeUpdateResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + id: + type: integer + refund_amount: + type: integer + currency: + type: string + status: + type: string + resolution: + nullable: true + domain: + type: string + transaction: + type: object + properties: + id: + type: integer + domain: + type: string + status: + type: string + reference: + type: string + receipt_number: + type: integer + nullable: true + amount: + type: integer + message: + nullable: true + gateway_response: + type: string + paid_at: + type: string + created_at: + type: string + channel: + type: string + currency: + type: string + ip_address: + type: string + metadata: + type: object + properties: + custom_fields: + type: array + items: + $ref: '#/components/schemas/MetadataCustomFieldsArray' + required: + - custom_fields + log: + type: object + properties: + start_time: + type: integer + time_spent: + type: integer + attempts: + type: integer + errors: + type: integer + success: + type: boolean + mobile: + type: boolean + input: + type: array + items: {} + history: + type: array + items: + type: object + properties: + type: + type: string + message: + type: string + time: + type: integer + required: + - type + - message + - time + required: + - start_time + - time_spent + - attempts + - errors + - success + - mobile + - input + - history + nullable: true + fees: + type: integer + fees_split: + type: integer + nullable: true + authorization: + type: object + properties: + receiver_bank_account_number: + nullable: true + receiver_bank: + nullable: true + required: + - receiver_bank_account_number + - receiver_bank + customer: + type: object + properties: + international_format_phone: + nullable: true + required: + - international_format_phone + plan: + type: object + subaccount: + type: object + split: + type: object + order_id: + nullable: true + paidAt: + type: string + createdAt: + type: string + requested_amount: + type: integer + pos_transaction_data: + nullable: true + source: + nullable: true + fees_breakdown: + nullable: true + connect: + nullable: true + required: + - id + - domain + - status + - reference + - amount + - message + - gateway_response + - paid_at + - created_at + - channel + - currency + - ip_address + - metadata + - log + - fees + - fees_split + - authorization + - customer + - plan + - subaccount + - split + - order_id + - paidAt + - createdAt + - requested_amount + - pos_transaction_data + - source + - fees_breakdown + - connect + transaction_reference: + nullable: true + category: + type: string + customer: + type: object + properties: + id: + type: integer + first_name: + type: string + last_name: + type: string + email: + type: string + customer_code: + type: string + phone: + type: string + metadata: + type: object + risk_action: + type: string + international_format_phone: + type: string + required: + - id + - first_name + - last_name + - email + - customer_code + - phone + - metadata + - risk_action + - international_format_phone + bin: + type: string + last4: + type: string + dueAt: + nullable: true + resolvedAt: + nullable: true + evidence: + nullable: true + attachments: + nullable: true + note: + nullable: true + history: + type: array + items: + $ref: '#/components/schemas/DisputeHistoryArray' + messages: + type: array + items: + $ref: '#/components/schemas/DisputeMessagesArray' + createdAt: + type: string + updatedAt: + type: string + required: + - id + - refund_amount + - currency + - status + - resolution + - domain + - transaction + - transaction_reference + - category + - customer + - bin + - last4 + - dueAt + - resolvedAt + - evidence + - attachments + - note + - history + - messages + - createdAt + - updatedAt + required: + - status + - message + - data + DisputeUploadURLResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + signedUrl: + type: string + fileName: + type: string + required: + - signedUrl + - fileName + required: + - status + - message + - data + DisputeExportResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + path: + type: string + expiresAt: + type: string + required: + - path + - expiresAt + required: + - status + - message + - data + DisputeListTransactionResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + history: + type: array + items: + $ref: '#/components/schemas/DisputeHistoryArray' + messages: + type: array + items: + $ref: '#/components/schemas/DisputeMessagesArray' + currency: + type: string + last4: + type: string + bin: + type: string + transaction_reference: + nullable: true + merchant_transaction_reference: + type: string + refund_amount: + type: integer + status: + type: string + domain: + type: string + resolution: + nullable: true + category: + type: string + note: + nullable: true + attachments: + nullable: true + id: + type: integer + integration: + type: integer + transaction: + type: object + properties: + id: + type: integer + domain: + type: string + status: + type: string + reference: + type: string + receipt_number: + type: integer + nullable: true + amount: + type: integer + message: + nullable: true + gateway_response: + type: string + paid_at: + type: string + created_at: + type: string + channel: + type: string + currency: + type: string + ip_address: + type: string + metadata: + type: object + properties: + custom_fields: + type: array + items: + $ref: '#/components/schemas/MetadataCustomFieldsArray' + required: + - custom_fields + log: + type: object + properties: + start_time: + type: integer + time_spent: + type: integer + attempts: + type: integer + errors: + type: integer + success: + type: boolean + mobile: + type: boolean + input: + type: array + items: {} + history: + type: array + items: + type: object + properties: + type: + type: string + message: + type: string + time: + type: integer + required: + - type + - message + - time + required: + - start_time + - time_spent + - attempts + - errors + - success + - mobile + - input + - history + nullable: true + fees: + type: integer + fees_split: + type: integer + nullable: true + authorization: + type: object + properties: + receiver_bank_account_number: + nullable: true + receiver_bank: + nullable: true + required: + - receiver_bank_account_number + - receiver_bank + customer: + type: object + properties: + international_format_phone: + nullable: true + required: + - international_format_phone + plan: + type: object + subaccount: + type: object + split: + type: object + order_id: + nullable: true + paidAt: + type: string + createdAt: + type: string + requested_amount: + type: integer + pos_transaction_data: + nullable: true + source: + nullable: true + fees_breakdown: + nullable: true + connect: + type: object + nullable: true + required: + - id + - domain + - status + - reference + - amount + - message + - gateway_response + - paid_at + - created_at + - channel + - currency + - ip_address + - metadata + - log + - fees + - fees_split + - authorization + - customer + - plan + - subaccount + - split + - order_id + - paidAt + - createdAt + - requested_amount + - pos_transaction_data + - source + - fees_breakdown + - connect + created_by: + type: integer + evidence: + nullable: true + resolvedAt: + nullable: true + createdAt: + type: string + updatedAt: + type: string + dueAt: + nullable: true + required: + - history + - messages + - currency + - last4 + - bin + - transaction_reference + - merchant_transaction_reference + - refund_amount + - status + - domain + - resolution + - category + - note + - attachments + - id + - integration + - transaction + - created_by + - evidence + - resolvedAt + - createdAt + - updatedAt + - dueAt + required: + - status + - message + - data + DisputeResolve: + type: object + required: + - resolution + - message + - refund_amount + - uploaded_filename + properties: + resolution: + description: Dispute resolution. Accepted values, merchant-accepted, declined + type: string + message: + description: Reason for resolving + type: string + refund_amount: + description: The amount to refund, in the subunit of your integration currency + type: integer + uploaded_filename: + description: Filename of attachment returned via response from the Dispute upload URL + type: string + evidence: + description: Evidence Id for fraud claims + type: integer + example: + resolution: merchant-accepted + message: Merchant accepted + refund_amount: 50000 + uploaded_filename: qesp8a4df1xejihd9x5q + DisputeResolveResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + currency: + type: string + last4: + type: string + bin: + type: string + transaction_reference: + nullable: true + merchant_transaction_reference: + type: string + refund_amount: + type: integer + status: + type: string + domain: + type: string + resolution: + type: string + category: + type: string + note: + nullable: true + attachments: + type: string + id: + type: integer + integration: + type: integer + transaction: + type: integer + created_by: + type: integer + evidence: + type: integer + resolvedAt: + type: string + createdAt: + type: string + updatedAt: + type: string + dueAt: + nullable: true + message: + type: object + properties: + dispute: + type: integer + sender: + type: string + body: + type: string + id: + type: integer + createdAt: + type: string + updatedAt: + type: string + required: + - dispute + - sender + - body + - id + - createdAt + - updatedAt + required: + - currency + - last4 + - bin + - transaction_reference + - merchant_transaction_reference + - refund_amount + - status + - domain + - resolution + - category + - note + - attachments + - id + - integration + - transaction + - created_by + - evidence + - resolvedAt + - createdAt + - updatedAt + - dueAt + - message + required: + - status + - message + - data + DisputeEvidence: + type: object + required: + - customer_email + - customer_name + - customer_phone + - service_details + properties: + customer_email: + description: Customer email + type: string + customer_name: + description: Customer name + type: string + customer_phone: + description: Customer mobile number + type: string + service_details: + description: Details of service offered + type: string + delivery_address: + description: Delivery address + type: string + delivery_date: + description: ISO 8601 representation of delivery date (YYYY-MM-DD) + type: string + format: date-time + example: + customer_email: customer@email.com + customer_name: Mensah King + customer_phone: '08012345678' + service_details: claim for buying cups + DisputeAddEvidenceResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + customer_email: + type: string + customer_name: + type: string + customer_phone: + type: string + service_details: + type: string + delivery_address: + type: string + delivery_date: + type: string + dispute: + type: integer + id: + type: integer + createdAt: + type: string + updatedAt: + type: string + required: + - customer_email + - customer_name + - customer_phone + - service_details + - delivery_address + - delivery_date + - dispute + - id + - createdAt + - updatedAt + required: + - status + - message + - data + MiscellaneousListBanksResponseArray: + type: object + properties: + name: + type: string + slug: + type: string + code: + type: string + longcode: + type: string + gateway: + type: string + nullable: true + pay_with_bank: + type: boolean + supports_transfer: + type: boolean + available_for_direct_debit: + type: boolean + active: + type: boolean + is_deleted: + type: boolean + nullable: true + country: + type: string + currency: + type: string + type: + type: string + id: + type: integer + createdAt: + type: string + updatedAt: + type: string + required: + - name + - slug + - code + - longcode + - gateway + - pay_with_bank + - supports_transfer + - available_for_direct_debit + - active + - is_deleted + - country + - currency + - type + - id + - createdAt + - updatedAt + MiscellaneousListBanksResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: array + items: + $ref: '#/components/schemas/MiscellaneousListBanksResponseArray' + required: + - status + - message + - data + VerificationResolveAccountNumberResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + account_number: + type: string + account_name: + type: string + bank_id: + type: integer + required: + - account_number + - account_name + - bank_id + required: + - status + - message + - data + BankValidateRequest: + type: object + required: + - account_name + - account_number + - account_type + - bank_code + - country_code + - document_type + properties: + account_name: + description: Customer's first and last name registered with their bank + type: string + account_number: + description: Customer's account number + type: string + account_type: + description: The type of the customer's account number + type: string + enum: + - personal + - business + bank_code: + description: The bank code of the customer’s bank. You can fetch the bank codes by using our List Banks endpoint + type: string + country_code: + description: The two digit ISO code of the customer’s bank + type: string + document_type: + description: Customer’s mode of identity + type: string + enum: + - identityNumber + - passportNumber + - businessRegistrationNumber + document_number: + description: Customer’s mode of identity number + type: string + example: + account_name: Ann Bron + account_number: '0123456789' + account_type: personal + bank_code: '632005' + country_code: ZA + document_type: identityNumber + document_number: '1234567890123' + VerificationValidateAccountResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + verified: + type: boolean + verificationMessage: + type: string + accountAcceptsDebits: + type: boolean + accountAcceptsCredits: + type: boolean + accountOpenForMoreThanThreeMonths: + type: boolean + accountHolderMatch: + type: boolean + accountOpen: + type: boolean + required: + - verified + - verificationMessage + - accountAcceptsDebits + - accountAcceptsCredits + - accountOpenForMoreThanThreeMonths + - accountHolderMatch + - accountOpen + required: + - status + - message + - data + VerificationResolveCardBINResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: object + properties: + bin: + type: string + brand: + type: string + sub_brand: + type: string + country_code: + type: string + country_name: + type: string + card_type: + type: string + bank: + type: string + currency: + type: string + linked_bank_id: + type: integer + required: + - bin + - brand + - sub_brand + - country_code + - country_name + - card_type + - bank + - currency + - linked_bank_id + required: + - status + - message + - data + MiscellaneousListCountriesResponseArray: + type: object + properties: + id: + type: integer + active_for_dashboard_onboarding: + type: boolean + name: + type: string + iso_code: + type: string + default_currency_code: + type: string + integration_defaults: + type: object + calling_code: + type: string + pilot_mode: + type: boolean + relationships: + type: object + properties: + currency: + type: object + properties: + type: + type: string + data: + type: array + items: + type: string + supported_currencies: + type: object + properties: + NGN: + type: object + properties: + bank: + type: object + properties: + bank_type: + type: string + branch_code: + type: boolean + branch_code_type: + type: string + account_name: + type: boolean + account_verification_required: + type: boolean + account_number_label: + type: string + account_number_pattern: + type: object + properties: + exact_match: + type: boolean + pattern: + type: string + required: + - exact_match + - pattern + documents: + type: array + items: {} + show_account_number_tooltip: + type: boolean + required: + - bank_type + - branch_code + - branch_code_type + - account_name + - account_verification_required + - account_number_label + - account_number_pattern + - documents + - show_account_number_tooltip + required: + - bank + USD: + type: object + properties: + bank: + type: object + properties: + bank_type: + type: string + required_fields: + type: array + items: + type: string + branch_code: + type: boolean + branch_code_type: + type: string + account_name: + type: boolean + account_verification_required: + type: boolean + account_number_label: + type: string + account_number_pattern: + type: object + properties: + exact_match: + type: boolean + pattern: + type: string + required: + - exact_match + - pattern + documents: + type: array + items: {} + notices: + type: array + items: + type: string + required: + - bank_type + - required_fields + - branch_code + - branch_code_type + - account_name + - account_verification_required + - account_number_label + - account_number_pattern + - documents + - notices + required: + - bank + required: + - NGN + - USD + required: + - type + - data + - supported_currencies + integration_feature: + type: object + properties: + type: + type: string + data: + type: array + items: {} + required: + - type + - data + integration_type: + type: object + properties: + type: + type: string + data: + type: array + items: + type: string + required: + - type + - data + payment_method: + type: object + properties: + type: + type: string + data: + type: array + items: + type: string + required: + - type + - data + required: + - currency + - integration_feature + - integration_type + - payment_method + required: + - id + - active_for_dashboard_onboarding + - name + - iso_code + - default_currency_code + - integration_defaults + - calling_code + - pilot_mode + - relationships + MiscellaneousListCountriesResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: array + items: + $ref: '#/components/schemas/MiscellaneousListCountriesResponseArray' + required: + - status + - message + - data + MiscellaneousListStatesResponseArray: + type: object + properties: + name: + type: string + slug: + type: string + abbreviation: + type: string + required: + - name + - slug + - abbreviation + MiscellaneousListStatesResponse: + type: object + properties: + status: + type: boolean + message: + type: string + data: + type: array + items: + $ref: '#/components/schemas/MiscellaneousListStatesResponseArray' + required: + - status + - message + - data + responses: + TransactionInitializeBadRequestResponse: + description: Responses from the Transaction Initialize endpoint + content: + application/json: + schema: + $ref: '#/components/schemas/TransactionInitializeBadRequestModel' + Unauthorized: + description: Unauthorized operation + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + example: + status: false + message: Invalid key + NotFound: + description: Entity not found + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + example: + status: false + message: Entity not found + Ok: + description: Request successful + content: + application/json: + schema: + $ref: '#/components/schemas/Response' + TerminalGetStatusSuccess: + description: Terminal Get Status response + content: + application/json: + schema: + $ref: '#/components/schemas/TerminalGetStatusResponse' + TerminalListsSuccess: + description: Terminal Lists response + content: + application/json: + schema: + $ref: '#/components/schemas/TerminalListsResponse' + TerminalGetSuccess: + description: Terminal Get response + content: + application/json: + schema: + $ref: '#/components/schemas/TerminalGetResponse' + TerminalUpdateSuccess: + description: Terminal Update response + content: + application/json: + schema: + $ref: '#/components/schemas/TerminalUpdateResponse' + TerminalCommissionDeviceSuccess: + description: Terminal Commission Device response + content: + application/json: + schema: + $ref: '#/components/schemas/TerminalCommissionDeviceResponse' + TerminalDecommissionDeviceSuccess: + description: Terminal Decommission Device response + content: + application/json: + schema: + $ref: '#/components/schemas/TerminalDecommissionDeviceResponse' + VirtualTerminalListSuccess: + description: Virtual Terminal Lists response + content: + application/json: + schema: + $ref: '#/components/schemas/VirtualTerminalListResponse' + VirtualTerminalCreateSuccess: + description: Virtual Terminal Create response + content: + application/json: + schema: + $ref: '#/components/schemas/VirtualTerminalCreateResponse' + VirtualTerminalFetchSuccess: + description: Virtual Terminal Fetch response + content: + application/json: + schema: + $ref: '#/components/schemas/VirtualTerminalFetchResponse' + VirtualTerminalUpdateSuccess: + description: Virtual Terminal Update response + content: + application/json: + schema: + $ref: '#/components/schemas/VirtualTerminalUpdateResponse' + VirtualTerminalDeactivateSuccess: + description: Virtual Terminal Deactivate response + content: + application/json: + schema: + $ref: '#/components/schemas/VirtualTerminalDeactivateResponse' + VirtualTerminalDestinationAssignSuccess: + description: Virtual Terminal Deactivate response + content: + application/json: + schema: + $ref: '#/components/schemas/VirtualTerminalDestinationAssignResponse' + VirtualTerminalDestinationUnassignSuccess: + description: Virtual Terminal unassign response + content: + application/json: + schema: + $ref: '#/components/schemas/VirtualTerminalDestinationUnassignResponse' + VirtualTerminalAddSplitCodeSuccess: + description: Virtual Terminal Split Assign response + content: + application/json: + schema: + $ref: '#/components/schemas/VirtualTerminalAddSplitCodeResponse' + VirtualTerminalDeleteSplitCodeSuccess: + description: Virtual Terminal Split Remove response + content: + application/json: + schema: + $ref: '#/components/schemas/VirtualTerminalDeleteSplitCodeResponse' + CustomerAuthorizationInitializeSuccess: + description: Customer Authorization Initialize response + content: + application/json: + schema: + $ref: '#/components/schemas/CustomerAuthorizationInitializeResponse' + CustomerAuthorizationVerifySuccess: + description: Customer Authorization Verify response + content: + application/json: + schema: + $ref: '#/components/schemas/CustomerAuthorizationVerifyResponse' + CustomerInitializeDirectDebitSuccess: + description: Customer Initialize Direct Debit response + content: + application/json: + schema: + $ref: '#/components/schemas/CustomerInitializeDirectDebitResponse' + CustomerDirectDebitActivationChargeSuccess: + description: Customer Direct Debit Activation Charge response + content: + application/json: + schema: + $ref: '#/components/schemas/CustomerDirectDebitActivationChargeResponse' + CustomerFetchMandateAuthorizationsSuccess: + description: Customer Fetch Mandate Authorizations response + content: + application/json: + schema: + $ref: '#/components/schemas/CustomerFetchMandateAuthorizationsResponse' + DirectDebitActivationChargeSuccess: + description: Direct Debit Activation Charge response + content: + application/json: + schema: + $ref: '#/components/schemas/DirectDebitActivationChargeResponse' + ApplePayOkResponse: + description: Responses from the Transaction Initialize endpoint + content: + application/json: + schema: + $ref: '#/components/schemas/ApplePayCreateOkModel' + PlanListSuccess: + description: Plan List response + content: + application/json: + schema: + $ref: '#/components/schemas/PlanListResponse' + PlanCreateSuccess: + description: Plan Create response + content: + application/json: + schema: + $ref: '#/components/schemas/PlanCreateResponse' + PlanFetchSuccess: + description: Plan Fetch response + content: + application/json: + schema: + $ref: '#/components/schemas/PlanFetchResponse' + PlanUpdateSuccess: + description: Plan Update response + content: + application/json: + schema: + $ref: '#/components/schemas/PlanUpdateResponse' + SubscriptionListSuccess: + description: Subscription List response + content: + application/json: + schema: + $ref: '#/components/schemas/SubscriptionListResponse' + SubscriptionCreateSuccess: + description: Subscription Create response + content: + application/json: + schema: + $ref: '#/components/schemas/SubscriptionCreateResponse' + SubscriptionFetchSuccess: + description: Subscription Fetch response + content: + application/json: + schema: + $ref: '#/components/schemas/SubscriptionFetchResponse' + SubscriptionDisableSuccess: + description: Subscription Disable response + content: + application/json: + schema: + $ref: '#/components/schemas/SubscriptionDisableResponse' + PaymentRequestListSuccess: + description: Payment Request List response + content: + application/json: + schema: + $ref: '#/components/schemas/PaymentRequestListResponse' + PaymentRequestCreateSuccess: + description: Payment Request Create response + content: + application/json: + schema: + $ref: '#/components/schemas/PaymentRequestCreateResponse' + PaymentRequestUpdateSuccess: + description: Payment Request Update response + content: + application/json: + schema: + $ref: '#/components/schemas/PaymentRequestUpdateResponse' + PaymentRequestVerifySuccess: + description: Payment Request Verify response + content: + application/json: + schema: + $ref: '#/components/schemas/PaymentRequestVerifyResponse' + PaymentRequestSendNotificationSuccess: + description: Payment Request Send Notification response + content: + application/json: + schema: + $ref: '#/components/schemas/PaymentRequestSendNotificationResponse' + PaymentRequestTotalSuccess: + description: Payment Request Total response + content: + application/json: + schema: + $ref: '#/components/schemas/PaymentRequestTotalResponse' + PaymentRequestFinalizeSuccess: + description: Payment Request Finalize response + content: + application/json: + schema: + $ref: '#/components/schemas/PaymentRequestFinalizeResponse' + PaymentRequestArchiveSuccess: + description: Payment Request Archive response + content: + application/json: + schema: + $ref: '#/components/schemas/PaymentRequestArchiveResponse' + ProductListsSuccess: + description: Product Lists response + content: + application/json: + schema: + $ref: '#/components/schemas/ProductListsResponse' + ProductCreateSuccess: + description: Product Create response + content: + application/json: + schema: + $ref: '#/components/schemas/ProductCreateResponse' + ProductFetchSuccess: + description: Product Fetch response + content: + application/json: + schema: + $ref: '#/components/schemas/ProductFetchResponse' + ProductUpdateSuccess: + description: Product Update response + content: + application/json: + schema: + $ref: '#/components/schemas/ProductUpdateResponse' + ProductDeleteSuccess: + description: Product Delete response + content: + application/json: + schema: + $ref: '#/components/schemas/ProductDeleteResponse' + StorefrontListSuccess: + description: Storefront List response + content: + application/json: + schema: + $ref: '#/components/schemas/StorefrontListResponse' + StorefrontCreateSuccess: + description: Storefront Create response + content: + application/json: + schema: + $ref: '#/components/schemas/StorefrontCreateResponse' + StorefrontFetchSuccess: + description: Storefront Fetch response + content: + application/json: + schema: + $ref: '#/components/schemas/StorefrontFetchResponse' + StorefrontUpdateSuccess: + description: Storefront Update response + content: + application/json: + schema: + $ref: '#/components/schemas/StorefrontUpdateResponse' + StorefrontDeleteSuccess: + description: Storefront Delete response + content: + application/json: + schema: + $ref: '#/components/schemas/StorefrontDeleteResponse' + OrderListSuccess: + description: Order List response + content: + application/json: + schema: + $ref: '#/components/schemas/OrderListResponse' + OrderCreateSuccess: + description: Order Create response + content: + application/json: + schema: + $ref: '#/components/schemas/OrderCreateResponse' + OrderFetchSuccess: + description: Order Fetch response + content: + application/json: + schema: + $ref: '#/components/schemas/OrderFetchResponse' + OrderFetchProductSuccess: + description: Order Fetch Product response + content: + application/json: + schema: + $ref: '#/components/schemas/OrderFetchProductResponse' + OrderValidateSuccess: + description: Order Validate response + content: + application/json: + schema: + $ref: '#/components/schemas/OrderValidateResponse' + PageListSuccess: + description: Page List response + content: + application/json: + schema: + $ref: '#/components/schemas/PageListResponse' + PageCreateSuccess: + description: Page Create response + content: + application/json: + schema: + $ref: '#/components/schemas/PageCreateResponse' + PageFetchSuccess: + description: Page Fetch response + content: + application/json: + schema: + $ref: '#/components/schemas/PageFetchResponse' + PageUpdateSuccess: + description: Page Update response + content: + application/json: + schema: + $ref: '#/components/schemas/PageUpdateResponse' + PageCheckSlugAvailabilitySuccess: + description: Page Check Slug Availability response + content: + application/json: + schema: + $ref: '#/components/schemas/PageCheckSlugAvailabilityResponse' + PageAddProductsSuccess: + description: Page Add Products response + content: + application/json: + schema: + $ref: '#/components/schemas/PageAddProductsResponse' + RefundListSuccess: + description: Refund List response + content: + application/json: + schema: + $ref: '#/components/schemas/RefundListResponse' + RefundCreateSuccess: + description: Refund Create response + content: + application/json: + schema: + $ref: '#/components/schemas/RefundCreateResponse' + RefundRetrySuccess: + description: Refund Create response + content: + application/json: + schema: + $ref: '#/components/schemas/RefundRetryResponse' + RefundFetchSuccess: + description: Refund Fetch response + content: + application/json: + schema: + $ref: '#/components/schemas/RefundFetchResponse' + DisputeListSuccess: + description: Dispute List response + content: + application/json: + schema: + $ref: '#/components/schemas/DisputeListResponse' + DisputeFetchSuccess: + description: Dispute Fetch response + content: + application/json: + schema: + $ref: '#/components/schemas/DisputeFetchResponse' + DisputeUpdateSuccess: + description: Dispute Update response + content: + application/json: + schema: + $ref: '#/components/schemas/DisputeUpdateResponse' + DisputeUploadURLSuccess: + description: Dispute Upload URL response + content: + application/json: + schema: + $ref: '#/components/schemas/DisputeUploadURLResponse' + DisputeExportSuccess: + description: Dispute Export response + content: + application/json: + schema: + $ref: '#/components/schemas/DisputeExportResponse' + DisputeListTransactionSuccess: + description: Dispute List Transaction response + content: + application/json: + schema: + $ref: '#/components/schemas/DisputeListTransactionResponse' + DisputeResolveSuccess: + description: Dispute Resolve response + content: + application/json: + schema: + $ref: '#/components/schemas/DisputeResolveResponse' + DisputeAddEvidenceSuccess: + description: Dispute Add Evidence response + content: + application/json: + schema: + $ref: '#/components/schemas/DisputeAddEvidenceResponse' + MiscellaneousListBanksSuccess: + description: Miscellaneous List Banks response + content: + application/json: + schema: + $ref: '#/components/schemas/MiscellaneousListBanksResponse' + VerificationResolveAccountNumberSuccess: + description: Verification Resolve Account Number response + content: + application/json: + schema: + $ref: '#/components/schemas/VerificationResolveAccountNumberResponse' + VerificationValidateAccountSuccess: + description: Verification Validate Account response + content: + application/json: + schema: + $ref: '#/components/schemas/VerificationValidateAccountResponse' + VerificationResolveCardBINSuccess: + description: Verification Resolve Card B I N response + content: + application/json: + schema: + $ref: '#/components/schemas/VerificationResolveCardBINResponse' + MiscellaneousListCountriesSuccess: + description: Miscellaneous List Countries response + content: + application/json: + schema: + $ref: '#/components/schemas/MiscellaneousListCountriesResponse' + MiscellaneousListStatesSuccess: + description: Miscellaneous List States response + content: + application/json: + schema: + $ref: '#/components/schemas/MiscellaneousListStatesResponse' \ No newline at end of file diff --git a/src/openapi-parser.ts b/src/openapi-parser.ts new file mode 100644 index 0000000..6c1af88 --- /dev/null +++ b/src/openapi-parser.ts @@ -0,0 +1,245 @@ +import * as SwaggerParser from '@apidevtools/swagger-parser'; +import { OpenAPIV3 } from 'openapi-types'; +import { Oas } from './types'; + +export class OpenAPIParser { + /** + * The URL of the OpenAPI specification to be parsed. + * For a start, this only supports local file paths. + */ + private specURL: string; + private operations: Oas.PathsOperations = {}; + + constructor(specURL: string) { + this.specURL = specURL; + } + + async parse() { + try { + const api = (await SwaggerParser.default.parse( + this.specURL + )) as OpenAPIV3.Document; + this.buildOperationsMap(api); + } catch (error) { + console.error('Error parsing OpenAPI spec:', error); + } + } + + private parseModel( + name: string, + models: OpenAPIV3.ComponentsObject, + ): Oas.Body { + const { schemas } = models! + const model = schemas![name] as OpenAPIV3.SchemaObject; + const body = {} as Oas.Body; + body.properties = [] + + if (model.properties === undefined) { + body.properties.push({ ...model as Oas.BodyParam }) + return body + } + + const { properties, required, example } = model; + + Object.entries(properties).forEach(([key, property]) => { + let bodyParam = {} as Oas.BodyParam + + if ("$ref" in property) { + const name = property.$ref.split("/").pop()!; + // TODO: Consider parsing inner examples if available + // Maybe just merge to the top example + const { properties: innerParams } = this.parseModel(name, models) + + bodyParam = { + ...innerParams[0] + } + bodyParam.name = key + } else { + const tempProperty = property as OpenAPIV3.SchemaObject + bodyParam = { + name: key, + type: tempProperty.type!, + description: tempProperty.description ?? "", + required: + required === undefined + ? false + : required.includes(key) + ? true + : false, + }; + } + + body.properties.push(bodyParam); + }); + + if (example !== undefined) { + body.examples = example as Map + } + return body; + } + + private parseRequestBody( + schema: Oas.PropertySchema, + models: OpenAPIV3.ComponentsObject, + ): Oas.Body { + + if ("$ref" in schema) { + const name = schema.$ref.split("/").pop()!; + const body = this.parseModel(name, models); + + return body; + } + const body = {} as Oas.Body + body.properties = [] + + if ("type" in schema && schema.type === "array") { + const schemaPath = schema.items as OpenAPIV3.ReferenceObject; + const name = schemaPath.$ref.split("/").pop() + + const { properties, examples } = this.parseModel(name!, models) + const parent = { + name: "", + type: 'array', + required: true, + description: schema.description ?? "", + children: properties + } as Oas.BodyParam + + body.properties.push(parent) + body.examples = examples + + return body; + } + + if ("type" in schema && schema.type === "object") { + const [key, path] = Object.entries(schema.properties!)[0]; + const schemaPath = path as OpenAPIV3.ReferenceObject + const name = schemaPath.$ref.split("/").pop()!; + const { properties, examples } = this.parseModel(name, models) + const parent = { + name: key, + type: 'object', + required: schema.required ?? false, + description: schema.description ?? "", + children: properties + } as Oas.BodyParam + + body.properties.push(parent) + body.examples = examples + + return body; + } + + if ("allOf" in schema) { + // An object is being used here because the OAS examples are actually of + // the object type even though they're typed as Map + // Also, map isn't being parsed properly when writing to file + let mergedExamples = {} + + schema.allOf?.forEach((schema) => { + const { properties, examples } = this.parseRequestBody(schema, models) + body.properties.push(...properties) + + if (examples !== undefined) { + mergedExamples = { ...mergedExamples, ...examples } + } + }); + + body.examples = mergedExamples as Map + + return body + } + + return {} as Oas.Body; + } + + private parseParameters( + parameters: OpenAPIV3.ParameterObject[] + ): Oas.RequestParameter { + let result: Oas.RequestParameter = { + // header: [], + pathParameter: [], + queryParameter: [], + }; + + parameters.forEach((parameter) => { + const endpointParam: Oas.EndpointParam = { + name: parameter.name, + description: parameter.description ?? "", + required: parameter.required ?? false, + schema: parameter.schema as OpenAPIV3.SchemaObject, + example: parameter.example, + }; + + if (parameter.in === "query") { + result.queryParameter.push(endpointParam); + } + + if (parameter.in === "path") { + result.pathParameter.push(endpointParam); + } + }); + + return result; + } + + private buildOperationsMap(api: OpenAPIV3.Document) { + const { components, paths } = api; + + Object.entries(paths).forEach(([route, path]) => { + if (path === undefined) { + return; + } + + const { parameters: pathParameters, ...pathOperations } = path; + let parameters = pathParameters ?? []; + + Object.entries(pathOperations).forEach(([method, operation]) => { + const { + summary, + description, + operationId, + requestBody, + parameters: innerParams, + } = operation as OpenAPIV3.OperationObject; + + parameters = innerParams ? [...parameters, ...innerParams] : parameters; + + const partialOperation: Partial = { + name: summary, + path: route, + method: method as OpenAPIV3.HttpMethods, + description, + }; + + if (requestBody !== undefined) { + const { content } = requestBody as OpenAPIV3.RequestBodyObject; + const mediaType = content["application/json"]; + + const body = + mediaType.schema === undefined + ? {} as Oas.Body + : this.parseRequestBody(mediaType.schema, components!); + + partialOperation.requestBody = body + } + + if (parameters && parameters !== null && parameters.length > 0) { + const { pathParameter, queryParameter } = + this.parseParameters(parameters as OpenAPIV3.ParameterObject[]); + + // partialOperation.header = header; + partialOperation.pathParameter = pathParameter; + partialOperation.queryParameter = queryParameter; + } + + this.operations[operationId!] = partialOperation + }); + }); + } + + + getOperationById(operationId: string): Partial | undefined { + return this.operations[operationId]; + } +} \ No newline at end of file diff --git a/src/types/index.ts b/src/types/index.ts new file mode 100644 index 0000000..63e2edc --- /dev/null +++ b/src/types/index.ts @@ -0,0 +1 @@ +export * as Oas from "./openapi-components" \ No newline at end of file diff --git a/src/types/openapi-components.ts b/src/types/openapi-components.ts new file mode 100644 index 0000000..fa268c5 --- /dev/null +++ b/src/types/openapi-components.ts @@ -0,0 +1,63 @@ +import { OpenAPIV3 } from "openapi-types"; + + +export interface Operation { + // tag: string; + name: string; + path: string; + method: OpenAPIV3.HttpMethods; + description: string; + // operationId: string; + queryParameter: EndpointParam[] + pathParameter: EndpointParam[] + requestBody: Body; + // requestBody: OpenAPIV3.ReferenceObject | OpenAPIV3.RequestBodyObject; + // responses: OpenAPIV3.ResponsesObject; +} + +export type EndpointParam = { + name: string + description: string + required: boolean + schema: OpenAPIV3.SchemaObject + example: any +} + +export type BodyParam = { + name: string + type: string + description: string + items?: OpenAPIV3.SchemaObject + required?: boolean + example?: any + children?: BodyParam[] +} + +export type Body = { + properties: BodyParam[] + examples: Map +} + +export type RequestParameter = { + // header: EndpointParam[] + queryParameter: EndpointParam[] + pathParameter: EndpointParam[] +} + +export type BaseEndpoint = { + id: string + name: string + description: string + path: string + method: OpenAPIV3.HttpMethods + body: Body +} + +export type Endpoint = BaseEndpoint & RequestParameter +export type PathsOperations = Record>; +export type PropertySchema = OpenAPIV3.SchemaObject | OpenAPIV3.ReferenceObject; + +// export type OperationDetails = { +// path: string; +// method: HttpMethod; +// } \ No newline at end of file diff --git a/test/openapi-parser.spec.ts b/test/openapi-parser.spec.ts new file mode 100644 index 0000000..e9c3c35 --- /dev/null +++ b/test/openapi-parser.spec.ts @@ -0,0 +1,22 @@ +import assert from "node:assert"; +import path from "node:path"; +import { fileURLToPath } from "node:url"; +import { OpenAPIParser} from "../src/openapi-parser.js"; + +describe("OpenAPI parsing", () => { + // const __filename = fileURLToPath(import.meta.url); + // const __dirname = path.dirname(__filename); + const oasPath = path.join(__dirname, "../", "src/data/paystack.openapi.yaml"); + const openapi = new OpenAPIParser(oasPath); + + before(async () => { + await openapi.parse(); + }); + + describe("Get operation by ID", () => { + it("should return operation name given the operation ID", () => { + const op = openapi.getOperationById("transaction_partialDebit"); + assert.equal("Partial Debit", op?.name); + }); + }) +}); \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json index 28933fb..e650b61 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,8 +1,8 @@ { "compilerOptions": { "target": "ES2022", - "module": "Node16", - "moduleResolution": "Node16", + "module": "commonjs", + // "moduleResolution": "Node16", "outDir": "./build", "rootDir": "./src", "strict": true, @@ -10,6 +10,6 @@ "skipLibCheck": true, "forceConsistentCasingInFileNames": true }, - "include": ["src/**/*"], + "include": ["src/**/*", "tests/**/*"], "exclude": ["node_modules"] } \ No newline at end of file