@mojaloop/sdk-scheme-adapter 12.0.0 → 12.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (263) hide show
  1. package/.circleci/config.yml +619 -0
  2. package/.env.example +13 -0
  3. package/.nvmrc +1 -1
  4. package/.versionrc +1 -0
  5. package/CHANGELOG.md +28 -2
  6. package/CODEOWNERS +2 -0
  7. package/Dockerfile +35 -0
  8. package/LICENSE.md +10 -0
  9. package/PROXY.md +84 -0
  10. package/README.md +228 -0
  11. package/SECURITY.md +18 -0
  12. package/audit-resolve.json +45 -0
  13. package/docker/ml-testing-toolkit/secrets/keygen.sh +5 -0
  14. package/docker/ml-testing-toolkit/secrets/privatekey.pem +27 -0
  15. package/docker/ml-testing-toolkit/secrets/publickey.cer +21 -0
  16. package/docker/ml-testing-toolkit/secrets/tls/createSecrets.sh +29 -0
  17. package/docker/ml-testing-toolkit/secrets/tls/hub_client.csr +28 -0
  18. package/docker/ml-testing-toolkit/secrets/tls/hub_client_cacert.pem +32 -0
  19. package/docker/ml-testing-toolkit/secrets/tls/hub_client_cakey.key +51 -0
  20. package/docker/ml-testing-toolkit/secrets/tls/hub_client_key.key +51 -0
  21. package/docker/ml-testing-toolkit/secrets/tls/hub_server.csr +28 -0
  22. package/docker/ml-testing-toolkit/secrets/tls/hub_server_cacert.pem +32 -0
  23. package/docker/ml-testing-toolkit/secrets/tls/hub_server_cacert.srl +1 -0
  24. package/docker/ml-testing-toolkit/secrets/tls/hub_server_cakey.key +51 -0
  25. package/docker/ml-testing-toolkit/secrets/tls/hub_server_cert.pem +33 -0
  26. package/docker/ml-testing-toolkit/secrets/tls/hub_server_key.key +51 -0
  27. package/docker/ml-testing-toolkit/secrets/tls/openssl.conf +17 -0
  28. package/docker/ml-testing-toolkit/spec_files/api_definitions/central_admin_9.3/api_spec.yaml +2450 -0
  29. package/docker/ml-testing-toolkit/spec_files/api_definitions/central_admin_9.3/response_map.json +96 -0
  30. package/docker/ml-testing-toolkit/spec_files/api_definitions/fspiop_1.0/api_spec.yaml +4187 -0
  31. package/docker/ml-testing-toolkit/spec_files/api_definitions/fspiop_1.0/callback_map.json +542 -0
  32. package/docker/ml-testing-toolkit/spec_files/api_definitions/fspiop_1.0/mockRef.json +83 -0
  33. package/docker/ml-testing-toolkit/spec_files/api_definitions/fspiop_1.0/trigger_templates/transaction_request_followup.json +125 -0
  34. package/docker/ml-testing-toolkit/spec_files/api_definitions/fspiop_1.1/api_spec.yaml +3703 -0
  35. package/docker/ml-testing-toolkit/spec_files/api_definitions/fspiop_1.1/callback_map.json +568 -0
  36. package/docker/ml-testing-toolkit/spec_files/api_definitions/fspiop_1.1/mockRef.json +83 -0
  37. package/docker/ml-testing-toolkit/spec_files/api_definitions/fspiop_1.1/trigger_templates/transaction_request_followup.json +125 -0
  38. package/docker/ml-testing-toolkit/spec_files/api_definitions/settlements_1.0/api_spec.yaml +983 -0
  39. package/docker/ml-testing-toolkit/spec_files/api_definitions/settlements_1.0/mockRef.json +38 -0
  40. package/docker/ml-testing-toolkit/spec_files/api_definitions/settlements_1.0/response_map.json +34 -0
  41. package/docker/ml-testing-toolkit/spec_files/reports/templates/newman/html_template.html +1074 -0
  42. package/docker/ml-testing-toolkit/spec_files/reports/templates/newman/pdf_template.html +765 -0
  43. package/docker/ml-testing-toolkit/spec_files/reports/templates/newman/script.js +98 -0
  44. package/docker/ml-testing-toolkit/spec_files/rules_callback/config.json +3 -0
  45. package/docker/ml-testing-toolkit/spec_files/rules_callback/default.json +426 -0
  46. package/docker/ml-testing-toolkit/spec_files/rules_response/config.json +3 -0
  47. package/docker/ml-testing-toolkit/spec_files/rules_response/default.json +1623 -0
  48. package/docker/ml-testing-toolkit/spec_files/rules_response/default_pisp_rules.json +161 -0
  49. package/docker/ml-testing-toolkit/spec_files/rules_validation/config.json +3 -0
  50. package/docker/ml-testing-toolkit/spec_files/rules_validation/default.json +672 -0
  51. package/docker/ml-testing-toolkit/spec_files/system_config.json +62 -0
  52. package/docker/ml-testing-toolkit/spec_files/user_config.json +45 -0
  53. package/docker/wait4/setup_hosts_file.sh +25 -0
  54. package/docker/wait4/wait4.config.js +71 -0
  55. package/docker/wait4/wait4.js +204 -0
  56. package/docker-compose.yml +67 -0
  57. package/docs/Mojaloop - Modusbox Onboarding functionality.pdf +0 -0
  58. package/docs/dfspInboundApi.yaml +1091 -0
  59. package/jest.config.js +4 -1
  60. package/package.json +17 -17
  61. package/secrets/jwsSigningKey.key +27 -0
  62. package/secrets/jwsVerificationKeys/mojaloop-sdk.pem +9 -0
  63. package/secrets/jwsVerificationKeys/switch.pem +9 -0
  64. package/sequences.puml +99 -0
  65. package/src/ControlAgent/index.js +221 -0
  66. package/{TestServer → src/ControlServer}/handlers.js +0 -0
  67. package/src/ControlServer/index.js +294 -0
  68. package/{InboundServer → src/InboundServer}/api.yaml +0 -0
  69. package/src/InboundServer/api_template.yaml +69 -0
  70. package/{InboundServer → src/InboundServer}/handlers.js +0 -0
  71. package/{InboundServer → src/InboundServer}/index.js +33 -1
  72. package/{InboundServer → src/InboundServer}/middlewares.js +0 -0
  73. package/src/OAuthTestServer/index.js +127 -0
  74. package/{OAuthTestServer → src/OAuthTestServer}/model.js +0 -0
  75. package/{OutboundServer → src/OutboundServer}/api.yaml +0 -0
  76. package/{OutboundServer → src/OutboundServer}/api_interfaces/index.d.ts +0 -0
  77. package/{OutboundServer → src/OutboundServer}/api_interfaces/openapi.d.ts +0 -0
  78. package/{OutboundServer → src/OutboundServer}/api_template/components/parameters/bulkQuoteId.yaml +1 -1
  79. package/{OutboundServer → src/OutboundServer}/api_template/components/parameters/bulkTransferId.yaml +1 -1
  80. package/{OutboundServer → src/OutboundServer}/api_template/components/parameters/requestToPayTransactionId.yaml +1 -1
  81. package/{OutboundServer → src/OutboundServer}/api_template/components/parameters/transferId.yaml +1 -1
  82. package/{OutboundServer → src/OutboundServer}/api_template/components/responses/accountsCreationCompleted.yaml +0 -0
  83. package/{OutboundServer → src/OutboundServer}/api_template/components/responses/accountsCreationError.yaml +0 -0
  84. package/{OutboundServer → src/OutboundServer}/api_template/components/responses/accountsCreationTimeout.yaml +0 -0
  85. package/{OutboundServer → src/OutboundServer}/api_template/components/responses/bulkQuoteBadRequest.yaml +0 -0
  86. package/{OutboundServer → src/OutboundServer}/api_template/components/responses/bulkQuoteServerError.yaml +0 -0
  87. package/{OutboundServer → src/OutboundServer}/api_template/components/responses/bulkQuoteSuccess.yaml +0 -0
  88. package/{OutboundServer → src/OutboundServer}/api_template/components/responses/bulkQuoteTimeout.yaml +0 -0
  89. package/{OutboundServer → src/OutboundServer}/api_template/components/responses/bulkTransferBadRequest.yaml +0 -0
  90. package/{OutboundServer → src/OutboundServer}/api_template/components/responses/bulkTransferServerError.yaml +0 -0
  91. package/{OutboundServer → src/OutboundServer}/api_template/components/responses/bulkTransferSuccess.yaml +0 -0
  92. package/{OutboundServer → src/OutboundServer}/api_template/components/responses/bulkTransferTimeout.yaml +0 -0
  93. package/{OutboundServer → src/OutboundServer}/api_template/components/responses/partiesByIdError404.yaml +1 -1
  94. package/{OutboundServer → src/OutboundServer}/api_template/components/responses/partiesByIdSuccess.yaml +0 -0
  95. package/{OutboundServer → src/OutboundServer}/api_template/components/responses/quotesPostSuccess.yaml +0 -0
  96. package/{OutboundServer → src/OutboundServer}/api_template/components/responses/quotesServerError.yaml +0 -0
  97. package/{OutboundServer → src/OutboundServer}/api_template/components/responses/requestToPaySuccess.yaml +0 -0
  98. package/{OutboundServer → src/OutboundServer}/api_template/components/responses/requestToPayTransferBadRequest.yaml +0 -0
  99. package/{OutboundServer → src/OutboundServer}/api_template/components/responses/requestToPayTransferSuccess.yaml +0 -0
  100. package/{OutboundServer → src/OutboundServer}/api_template/components/responses/simpleTransfersPostSuccess.yaml +0 -0
  101. package/{OutboundServer → src/OutboundServer}/api_template/components/responses/simpleTransfersServerError.yaml +0 -0
  102. package/{OutboundServer → src/OutboundServer}/api_template/components/responses/transferBadRequest.yaml +0 -0
  103. package/{OutboundServer → src/OutboundServer}/api_template/components/responses/transferServerError.yaml +0 -0
  104. package/{OutboundServer → src/OutboundServer}/api_template/components/responses/transferSuccess.yaml +0 -0
  105. package/{OutboundServer → src/OutboundServer}/api_template/components/responses/transferTimeout.yaml +0 -0
  106. package/src/OutboundServer/api_template/components/schemas/accountCreationStatus.yaml +18 -0
  107. package/{OutboundServer → src/OutboundServer}/api_template/components/schemas/accountsCreationState.yaml +0 -0
  108. package/src/OutboundServer/api_template/components/schemas/accountsRequest.yaml +20 -0
  109. package/{OutboundServer → src/OutboundServer}/api_template/components/schemas/accountsResponse.yaml +1 -1
  110. package/{OutboundServer → src/OutboundServer}/api_template/components/schemas/async2SyncCurrentState.yaml +0 -0
  111. package/{OutboundServer → src/OutboundServer}/api_template/components/schemas/bulkQuoteErrorResponse.yaml +0 -0
  112. package/{OutboundServer → src/OutboundServer}/api_template/components/schemas/bulkQuoteRequest.yaml +2 -2
  113. package/{OutboundServer → src/OutboundServer}/api_template/components/schemas/bulkQuoteResponse.yaml +1 -1
  114. package/{OutboundServer → src/OutboundServer}/api_template/components/schemas/bulkQuoteStatus.yaml +0 -0
  115. package/{OutboundServer → src/OutboundServer}/api_template/components/schemas/bulkQuoteStatusResponse.yaml +1 -1
  116. package/{OutboundServer → src/OutboundServer}/api_template/components/schemas/bulkTransferErrorResponse.yaml +0 -0
  117. package/{OutboundServer → src/OutboundServer}/api_template/components/schemas/bulkTransferRequest.yaml +2 -2
  118. package/{OutboundServer → src/OutboundServer}/api_template/components/schemas/bulkTransferResponse.yaml +1 -1
  119. package/{OutboundServer → src/OutboundServer}/api_template/components/schemas/bulkTransferStatus.yaml +0 -0
  120. package/{OutboundServer → src/OutboundServer}/api_template/components/schemas/bulkTransferStatusResponse.yaml +1 -1
  121. package/{OutboundServer → src/OutboundServer}/api_template/components/schemas/errorAccountsResponse.yaml +0 -0
  122. package/{OutboundServer → src/OutboundServer}/api_template/components/schemas/errorQuotesResponse.yaml +0 -0
  123. package/{OutboundServer → src/OutboundServer}/api_template/components/schemas/errorResponse.yaml +0 -0
  124. package/{OutboundServer → src/OutboundServer}/api_template/components/schemas/errorSimpleTransfersResponse.yaml +0 -0
  125. package/{OutboundServer → src/OutboundServer}/api_template/components/schemas/errorTransferResponse.yaml +0 -0
  126. package/src/OutboundServer/api_template/components/schemas/extensionListEmptiable.yaml +6 -0
  127. package/src/OutboundServer/api_template/components/schemas/individualQuote.yaml +32 -0
  128. package/{OutboundServer → src/OutboundServer}/api_template/components/schemas/individualQuoteResult.yaml +5 -5
  129. package/src/OutboundServer/api_template/components/schemas/individualTransfer.yaml +32 -0
  130. package/{OutboundServer → src/OutboundServer}/api_template/components/schemas/individualTransferFulfilment.yaml +2 -2
  131. package/{OutboundServer → src/OutboundServer}/api_template/components/schemas/individualTransferResult.yaml +6 -6
  132. package/src/OutboundServer/api_template/components/schemas/mojaloopError.yaml +5 -0
  133. package/src/OutboundServer/api_template/components/schemas/mojaloopTransactionRequestState.yaml +2 -0
  134. package/{OutboundServer → src/OutboundServer}/api_template/components/schemas/partiesByIdResponse.yaml +1 -1
  135. package/src/OutboundServer/api_template/components/schemas/quote.yaml +3 -0
  136. package/{OutboundServer → src/OutboundServer}/api_template/components/schemas/quoteError.yaml +0 -0
  137. package/src/OutboundServer/api_template/components/schemas/quotesPostRequest.yaml +13 -0
  138. package/src/OutboundServer/api_template/components/schemas/quotesPostResponse.yaml +48 -0
  139. package/src/OutboundServer/api_template/components/schemas/requestToPayRequest.yaml +39 -0
  140. package/src/OutboundServer/api_template/components/schemas/requestToPayResponse.yaml +41 -0
  141. package/src/OutboundServer/api_template/components/schemas/requestToPayTransferRequest.yaml +42 -0
  142. package/{OutboundServer → src/OutboundServer}/api_template/components/schemas/requestToPayTransferResponse.yaml +6 -6
  143. package/{OutboundServer → src/OutboundServer}/api_template/components/schemas/simpleTransferServerError.yaml +0 -0
  144. package/src/OutboundServer/api_template/components/schemas/simpleTransfersPostRequest.yaml +12 -0
  145. package/{OutboundServer → src/OutboundServer}/api_template/components/schemas/simpleTransfersPostResponse.yaml +1 -1
  146. package/{OutboundServer → src/OutboundServer}/api_template/components/schemas/transactionType.yaml +0 -0
  147. package/{OutboundServer → src/OutboundServer}/api_template/components/schemas/transferContinuationAcceptOTP.yaml +0 -0
  148. package/{OutboundServer → src/OutboundServer}/api_template/components/schemas/transferContinuationAcceptParty.yaml +0 -0
  149. package/{OutboundServer → src/OutboundServer}/api_template/components/schemas/transferContinuationAcceptQuote.yaml +0 -0
  150. package/{OutboundServer → src/OutboundServer}/api_template/components/schemas/transferError.yaml +0 -0
  151. package/src/OutboundServer/api_template/components/schemas/transferFulfilment.yaml +3 -0
  152. package/src/OutboundServer/api_template/components/schemas/transferParty.yaml +40 -0
  153. package/{OutboundServer → src/OutboundServer}/api_template/components/schemas/transferRequest.yaml +4 -4
  154. package/{OutboundServer → src/OutboundServer}/api_template/components/schemas/transferResponse.yaml +6 -6
  155. package/{OutboundServer → src/OutboundServer}/api_template/components/schemas/transferStatus.yaml +0 -0
  156. package/{OutboundServer → src/OutboundServer}/api_template/components/schemas/transferStatusResponse.yaml +1 -1
  157. package/{OutboundServer → src/OutboundServer}/api_template/health.yaml +0 -0
  158. package/{OutboundServer → src/OutboundServer}/api_template/openapi.yaml +0 -0
  159. package/{OutboundServer → src/OutboundServer}/api_template/paths/accounts.yaml +0 -0
  160. package/{OutboundServer → src/OutboundServer}/api_template/paths/bulkQuotes.yaml +0 -0
  161. package/{OutboundServer → src/OutboundServer}/api_template/paths/bulkQuotes_bulkQuoteId.yaml +0 -0
  162. package/{OutboundServer → src/OutboundServer}/api_template/paths/bulkTransfers.yaml +0 -0
  163. package/{OutboundServer → src/OutboundServer}/api_template/paths/bulkTransfers_bulkTransferId.yaml +0 -0
  164. package/{OutboundServer → src/OutboundServer}/api_template/paths/parties_Type_ID.yaml +2 -2
  165. package/{OutboundServer → src/OutboundServer}/api_template/paths/parties_Type_ID_SubId.yaml +3 -3
  166. package/{OutboundServer → src/OutboundServer}/api_template/paths/quotes.yaml +0 -0
  167. package/{OutboundServer → src/OutboundServer}/api_template/paths/requestToPay.yaml +0 -0
  168. package/{OutboundServer → src/OutboundServer}/api_template/paths/requestToPayTransfer.yaml +0 -0
  169. package/{OutboundServer → src/OutboundServer}/api_template/paths/requestToPayTransfer_requestToPayTransactionId.yaml +0 -0
  170. package/{OutboundServer → src/OutboundServer}/api_template/paths/simpleTransfers.yaml +0 -0
  171. package/{OutboundServer → src/OutboundServer}/api_template/paths/transfers.yaml +0 -0
  172. package/{OutboundServer → src/OutboundServer}/api_template/paths/transfers_transferId.yaml +0 -0
  173. package/{OutboundServer → src/OutboundServer}/handlers.js +0 -0
  174. package/{OutboundServer → src/OutboundServer}/index.js +15 -0
  175. package/{OutboundServer → src/OutboundServer}/middlewares.js +0 -0
  176. package/{TestServer → src/TestServer}/api.yaml +0 -0
  177. package/src/TestServer/handlers.js +63 -0
  178. package/{TestServer → src/TestServer}/index.js +31 -0
  179. package/{config.js → src/config.js} +6 -0
  180. package/{index.d.ts → src/index.d.ts} +0 -0
  181. package/{index.js → src/index.js} +0 -0
  182. package/{lib → src/lib}/api/index.js +0 -0
  183. package/{lib → src/lib}/cache.js +0 -0
  184. package/{lib → src/lib}/check.js +0 -0
  185. package/{lib → src/lib}/model/AccountsModel.js +0 -0
  186. package/{lib → src/lib}/model/Async2SyncModel.js +0 -0
  187. package/{lib → src/lib}/model/InboundTransfersModel.js +0 -0
  188. package/{lib → src/lib}/model/OutboundBulkQuotesModel.js +0 -0
  189. package/{lib → src/lib}/model/OutboundBulkTransfersModel.js +0 -0
  190. package/{lib → src/lib}/model/OutboundRequestToPayModel.js +0 -0
  191. package/{lib → src/lib}/model/OutboundRequestToPayTransferModel.js +0 -0
  192. package/{lib → src/lib}/model/OutboundTransfersModel.js +0 -0
  193. package/{lib → src/lib}/model/PartiesModel.js +0 -0
  194. package/{lib → src/lib}/model/ProxyModel/MatchRules/Expression.js +0 -0
  195. package/{lib → src/lib}/model/ProxyModel/MatchRules/Headers.js +0 -0
  196. package/{lib → src/lib}/model/ProxyModel/MatchRules/MatchRule.js +0 -0
  197. package/{lib → src/lib}/model/ProxyModel/MatchRules/Path.js +0 -0
  198. package/{lib → src/lib}/model/ProxyModel/MatchRules/Query.js +0 -0
  199. package/{lib → src/lib}/model/ProxyModel/MatchRules/index.js +0 -0
  200. package/{lib → src/lib}/model/ProxyModel/Route.js +0 -0
  201. package/{lib → src/lib}/model/ProxyModel/configSchema.json +0 -0
  202. package/{lib → src/lib}/model/ProxyModel/index.js +0 -0
  203. package/{lib → src/lib}/model/QuotesModel.js +0 -0
  204. package/{lib → src/lib}/model/TransfersModel.js +0 -0
  205. package/{lib → src/lib}/model/common/BackendError.js +0 -0
  206. package/{lib → src/lib}/model/common/PersistentStateMachine.js +0 -0
  207. package/{lib → src/lib}/model/common/index.js +0 -0
  208. package/{lib → src/lib}/model/index.js +0 -0
  209. package/{lib → src/lib}/model/lib/deferredJob.js +0 -0
  210. package/{lib → src/lib}/model/lib/index.js +0 -0
  211. package/{lib → src/lib}/model/lib/requests/backendRequests.js +0 -0
  212. package/{lib → src/lib}/model/lib/requests/common.js +0 -0
  213. package/{lib → src/lib}/model/lib/requests/index.js +0 -0
  214. package/{lib → src/lib}/model/lib/shared.js +0 -0
  215. package/{lib → src/lib}/randomphrase/index.js +0 -0
  216. package/{lib → src/lib}/randomphrase/words.json +0 -0
  217. package/{lib → src/lib}/router.js +0 -0
  218. package/{lib → src/lib}/validate.js +0 -0
  219. package/test/config/integration.env +9 -0
  220. package/test/integration/lib/cache.test.js +3 -3
  221. package/test/unit/ControlClient.test.js +113 -0
  222. package/test/unit/ControlServer/events.js +41 -0
  223. package/test/unit/ControlServer/index.js +231 -0
  224. package/test/unit/ControlServer.test.js +126 -0
  225. package/test/unit/InboundServer.test.js +5 -5
  226. package/test/unit/TestServer.test.js +5 -5
  227. package/test/unit/api/utils.js +5 -5
  228. package/test/unit/config.test.js +11 -10
  229. package/test/unit/inboundApi/handlers.test.js +6 -6
  230. package/test/unit/index.test.js +2 -1
  231. package/test/unit/lib/cache.test.js +1 -1
  232. package/test/unit/lib/model/AccountsModel.test.js +2 -2
  233. package/test/unit/lib/model/InboundTransfersModel.test.js +5 -5
  234. package/test/unit/lib/model/OutboundBulkQuotesModel.test.js +2 -2
  235. package/test/unit/lib/model/OutboundBulkTransfersModel.test.js +2 -2
  236. package/test/unit/lib/model/OutboundRequestToPayModel.test.js +3 -3
  237. package/test/unit/lib/model/OutboundRequestToPayTransferModel.test.js +2 -2
  238. package/test/unit/lib/model/OutboundTransfersModel.test.js +3 -3
  239. package/test/unit/lib/model/PartiesModel.test.js +28 -28
  240. package/test/unit/lib/model/QuotesModel.test.js +31 -31
  241. package/test/unit/lib/model/TransfersModel.test.js +3 -3
  242. package/test/unit/lib/model/common/PersistentStateMachine.test.js +13 -13
  243. package/test/unit/lib/model/mockedLibRequests.js +1 -1
  244. package/test/unit/outboundApi/handlers.test.js +3 -3
  245. package/.eslintignore +0 -2
  246. package/InboundServer/api_template.yaml +0 -69
  247. package/OAuthTestServer/index.js +0 -66
  248. package/OutboundServer/api_template/components/schemas/accountCreationStatus.yaml +0 -18
  249. package/OutboundServer/api_template/components/schemas/accountsRequest.yaml +0 -20
  250. package/OutboundServer/api_template/components/schemas/extensionListEmptiable.yaml +0 -6
  251. package/OutboundServer/api_template/components/schemas/individualQuote.yaml +0 -32
  252. package/OutboundServer/api_template/components/schemas/individualTransfer.yaml +0 -32
  253. package/OutboundServer/api_template/components/schemas/mojaloopError.yaml +0 -5
  254. package/OutboundServer/api_template/components/schemas/mojaloopTransactionRequestState.yaml +0 -2
  255. package/OutboundServer/api_template/components/schemas/quote.yaml +0 -3
  256. package/OutboundServer/api_template/components/schemas/quotesPostRequest.yaml +0 -13
  257. package/OutboundServer/api_template/components/schemas/quotesPostResponse.yaml +0 -48
  258. package/OutboundServer/api_template/components/schemas/requestToPayRequest.yaml +0 -39
  259. package/OutboundServer/api_template/components/schemas/requestToPayResponse.yaml +0 -41
  260. package/OutboundServer/api_template/components/schemas/requestToPayTransferRequest.yaml +0 -42
  261. package/OutboundServer/api_template/components/schemas/simpleTransfersPostRequest.yaml +0 -12
  262. package/OutboundServer/api_template/components/schemas/transferFulfilment.yaml +0 -3
  263. package/OutboundServer/api_template/components/schemas/transferParty.yaml +0 -40
@@ -0,0 +1,1091 @@
1
+ openapi: 3.0.1
2
+ info:
3
+ title: Mojaloop SDK Inbound Scheme Adapter API
4
+ description: >
5
+ API specification for the Mojaloop SDK Inbound Scheme Adapter API – to be implemented by the Digital Financial Service Provider's (DFSP) backend.
6
+
7
+
8
+ **Note on terminology:** The term "Switch" is equal to the term "Hub", and the term "FSP" is equal to the term "DFSP".
9
+ license:
10
+ name: Apache License Version 2.0, January 2004
11
+ url: http://www.apache.org/licenses/
12
+ version: 1.1.0
13
+
14
+ paths:
15
+ /participants/{idType}/{idValue}:
16
+ get:
17
+ summary: Asks for the identifier (fspId) of the scheme participant (FSP) that can handle transfers for the specified identifier type and value
18
+ description: The HTTP request `GET /participants/{idType}/{idValue}` is used to find out in which FSP the requested party, defined by `{idType}` and `{idValue}`, is located.
19
+ tags:
20
+ - Participants
21
+ parameters:
22
+ - $ref: '#/components/parameters/idType'
23
+ - $ref: '#/components/parameters/idValue'
24
+ responses:
25
+ 200:
26
+ description: Response containing details of the requested party
27
+ content:
28
+ application/json:
29
+ schema:
30
+ $ref: '#/components/schemas/participantsResponse'
31
+ 400:
32
+ $ref: '#/components/responses/400'
33
+ 404:
34
+ $ref: '#/components/responses/404'
35
+ 500:
36
+ $ref: '#/components/responses/500'
37
+
38
+ /participants/{idType}/{idValue}/{idSubValue}:
39
+ get:
40
+ summary: Asks for the identifier (fspId) of the scheme participant (FSP) that can handle transfers for the specified identifier type and value
41
+ description: The HTTP request `GET /participants/{idType}/{idValue}/{idSubValue}` is used to find out in which FSP the requested party, defined by `{idType}`, `{idValue}` and `{idSubValue}` is located.
42
+ tags:
43
+ - Participants
44
+ parameters:
45
+ - $ref: '#/components/parameters/idType'
46
+ - $ref: '#/components/parameters/idValue'
47
+ - $ref: '#/components/parameters/idSubValue'
48
+ responses:
49
+ 200:
50
+ description: Response containing details of the requested party
51
+ content:
52
+ application/json:
53
+ schema:
54
+ $ref: '#/components/schemas/participantsResponse'
55
+ 400:
56
+ $ref: '#/components/responses/400'
57
+ 404:
58
+ $ref: '#/components/responses/404'
59
+ 500:
60
+ $ref: '#/components/responses/500'
61
+
62
+ /parties/{idType}/{idValue}:
63
+ get:
64
+ summary: Requests information relating to a transfer party identified by the specified identifier type and value
65
+ description: The HTTP request `GET /parties/{idType}/{idValue}` is used to look up information regarding the requested transfer party, identified by `{idType}` and `{idValue}`.
66
+ tags:
67
+ - Parties
68
+ parameters:
69
+ - $ref: '#/components/parameters/idType'
70
+ - $ref: '#/components/parameters/idValue'
71
+ responses:
72
+ 200:
73
+ description: Response containing details of the requested party
74
+ content:
75
+ application/json:
76
+ schema:
77
+ $ref: '#/components/schemas/transferParty'
78
+ 400:
79
+ $ref: '#/components/responses/400'
80
+ 404:
81
+ $ref: '#/components/responses/404'
82
+ 500:
83
+ $ref: '#/components/responses/500'
84
+
85
+ /parties/{idType}/{idValue}/{idSubValue}:
86
+ get:
87
+ summary: Requests information relating to a transfer party identified by the specified identifier type and value
88
+ description: The HTTP request `GET /parties/{idType}/{idValue}/{idSubValue}` is used to look up information regarding the requested transfer party, identified by `{idType}`, `{idValue}` and `{idSubValue}`.
89
+ tags:
90
+ - Parties
91
+ parameters:
92
+ - $ref: '#/components/parameters/idType'
93
+ - $ref: '#/components/parameters/idValue'
94
+ - $ref: '#/components/parameters/idSubValue'
95
+ responses:
96
+ 200:
97
+ description: Response containing details of the requested party
98
+ content:
99
+ application/json:
100
+ schema:
101
+ $ref: '#/components/schemas/transferParty'
102
+ 400:
103
+ $ref: '#/components/responses/400'
104
+ 404:
105
+ $ref: '#/components/responses/404'
106
+ 500:
107
+ $ref: '#/components/responses/500'
108
+
109
+ /quoterequests:
110
+ post:
111
+ summary: Requests a quote for the specified transfer
112
+ description: The HTTP request `POST /quoterequests` is used to request the creation of a quote for the provided financial transaction.
113
+ tags:
114
+ - Quotes
115
+ requestBody:
116
+ description: Request for a transfer quotation
117
+ content:
118
+ application/json:
119
+ schema:
120
+ $ref: '#/components/schemas/quoteRequest'
121
+ responses:
122
+ 200:
123
+ description: A response to the transfer quotation request
124
+ content:
125
+ application/json:
126
+ schema:
127
+ $ref: '#/components/schemas/quoteResponse'
128
+ 400:
129
+ $ref: '#/components/responses/400'
130
+ 500:
131
+ $ref: '#/components/responses/500'
132
+
133
+ /transfers:
134
+ post:
135
+ summary: Transfers funds from an external account to an internal account
136
+ description: The HTTP request `POST /transfers` is used to request the creation of a transfer for the transfer party.
137
+ tags:
138
+ - Transfers
139
+ requestBody:
140
+ description: An incoming transfer request
141
+ content:
142
+ application/json:
143
+ schema:
144
+ $ref: '#/components/schemas/transferRequest'
145
+ responses:
146
+ 200:
147
+ description: The transfer was accepted
148
+ content:
149
+ application/json:
150
+ schema:
151
+ $ref: '#/components/schemas/transferResponse'
152
+ 400:
153
+ $ref: '#/components/responses/400'
154
+ 500:
155
+ $ref: '#/components/responses/500'
156
+
157
+ /transfers/{transferId}:
158
+ parameters:
159
+ - $ref: '#/components/parameters/transferId'
160
+ get:
161
+ summary: Retrieves information for a specific transfer
162
+ description: The HTTP request `GET /transfers/{transferId}` is used to get information regarding a transfer created or requested earlier. The `{transferId}` in the URI should contain the `transferId` that was used for the creation of the transfer.
163
+ tags:
164
+ - Transfers
165
+ responses:
166
+ 200:
167
+ description: The transfer was accepted
168
+ content:
169
+ application/json:
170
+ schema:
171
+ $ref: '#/components/schemas/transferDetailsResponse'
172
+ 500:
173
+ $ref: '#/components/responses/500'
174
+ put:
175
+ summary: Receive notification for a specific transfer
176
+ description: The HTTP request `PUT /transfers/{transferId}` is used to receive notification for transfer being fulfiled when the FSP is a Payee
177
+ tags:
178
+ - Transfers
179
+ requestBody:
180
+ description: An incoming notification for fulfiled transfer
181
+ content:
182
+ application/json:
183
+ schema:
184
+ $ref: '#/components/schemas/fulfilNotification'
185
+ responses:
186
+ 200:
187
+ description: The notification was accepted
188
+ 500:
189
+ $ref: '#/components/responses/500'
190
+
191
+ components:
192
+ schemas:
193
+
194
+ amountType:
195
+ type: string
196
+ enum:
197
+ - SEND
198
+ - RECEIVE
199
+ description: SEND for send amount, RECEIVE for receive amount.
200
+
201
+ currency:
202
+ maxLength: 3
203
+ minLength: 3
204
+ type: string
205
+ enum:
206
+ - AED
207
+ - AFN
208
+ - ALL
209
+ - AMD
210
+ - ANG
211
+ - AOA
212
+ - ARS
213
+ - AUD
214
+ - AWG
215
+ - AZN
216
+ - BAM
217
+ - BBD
218
+ - BDT
219
+ - BGN
220
+ - BHD
221
+ - BIF
222
+ - BMD
223
+ - BND
224
+ - BOB
225
+ - BRL
226
+ - BSD
227
+ - BTN
228
+ - BWP
229
+ - BYN
230
+ - BZD
231
+ - CAD
232
+ - CDF
233
+ - CHF
234
+ - CLP
235
+ - CNY
236
+ - COP
237
+ - CRC
238
+ - CUC
239
+ - CUP
240
+ - CVE
241
+ - CZK
242
+ - DJF
243
+ - DKK
244
+ - DOP
245
+ - DZD
246
+ - EGP
247
+ - ERN
248
+ - ETB
249
+ - EUR
250
+ - FJD
251
+ - FKP
252
+ - GBP
253
+ - GEL
254
+ - GGP
255
+ - GHS
256
+ - GIP
257
+ - GMD
258
+ - GNF
259
+ - GTQ
260
+ - GYD
261
+ - HKD
262
+ - HNL
263
+ - HRK
264
+ - HTG
265
+ - HUF
266
+ - IDR
267
+ - ILS
268
+ - IMP
269
+ - INR
270
+ - IQD
271
+ - IRR
272
+ - ISK
273
+ - JEP
274
+ - JMD
275
+ - JOD
276
+ - JPY
277
+ - KES
278
+ - KGS
279
+ - KHR
280
+ - KMF
281
+ - KPW
282
+ - KRW
283
+ - KWD
284
+ - KYD
285
+ - KZT
286
+ - LAK
287
+ - LBP
288
+ - LKR
289
+ - LRD
290
+ - LSL
291
+ - LYD
292
+ - MAD
293
+ - MDL
294
+ - MGA
295
+ - MKD
296
+ - MMK
297
+ - MNT
298
+ - MOP
299
+ - MRO
300
+ - MUR
301
+ - MVR
302
+ - MWK
303
+ - MXN
304
+ - MYR
305
+ - MZN
306
+ - NAD
307
+ - NGN
308
+ - NIO
309
+ - NOK
310
+ - NPR
311
+ - NZD
312
+ - OMR
313
+ - PAB
314
+ - PEN
315
+ - PGK
316
+ - PHP
317
+ - PKR
318
+ - PLN
319
+ - PYG
320
+ - QAR
321
+ - RON
322
+ - RSD
323
+ - RUB
324
+ - RWF
325
+ - SAR
326
+ - SBD
327
+ - SCR
328
+ - SDG
329
+ - SEK
330
+ - SGD
331
+ - SHP
332
+ - SLL
333
+ - SOS
334
+ - SPL
335
+ - SRD
336
+ - STD
337
+ - SVC
338
+ - SYP
339
+ - SZL
340
+ - THB
341
+ - TJS
342
+ - TMT
343
+ - TND
344
+ - TOP
345
+ - TRY
346
+ - TTD
347
+ - TVD
348
+ - TWD
349
+ - TZS
350
+ - UAH
351
+ - UGX
352
+ - USD
353
+ - UYU
354
+ - UZS
355
+ - VEF
356
+ - VND
357
+ - VUV
358
+ - WST
359
+ - XAF
360
+ - XCD
361
+ - XDR
362
+ - XOF
363
+ - XPF
364
+ - XTS
365
+ - XXX
366
+ - YER
367
+ - ZAR
368
+ - ZMW
369
+ - ZWD
370
+
371
+ dateOfBirth:
372
+ type: string
373
+ pattern: ^(?:[1-9]\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\d|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-02-29)$
374
+ description: Date of birth in the form YYYY-MM-DD.
375
+
376
+ errorResponse:
377
+ type: object
378
+ required:
379
+ - statusCode
380
+ properties:
381
+ statusCode:
382
+ type: string
383
+ description: Error code as string.
384
+ message:
385
+ type: string
386
+ description: Error message text.
387
+
388
+ fspId:
389
+ type: string
390
+ minLength: 1
391
+ maxLength: 32
392
+ description: FSP identifier.
393
+
394
+ extensionList:
395
+ type: array
396
+ items:
397
+ $ref: '#/components/schemas/extensionItem'
398
+ minItems: 0
399
+ maxItems: 16
400
+
401
+ geoCode:
402
+ type: object
403
+ description: Indicates the geographic location from where the transaction was initiated.
404
+ properties:
405
+ latitude:
406
+ $ref: '#/components/schemas/latitude'
407
+ longitude:
408
+ $ref: '#/components/schemas/longitude'
409
+ required:
410
+ - latitude
411
+ - longitude
412
+
413
+ idType:
414
+ type: string
415
+ enum:
416
+ - MSISDN
417
+ - ACCOUNT_ID
418
+ description: Below are the allowed values for the enumeration.
419
+
420
+ - MSISDN - An MSISDN (Mobile Station International Subscriber Directory Number, that is, the phone number) is used as reference to a participant. The MSISDN identifier should be in international format according to the [ITU-T E.164 standard](https://www.itu.int/rec/T-REC-E.164/en). Optionally, the MSISDN may be prefixed by a single plus sign, indicating the international prefix.
421
+
422
+ - ACCOUNT_ID - A bank account number or FSP account ID should be used as reference to a participant. The ACCOUNT_ID identifier can be in any format, as formats can greatly differ depending on country and FSP.
423
+
424
+ personalIdType:
425
+ type: string
426
+ enum:
427
+ - PASSPORT
428
+ - NATIONAL_REGISTRATION
429
+ - DRIVING_LICENSE
430
+ - ALIEN_REGISTRATION
431
+ - NATIONAL_ID_CARD
432
+ - EMPLOYER_ID
433
+ - TAX_ID_NUMBER
434
+ - SENIOR_CITIZENS_CARD
435
+ - MARRIAGE_CERTIFICATE
436
+ - HEALTH_CARD
437
+ - VOTERS_ID
438
+ - UNITED_NATIONS
439
+ - OTHER_ID
440
+ description: Below are the allowed values for the enumeration.
441
+
442
+ - PASSPORT - Apassport number isused in reference to a party.
443
+
444
+ - NATIONAL_REGISTRATION - Anational registration number isused in reference to a party.
445
+
446
+ - DRIVING_LICENSE - Adriving license isused in reference to a party.
447
+
448
+ - ALIEN_REGISTRATION - An alien registration number isused in reference to a party.
449
+
450
+ - NATIONAL_ID_CARD - Anational ID card number isused in reference to a party.
451
+
452
+ - EMPLOYER_ID - Atax identification number isused in reference to a party.
453
+
454
+ - TAX_ID_NUMBER - Atax identification number isused in reference to a party.
455
+
456
+ - SENIOR_CITIZENS_CARD - Asenior citizens card number isused in reference to a party.
457
+
458
+ - MARRIAGE_CERTIFICATE - Amarriage certificate number isused in reference to a party.
459
+
460
+ - HEALTH_CARD - Ahealth card number isused in reference to a party.
461
+
462
+ - VOTERS_ID - Avoter’s identification number isused in reference to a party.
463
+
464
+ - UNITED_NATIONS - An UN (United Nations) number isused in reference to a party.
465
+
466
+ - OTHER_ID - Any other type of identification type number isused in reference to a party.
467
+
468
+ idValue:
469
+ type: string
470
+ minLength: 1
471
+ maxLength: 128
472
+ description: Identifier of the party.
473
+
474
+ idSubValue:
475
+ type: string
476
+ minLength: 1
477
+ maxLength: 128
478
+ description: Either a sub-identifier of a `{idValue}`, or a sub-type of the `{idType}`, normally a `{personalIdType}`
479
+
480
+ initiator:
481
+ type: string
482
+ enum:
483
+ - PAYER
484
+ - PAYEE
485
+ description: Specifies if the initiator of the transfer is the Payer or Payee.
486
+
487
+ extensionItem:
488
+ type: object
489
+ properties:
490
+ key:
491
+ type: string
492
+ minLength: 1
493
+ maxLength: 32
494
+ value:
495
+ type: string
496
+ minLength: 1
497
+ maxLength: 128
498
+
499
+ initiatorType:
500
+ type: string
501
+ enum:
502
+ - CONSUMER
503
+ - AGENT
504
+ - BUSINESS
505
+ - DEVICE
506
+ description: Specifies the type of the transaction initiator.
507
+
508
+ latitude:
509
+ type: string
510
+ pattern: ^(\+|-)?(?:90(?:(?:\.0{1,6})?)|(?:[0-9]|[1-8][0-9])(?:(?:\.[0-9]{1,6})?))$
511
+ description: The API data type Latitude is a JSON String in a lexical format that is restricted by a regular expression for interoperability reasons.
512
+
513
+ longitude:
514
+ type: string
515
+ pattern: ^(\+|-)?(?:180(?:(?:\.0{1,6})?)|(?:[0-9]|[1-9][0-9]|1[0-7][0-9])(?:(?:\.[0-9]{1,6})?))$
516
+ description: The API data type Longitude is a JSON String in a lexical format that is restricted by a regular expression for interoperability reasons.
517
+
518
+ money:
519
+ pattern: ^([0]|([1-9][0-9]{0,17}))([.][0-9]{0,3}[1-9])?$
520
+ type: string
521
+
522
+ participantsResponse:
523
+ type: object
524
+ properties:
525
+ fspId:
526
+ $ref: '#/components/schemas/fspId'
527
+
528
+ payerType:
529
+ type: string
530
+ enum:
531
+ - CONSUMER
532
+ - AGENT
533
+ - BUSINESS
534
+ - DEVICE
535
+
536
+ quoteId:
537
+ pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
538
+ type: string
539
+ description: A Mojaloop API quote identifier (UUID).
540
+
541
+ quoteRequest:
542
+ type: object
543
+ description: A request for a quote for transfer from the DFSP backend.
544
+ required:
545
+ - quoteId
546
+ - transactionId
547
+ - to
548
+ - from
549
+ - amountType
550
+ - amount
551
+ - currency
552
+ - transactionType
553
+ - initiator
554
+ - initiatorType
555
+ properties:
556
+ quoteId:
557
+ $ref: '#/components/schemas/quoteId'
558
+ transactionId:
559
+ $ref: '#/components/schemas/transactionId'
560
+ description: Identifier for the transaction, decided by the Payer FSP during the creation of the quote.
561
+ to:
562
+ $ref: '#/components/schemas/transferParty'
563
+ description: Information about the Payee in the proposed financial transaction.
564
+ from:
565
+ $ref: '#/components/schemas/transferParty'
566
+ description: Information about the Payer in the proposed financial transaction.
567
+ amountType:
568
+ $ref: '#/components/schemas/amountType'
569
+ description: SEND for send amount, RECEIVE for receive amount.
570
+ amount:
571
+ $ref: '#/components/schemas/money'
572
+ description: Depending on `amountType`. If SEND - The amount the Payer would like to send, that is, the amount that should be withdrawn from the Payer account including any fees. The amount is updated by each participating entity in the transaction. If RECEIVE - The amount the Payee should receive, that is, the amount that should be sent to the receiver exclusive any fees. The amount is not updated by any of the participating entities.
573
+ currency:
574
+ $ref: '#/components/schemas/currency'
575
+ feesAmount:
576
+ $ref: '#/components/schemas/money'
577
+ description: The fees in the transaction. The fees element should be empty if fees should be non-disclosed. The fees element should be non-empty if fees should be disclosed.
578
+ feesCurrency:
579
+ $ref: '#/components/schemas/currency'
580
+ transactionType:
581
+ $ref: '#/components/schemas/transactionType'
582
+ description: Type of transaction for which the quote is requested.
583
+ initiator:
584
+ $ref: '#/components/schemas/initiator'
585
+ description: Specifies if the initiator of the transfer is the Payer or Payee.
586
+ initiatorType:
587
+ $ref: '#/components/schemas/initiatorType'
588
+ description: Specifies the type of the transaction initiator.
589
+ geoCode:
590
+ $ref: '#/components/schemas/geoCode'
591
+ description: Longitude and Latitude of the initiating party. Can be used to detect fraud.
592
+ note:
593
+ type: string
594
+ minLength: 1
595
+ maxLength: 128
596
+ description: An optional note associated with the requested transfer.
597
+ expiration:
598
+ $ref: '#/components/schemas/timestamp'
599
+ description: An optional deadline for responding to the quote request.
600
+ extensionList:
601
+ $ref: '#/components/schemas/extensionList'
602
+
603
+ quoteResponse:
604
+ type: object
605
+ description: A response to a request for a quote.
606
+ required:
607
+ - quoteId
608
+ - transactionId
609
+ - transferAmount
610
+ - transferAmountCurrency
611
+ properties:
612
+ quoteId:
613
+ $ref: '#/components/schemas/quoteId'
614
+ description: ID of the quote that this response relates to.
615
+ transactionId:
616
+ $ref: '#/components/schemas/transactionId'
617
+ description: Identifier for the transaction, decided by the Payer FSP during the creation of the quote.
618
+ transferAmount:
619
+ $ref: '#/components/schemas/money'
620
+ description: The amount of money that the Payer FSP should transfer to the Payee FSP.
621
+ transferAmountCurrency:
622
+ $ref: '#/components/schemas/currency'
623
+ description: The currency of the `transferAmount`.
624
+ payeeReceiveAmount:
625
+ $ref: '#/components/schemas/money'
626
+ description: The amount that the Payee should receive in the end-to-end transaction. Optional as the Payee FSP might not want to disclose any optional Payee fees.
627
+ payeeReceiveAmountCurrency:
628
+ $ref: '#/components/schemas/currency'
629
+ description: The currency of the `payeeReceiveAmount`.
630
+ payeeFspFeeAmount:
631
+ $ref: '#/components/schemas/money'
632
+ description: Payee FSP’s part of the transaction fee.
633
+ payeeFspFeeAmountCurrency:
634
+ $ref: '#/components/schemas/currency'
635
+ description: The currency of the `payeeFspFeeAmount`.
636
+ payeeFspCommissionAmount:
637
+ $ref: '#/components/schemas/money'
638
+ description: Transaction commission from the Payee FSP.
639
+ payeeFspCommissionAmountCurrency:
640
+ $ref: '#/components/schemas/currency'
641
+ description: Currency of the `payeeFspCommissionAmount`.
642
+ expiration:
643
+ $ref: '#/components/schemas/timestamp'
644
+ description: Timestamp specifying the validity period of the quotation.
645
+ geoCode:
646
+ $ref: '#/components/schemas/geoCode'
647
+ description: Longitude and Latitude of the Payee. Can be used to detect fraud.
648
+ extensionList:
649
+ $ref: '#/components/schemas/extensionList'
650
+
651
+ timestamp:
652
+ type: string
653
+ pattern: ^(?:[1-9]\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\d|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-02-29)T(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:(\.\d{3}))(?:Z|[+-][01]\d:[0-5]\d)$
654
+ description: An ISO-8601 formatted timestamp.
655
+
656
+ transactionId:
657
+ pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
658
+ type: string
659
+ description: ID of the transaction, the ID is decided by the Payer FSP during the creation of the quote.
660
+
661
+ transactionType:
662
+ type: string
663
+ enum:
664
+ - TRANSFER
665
+
666
+ scenario:
667
+ type: string
668
+ enum:
669
+ - TRANSFER
670
+
671
+ amountCurrency:
672
+ type: object
673
+ description: Object containing Amount and Currency of the transfer.
674
+ required:
675
+ - amount
676
+ - currency
677
+ properties:
678
+ amount:
679
+ $ref: '#/components/schemas/money'
680
+ currency:
681
+ $ref: '#/components/schemas/currency'
682
+
683
+ transactionTypeObject:
684
+ type: object
685
+ description: Object containing transfer object.
686
+ required:
687
+ - scenario
688
+ - initiator
689
+ - initiatorType
690
+ properties:
691
+ scenario:
692
+ $ref: '#/components/schemas/scenario'
693
+ initiator:
694
+ $ref: '#/components/schemas/initiator'
695
+ initiatorType:
696
+ $ref: '#/components/schemas/initiatorType'
697
+ description: Specifies the type of the transaction initiator.
698
+
699
+ ilpPacketData:
700
+ type: object
701
+ description: Object containing transfer object.
702
+ required:
703
+ - quoteId
704
+ - transactionId
705
+ - payer
706
+ - payee
707
+ - amount
708
+ - transactionType
709
+ properties:
710
+ quoteId:
711
+ $ref: '#/components/schemas/quoteId'
712
+ transactionId:
713
+ $ref: '#/components/schemas/transactionId'
714
+ description: Identifier for the transaction, decided by the Payer FSP during the creation of the quote.
715
+ payer:
716
+ $ref: '#/components/schemas/transferParty'
717
+ description: Information about the Payer in the proposed financial transaction.
718
+ payee:
719
+ $ref: '#/components/schemas/transferParty'
720
+ description: Information about the Payee in the proposed financial transaction.
721
+ amount:
722
+ $ref: '#/components/schemas/amountCurrency'
723
+ description: Amount and currency of the transaction
724
+ transactionType:
725
+ $ref: '#/components/schemas/transactionTypeObject'
726
+ description: Information about type of transaction and initiator.
727
+
728
+ transferId:
729
+ pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
730
+ type: string
731
+ description: A Mojaloop API transfer identifier (UUID).
732
+
733
+ transferParty:
734
+ type: object
735
+ required:
736
+ - idType
737
+ - idValue
738
+ properties:
739
+ type:
740
+ $ref: '#/components/schemas/payerType'
741
+ idType:
742
+ $ref: '#/components/schemas/idType'
743
+ idValue:
744
+ type: string
745
+ description: The identifier string used to identify the sender.
746
+ idSubValue:
747
+ $ref: '#/components/schemas/idSubValue'
748
+ displayName:
749
+ type: string
750
+ description: Display name of the sender, if known.
751
+ firstName:
752
+ type: string
753
+ description: Party first name.
754
+ middleName:
755
+ type: string
756
+ description: Party middle name.
757
+ lastName:
758
+ type: string
759
+ description: Party last name.
760
+ dateOfBirth:
761
+ $ref: '#/components/schemas/dateOfBirth'
762
+ merchantClassificationCode:
763
+ type: string
764
+ description: Up to 4 digits specifying the sender's merchant classification, if known and applicable.
765
+ fspId:
766
+ type: string
767
+ description: Mojaloop scheme FSPID of the DFSP which owns the party account.
768
+ extensionList:
769
+ $ref: '#/components/schemas/extensionList'
770
+
771
+ transferState:
772
+ type: string
773
+ enum:
774
+ - RECEIVED
775
+ - RESERVED
776
+ - COMMITTED
777
+ - ABORTED
778
+ description: >
779
+ Below are the allowed values for the enumeration
780
+ - RECEIVED DFSP has received the transfer.
781
+ - RESERVED DFSP has reserved the transfer.
782
+ - COMMITTED DFSP has successfully performed the transfer.
783
+ - ABORTED DFSP has aborted the transfer due a rejection or failure to perform the transfer.
784
+
785
+ transferRequest:
786
+ type: object
787
+ required:
788
+ - transferId
789
+ - quote
790
+ - from
791
+ - to
792
+ - amountType
793
+ - currency
794
+ - amount
795
+ - transactionType
796
+ - ilpPacket
797
+ properties:
798
+ transferId:
799
+ $ref: '#/components/schemas/transferId'
800
+ quote:
801
+ $ref: '#/components/schemas/quoteResponse'
802
+ quoteRequestExtensions:
803
+ $ref: '#/components/schemas/extensionList'
804
+ from:
805
+ $ref: '#/components/schemas/transferParty'
806
+ to:
807
+ $ref: '#/components/schemas/transferParty'
808
+ amountType:
809
+ $ref: '#/components/schemas/amountType'
810
+ currency:
811
+ $ref: '#/components/schemas/currency'
812
+ amount:
813
+ $ref: '#/components/schemas/money'
814
+ transactionType:
815
+ $ref: '#/components/schemas/transactionType'
816
+ ilpPacket:
817
+ type: object
818
+ required:
819
+ - data
820
+ properties:
821
+ data:
822
+ $ref: '#/components/schemas/ilpPacketData'
823
+ note:
824
+ maxLength: 128
825
+ type: string
826
+
827
+ transferResponse:
828
+ type: object
829
+ required:
830
+ - homeTransactionId
831
+ properties:
832
+ homeTransactionId:
833
+ type: string
834
+ description: Transaction ID from the DFSP backend, used to reconcile transactions between the Switch and DFSP backend systems.
835
+
836
+ transferDetailsResponse:
837
+ type: object
838
+ required:
839
+ - homeTransactionId
840
+ - from
841
+ - to
842
+ - amountType
843
+ - currency
844
+ - amount
845
+ - transferState
846
+ - transactionType
847
+ - timestamp
848
+ properties:
849
+ homeTransactionId:
850
+ type: string
851
+ description: Transaction ID from the DFSP backend, used to reconcile transactions between the Switch and DFSP backend systems.
852
+ from:
853
+ $ref: '#/components/schemas/transferParty'
854
+ to:
855
+ $ref: '#/components/schemas/transferParty'
856
+ amountType:
857
+ $ref: '#/components/schemas/amountType'
858
+ currency:
859
+ $ref: '#/components/schemas/currency'
860
+ amount:
861
+ $ref: '#/components/schemas/money'
862
+ transferState:
863
+ $ref: '#/components/schemas/transferState'
864
+ timestamp:
865
+ $ref: '#/components/schemas/timestamp'
866
+ transactionType:
867
+ $ref: '#/components/schemas/transactionType'
868
+ note:
869
+ maxLength: 128
870
+ type: string
871
+ extensions:
872
+ $ref: '#/components/schemas/extensionList'
873
+
874
+ transferStatus:
875
+ type: string
876
+ enum:
877
+ - ERROR_OCCURRED
878
+ - WAITING_FOR_PARTY_ACCEPTANCE
879
+ - WAITING_FOR_QUOTE_ACCEPTANCE
880
+ - COMPLETED
881
+
882
+ fulfilNotification:
883
+ title: TransfersIDPatchResponse
884
+ type: object
885
+ description: PUT /transfers/{transferId} object
886
+ properties:
887
+ transferId:
888
+ $ref: '#/components/schemas/transferId'
889
+ direction:
890
+ type: string
891
+ enum:
892
+ - INBOUND
893
+ quoteRequest:
894
+ type: object
895
+ properties:
896
+ headers:
897
+ type: object
898
+ body:
899
+ type: object
900
+ quoteResponse:
901
+ type: object
902
+ properties:
903
+ headers:
904
+ type: object
905
+ body:
906
+ type: object
907
+ prepare:
908
+ type: object
909
+ properties:
910
+ headers:
911
+ type: object
912
+ body:
913
+ type: object
914
+ fulfil:
915
+ type: object
916
+ properties:
917
+ headers:
918
+ type: object
919
+ body:
920
+ type: object
921
+ quote:
922
+ type: object
923
+ properties:
924
+ request:
925
+ type: object
926
+ internalRequest:
927
+ type: object
928
+ response:
929
+ type: object
930
+ mojaloopResponse:
931
+ type: object
932
+ fulfilment:
933
+ type: string
934
+ currentState:
935
+ $ref: '#/components/schemas/transferStatus'
936
+ lastError:
937
+ $ref: '#/components/schemas/transferError'
938
+ initiatedTimestamp:
939
+ $ref: '#/components/schemas/timestamp'
940
+ finalNotification:
941
+ type: object
942
+ properties:
943
+ completedTimestamp:
944
+ $ref: '#/components/schemas/timestamp'
945
+ description: Time and date when the transaction was completed.
946
+ example: "2020-05-19T08:38:08.699-04:00"
947
+ transferState:
948
+ $ref: '#/components/schemas/transferState'
949
+ description: State of the transfer.
950
+ example: COMMITTED
951
+ extensionList:
952
+ $ref: '#/components/schemas/extensionList'
953
+ description: Optional extension, specific to deployment.
954
+ required:
955
+ - completedTimestamp
956
+ - transferState
957
+
958
+ extensionListComplex:
959
+ type: object
960
+ description: Data model for the complex type ExtensionList
961
+ properties:
962
+ extension:
963
+ type: array
964
+ items:
965
+ $ref: '#/components/schemas/extensionItem'
966
+ minItems: 1
967
+ maxItems: 16
968
+ description: Number of Extension elements
969
+ required:
970
+ - extension
971
+
972
+ transferError:
973
+ type: object
974
+ description: This object represents a Mojaloop API error received at any time during the transfer process
975
+ properties:
976
+ httpStatusCode:
977
+ type: integer
978
+ description: The HTTP status code returned to the caller. This is the same as the actual HTTP status code returned with the response.
979
+ mojaloopError:
980
+ description: If a transfer process results in an error callback during the asynchronous Mojaloop API exchange, this property will contain the underlying Mojaloop API error object.
981
+ $ref: '#/components/schemas/mojaloopError'
982
+
983
+ generalError:
984
+ type: object
985
+ description: This object may represent a number of different error object types and so its properties may vary significantly.
986
+
987
+ mojaloopError:
988
+ type: object
989
+ properties:
990
+ errorInformation:
991
+ $ref: '#/components/schemas/errorInformation'
992
+
993
+ errorInformation:
994
+ title: ErrorInformation
995
+ type: object
996
+ description: A Mojaloop API error information construct.
997
+ properties:
998
+ errorCode:
999
+ $ref: '#/components/schemas/errorCode'
1000
+ description: Specific error number.
1001
+ errorDescription:
1002
+ $ref: '#/components/schemas/errorDescription'
1003
+ description: Error description string.
1004
+ extensionList:
1005
+ $ref: '#/components/schemas/extensionListComplex'
1006
+ description: 'Optional list of extensions, specific to deployment.'
1007
+ required:
1008
+ - errorCode
1009
+ - errorDescription
1010
+
1011
+ errorCode:
1012
+ title: ErrorCode
1013
+ type: string
1014
+ pattern: '^[1-9]\d{3}$'
1015
+ description: >
1016
+ The API data type errorCode is a JSON String of four characters,
1017
+ consisting of digits only. Negative numbers are not allowed. A leading
1018
+ zero is not allowed. Each error code in the API is a four-digit number,
1019
+ for example, 1234, where the first number (1 in the example) represents
1020
+ the high-level error category, the second number (2 in the example)
1021
+ represents the low-level error category, and the last two numbers (34 in
1022
+ the example) represents the specific error.
1023
+
1024
+ errorDescription:
1025
+ title: ErrorDescription
1026
+ type: string
1027
+ minLength: 1
1028
+ maxLength: 128
1029
+ description: Error description string.
1030
+
1031
+
1032
+
1033
+ responses:
1034
+ '400':
1035
+ description: Malformed or missing required headers or parameters
1036
+ content:
1037
+ application/json:
1038
+ schema:
1039
+ $ref: '#/components/schemas/errorResponse'
1040
+ '404':
1041
+ description: The party specified by the provided identifier type and value is not known to the server
1042
+ '500':
1043
+ description: An error occurred processing the request
1044
+ content:
1045
+ application/json:
1046
+ schema:
1047
+ $ref: '#/components/schemas/errorResponse'
1048
+
1049
+ parameters:
1050
+ transferId:
1051
+ name: transferId
1052
+ in: path
1053
+ required: true
1054
+ schema:
1055
+ type: string
1056
+
1057
+ idType:
1058
+ name: idType
1059
+ in: path
1060
+ required: true
1061
+ schema:
1062
+ type: string
1063
+ enum:
1064
+ - MSISDN
1065
+ - ACCOUNT_ID
1066
+ description: Below are the allowed values for the enumeration.
1067
+
1068
+ - MSISDN - An MSISDN (Mobile Station International Subscriber Directory Number, that is, the phone number) is used as reference to a participant. The MSISDN identifier should be in international format according to the [ITU-T E.164 standard](https://www.itu.int/rec/T-REC-E.164/en). Optionally, the MSISDN may be prefixed by a single plus sign, indicating the international prefix.
1069
+
1070
+ - ACCOUNT_ID - A bank account number or FSP account ID should be used as reference to a participant. The ACCOUNT_ID identifier can be in any format, as formats can greatly differ depending on country and FSP.
1071
+
1072
+ idValue:
1073
+ name: idValue
1074
+ in: path
1075
+ required: true
1076
+ schema:
1077
+ type: string
1078
+ minLength: 1
1079
+ maxLength: 128
1080
+ description: Identifier of the party.
1081
+
1082
+ idSubValue:
1083
+ name: idSubValue
1084
+ in: path
1085
+ required: true
1086
+ schema:
1087
+ type: string
1088
+ minLength: 1
1089
+ maxLength: 128
1090
+ description: Either a sub-identifier of a `{idValue}`, or a sub-type of the `{idType}`, normally a `{personalIdType}`
1091
+