@mojaloop/sdk-scheme-adapter 11.18.8

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 (277) hide show
  1. package/.env.example +140 -0
  2. package/.eslintignore +2 -0
  3. package/.eslintrc.json +30 -0
  4. package/.nvmrc +1 -0
  5. package/.versionrc +15 -0
  6. package/CHANGELOG.md +118 -0
  7. package/InboundServer/api.yaml +3594 -0
  8. package/InboundServer/api_template.yaml +69 -0
  9. package/InboundServer/handlers.js +940 -0
  10. package/InboundServer/index.js +205 -0
  11. package/InboundServer/middlewares.js +426 -0
  12. package/OAuthTestServer/index.js +66 -0
  13. package/OAuthTestServer/model.js +70 -0
  14. package/OutboundServer/api.yaml +2732 -0
  15. package/OutboundServer/api_interfaces/index.d.ts +117 -0
  16. package/OutboundServer/api_interfaces/openapi.d.ts +1475 -0
  17. package/OutboundServer/api_template/components/parameters/bulkQuoteId.yaml +9 -0
  18. package/OutboundServer/api_template/components/parameters/bulkTransferId.yaml +9 -0
  19. package/OutboundServer/api_template/components/parameters/requestToPayTransactionId.yaml +9 -0
  20. package/OutboundServer/api_template/components/parameters/transferId.yaml +9 -0
  21. package/OutboundServer/api_template/components/responses/accountsCreationCompleted.yaml +5 -0
  22. package/OutboundServer/api_template/components/responses/accountsCreationError.yaml +5 -0
  23. package/OutboundServer/api_template/components/responses/accountsCreationTimeout.yaml +5 -0
  24. package/OutboundServer/api_template/components/responses/authorizationPostSuccess.yaml +5 -0
  25. package/OutboundServer/api_template/components/responses/authorizationsServerError.yaml +5 -0
  26. package/OutboundServer/api_template/components/responses/bulkQuoteBadRequest.yaml +5 -0
  27. package/OutboundServer/api_template/components/responses/bulkQuoteServerError.yaml +5 -0
  28. package/OutboundServer/api_template/components/responses/bulkQuoteSuccess.yaml +5 -0
  29. package/OutboundServer/api_template/components/responses/bulkQuoteTimeout.yaml +5 -0
  30. package/OutboundServer/api_template/components/responses/bulkTransferBadRequest.yaml +5 -0
  31. package/OutboundServer/api_template/components/responses/bulkTransferServerError.yaml +5 -0
  32. package/OutboundServer/api_template/components/responses/bulkTransferSuccess.yaml +5 -0
  33. package/OutboundServer/api_template/components/responses/bulkTransferTimeout.yaml +5 -0
  34. package/OutboundServer/api_template/components/responses/partiesByIdError404.yaml +9 -0
  35. package/OutboundServer/api_template/components/responses/partiesByIdSuccess.yaml +5 -0
  36. package/OutboundServer/api_template/components/responses/quotesPostSuccess.yaml +5 -0
  37. package/OutboundServer/api_template/components/responses/quotesServerError.yaml +5 -0
  38. package/OutboundServer/api_template/components/responses/requestToPaySuccess.yaml +5 -0
  39. package/OutboundServer/api_template/components/responses/requestToPayTransferBadRequest.yaml +5 -0
  40. package/OutboundServer/api_template/components/responses/requestToPayTransferSuccess.yaml +5 -0
  41. package/OutboundServer/api_template/components/responses/simpleTransfersPostSuccess.yaml +5 -0
  42. package/OutboundServer/api_template/components/responses/simpleTransfersServerError.yaml +5 -0
  43. package/OutboundServer/api_template/components/responses/transferBadRequest.yaml +5 -0
  44. package/OutboundServer/api_template/components/responses/transferServerError.yaml +5 -0
  45. package/OutboundServer/api_template/components/responses/transferSuccess.yaml +5 -0
  46. package/OutboundServer/api_template/components/responses/transferTimeout.yaml +5 -0
  47. package/OutboundServer/api_template/components/schemas/accountCreationStatus.yaml +18 -0
  48. package/OutboundServer/api_template/components/schemas/accountsCreationState.yaml +4 -0
  49. package/OutboundServer/api_template/components/schemas/accountsRequest.yaml +20 -0
  50. package/OutboundServer/api_template/components/schemas/accountsResponse.yaml +15 -0
  51. package/OutboundServer/api_template/components/schemas/async2SyncCurrentState.yaml +5 -0
  52. package/OutboundServer/api_template/components/schemas/authorizationsPostRequest.yaml +15 -0
  53. package/OutboundServer/api_template/components/schemas/authorizationsPostResponse.yaml +19 -0
  54. package/OutboundServer/api_template/components/schemas/bulkQuoteErrorResponse.yaml +8 -0
  55. package/OutboundServer/api_template/components/schemas/bulkQuoteRequest.yaml +26 -0
  56. package/OutboundServer/api_template/components/schemas/bulkQuoteResponse.yaml +21 -0
  57. package/OutboundServer/api_template/components/schemas/bulkQuoteStatus.yaml +4 -0
  58. package/OutboundServer/api_template/components/schemas/bulkQuoteStatusResponse.yaml +17 -0
  59. package/OutboundServer/api_template/components/schemas/bulkTransferErrorResponse.yaml +8 -0
  60. package/OutboundServer/api_template/components/schemas/bulkTransferRequest.yaml +26 -0
  61. package/OutboundServer/api_template/components/schemas/bulkTransferResponse.yaml +16 -0
  62. package/OutboundServer/api_template/components/schemas/bulkTransferStatus.yaml +4 -0
  63. package/OutboundServer/api_template/components/schemas/bulkTransferStatusResponse.yaml +17 -0
  64. package/OutboundServer/api_template/components/schemas/errorAccountsResponse.yaml +8 -0
  65. package/OutboundServer/api_template/components/schemas/errorAuthorizationsResponse.yaml +3 -0
  66. package/OutboundServer/api_template/components/schemas/errorQuotesResponse.yaml +9 -0
  67. package/OutboundServer/api_template/components/schemas/errorResponse.yaml +8 -0
  68. package/OutboundServer/api_template/components/schemas/errorSimpleTransfersResponse.yaml +3 -0
  69. package/OutboundServer/api_template/components/schemas/errorTransferResponse.yaml +8 -0
  70. package/OutboundServer/api_template/components/schemas/extensionListEmptiable.yaml +6 -0
  71. package/OutboundServer/api_template/components/schemas/individualQuote.yaml +32 -0
  72. package/OutboundServer/api_template/components/schemas/individualQuoteResult.yaml +28 -0
  73. package/OutboundServer/api_template/components/schemas/individualTransfer.yaml +32 -0
  74. package/OutboundServer/api_template/components/schemas/individualTransferFulfilment.yaml +13 -0
  75. package/OutboundServer/api_template/components/schemas/individualTransferResult.yaml +41 -0
  76. package/OutboundServer/api_template/components/schemas/mojaloopError.yaml +5 -0
  77. package/OutboundServer/api_template/components/schemas/mojaloopTransactionRequestState.yaml +2 -0
  78. package/OutboundServer/api_template/components/schemas/partiesByIdResponse.yaml +13 -0
  79. package/OutboundServer/api_template/components/schemas/quote.yaml +3 -0
  80. package/OutboundServer/api_template/components/schemas/quoteError.yaml +16 -0
  81. package/OutboundServer/api_template/components/schemas/quotesPostRequest.yaml +13 -0
  82. package/OutboundServer/api_template/components/schemas/quotesPostResponse.yaml +48 -0
  83. package/OutboundServer/api_template/components/schemas/requestToPayRequest.yaml +39 -0
  84. package/OutboundServer/api_template/components/schemas/requestToPayResponse.yaml +41 -0
  85. package/OutboundServer/api_template/components/schemas/requestToPayTransferRequest.yaml +42 -0
  86. package/OutboundServer/api_template/components/schemas/requestToPayTransferResponse.yaml +58 -0
  87. package/OutboundServer/api_template/components/schemas/simpleTransferServerError.yaml +5 -0
  88. package/OutboundServer/api_template/components/schemas/simpleTransfersPostRequest.yaml +12 -0
  89. package/OutboundServer/api_template/components/schemas/simpleTransfersPostResponse.yaml +11 -0
  90. package/OutboundServer/api_template/components/schemas/transactionType.yaml +4 -0
  91. package/OutboundServer/api_template/components/schemas/transferContinuationAcceptOTP.yaml +9 -0
  92. package/OutboundServer/api_template/components/schemas/transferContinuationAcceptParty.yaml +8 -0
  93. package/OutboundServer/api_template/components/schemas/transferContinuationAcceptQuote.yaml +9 -0
  94. package/OutboundServer/api_template/components/schemas/transferError.yaml +16 -0
  95. package/OutboundServer/api_template/components/schemas/transferFulfilment.yaml +3 -0
  96. package/OutboundServer/api_template/components/schemas/transferParty.yaml +40 -0
  97. package/OutboundServer/api_template/components/schemas/transferRequest.yaml +37 -0
  98. package/OutboundServer/api_template/components/schemas/transferResponse.yaml +58 -0
  99. package/OutboundServer/api_template/components/schemas/transferStatus.yaml +6 -0
  100. package/OutboundServer/api_template/components/schemas/transferStatusResponse.yaml +13 -0
  101. package/OutboundServer/api_template/health.yaml +12 -0
  102. package/OutboundServer/api_template/openapi.yaml +55 -0
  103. package/OutboundServer/api_template/paths/accounts.yaml +26 -0
  104. package/OutboundServer/api_template/paths/authorizations.yaml +19 -0
  105. package/OutboundServer/api_template/paths/bulkQuotes.yaml +23 -0
  106. package/OutboundServer/api_template/paths/bulkQuotes_bulkQuoteId.yaml +24 -0
  107. package/OutboundServer/api_template/paths/bulkTransfers.yaml +23 -0
  108. package/OutboundServer/api_template/paths/bulkTransfers_bulkTransferId.yaml +24 -0
  109. package/OutboundServer/api_template/paths/parties_Type_ID.yaml +20 -0
  110. package/OutboundServer/api_template/paths/parties_Type_ID_SubId.yaml +22 -0
  111. package/OutboundServer/api_template/paths/quotes.yaml +20 -0
  112. package/OutboundServer/api_template/paths/requestToPay.yaml +22 -0
  113. package/OutboundServer/api_template/paths/requestToPayTransfer.yaml +57 -0
  114. package/OutboundServer/api_template/paths/requestToPayTransfer_requestToPayTransactionId.yaml +34 -0
  115. package/OutboundServer/api_template/paths/simpleTransfers.yaml +19 -0
  116. package/OutboundServer/api_template/paths/transfers.yaml +55 -0
  117. package/OutboundServer/api_template/paths/transfers_transferId.yaml +58 -0
  118. package/OutboundServer/handlers.js +622 -0
  119. package/OutboundServer/index.js +137 -0
  120. package/OutboundServer/middlewares.js +67 -0
  121. package/TestServer/api.yaml +62 -0
  122. package/TestServer/handlers.js +63 -0
  123. package/TestServer/index.js +215 -0
  124. package/audit-resolve.json +65 -0
  125. package/babel.config.js +3 -0
  126. package/config.js +158 -0
  127. package/index.d.ts +1 -0
  128. package/index.js +149 -0
  129. package/jest.config.js +15 -0
  130. package/lib/api/index.js +12 -0
  131. package/lib/cache.js +352 -0
  132. package/lib/check.js +25 -0
  133. package/lib/model/AccountsModel.js +396 -0
  134. package/lib/model/Async2SyncModel.js +283 -0
  135. package/lib/model/AuthorizationsModel.js +86 -0
  136. package/lib/model/InboundTransfersModel.js +730 -0
  137. package/lib/model/OutboundBulkQuotesModel.js +485 -0
  138. package/lib/model/OutboundBulkTransfersModel.js +479 -0
  139. package/lib/model/OutboundRequestToPayModel.js +517 -0
  140. package/lib/model/OutboundRequestToPayTransferModel.js +893 -0
  141. package/lib/model/OutboundTransfersModel.js +823 -0
  142. package/lib/model/PartiesModel.js +70 -0
  143. package/lib/model/ProxyModel/MatchRules/Expression.js +48 -0
  144. package/lib/model/ProxyModel/MatchRules/Headers.js +65 -0
  145. package/lib/model/ProxyModel/MatchRules/MatchRule.js +27 -0
  146. package/lib/model/ProxyModel/MatchRules/Path.js +36 -0
  147. package/lib/model/ProxyModel/MatchRules/Query.js +65 -0
  148. package/lib/model/ProxyModel/MatchRules/index.js +19 -0
  149. package/lib/model/ProxyModel/Route.js +82 -0
  150. package/lib/model/ProxyModel/configSchema.json +118 -0
  151. package/lib/model/ProxyModel/index.js +138 -0
  152. package/lib/model/QuotesModel.js +94 -0
  153. package/lib/model/TransfersModel.js +81 -0
  154. package/lib/model/common/BackendError.js +26 -0
  155. package/lib/model/common/PersistentStateMachine.js +93 -0
  156. package/lib/model/common/index.js +18 -0
  157. package/lib/model/index.js +43 -0
  158. package/lib/model/lib/deferredJob.js +113 -0
  159. package/lib/model/lib/index.js +9 -0
  160. package/lib/model/lib/requests/backendRequests.js +227 -0
  161. package/lib/model/lib/requests/common.js +76 -0
  162. package/lib/model/lib/requests/index.js +19 -0
  163. package/lib/model/lib/shared.js +468 -0
  164. package/lib/randomphrase/index.js +21 -0
  165. package/lib/randomphrase/words.json +3397 -0
  166. package/lib/router.js +28 -0
  167. package/lib/validate.js +205 -0
  168. package/package.json +102 -0
  169. package/test/__mocks__/@mojaloop/sdk-standard-components.js +152 -0
  170. package/test/__mocks__/javascript-state-machine.js +21 -0
  171. package/test/__mocks__/redis.js +49 -0
  172. package/test/__mocks__/uuidv4.js +16 -0
  173. package/test/config/integration.env +136 -0
  174. package/test/integration/lib/Outbound/authorizations.test.js +58 -0
  175. package/test/integration/lib/Outbound/data/authorizationsPostRequest.json +43 -0
  176. package/test/integration/lib/Outbound/data/quotesPostRequest.json +52 -0
  177. package/test/integration/lib/Outbound/data/transfersPostRequest.json +24 -0
  178. package/test/integration/lib/Outbound/parties.test.js +28 -0
  179. package/test/integration/lib/Outbound/quotes.test.js +58 -0
  180. package/test/integration/lib/Outbound/simpleTransfers.test.js +67 -0
  181. package/test/integration/lib/cache.test.js +80 -0
  182. package/test/integration/testEnv.js +7 -0
  183. package/test/unit/InboundServer.test.js +443 -0
  184. package/test/unit/TestServer.test.js +394 -0
  185. package/test/unit/api/accounts/accounts.test.js +128 -0
  186. package/test/unit/api/accounts/data/postAccountsBody.json +7 -0
  187. package/test/unit/api/accounts/data/postAccountsErrorMojaloopResponse.json +25 -0
  188. package/test/unit/api/accounts/data/postAccountsErrorTimeoutResponse.json +19 -0
  189. package/test/unit/api/accounts/data/postAccountsSuccessResponse.json +17 -0
  190. package/test/unit/api/accounts/data/postAccountsSuccessResponseWithError1.json +21 -0
  191. package/test/unit/api/accounts/data/postAccountsSuccessResponseWithError2.json +21 -0
  192. package/test/unit/api/accounts/utils.js +65 -0
  193. package/test/unit/api/proxy/data/proxyConfig.yaml +82 -0
  194. package/test/unit/api/proxy/data/requestBody.json +22 -0
  195. package/test/unit/api/proxy/data/requestHeaders.json +5 -0
  196. package/test/unit/api/proxy/data/requestQuery.json +6 -0
  197. package/test/unit/api/proxy/data/responseBody.json +21 -0
  198. package/test/unit/api/proxy/data/responseHeaders.json +5 -0
  199. package/test/unit/api/proxy/proxy.test.js +220 -0
  200. package/test/unit/api/proxy/utils.js +79 -0
  201. package/test/unit/api/transfers/data/getTransfersCommittedResponse.json +21 -0
  202. package/test/unit/api/transfers/data/getTransfersErrorNotFound.json +17 -0
  203. package/test/unit/api/transfers/data/postQuotesBody.json +52 -0
  204. package/test/unit/api/transfers/data/postTransfersBadBody.json +17 -0
  205. package/test/unit/api/transfers/data/postTransfersBody.json +24 -0
  206. package/test/unit/api/transfers/data/postTransfersErrorMojaloopResponse.json +53 -0
  207. package/test/unit/api/transfers/data/postTransfersErrorTimeoutResponse.json +47 -0
  208. package/test/unit/api/transfers/data/postTransfersSimpleBody.json +26 -0
  209. package/test/unit/api/transfers/data/postTransfersSuccessResponse.json +101 -0
  210. package/test/unit/api/transfers/data/putPartiesBody.json +20 -0
  211. package/test/unit/api/transfers/data/putQuotesBody.json +37 -0
  212. package/test/unit/api/transfers/data/putTransfersBody.json +17 -0
  213. package/test/unit/api/transfers/transfers.test.js +191 -0
  214. package/test/unit/api/transfers/utils.js +183 -0
  215. package/test/unit/api/utils.js +75 -0
  216. package/test/unit/config.test.js +119 -0
  217. package/test/unit/data/commonHttpHeaders.json +6 -0
  218. package/test/unit/data/defaultConfig.json +58 -0
  219. package/test/unit/data/postQuotesBody.json +52 -0
  220. package/test/unit/data/putParticipantsBody.json +12 -0
  221. package/test/unit/data/putPartiesBody.json +20 -0
  222. package/test/unit/data/testFile.json +29 -0
  223. package/test/unit/data/testFile.yaml +14 -0
  224. package/test/unit/inboundApi/data/mockArguments.json +117 -0
  225. package/test/unit/inboundApi/data/mockTransactionRequest.json +42 -0
  226. package/test/unit/inboundApi/handlers.test.js +799 -0
  227. package/test/unit/index.test.js +55 -0
  228. package/test/unit/lib/cache.test.js +146 -0
  229. package/test/unit/lib/model/AccountsModel.test.js +121 -0
  230. package/test/unit/lib/model/AuthorizationsModel.test.js +460 -0
  231. package/test/unit/lib/model/InboundTransfersModel.test.js +628 -0
  232. package/test/unit/lib/model/OutboundBulkQuotesModel.test.js +249 -0
  233. package/test/unit/lib/model/OutboundBulkTransfersModel.test.js +244 -0
  234. package/test/unit/lib/model/OutboundRequestToPayModel.test.js +166 -0
  235. package/test/unit/lib/model/OutboundRequestToPayTransferModel.test.js +245 -0
  236. package/test/unit/lib/model/OutboundTransfersModel.test.js +836 -0
  237. package/test/unit/lib/model/PartiesModel.test.js +468 -0
  238. package/test/unit/lib/model/QuotesModel.test.js +470 -0
  239. package/test/unit/lib/model/TransfersModel.test.js +474 -0
  240. package/test/unit/lib/model/common/PersistentStateMachine.test.js +179 -0
  241. package/test/unit/lib/model/data/authorizationsResponse.json +13 -0
  242. package/test/unit/lib/model/data/bulkQuoteRequest.json +27 -0
  243. package/test/unit/lib/model/data/bulkQuoteResponse.json +35 -0
  244. package/test/unit/lib/model/data/bulkTransferFulfil.json +13 -0
  245. package/test/unit/lib/model/data/bulkTransferRequest.json +29 -0
  246. package/test/unit/lib/model/data/defaultConfig.json +47 -0
  247. package/test/unit/lib/model/data/getBulkTransfersBackendResponse.json +42 -0
  248. package/test/unit/lib/model/data/getBulkTransfersMojaloopResponse.json +22 -0
  249. package/test/unit/lib/model/data/getTransfersBackendResponse.json +34 -0
  250. package/test/unit/lib/model/data/getTransfersMojaloopResponse.json +17 -0
  251. package/test/unit/lib/model/data/mockArguments.json +131 -0
  252. package/test/unit/lib/model/data/mockTxnRequestsArguments.json +63 -0
  253. package/test/unit/lib/model/data/notificationToPayee.json +10 -0
  254. package/test/unit/lib/model/data/payeeParty.json +16 -0
  255. package/test/unit/lib/model/data/putAuthorizationsResponse.json +10 -0
  256. package/test/unit/lib/model/data/putQuotesResponse.json +33 -0
  257. package/test/unit/lib/model/data/putTransfersResponse.json +5 -0
  258. package/test/unit/lib/model/data/quoteResponse.json +31 -0
  259. package/test/unit/lib/model/data/requestToPayRequest.json +20 -0
  260. package/test/unit/lib/model/data/requestToPayTransferRequest.json +27 -0
  261. package/test/unit/lib/model/data/transactionRequestResponse.json +18 -0
  262. package/test/unit/lib/model/data/transferFulfil.json +8 -0
  263. package/test/unit/lib/model/data/transferRequest.json +26 -0
  264. package/test/unit/lib/model/mockedLibRequests.js +74 -0
  265. package/test/unit/mockLogger.js +39 -0
  266. package/test/unit/outboundApi/data/bulkQuoteRequest.json +28 -0
  267. package/test/unit/outboundApi/data/bulkTransferRequest.json +28 -0
  268. package/test/unit/outboundApi/data/mockBulkQuoteError.json +45 -0
  269. package/test/unit/outboundApi/data/mockBulkTransferError.json +48 -0
  270. package/test/unit/outboundApi/data/mockError.json +41 -0
  271. package/test/unit/outboundApi/data/mockGetPartiesError.json +4 -0
  272. package/test/unit/outboundApi/data/mockRequestToPayError.json +32 -0
  273. package/test/unit/outboundApi/data/mockRequestToPayTransferError.json +39 -0
  274. package/test/unit/outboundApi/data/requestToPay.json +21 -0
  275. package/test/unit/outboundApi/data/requestToPayTransferRequest.json +20 -0
  276. package/test/unit/outboundApi/data/transferRequest.json +21 -0
  277. package/test/unit/outboundApi/handlers.test.js +986 -0
@@ -0,0 +1,66 @@
1
+ /**************************************************************************
2
+ * (C) Copyright ModusBox Inc. 2019 - All rights reserved. *
3
+ * *
4
+ * This file is made available under the terms of the license agreement *
5
+ * specified in the corresponding source code repository. *
6
+ * *
7
+ * ORIGINAL AUTHOR: *
8
+ * Yevhen Kyriukha - yevhen.kyriukha@modusbox.com *
9
+ **************************************************************************/
10
+
11
+ 'use strict';
12
+
13
+ const http = require('http');
14
+ const Koa = require('koa');
15
+ const koaBody = require('koa-body');
16
+ const OAuthServer = require('koa2-oauth-server');
17
+ const { InMemoryCache } = require('./model');
18
+
19
+ class OAuthTestServer {
20
+ /**
21
+ *
22
+ * @param {Object} conf
23
+ * @param {number} conf.port OAuth server listen port
24
+ * @param {string} conf.clientKey Customer Key
25
+ * @param {String} conf.clientSecret Customer Secret
26
+ * @param {Logger} conf.logger Logger
27
+ */
28
+ constructor({ port, clientKey, clientSecret, logger }) {
29
+ this._api = null;
30
+ this._port = port;
31
+ this._logger = logger;
32
+ this._api = OAuthTestServer._SetupApi({ clientKey, clientSecret });
33
+ this._server = http.createServer(this._api.callback());
34
+ }
35
+
36
+ async start() {
37
+ if (this._server.listening) {
38
+ return;
39
+ }
40
+ await new Promise((resolve) => this._server.listen(this._port, resolve));
41
+ this._logger.push({ port: this._port }).log('Serving OAuth2 Test Server');
42
+ }
43
+
44
+ async stop() {
45
+ await new Promise(resolve => this._server.close(resolve));
46
+ this._logger.log('OAuth2 Test Server shut down complete');
47
+ }
48
+
49
+ static _SetupApi({ clientKey, clientSecret }) {
50
+ const result = new Koa();
51
+
52
+ result.oauth = new OAuthServer({
53
+ model: new InMemoryCache({ clientKey, clientSecret }),
54
+ accessTokenLifetime: 60 * 60,
55
+ allowBearerTokensInQueryString: true,
56
+ });
57
+
58
+ result.use(koaBody());
59
+ result.use(result.oauth.token());
60
+
61
+ return result;
62
+ }
63
+ }
64
+
65
+
66
+ module.exports = OAuthTestServer;
@@ -0,0 +1,70 @@
1
+ /**************************************************************************
2
+ * (C) Copyright ModusBox Inc. 2019 - All rights reserved. *
3
+ * *
4
+ * This file is made available under the terms of the license agreement *
5
+ * specified in the corresponding source code repository. *
6
+ * *
7
+ * ORIGINAL AUTHOR: *
8
+ * Yevhen Kyriukha - yevhen.kyriukha@modusbox.com *
9
+ **************************************************************************/
10
+
11
+ class InMemoryCache {
12
+ /**
13
+ * @param {string} opts.clientKey Customer Key
14
+ * @param {String} opts.clientSecret Customer Secret
15
+ */
16
+ constructor({ clientKey : clientId, clientSecret }) {
17
+ this.clients = [{
18
+ clientId,
19
+ clientSecret,
20
+ grants: [
21
+ 'client_credentials'
22
+ ],
23
+ redirectUris : []
24
+ }];
25
+ this.tokens = [];
26
+ }
27
+
28
+ getAccessToken(token) {
29
+ const tokens = this.tokens.filter(savedToken =>
30
+ savedToken.accessToken === token
31
+ );
32
+
33
+ return tokens[0];
34
+ }
35
+
36
+ getClient(clientId, clientSecret) {
37
+ const clients = this.clients.filter(client =>
38
+ client.clientId === clientId && client.clientSecret === clientSecret
39
+ );
40
+
41
+ return clients[0];
42
+ }
43
+
44
+ saveToken(token, client, user) {
45
+ token.client = {
46
+ id: client.clientId
47
+ };
48
+
49
+ token.user = {
50
+ id: user.username || user.clientId
51
+ };
52
+
53
+ this.tokens.push(token);
54
+
55
+ return token;
56
+ }
57
+
58
+ /*
59
+ * Method used only by client_credentials grant type.
60
+ */
61
+ getUserFromClient(client) {
62
+ const clients = this.clients.filter(savedClient =>
63
+ savedClient.clientId === client.clientId && savedClient.clientSecret === client.clientSecret
64
+ );
65
+
66
+ return clients[0];
67
+ }
68
+ }
69
+
70
+ module.exports.InMemoryCache = InMemoryCache;
@@ -0,0 +1,2732 @@
1
+ openapi: 3.0.1
2
+ info:
3
+ title: Mojaloop SDK Outbound Scheme Adapter API
4
+ description: >
5
+ Specification for the Mojaloop SDK Scheme Adapter Outbound Transfers API
6
+
7
+
8
+ This API can be used by DFSP backends to simplify the process of sending
9
+ funds to other parties within a Mojaloop scheme.
10
+
11
+
12
+ Please see other documentation on
13
+ https://github.com/mojaloop/sdk-scheme-adapter for more information.
14
+
15
+
16
+ **Note on terminology:** The term "Switch" is equal to the term "Hub", and
17
+ the term "FSP" is equal to the term "DFSP".
18
+ license:
19
+ name: 'Apache License Version 2.0, January 2004'
20
+ url: 'http://www.apache.org/licenses/'
21
+ version: 1.0.0
22
+ paths:
23
+ /:
24
+ get:
25
+ summary: Health check endpoint
26
+ description: >-
27
+ This endpoint allows a user of the SDK scheme adapter to check the
28
+ outbound transfers service is listening.
29
+ tags:
30
+ - Health
31
+ responses:
32
+ '200':
33
+ description: >-
34
+ Returns empty body if the scheme adapter outbound transfers service
35
+ is running.
36
+ /transfers:
37
+ post:
38
+ summary: Sends money from one account to another
39
+ description: >
40
+ The HTTP request `POST /transfers` is used to request the movement of
41
+ funds from payer DFSP to payee DFSP.
42
+
43
+ The underlying Mojaloop API has three stages for money transfer:
44
+
45
+ 1. Party lookup. This facilitates a check by the sending party that the destination party is correct before proceeding with a money movement.
46
+ 2. Quotation. This facilitates the exchange of fee information and the construction of a cryptographic "contract" between payee and payer DFSPs before funds are transferred.
47
+ 3. Transfer. The enactment of the previously agreed "contract"
48
+
49
+ This method has several modes of operation.
50
+
51
+ - If the configuration variables `AUTO_ACCEPT_PARTIES` is set to
52
+ `"false"` this method will terminate when the payee party has been
53
+ resolved and return the payee party details.
54
+ If the payee wishes to proceed with the transfer, then a subsequent `PUT /transfers/{transferId}` request (accepting the payee party) is required to continue the operation.
55
+ The scheme adapter will then proceed with quotation stage...
56
+
57
+ - If the configuration variable `AUTO_ACCEPT_QUOTES` is set to `"false"`
58
+ this method will terminate and return the quotation when it has been
59
+ received from the payee DFSP.
60
+ If the payee wished to proceed with the transfer, then a subsequent `PUT /transfers/{transferId}` request (accepting the quote) is required to continue the operation.
61
+ The scheme adapter will then proceed with the transfer state.
62
+
63
+ If the configuration variables `AUTO_ACCEPT_PARTIES` and
64
+ `AUTO_ACCEPT_QUOTES` are both set to `"true"` this method will block
65
+ until all three transfer stages are complete. Upon completion it will
66
+ return the entire set of transfer details received during the operation.
67
+
68
+
69
+ Combinations of settings for `AUTO_ACCEPT...` configuration variables
70
+ allow the scheme adapter user to decide which mode of operation best
71
+ suits their use cases. i.e. the scheme adapter can be configured to
72
+ "break" the three stage transfer at these points in order to execute
73
+ backend logic such as party verification, quoted fees assessments etc...
74
+ tags:
75
+ - Transfers
76
+ requestBody:
77
+ description: Transfer request body
78
+ content:
79
+ application/json:
80
+ schema:
81
+ $ref: '#/components/schemas/transferRequest'
82
+ required: true
83
+ responses:
84
+ '200':
85
+ $ref: '#/components/responses/transferSuccess'
86
+ '400':
87
+ $ref: '#/components/responses/transferBadRequest'
88
+ '500':
89
+ $ref: '#/components/responses/transferServerError'
90
+ '504':
91
+ $ref: '#/components/responses/transferTimeout'
92
+ '/transfers/{transferId}':
93
+ put:
94
+ summary: >-
95
+ Continues a transfer that has paused at the quote stage in order to
96
+ accept or reject payee party and/or quote
97
+ description: >
98
+ The HTTP request `PUT /transfers/{transferId}` is used to continue a
99
+ transfer initiated via the `POST /transfers` method that has halted
100
+ after party lookup and/or quotation stage.
101
+
102
+
103
+ The request body should contain either the "acceptParty" or
104
+ "acceptQuote" property set to `true` as required to continue the
105
+ transfer.
106
+
107
+
108
+ See the description of the `POST /transfers` HTTP method for more
109
+ information on modes of transfer.
110
+ tags:
111
+ - Transfers
112
+ requestBody:
113
+ content:
114
+ application/json:
115
+ schema:
116
+ oneOf:
117
+ - $ref: '#/components/schemas/transferContinuationAcceptParty'
118
+ - $ref: '#/components/schemas/transferContinuationAcceptQuote'
119
+ parameters:
120
+ - $ref: '#/components/parameters/transferId'
121
+ responses:
122
+ '200':
123
+ $ref: '#/components/responses/transferSuccess'
124
+ '500':
125
+ $ref: '#/components/responses/transferServerError'
126
+ '504':
127
+ $ref: '#/components/responses/transferTimeout'
128
+ get:
129
+ summary: Retrieves information for a specific transfer
130
+ description: >-
131
+ The HTTP request `GET /transfers/{transferId}` is used to get
132
+ information regarding a transfer created or requested earlier. The
133
+ `{transferId}` in the URI should contain the `transferId` that was used
134
+ for the creation of the transfer.
135
+ tags:
136
+ - Transfers
137
+ parameters:
138
+ - $ref: '#/components/parameters/transferId'
139
+ responses:
140
+ '200':
141
+ description: Transfer information successfully retrieved
142
+ content:
143
+ application/json:
144
+ schema:
145
+ $ref: '#/components/schemas/transferStatusResponse'
146
+ '500':
147
+ description: An error occurred processing the transfer
148
+ content:
149
+ application/json:
150
+ schema:
151
+ $ref: '#/components/schemas/errorResponse'
152
+ /bulkTransfers:
153
+ post:
154
+ summary: Sends money from one account to multiple accounts
155
+ description: >
156
+ The HTTP request `POST /bulkTransfers` is used to request the movement
157
+ of funds from payer DFSP to payees' DFSP.
158
+ tags:
159
+ - BulkTransfers
160
+ requestBody:
161
+ description: Bulk transfer request body
162
+ content:
163
+ application/json:
164
+ schema:
165
+ $ref: '#/components/schemas/bulkTransferRequest'
166
+ required: true
167
+ responses:
168
+ '200':
169
+ $ref: '#/components/responses/bulkTransferSuccess'
170
+ '400':
171
+ $ref: '#/components/responses/bulkTransferBadRequest'
172
+ '500':
173
+ $ref: '#/components/responses/bulkTransferServerError'
174
+ '504':
175
+ $ref: '#/components/responses/bulkTransferTimeout'
176
+ '/bulkTransfers/{bulkTransferId}':
177
+ get:
178
+ summary: Retrieves information for a specific bulk transfer
179
+ description: >-
180
+ The HTTP request `GET /bulkTransfers/{bulktTransferId}` is used to get
181
+ information regarding a bulk transfer created or requested earlier. The
182
+ `{bulkTransferId}` in the URI should contain the `bulkTransferId` that
183
+ was used for the creation of the bulk transfer.
184
+ tags:
185
+ - BulkTransfers
186
+ parameters:
187
+ - $ref: '#/components/parameters/bulkTransferId'
188
+ responses:
189
+ '200':
190
+ description: Bulk transfer information successfully retrieved
191
+ content:
192
+ application/json:
193
+ schema:
194
+ $ref: '#/components/schemas/bulkTransferStatusResponse'
195
+ '500':
196
+ description: An error occurred processing the bulk transfer
197
+ content:
198
+ application/json:
199
+ schema:
200
+ $ref: '#/components/schemas/errorResponse'
201
+ /bulkQuotes:
202
+ post:
203
+ summary: Request bulk quotes for the provided financial transactions
204
+ description: >
205
+ The HTTP request `POST /bulkQuotes` is used to request a bulk quote to
206
+ fascilitate funds transfer from payer DFSP to payees' DFSP.
207
+ tags:
208
+ - BulkQuotes
209
+ requestBody:
210
+ description: Bulk quote request body
211
+ content:
212
+ application/json:
213
+ schema:
214
+ $ref: '#/components/schemas/bulkQuoteRequest'
215
+ required: true
216
+ responses:
217
+ '200':
218
+ $ref: '#/components/responses/bulkQuoteSuccess'
219
+ '400':
220
+ $ref: '#/components/responses/bulkQuoteBadRequest'
221
+ '500':
222
+ $ref: '#/components/responses/bulkQuoteServerError'
223
+ '504':
224
+ $ref: '#/components/responses/bulkQuoteTimeout'
225
+ '/bulkQuotes/{bulkQuoteId}':
226
+ get:
227
+ summary: Retrieves information for a specific bulk quote
228
+ description: >-
229
+ The HTTP request `GET /bulkQuotes/{bulktQuoteId}` is used to get
230
+ information regarding a bulk quote created or requested earlier. The
231
+ `{bulkQuoteId}` in the URI should contain the `bulkQuoteId` that was
232
+ used for the creation of the bulk quote.
233
+ tags:
234
+ - BulkQuotes
235
+ parameters:
236
+ - $ref: '#/components/parameters/bulkQuoteId'
237
+ responses:
238
+ '200':
239
+ description: Bulk quote information successfully retrieved
240
+ content:
241
+ application/json:
242
+ schema:
243
+ $ref: '#/components/schemas/bulkQuoteStatusResponse'
244
+ '500':
245
+ description: An error occurred processing the bulk quote
246
+ content:
247
+ application/json:
248
+ schema:
249
+ $ref: '#/components/schemas/errorResponse'
250
+ /requestToPay:
251
+ post:
252
+ summary: Receiver requesting funds from Sender
253
+ description: >
254
+ The HTTP request `POST /requestToPay` is used to support Pull Funds
255
+ pattern where in a receiver can request for funds from the Sender.
256
+
257
+ The underlying API has two stages:
258
+
259
+ 1. Party lookup. This facilitates a check by the sending party that the destination party is correct before proceeding with a money movement.
260
+ 2. Transaction Request. This request enables a Payee to request Payer to send electronic funds to the Payee.
261
+ tags:
262
+ - RequestToPay
263
+ requestBody:
264
+ description: RequestToPay request body
265
+ content:
266
+ application/json:
267
+ schema:
268
+ $ref: '#/components/schemas/requestToPayRequest'
269
+ required: true
270
+ responses:
271
+ '200':
272
+ $ref: '#/components/responses/requestToPaySuccess'
273
+ /requestToPayTransfer:
274
+ post:
275
+ summary: >-
276
+ Used to trigger funds from customer fsp account to merchant fsp account.
277
+ This is a follow-up request to requestToPay.
278
+ description: >
279
+ The HTTP request `POST /requestToPayTransfer` is used to request the
280
+ movement of funds from payer DFSP to payee DFSP.
281
+
282
+ The underlying Mojaloop API has three stages for money transfer:
283
+
284
+ 1. Quotation. This facilitates the exchange of fee information and the construction of a cryptographic "contract" between payee and payer DFSPs before funds are transferred.
285
+ 2. Authorization. This facilitates getting OTP from payee DFSP.
286
+ 3. Transfer. The enactment of the previously agreed "contract"
287
+
288
+ This method has several modes of operation.
289
+
290
+ - If the configuration variable `AUTO_ACCEPT_QUOTES` is set to `"false"`
291
+ this method will terminate and return the quotation when it has been
292
+ received from the payee DFSP.
293
+ If the payee wished to proceed with the otp, then a subsequent `PUT /transfers/{transferId}` request (accepting the quote) is required to continue the operation.
294
+ The scheme adapter will then proceed with the transfer state.
295
+
296
+ - If the configuration variable `AUTO_ACCEPT_OTP` is set to `"false"`
297
+ this method will terminate and return the otp when it has been received
298
+ from the payee DFSP.
299
+ If the payer wished to proceed with the transfer, then a subsequent `PUT /transfers/{transferId}` request (accepting the quote) is required to continue the operation.
300
+ The scheme adapter will then proceed with the transfer state.
301
+
302
+ If the configuration variables `AUTO_ACCEPT_PARTIES` and
303
+ `AUTO_ACCEPT_QUOTES` are both set to `"true"` this method will block
304
+ until all three transfer stages are complete. Upon completion it will
305
+ return the entire set of transfer details received during the operation.
306
+
307
+
308
+ Combinations of settings for `AUTO_ACCEPT...` configuration variables
309
+ allow the scheme adapter user to decide which mode of operation best
310
+ suits their use cases. i.e. the scheme adapter can be configured to
311
+ "break" the three stage transfer at these points in order to execute
312
+ backend logic such as party verification, quoted fees assessments etc...
313
+ tags:
314
+ - RequestToPayTransfer
315
+ requestBody:
316
+ description: Request To Pay Transfer request body
317
+ content:
318
+ application/json:
319
+ schema:
320
+ $ref: '#/components/schemas/requestToPayTransferRequest'
321
+ required: true
322
+ responses:
323
+ '200':
324
+ $ref: '#/components/responses/requestToPayTransferSuccess'
325
+ '400':
326
+ $ref: '#/components/responses/requestToPayTransferBadRequest'
327
+ '500':
328
+ $ref: '#/components/responses/transferServerError'
329
+ '504':
330
+ $ref: '#/components/responses/transferTimeout'
331
+ '/requestToPayTransfer/{requestToPayTransactionId}':
332
+ put:
333
+ summary: >-
334
+ Continues a transfer that has paused at the otp stage in order to accept
335
+ or reject quote
336
+ description: >
337
+ The HTTP request `PUT /transfers/{transferId}` is used to continue a
338
+ transfer initiated via the `POST /transfers` method that has halted
339
+ after party lookup and/or quotation stage.
340
+
341
+
342
+ The request body should contain either the "acceptOTP" or "acceptQuote"
343
+ property set to `true` as required to continue the transfer.
344
+
345
+
346
+ See the description of the `POST /requestToPayTransfer` HTTP method for
347
+ more information on modes of transfer.
348
+ tags:
349
+ - RequestToPayTransferID
350
+ requestBody:
351
+ content:
352
+ application/json:
353
+ schema:
354
+ oneOf:
355
+ - $ref: '#/components/schemas/transferContinuationAcceptQuote'
356
+ - $ref: '#/components/schemas/transferContinuationAcceptOTP'
357
+ parameters:
358
+ - $ref: '#/components/parameters/requestToPayTransactionId'
359
+ responses:
360
+ '200':
361
+ $ref: '#/components/responses/transferSuccess'
362
+ '500':
363
+ $ref: '#/components/responses/transferServerError'
364
+ '504':
365
+ $ref: '#/components/responses/transferTimeout'
366
+ /accounts:
367
+ post:
368
+ summary: Create accounts on the Account Lookup Service
369
+ description: >-
370
+ The HTTP request `POST /accounts` is used to create account information
371
+ on the Account Lookup Service (ALS) regarding the provided list of
372
+ identities.
373
+
374
+
375
+ Caller DFSP is used as the account source FSP information
376
+ tags:
377
+ - Accounts
378
+ requestBody:
379
+ description: Identities list request body
380
+ content:
381
+ application/json:
382
+ schema:
383
+ $ref: '#/components/schemas/accountsRequest'
384
+ required: true
385
+ responses:
386
+ '200':
387
+ $ref: '#/components/responses/accountsCreationCompleted'
388
+ '400':
389
+ $ref: '#/components/responses/accountsCreationError'
390
+ '500':
391
+ $ref: '#/components/responses/accountsCreationError'
392
+ '504':
393
+ $ref: '#/components/responses/accountsCreationTimeout'
394
+ '/parties/{Type}/{ID}':
395
+ parameters:
396
+ - $ref: '#/components/parameters/Type'
397
+ - $ref: '#/components/parameters/ID'
398
+ get:
399
+ description: >-
400
+ The HTTP request GET /parties// (or GET /parties///) is used to lookup
401
+ information regarding the requested Party, defined by , and optionally
402
+ (for example, GET /parties/MSISDN/123456789, or GET
403
+ /parties/BUSINESS/shoecompany/employee1).
404
+ summary: PartiesByTypeAndID
405
+ tags:
406
+ - parties
407
+ operationId: PartiesByTypeAndID
408
+ responses:
409
+ '200':
410
+ $ref: '#/components/responses/partiesByIdSuccess'
411
+ '404':
412
+ $ref: '#/components/responses/partiesByIdError404'
413
+ '/parties/{Type}/{ID}/{SubId}':
414
+ parameters:
415
+ - $ref: '#/components/parameters/Type'
416
+ - $ref: '#/components/parameters/ID'
417
+ - $ref: '#/components/parameters/SubId'
418
+ get:
419
+ description: >-
420
+ The HTTP request GET /parties// (or GET /parties///) is used to lookup
421
+ information regarding the requested Party, defined by , and optionally
422
+ (for example, GET /parties/MSISDN/123456789, or GET
423
+ /parties/BUSINESS/shoecompany/employee1).
424
+ summary: PartiesSubIdByTypeAndID
425
+ tags:
426
+ - parties
427
+ operationId: PartiesSubIdByTypeAndID
428
+ responses:
429
+ '200':
430
+ $ref: '#/components/responses/partiesByIdSuccess'
431
+ '404':
432
+ $ref: '#/components/responses/partiesByIdError404'
433
+ /quotes:
434
+ post:
435
+ summary: Quotes endpoint
436
+ description: is used to request quotes from other DFSP
437
+ tags:
438
+ - quotes
439
+ operationId: QuotesPost
440
+ requestBody:
441
+ description: Quotes request payload
442
+ content:
443
+ application/json:
444
+ schema:
445
+ $ref: '#/components/schemas/quotesPostRequest'
446
+ required: true
447
+ responses:
448
+ '200':
449
+ $ref: '#/components/responses/quotesPostSuccess'
450
+ '500':
451
+ $ref: '#/components/responses/quotesServerError'
452
+ /simpleTransfers:
453
+ post:
454
+ summary: Simple Transfers endpoint
455
+ description: is used to request a transfer
456
+ tags:
457
+ - transfers
458
+ operationId: SimpleTransfersPost
459
+ requestBody:
460
+ description: Simple Transfer request payload
461
+ content:
462
+ application/json:
463
+ schema:
464
+ $ref: '#/components/schemas/simpleTransfersPostRequest'
465
+ required: true
466
+ responses:
467
+ '200':
468
+ $ref: '#/components/responses/simpleTransfersPostSuccess'
469
+ '500':
470
+ $ref: '#/components/responses/simpleTransfersServerError'
471
+ /authorizations:
472
+ post:
473
+ description: >-
474
+ The HTTP request `POST /authorizations` is used to request the Payer to
475
+ enter the applicable credentials in the PISP system.
476
+ summary: Authorizations endpoint
477
+ operationId: AuthorizationsPost
478
+ tags:
479
+ - authorizations
480
+ requestBody:
481
+ description: Perform authorization
482
+ required: true
483
+ content:
484
+ application/json:
485
+ schema:
486
+ $ref: '#/components/schemas/authorizationsPostRequest'
487
+ responses:
488
+ '200':
489
+ $ref: '#/components/responses/authorizationPostSuccess'
490
+ '500':
491
+ $ref: '#/components/responses/authorizationsServerError'
492
+ components:
493
+ schemas:
494
+ TransactionInitiatorType:
495
+ title: TransactionInitiatorType
496
+ type: string
497
+ enum:
498
+ - CONSUMER
499
+ - AGENT
500
+ - BUSINESS
501
+ - DEVICE
502
+ description: |-
503
+ Below are the allowed values for the enumeration.
504
+ - CONSUMER - Consumer is the initiator of the transaction.
505
+ - AGENT - Agent is the initiator of the transaction.
506
+ - BUSINESS - Business is the initiator of the transaction.
507
+ - DEVICE - Device is the initiator of the transaction.
508
+ example: CONSUMER
509
+ PartyIdType:
510
+ title: PartyIdType
511
+ type: string
512
+ enum:
513
+ - MSISDN
514
+ - EMAIL
515
+ - PERSONAL_ID
516
+ - BUSINESS
517
+ - DEVICE
518
+ - ACCOUNT_ID
519
+ - IBAN
520
+ - ALIAS
521
+ - CONSENT
522
+ - THIRD_PARTY_LINK
523
+ description: >
524
+ This is a variant based on FSPIOP `PartyIdType` specification.
525
+
526
+ Main difference being the CONSENT and THIRD_PARTY_LINK enums.
527
+
528
+
529
+ Below are the allowed values for the enumeration.
530
+
531
+ - MSISDN - An MSISDN (Mobile Station International Subscriber Directory
532
+
533
+ Number, that is, the phone number) is used as reference to a
534
+ participant.
535
+
536
+ The MSISDN identifier should be in international format according to the
537
+
538
+ [ITU-T E.164 standard](https://www.itu.int/rec/T-REC-E.164/en).
539
+
540
+ Optionally, the MSISDN may be prefixed by a single plus sign, indicating
541
+ the
542
+
543
+ international prefix.
544
+
545
+ - EMAIL - An email is used as reference to a
546
+
547
+ participant. The format of the email should be according to the
548
+ informational
549
+
550
+ [RFC 3696](https://tools.ietf.org/html/rfc3696).
551
+
552
+ - PERSONAL_ID - A personal identifier is used as reference to a
553
+ participant.
554
+
555
+ Examples of personal identification are passport number, birth
556
+ certificate
557
+
558
+ number, and national registration number. The identifier number is added
559
+ in
560
+
561
+ the PartyIdentifier element. The personal identifier type is added in
562
+ the
563
+
564
+ PartySubIdOrType element.
565
+
566
+ - BUSINESS - A specific Business (for example, an organization or a
567
+ company)
568
+
569
+ is used as reference to a participant. The BUSINESS identifier can be in
570
+ any
571
+
572
+ format. To make a transaction connected to a specific username or bill
573
+ number
574
+
575
+ in a Business, the PartySubIdOrType element should be used.
576
+
577
+ - DEVICE - A specific device (for example, a POS or ATM) ID connected to
578
+ a
579
+
580
+ specific business or organization is used as reference to a Party.
581
+
582
+ For referencing a specific device under a specific business or
583
+ organization,
584
+
585
+ use the PartySubIdOrType element.
586
+
587
+ - ACCOUNT_ID - A bank account number or FSP account ID should be used as
588
+
589
+ reference to a participant. The ACCOUNT_ID identifier can be in any
590
+ format,
591
+
592
+ as formats can greatly differ depending on country and FSP.
593
+
594
+ - IBAN - A bank account number or FSP account ID is used as reference to
595
+ a
596
+
597
+ participant. The IBAN identifier can consist of up to 34 alphanumeric
598
+
599
+ characters and should be entered without whitespace.
600
+
601
+ - ALIAS An alias is used as reference to a participant. The alias should
602
+ be
603
+
604
+ created in the FSP as an alternative reference to an account owner.
605
+
606
+ Another example of an alias is a username in the FSP system.
607
+
608
+ The ALIAS identifier can be in any format. It is also possible to use
609
+ the
610
+
611
+ PartySubIdOrType element for identifying an account under an Alias
612
+ defined
613
+
614
+ by the PartyIdentifier.
615
+
616
+ - CONSENT - TBD
617
+
618
+ - THIRD_PARTY_LINK - TBD
619
+ example: PERSONAL_ID
620
+ PartyIdentifier:
621
+ title: PartyIdentifier
622
+ type: string
623
+ minLength: 1
624
+ maxLength: 128
625
+ description: Identifier of the Party.
626
+ example: '16135551212'
627
+ PartySubIdOrType:
628
+ title: PartySubIdOrType
629
+ type: string
630
+ minLength: 1
631
+ maxLength: 128
632
+ description: >-
633
+ Either a sub-identifier of a PartyIdentifier, or a sub-type of the
634
+ PartyIdType, normally a PersonalIdentifierType.
635
+ Name:
636
+ title: Name
637
+ type: string
638
+ pattern: '^(?!\s*$)[\w .,''-]{1,128}$'
639
+ description: >-
640
+ The API data type Name is a JSON String, restricted by a regular
641
+ expression to avoid characters which are generally not used in a name.
642
+
643
+
644
+ Regular Expression - The regular expression for restricting the Name
645
+ type is "^(?!\s*$)[\w .,'-]{1,128}$". The restriction does not allow a
646
+ string consisting of whitespace only, all Unicode characters are
647
+ allowed, as well as the period (.) (apostrophe (‘), dash (-), comma (,)
648
+ and space characters ( ).
649
+
650
+
651
+ **Note:** In some programming languages, Unicode support must be
652
+ specifically enabled. For example, if Java is used, the flag
653
+ UNICODE_CHARACTER_CLASS must be enabled to allow Unicode characters.
654
+ FirstName:
655
+ title: FirstName
656
+ type: string
657
+ minLength: 1
658
+ maxLength: 128
659
+ pattern: >-
660
+ ^(?!\s*$)[\p{L}\p{gc=Mark}\p{digit}\p{gc=Connector_Punctuation}\p{Join_Control}
661
+ .,''-]{1,128}$
662
+ description: First name of the Party (Name Type).
663
+ example: Henrik
664
+ MiddleName:
665
+ title: MiddleName
666
+ type: string
667
+ minLength: 1
668
+ maxLength: 128
669
+ pattern: >-
670
+ ^(?!\s*$)[\p{L}\p{gc=Mark}\p{digit}\p{gc=Connector_Punctuation}\p{Join_Control}
671
+ .,''-]{1,128}$
672
+ description: Middle name of the Party (Name Type).
673
+ example: Johannes
674
+ LastName:
675
+ title: LastName
676
+ type: string
677
+ minLength: 1
678
+ maxLength: 128
679
+ pattern: >-
680
+ ^(?!\s*$)[\p{L}\p{gc=Mark}\p{digit}\p{gc=Connector_Punctuation}\p{Join_Control}
681
+ .,''-]{1,128}$
682
+ description: Last name of the Party (Name Type).
683
+ example: Karlsson
684
+ DateOfBirth:
685
+ title: DateofBirth (type Date)
686
+ type: string
687
+ pattern: >-
688
+ ^(?:[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)$
689
+ description: Date of Birth of the Party.
690
+ example: '1966-06-16'
691
+ MerchantClassificationCode:
692
+ title: MerchantClassificationCode
693
+ type: string
694
+ pattern: '^[\d]{1,4}$'
695
+ description: >-
696
+ A limited set of pre-defined numbers. This list would be a limited set
697
+ of numbers identifying a set of popular merchant types like School Fees,
698
+ Pubs and Restaurants, Groceries, etc.
699
+ FspId:
700
+ title: FspId
701
+ type: string
702
+ minLength: 1
703
+ maxLength: 32
704
+ description: FSP identifier.
705
+ ExtensionKey:
706
+ title: ExtensionKey
707
+ type: string
708
+ minLength: 1
709
+ maxLength: 32
710
+ description: Extension key.
711
+ ExtensionValue:
712
+ title: ExtensionValue
713
+ type: string
714
+ minLength: 1
715
+ maxLength: 128
716
+ description: Extension value.
717
+ Extension:
718
+ title: Extension
719
+ type: object
720
+ description: Data model for the complex type Extension.
721
+ properties:
722
+ key:
723
+ $ref: '#/components/schemas/ExtensionKey'
724
+ value:
725
+ $ref: '#/components/schemas/ExtensionValue'
726
+ required:
727
+ - key
728
+ - value
729
+ extensionListEmptiable:
730
+ type: array
731
+ items:
732
+ $ref: '#/components/schemas/Extension'
733
+ minItems: 0
734
+ maxItems: 16
735
+ transferParty:
736
+ type: object
737
+ required:
738
+ - idType
739
+ - idValue
740
+ properties:
741
+ type:
742
+ $ref: '#/components/schemas/TransactionInitiatorType'
743
+ idType:
744
+ $ref: '#/components/schemas/PartyIdType'
745
+ idValue:
746
+ $ref: '#/components/schemas/PartyIdentifier'
747
+ idSubValue:
748
+ $ref: '#/components/schemas/PartySubIdOrType'
749
+ displayName:
750
+ $ref: '#/components/schemas/Name'
751
+ firstName:
752
+ $ref: '#/components/schemas/FirstName'
753
+ middleName:
754
+ $ref: '#/components/schemas/MiddleName'
755
+ lastName:
756
+ $ref: '#/components/schemas/LastName'
757
+ dateOfBirth:
758
+ $ref: '#/components/schemas/DateOfBirth'
759
+ merchantClassificationCode:
760
+ $ref: '#/components/schemas/MerchantClassificationCode'
761
+ fspId:
762
+ $ref: '#/components/schemas/FspId'
763
+ extensionList:
764
+ $ref: '#/components/schemas/extensionListEmptiable'
765
+ AmountType:
766
+ title: AmountType
767
+ type: string
768
+ enum:
769
+ - SEND
770
+ - RECEIVE
771
+ description: >-
772
+ Below are the allowed values for the enumeration AmountType.
773
+
774
+ - SEND - Amount the Payer would like to send, that is, the amount that
775
+ should be withdrawn from the Payer account including any fees.
776
+
777
+ - RECEIVE - Amount the Payer would like the Payee to receive, that is,
778
+ the amount that should be sent to the receiver exclusive of any fees.
779
+ example: RECEIVE
780
+ Currency:
781
+ title: Currency
782
+ description: >-
783
+ The currency codes defined in [ISO
784
+ 4217](https://www.iso.org/iso-4217-currency-codes.html) as three-letter
785
+ alphabetic codes are used as the standard naming representation for
786
+ currencies.
787
+ type: string
788
+ minLength: 3
789
+ maxLength: 3
790
+ enum:
791
+ - AED
792
+ - AFN
793
+ - ALL
794
+ - AMD
795
+ - ANG
796
+ - AOA
797
+ - ARS
798
+ - AUD
799
+ - AWG
800
+ - AZN
801
+ - BAM
802
+ - BBD
803
+ - BDT
804
+ - BGN
805
+ - BHD
806
+ - BIF
807
+ - BMD
808
+ - BND
809
+ - BOB
810
+ - BRL
811
+ - BSD
812
+ - BTN
813
+ - BWP
814
+ - BYN
815
+ - BZD
816
+ - CAD
817
+ - CDF
818
+ - CHF
819
+ - CLP
820
+ - CNY
821
+ - COP
822
+ - CRC
823
+ - CUC
824
+ - CUP
825
+ - CVE
826
+ - CZK
827
+ - DJF
828
+ - DKK
829
+ - DOP
830
+ - DZD
831
+ - EGP
832
+ - ERN
833
+ - ETB
834
+ - EUR
835
+ - FJD
836
+ - FKP
837
+ - GBP
838
+ - GEL
839
+ - GGP
840
+ - GHS
841
+ - GIP
842
+ - GMD
843
+ - GNF
844
+ - GTQ
845
+ - GYD
846
+ - HKD
847
+ - HNL
848
+ - HRK
849
+ - HTG
850
+ - HUF
851
+ - IDR
852
+ - ILS
853
+ - IMP
854
+ - INR
855
+ - IQD
856
+ - IRR
857
+ - ISK
858
+ - JEP
859
+ - JMD
860
+ - JOD
861
+ - JPY
862
+ - KES
863
+ - KGS
864
+ - KHR
865
+ - KMF
866
+ - KPW
867
+ - KRW
868
+ - KWD
869
+ - KYD
870
+ - KZT
871
+ - LAK
872
+ - LBP
873
+ - LKR
874
+ - LRD
875
+ - LSL
876
+ - LYD
877
+ - MAD
878
+ - MDL
879
+ - MGA
880
+ - MKD
881
+ - MMK
882
+ - MNT
883
+ - MOP
884
+ - MRO
885
+ - MUR
886
+ - MVR
887
+ - MWK
888
+ - MXN
889
+ - MYR
890
+ - MZN
891
+ - NAD
892
+ - NGN
893
+ - NIO
894
+ - NOK
895
+ - NPR
896
+ - NZD
897
+ - OMR
898
+ - PAB
899
+ - PEN
900
+ - PGK
901
+ - PHP
902
+ - PKR
903
+ - PLN
904
+ - PYG
905
+ - QAR
906
+ - RON
907
+ - RSD
908
+ - RUB
909
+ - RWF
910
+ - SAR
911
+ - SBD
912
+ - SCR
913
+ - SDG
914
+ - SEK
915
+ - SGD
916
+ - SHP
917
+ - SLL
918
+ - SOS
919
+ - SPL
920
+ - SRD
921
+ - STD
922
+ - SVC
923
+ - SYP
924
+ - SZL
925
+ - THB
926
+ - TJS
927
+ - TMT
928
+ - TND
929
+ - TOP
930
+ - TRY
931
+ - TTD
932
+ - TVD
933
+ - TWD
934
+ - TZS
935
+ - UAH
936
+ - UGX
937
+ - USD
938
+ - UYU
939
+ - UZS
940
+ - VEF
941
+ - VND
942
+ - VUV
943
+ - WST
944
+ - XAF
945
+ - XCD
946
+ - XDR
947
+ - XOF
948
+ - XPF
949
+ - YER
950
+ - ZAR
951
+ - ZMW
952
+ - ZWD
953
+ Amount:
954
+ title: Amount
955
+ type: string
956
+ pattern: '^([0]|([1-9][0-9]{0,17}))([.][0-9]{0,3}[1-9])?$'
957
+ description: >-
958
+ The API data type Amount is a JSON String in a canonical format that is
959
+ restricted by a regular expression for interoperability reasons. This
960
+ pattern does not allow any trailing zeroes at all, but allows an amount
961
+ without a minor currency unit. It also only allows four digits in the
962
+ minor currency unit; a negative value is not allowed. Using more than 18
963
+ digits in the major currency unit is not allowed.
964
+ example: '123.45'
965
+ transactionType:
966
+ type: string
967
+ enum:
968
+ - TRANSFER
969
+ description: Type of transaction.
970
+ Note:
971
+ title: Note
972
+ type: string
973
+ minLength: 1
974
+ maxLength: 128
975
+ description: Memo assigned to transaction.
976
+ example: Note sent to Payee.
977
+ transferRequest:
978
+ type: object
979
+ required:
980
+ - homeTransactionId
981
+ - from
982
+ - to
983
+ - amountType
984
+ - currency
985
+ - amount
986
+ - transactionType
987
+ properties:
988
+ homeTransactionId:
989
+ type: string
990
+ description: >-
991
+ Transaction ID from the DFSP backend, used to reconcile transactions
992
+ between the Switch and DFSP backend systems.
993
+ from:
994
+ $ref: '#/components/schemas/transferParty'
995
+ to:
996
+ $ref: '#/components/schemas/transferParty'
997
+ amountType:
998
+ $ref: '#/components/schemas/AmountType'
999
+ currency:
1000
+ $ref: '#/components/schemas/Currency'
1001
+ amount:
1002
+ $ref: '#/components/schemas/Amount'
1003
+ transactionType:
1004
+ $ref: '#/components/schemas/transactionType'
1005
+ note:
1006
+ $ref: '#/components/schemas/Note'
1007
+ quoteRequestExtensions:
1008
+ $ref: '#/components/schemas/extensionListEmptiable'
1009
+ transferRequestExtensions:
1010
+ $ref: '#/components/schemas/extensionListEmptiable'
1011
+ CorrelationId:
1012
+ title: CorrelationId
1013
+ type: string
1014
+ pattern: >-
1015
+ ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
1016
+ description: >-
1017
+ Identifier that correlates all messages of the same sequence. The API
1018
+ data type UUID (Universally Unique Identifier) is a JSON String in
1019
+ canonical format, conforming to [RFC
1020
+ 4122](https://tools.ietf.org/html/rfc4122), that is restricted by a
1021
+ regular expression for interoperability reasons. A UUID is always 36
1022
+ characters long, 32 hexadecimal symbols and 4 dashes (‘-‘).
1023
+ example: b51ec534-ee48-4575-b6a9-ead2955b8069
1024
+ transferStatus:
1025
+ type: string
1026
+ enum:
1027
+ - ERROR_OCCURRED
1028
+ - WAITING_FOR_PARTY_ACCEPTANCE
1029
+ - WAITING_FOR_QUOTE_ACCEPTANCE
1030
+ - COMPLETED
1031
+ Money:
1032
+ title: Money
1033
+ type: object
1034
+ description: Data model for the complex type Money.
1035
+ properties:
1036
+ currency:
1037
+ $ref: '#/components/schemas/Currency'
1038
+ amount:
1039
+ $ref: '#/components/schemas/Amount'
1040
+ required:
1041
+ - currency
1042
+ - amount
1043
+ DateTime:
1044
+ title: DateTime
1045
+ type: string
1046
+ pattern: >-
1047
+ ^(?:[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)$
1048
+ description: >-
1049
+ The API data type DateTime is a JSON String in a lexical format that is
1050
+ restricted by a regular expression for interoperability reasons. The
1051
+ format is according to [ISO
1052
+ 8601](https://www.iso.org/iso-8601-date-and-time-format.html), expressed
1053
+ in a combined date, time and time zone format. A more readable version
1054
+ of the format is yyyy-MM-ddTHH:mm:ss.SSS[-HH:MM]. Examples are
1055
+ "2016-05-24T08:38:08.699-04:00", "2016-05-24T08:38:08.699Z" (where Z
1056
+ indicates Zulu time zone, same as UTC).
1057
+ example: '2016-05-24T08:38:08.699-04:00'
1058
+ Latitude:
1059
+ title: Latitude
1060
+ type: string
1061
+ pattern: >-
1062
+ ^(\+|-)?(?:90(?:(?:\.0{1,6})?)|(?:[0-9]|[1-8][0-9])(?:(?:\.[0-9]{1,6})?))$
1063
+ description: >-
1064
+ The API data type Latitude is a JSON String in a lexical format that is
1065
+ restricted by a regular expression for interoperability reasons.
1066
+ example: '+45.4215'
1067
+ Longitude:
1068
+ title: Longitude
1069
+ type: string
1070
+ pattern: >-
1071
+ ^(\+|-)?(?:180(?:(?:\.0{1,6})?)|(?:[0-9]|[1-9][0-9]|1[0-7][0-9])(?:(?:\.[0-9]{1,6})?))$
1072
+ description: >-
1073
+ The API data type Longitude is a JSON String in a lexical format that is
1074
+ restricted by a regular expression for interoperability reasons.
1075
+ example: '+75.6972'
1076
+ GeoCode:
1077
+ title: GeoCode
1078
+ type: object
1079
+ description: >-
1080
+ Data model for the complex type GeoCode. Indicates the geographic
1081
+ location from where the transaction was initiated.
1082
+ properties:
1083
+ latitude:
1084
+ $ref: '#/components/schemas/Latitude'
1085
+ longitude:
1086
+ $ref: '#/components/schemas/Longitude'
1087
+ required:
1088
+ - latitude
1089
+ - longitude
1090
+ IlpPacket:
1091
+ title: IlpPacket
1092
+ type: string
1093
+ pattern: '^[A-Za-z0-9-_]+[=]{0,2}$'
1094
+ minLength: 1
1095
+ maxLength: 32768
1096
+ description: Information for recipient (transport layer information).
1097
+ example: >-
1098
+ AYIBgQAAAAAAAASwNGxldmVsb25lLmRmc3AxLm1lci45T2RTOF81MDdqUUZERmZlakgyOVc4bXFmNEpLMHlGTFGCAUBQU0svMS4wCk5vbmNlOiB1SXlweUYzY3pYSXBFdzVVc05TYWh3CkVuY3J5cHRpb246IG5vbmUKUGF5bWVudC1JZDogMTMyMzZhM2ItOGZhOC00MTYzLTg0NDctNGMzZWQzZGE5OGE3CgpDb250ZW50LUxlbmd0aDogMTM1CkNvbnRlbnQtVHlwZTogYXBwbGljYXRpb24vanNvbgpTZW5kZXItSWRlbnRpZmllcjogOTI4MDYzOTEKCiJ7XCJmZWVcIjowLFwidHJhbnNmZXJDb2RlXCI6XCJpbnZvaWNlXCIsXCJkZWJpdE5hbWVcIjpcImFsaWNlIGNvb3BlclwiLFwiY3JlZGl0TmFtZVwiOlwibWVyIGNoYW50XCIsXCJkZWJpdElkZW50aWZpZXJcIjpcIjkyODA2MzkxXCJ9IgA
1099
+ IlpCondition:
1100
+ title: IlpCondition
1101
+ type: string
1102
+ pattern: '^[A-Za-z0-9-_]{43}$'
1103
+ maxLength: 48
1104
+ description: Condition that must be attached to the transfer by the Payer.
1105
+ ExtensionList:
1106
+ title: ExtensionList
1107
+ type: object
1108
+ description: >-
1109
+ Data model for the complex type ExtensionList. An optional list of
1110
+ extensions, specific to deployment.
1111
+ properties:
1112
+ extension:
1113
+ type: array
1114
+ items:
1115
+ $ref: '#/components/schemas/Extension'
1116
+ minItems: 1
1117
+ maxItems: 16
1118
+ description: Number of Extension elements.
1119
+ required:
1120
+ - extension
1121
+ QuotesIDPutResponse:
1122
+ title: QuotesIDPutResponse
1123
+ type: object
1124
+ description: 'The object sent in the PUT /quotes/{ID} callback.'
1125
+ properties:
1126
+ transferAmount:
1127
+ $ref: '#/components/schemas/Money'
1128
+ payeeReceiveAmount:
1129
+ $ref: '#/components/schemas/Money'
1130
+ payeeFspFee:
1131
+ $ref: '#/components/schemas/Money'
1132
+ payeeFspCommission:
1133
+ $ref: '#/components/schemas/Money'
1134
+ expiration:
1135
+ $ref: '#/components/schemas/DateTime'
1136
+ geoCode:
1137
+ $ref: '#/components/schemas/GeoCode'
1138
+ ilpPacket:
1139
+ $ref: '#/components/schemas/IlpPacket'
1140
+ condition:
1141
+ $ref: '#/components/schemas/IlpCondition'
1142
+ extensionList:
1143
+ $ref: '#/components/schemas/ExtensionList'
1144
+ required:
1145
+ - transferAmount
1146
+ - expiration
1147
+ - ilpPacket
1148
+ - condition
1149
+ IlpFulfilment:
1150
+ title: IlpFulfilment
1151
+ type: string
1152
+ pattern: '^[A-Za-z0-9-_]{43}$'
1153
+ maxLength: 48
1154
+ description: Fulfilment that must be attached to the transfer by the Payee.
1155
+ example: WLctttbu2HvTsa1XWvUoGRcQozHsqeu9Ahl2JW9Bsu8
1156
+ TransferState:
1157
+ title: TransferState
1158
+ type: string
1159
+ enum:
1160
+ - RECEIVED
1161
+ - RESERVED
1162
+ - COMMITTED
1163
+ - ABORTED
1164
+ description: >-
1165
+ Below are the allowed values for the enumeration.
1166
+
1167
+ - RECEIVED - Next ledger has received the transfer.
1168
+
1169
+ - RESERVED - Next ledger has reserved the transfer.
1170
+
1171
+ - COMMITTED - Next ledger has successfully performed the transfer.
1172
+
1173
+ - ABORTED - Next ledger has aborted the transfer due to a rejection or
1174
+ failure to perform the transfer.
1175
+ example: RESERVED
1176
+ TransfersIDPutResponse:
1177
+ title: TransfersIDPutResponse
1178
+ type: object
1179
+ description: 'The object sent in the PUT /transfers/{ID} callback.'
1180
+ properties:
1181
+ fulfilment:
1182
+ $ref: '#/components/schemas/IlpFulfilment'
1183
+ completedTimestamp:
1184
+ $ref: '#/components/schemas/DateTime'
1185
+ transferState:
1186
+ $ref: '#/components/schemas/TransferState'
1187
+ extensionList:
1188
+ $ref: '#/components/schemas/ExtensionList'
1189
+ required:
1190
+ - transferState
1191
+ ErrorCode:
1192
+ title: ErrorCode
1193
+ type: string
1194
+ pattern: '^[1-9]\d{3}$'
1195
+ description: >-
1196
+ The API data type ErrorCode is a JSON String of four characters,
1197
+ consisting of digits only. Negative numbers are not allowed. A leading
1198
+ zero is not allowed. Each error code in the API is a four-digit number,
1199
+ for example, 1234, where the first number (1 in the example) represents
1200
+ the high-level error category, the second number (2 in the example)
1201
+ represents the low-level error category, and the last two numbers (34 in
1202
+ the example) represent the specific error.
1203
+ example: '5100'
1204
+ ErrorDescription:
1205
+ title: ErrorDescription
1206
+ type: string
1207
+ minLength: 1
1208
+ maxLength: 128
1209
+ description: Error description string.
1210
+ ErrorInformation:
1211
+ title: ErrorInformation
1212
+ type: object
1213
+ description: Data model for the complex type ErrorInformation.
1214
+ properties:
1215
+ errorCode:
1216
+ $ref: '#/components/schemas/ErrorCode'
1217
+ errorDescription:
1218
+ $ref: '#/components/schemas/ErrorDescription'
1219
+ extensionList:
1220
+ $ref: '#/components/schemas/ExtensionList'
1221
+ required:
1222
+ - errorCode
1223
+ - errorDescription
1224
+ mojaloopError:
1225
+ type: object
1226
+ properties:
1227
+ errorInformation:
1228
+ $ref: '#/components/schemas/ErrorInformation'
1229
+ transferError:
1230
+ type: object
1231
+ description: >-
1232
+ This object represents a Mojaloop API error received at any time during
1233
+ the transfer process
1234
+ properties:
1235
+ httpStatusCode:
1236
+ type: integer
1237
+ description: >-
1238
+ The HTTP status code returned to the caller. This is the same as the
1239
+ actual HTTP status code returned with the response.
1240
+ mojaloopError:
1241
+ description: >-
1242
+ If a transfer process results in an error callback during the
1243
+ asynchronous Mojaloop API exchange, this property will contain the
1244
+ underlying Mojaloop API error object.
1245
+ $ref: '#/components/schemas/mojaloopError'
1246
+ transferResponse:
1247
+ type: object
1248
+ required:
1249
+ - homeTransactionId
1250
+ - from
1251
+ - to
1252
+ - amountType
1253
+ - currency
1254
+ - amount
1255
+ - transactionType
1256
+ properties:
1257
+ transferId:
1258
+ $ref: '#/components/schemas/CorrelationId'
1259
+ homeTransactionId:
1260
+ type: string
1261
+ description: >-
1262
+ Transaction ID from the DFSP backend, used to reconcile transactions
1263
+ between the Switch and DFSP backend systems.
1264
+ from:
1265
+ $ref: '#/components/schemas/transferParty'
1266
+ to:
1267
+ $ref: '#/components/schemas/transferParty'
1268
+ amountType:
1269
+ $ref: '#/components/schemas/AmountType'
1270
+ currency:
1271
+ $ref: '#/components/schemas/Currency'
1272
+ amount:
1273
+ $ref: '#/components/schemas/Amount'
1274
+ transactionType:
1275
+ $ref: '#/components/schemas/transactionType'
1276
+ note:
1277
+ $ref: '#/components/schemas/Note'
1278
+ currentState:
1279
+ $ref: '#/components/schemas/transferStatus'
1280
+ quoteId:
1281
+ $ref: '#/components/schemas/CorrelationId'
1282
+ quoteResponse:
1283
+ $ref: '#/components/schemas/QuotesIDPutResponse'
1284
+ quoteResponseSource:
1285
+ type: string
1286
+ description: >
1287
+ FSPID of the entity that supplied the quote response. This may not
1288
+ be the same as the FSPID of the entity which owns the end user
1289
+ account in the case of a FOREX transfer. i.e. it may be a FOREX
1290
+ gateway.
1291
+ fulfil:
1292
+ $ref: '#/components/schemas/TransfersIDPutResponse'
1293
+ lastError:
1294
+ description: >
1295
+ Object representing the last error to occur during a transfer
1296
+ process. This may be a Mojaloop API error returned from another
1297
+ entity in the scheme or an object representing other types of error
1298
+ e.g. exceptions that may occur inside the scheme adapter.
1299
+ $ref: '#/components/schemas/transferError'
1300
+ errorResponse:
1301
+ type: object
1302
+ properties:
1303
+ statusCode:
1304
+ type: string
1305
+ description: Error code as string.
1306
+ message:
1307
+ type: string
1308
+ description: Error message text.
1309
+ errorTransferResponse:
1310
+ allOf:
1311
+ - $ref: '#/components/schemas/errorResponse'
1312
+ - type: object
1313
+ required:
1314
+ - transferState
1315
+ properties:
1316
+ transferState:
1317
+ $ref: '#/components/schemas/transferResponse'
1318
+ transferStatusResponse:
1319
+ type: object
1320
+ required:
1321
+ - transferId
1322
+ - currentState
1323
+ - fulfil
1324
+ properties:
1325
+ transferId:
1326
+ $ref: '#/components/schemas/CorrelationId'
1327
+ currentState:
1328
+ $ref: '#/components/schemas/transferStatus'
1329
+ fulfil:
1330
+ $ref: '#/components/schemas/TransfersIDPutResponse'
1331
+ transferContinuationAcceptParty:
1332
+ type: object
1333
+ required:
1334
+ - acceptParty
1335
+ properties:
1336
+ acceptParty:
1337
+ type: boolean
1338
+ enum:
1339
+ - true
1340
+ transferContinuationAcceptQuote:
1341
+ type: object
1342
+ required:
1343
+ - acceptQuote
1344
+ properties:
1345
+ acceptQuote:
1346
+ type: boolean
1347
+ enum:
1348
+ - true
1349
+ - false
1350
+ individualTransfer:
1351
+ title: IndividualTransfer
1352
+ type: object
1353
+ description: Data model for the complex type 'individualTransfer'.
1354
+ properties:
1355
+ transferId:
1356
+ $ref: '#/components/schemas/CorrelationId'
1357
+ to:
1358
+ $ref: '#/components/schemas/transferParty'
1359
+ amountType:
1360
+ $ref: '#/components/schemas/AmountType'
1361
+ currency:
1362
+ $ref: '#/components/schemas/Currency'
1363
+ amount:
1364
+ $ref: '#/components/schemas/Amount'
1365
+ transactionType:
1366
+ $ref: '#/components/schemas/transactionType'
1367
+ note:
1368
+ $ref: '#/components/schemas/Note'
1369
+ extensions:
1370
+ $ref: '#/components/schemas/ExtensionList'
1371
+ required:
1372
+ - transferId
1373
+ - to
1374
+ - amountType
1375
+ - currency
1376
+ - transactionType
1377
+ bulkTransferRequest:
1378
+ type: object
1379
+ required:
1380
+ - homeTransactionId
1381
+ - from
1382
+ - individualTransfers
1383
+ properties:
1384
+ homeTransactionId:
1385
+ type: string
1386
+ description: >-
1387
+ Transaction ID from the DFSP backend, used to reconcile transactions
1388
+ between the Switch and DFSP backend systems.
1389
+ bulkTransferId:
1390
+ $ref: '#/components/schemas/CorrelationId'
1391
+ from:
1392
+ $ref: '#/components/schemas/transferParty'
1393
+ individualTransfers:
1394
+ description: List of individual transfers in a bulk transfer.
1395
+ type: array
1396
+ minItems: 1
1397
+ maxItems: 1000
1398
+ items:
1399
+ $ref: '#/components/schemas/individualTransfer'
1400
+ extensions:
1401
+ $ref: '#/components/schemas/ExtensionList'
1402
+ individualTransferResult:
1403
+ type: object
1404
+ properties:
1405
+ transferId:
1406
+ $ref: '#/components/schemas/CorrelationId'
1407
+ to:
1408
+ $ref: '#/components/schemas/transferParty'
1409
+ amountType:
1410
+ $ref: '#/components/schemas/AmountType'
1411
+ currency:
1412
+ $ref: '#/components/schemas/Currency'
1413
+ amount:
1414
+ $ref: '#/components/schemas/Amount'
1415
+ transactionType:
1416
+ $ref: '#/components/schemas/transactionType'
1417
+ note:
1418
+ $ref: '#/components/schemas/Note'
1419
+ quoteId:
1420
+ $ref: '#/components/schemas/CorrelationId'
1421
+ quoteResponse:
1422
+ $ref: '#/components/schemas/QuotesIDPutResponse'
1423
+ quoteResponseSource:
1424
+ type: string
1425
+ description: >
1426
+ FSPID of the entity that supplied the quote response. This may not
1427
+ be the same as the FSPID of the entity which owns the end user
1428
+ account in the case of a FOREX transfer. i.e. it may be a FOREX
1429
+ gateway.
1430
+ fulfil:
1431
+ $ref: '#/components/schemas/TransfersIDPutResponse'
1432
+ lastError:
1433
+ description: >
1434
+ Object representing the last error to occur during a transfer
1435
+ process. This may be a Mojaloop API error returned from another
1436
+ entity in the scheme or an object representing other types of error
1437
+ e.g. exceptions that may occur inside the scheme adapter.
1438
+ $ref: '#/components/schemas/transferError'
1439
+ bulkTransferResponse:
1440
+ type: object
1441
+ required:
1442
+ - from
1443
+ - individualTransferResults
1444
+ properties:
1445
+ transferId:
1446
+ $ref: '#/components/schemas/CorrelationId'
1447
+ from:
1448
+ $ref: '#/components/schemas/transferParty'
1449
+ individualTransferResults:
1450
+ type: array
1451
+ maxItems: 1000
1452
+ items:
1453
+ $ref: '#/components/schemas/individualTransferResult'
1454
+ description: List of individual transfer result in a bulk transfer response.
1455
+ bulkTransferErrorResponse:
1456
+ allOf:
1457
+ - $ref: '#/components/schemas/errorResponse'
1458
+ - type: object
1459
+ required:
1460
+ - bulkTansferState
1461
+ properties:
1462
+ bulkTransferState:
1463
+ $ref: '#/components/schemas/bulkTransferResponse'
1464
+ bulkTransferStatus:
1465
+ type: string
1466
+ enum:
1467
+ - ERROR_OCCURRED
1468
+ - COMPLETED
1469
+ individualTransferFulfilment:
1470
+ type: object
1471
+ description: >-
1472
+ A Mojaloop API transfer fulfilment for individual transfers in a bulk
1473
+ transfer
1474
+ properties:
1475
+ fulfilment:
1476
+ $ref: '#/components/schemas/IlpFulfilment'
1477
+ description: >
1478
+ Fulfilment of the condition specified with the transaction.
1479
+ Mandatory if transfer has completed successfully.
1480
+ extensionList:
1481
+ $ref: '#/components/schemas/ExtensionList'
1482
+ description: 'Optional extension, specific to deployment.'
1483
+ bulkTransferStatusResponse:
1484
+ type: object
1485
+ required:
1486
+ - bulkTransferId
1487
+ - currentState
1488
+ - fulfils
1489
+ properties:
1490
+ bulkTransferId:
1491
+ $ref: '#/components/schemas/CorrelationId'
1492
+ currentState:
1493
+ $ref: '#/components/schemas/bulkTransferStatus'
1494
+ fulfils:
1495
+ type: array
1496
+ minItems: 1
1497
+ maxItems: 1000
1498
+ items:
1499
+ $ref: '#/components/schemas/individualTransferFulfilment'
1500
+ individualQuote:
1501
+ title: IndividualQuote
1502
+ type: object
1503
+ description: Data model for the complex type 'individualQuote'.
1504
+ properties:
1505
+ quoteId:
1506
+ $ref: '#/components/schemas/CorrelationId'
1507
+ to:
1508
+ $ref: '#/components/schemas/transferParty'
1509
+ amountType:
1510
+ $ref: '#/components/schemas/AmountType'
1511
+ currency:
1512
+ $ref: '#/components/schemas/Currency'
1513
+ amount:
1514
+ $ref: '#/components/schemas/Amount'
1515
+ transactionType:
1516
+ $ref: '#/components/schemas/transactionType'
1517
+ note:
1518
+ $ref: '#/components/schemas/Note'
1519
+ extensions:
1520
+ $ref: '#/components/schemas/ExtensionList'
1521
+ required:
1522
+ - quoteId
1523
+ - to
1524
+ - amountType
1525
+ - currency
1526
+ - transactionType
1527
+ bulkQuoteRequest:
1528
+ type: object
1529
+ required:
1530
+ - homeTransactionId
1531
+ - from
1532
+ - individualQuotes
1533
+ properties:
1534
+ homeTransactionId:
1535
+ type: string
1536
+ description: >-
1537
+ Transaction ID from the DFSP backend, used to reconcile transactions
1538
+ between the Switch and DFSP backend systems.
1539
+ bulkQuoteId:
1540
+ $ref: '#/components/schemas/CorrelationId'
1541
+ from:
1542
+ $ref: '#/components/schemas/transferParty'
1543
+ individualQuotes:
1544
+ description: List of individual quotes in a bulk quote.
1545
+ type: array
1546
+ minItems: 1
1547
+ maxItems: 1000
1548
+ items:
1549
+ $ref: '#/components/schemas/individualQuote'
1550
+ extensions:
1551
+ $ref: '#/components/schemas/ExtensionList'
1552
+ quoteError:
1553
+ type: object
1554
+ description: >-
1555
+ This object represents a Mojaloop API error received at any time during
1556
+ the quote process
1557
+ properties:
1558
+ httpStatusCode:
1559
+ type: integer
1560
+ description: >-
1561
+ The HTTP status code returned to the caller. This is the same as the
1562
+ actual HTTP status code returned with the response.
1563
+ mojaloopError:
1564
+ description: >-
1565
+ If a quote process results in an error callback during the
1566
+ asynchronous Mojaloop API exchange, this property will contain the
1567
+ underlying Mojaloop API error object.
1568
+ $ref: '#/components/schemas/mojaloopError'
1569
+ individualQuoteResult:
1570
+ type: object
1571
+ properties:
1572
+ quoteId:
1573
+ $ref: '#/components/schemas/CorrelationId'
1574
+ to:
1575
+ $ref: '#/components/schemas/transferParty'
1576
+ amountType:
1577
+ $ref: '#/components/schemas/AmountType'
1578
+ currency:
1579
+ $ref: '#/components/schemas/Currency'
1580
+ amount:
1581
+ $ref: '#/components/schemas/Amount'
1582
+ transactionType:
1583
+ $ref: '#/components/schemas/transactionType'
1584
+ note:
1585
+ $ref: '#/components/schemas/Note'
1586
+ lastError:
1587
+ description: >
1588
+ Object representing the last error to occur during a quote process.
1589
+ This may be a Mojaloop API error returned from another entity in the
1590
+ scheme or an object representing other types of error e.g.
1591
+ exceptions that may occur inside the scheme adapter.
1592
+ $ref: '#/components/schemas/quoteError'
1593
+ bulkQuoteResponse:
1594
+ type: object
1595
+ required:
1596
+ - from
1597
+ - individualQuoteResults
1598
+ properties:
1599
+ quoteId:
1600
+ $ref: '#/components/schemas/CorrelationId'
1601
+ homeTransactionId:
1602
+ type: string
1603
+ description: >-
1604
+ Transaction ID from the DFSP backend, used to reconcile transactions
1605
+ between the Switch and DFSP backend systems.
1606
+ from:
1607
+ $ref: '#/components/schemas/transferParty'
1608
+ individualQuoteResults:
1609
+ type: array
1610
+ maxItems: 1000
1611
+ items:
1612
+ $ref: '#/components/schemas/individualQuoteResult'
1613
+ description: List of individualQuoteResults in a bulk transfer response.
1614
+ bulkQuoteErrorResponse:
1615
+ allOf:
1616
+ - $ref: '#/components/schemas/errorResponse'
1617
+ - type: object
1618
+ required:
1619
+ - bulkTansferState
1620
+ properties:
1621
+ bulkQuoteState:
1622
+ $ref: '#/components/schemas/bulkQuoteResponse'
1623
+ bulkQuoteStatus:
1624
+ type: string
1625
+ enum:
1626
+ - ERROR_OCCURRED
1627
+ - COMPLETED
1628
+ bulkQuoteStatusResponse:
1629
+ type: object
1630
+ required:
1631
+ - bulkQuoteId
1632
+ - currentState
1633
+ - individualQuotes
1634
+ properties:
1635
+ bulkQuoteId:
1636
+ $ref: '#/components/schemas/CorrelationId'
1637
+ currentState:
1638
+ $ref: '#/components/schemas/bulkQuoteStatus'
1639
+ individualQuotes:
1640
+ type: array
1641
+ minItems: 1
1642
+ maxItems: 1000
1643
+ items:
1644
+ $ref: '#/components/schemas/individualQuote'
1645
+ TransactionScenario:
1646
+ title: TransactionScenario
1647
+ type: string
1648
+ enum:
1649
+ - DEPOSIT
1650
+ - WITHDRAWAL
1651
+ - TRANSFER
1652
+ - PAYMENT
1653
+ - REFUND
1654
+ description: >-
1655
+ Below are the allowed values for the enumeration.
1656
+
1657
+ - DEPOSIT - Used for performing a Cash-In (deposit) transaction. In a
1658
+ normal scenario, electronic funds are transferred from a Business
1659
+ account to a Consumer account, and physical cash is given from the
1660
+ Consumer to the Business User.
1661
+
1662
+ - WITHDRAWAL - Used for performing a Cash-Out (withdrawal) transaction.
1663
+ In a normal scenario, electronic funds are transferred from a Consumer’s
1664
+ account to a Business account, and physical cash is given from the
1665
+ Business User to the Consumer.
1666
+
1667
+ - TRANSFER - Used for performing a P2P (Peer to Peer, or Consumer to
1668
+ Consumer) transaction.
1669
+
1670
+ - PAYMENT - Usually used for performing a transaction from a Consumer to
1671
+ a Merchant or Organization, but could also be for a B2B (Business to
1672
+ Business) payment. The transaction could be online for a purchase in an
1673
+ Internet store, in a physical store where both the Consumer and Business
1674
+ User are present, a bill payment, a donation, and so on.
1675
+
1676
+ - REFUND - Used for performing a refund of transaction.
1677
+ example: DEPOSIT
1678
+ TransactionSubScenario:
1679
+ title: TransactionSubScenario
1680
+ type: string
1681
+ pattern: '^[A-Z_]{1,32}$'
1682
+ description: >-
1683
+ Possible sub-scenario, defined locally within the scheme (UndefinedEnum
1684
+ Type).
1685
+ example: LOCALLY_DEFINED_SUBSCENARIO
1686
+ TransactionInitiator:
1687
+ title: TransactionInitiator
1688
+ type: string
1689
+ enum:
1690
+ - PAYER
1691
+ - PAYEE
1692
+ description: >-
1693
+ Below are the allowed values for the enumeration.
1694
+
1695
+ - PAYER - Sender of funds is initiating the transaction. The account to
1696
+ send from is either owned by the Payer or is connected to the Payer in
1697
+ some way.
1698
+
1699
+ - PAYEE - Recipient of the funds is initiating the transaction by
1700
+ sending a transaction request. The Payer must approve the transaction,
1701
+ either automatically by a pre-generated OTP or by pre-approval of the
1702
+ Payee, or by manually approving in his or her own Device.
1703
+ example: PAYEE
1704
+ RefundReason:
1705
+ title: RefundReason
1706
+ type: string
1707
+ minLength: 1
1708
+ maxLength: 128
1709
+ description: Reason for the refund.
1710
+ example: Free text indicating reason for the refund.
1711
+ Refund:
1712
+ title: Refund
1713
+ type: object
1714
+ description: Data model for the complex type Refund.
1715
+ properties:
1716
+ originalTransactionId:
1717
+ $ref: '#/components/schemas/CorrelationId'
1718
+ refundReason:
1719
+ $ref: '#/components/schemas/RefundReason'
1720
+ required:
1721
+ - originalTransactionId
1722
+ BalanceOfPayments:
1723
+ title: BalanceOfPayments
1724
+ type: string
1725
+ pattern: '^[1-9]\d{2}$'
1726
+ description: >-
1727
+ (BopCode) The API data type
1728
+ [BopCode](https://www.imf.org/external/np/sta/bopcode/) is a JSON String
1729
+ of 3 characters, consisting of digits only. Negative numbers are not
1730
+ allowed. A leading zero is not allowed.
1731
+ example: '123'
1732
+ TransactionType:
1733
+ title: TransactionType
1734
+ type: object
1735
+ description: Data model for the complex type TransactionType.
1736
+ properties:
1737
+ scenario:
1738
+ $ref: '#/components/schemas/TransactionScenario'
1739
+ subScenario:
1740
+ $ref: '#/components/schemas/TransactionSubScenario'
1741
+ initiator:
1742
+ $ref: '#/components/schemas/TransactionInitiator'
1743
+ initiatorType:
1744
+ $ref: '#/components/schemas/TransactionInitiatorType'
1745
+ refundInfo:
1746
+ $ref: '#/components/schemas/Refund'
1747
+ balanceOfPayments:
1748
+ $ref: '#/components/schemas/BalanceOfPayments'
1749
+ required:
1750
+ - scenario
1751
+ - initiator
1752
+ - initiatorType
1753
+ requestToPayRequest:
1754
+ type: object
1755
+ required:
1756
+ - homeTransactionId
1757
+ - from
1758
+ - to
1759
+ - amountType
1760
+ - currency
1761
+ - amount
1762
+ - scenario
1763
+ - initiator
1764
+ - initiatorType
1765
+ properties:
1766
+ homeTransactionId:
1767
+ type: string
1768
+ description: >-
1769
+ Transaction ID from the DFSP backend, used to reconcile transactions
1770
+ between the Switch and DFSP backend systems.
1771
+ from:
1772
+ $ref: '#/components/schemas/transferParty'
1773
+ to:
1774
+ $ref: '#/components/schemas/transferParty'
1775
+ amountType:
1776
+ $ref: '#/components/schemas/AmountType'
1777
+ currency:
1778
+ $ref: '#/components/schemas/Currency'
1779
+ amount:
1780
+ $ref: '#/components/schemas/Amount'
1781
+ scenario:
1782
+ $ref: '#/components/schemas/TransactionType'
1783
+ initiator:
1784
+ $ref: '#/components/schemas/TransactionInitiator'
1785
+ initiatorType:
1786
+ $ref: '#/components/schemas/TransactionInitiatorType'
1787
+ AuthenticationType:
1788
+ title: AuthenticationType
1789
+ type: string
1790
+ enum:
1791
+ - OTP
1792
+ - QRCODE
1793
+ - U2F
1794
+ description: |-
1795
+ Below are the allowed values for the enumeration AuthenticationType.
1796
+ - OTP - One-time password generated by the Payer FSP.
1797
+ - QRCODE - QR code used as One Time Password.
1798
+ - U2F - U2F is a new addition isolated to Thirdparty stream.
1799
+ example: OTP
1800
+ TransactionRequestState:
1801
+ title: TransactionRequestState
1802
+ type: string
1803
+ enum:
1804
+ - RECEIVED
1805
+ - PENDING
1806
+ - ACCEPTED
1807
+ - REJECTED
1808
+ description: |-
1809
+ Below are the allowed values for the enumeration.
1810
+ - RECEIVED - Payer FSP has received the transaction from the Payee FSP.
1811
+ - PENDING - Payer FSP has sent the transaction request to the Payer.
1812
+ - ACCEPTED - Payer has approved the transaction.
1813
+ - REJECTED - Payer has rejected the transaction.
1814
+ example: RECEIVED
1815
+ requestToPayResponse:
1816
+ type: object
1817
+ required:
1818
+ - transactionRequestId
1819
+ - from
1820
+ - to
1821
+ - amountType
1822
+ - currency
1823
+ - amount
1824
+ - transactionType
1825
+ - requestToPayState
1826
+ properties:
1827
+ transactionRequestId:
1828
+ $ref: '#/components/schemas/CorrelationId'
1829
+ from:
1830
+ $ref: '#/components/schemas/transferParty'
1831
+ to:
1832
+ $ref: '#/components/schemas/transferParty'
1833
+ amountType:
1834
+ $ref: '#/components/schemas/AmountType'
1835
+ currency:
1836
+ $ref: '#/components/schemas/Currency'
1837
+ amount:
1838
+ $ref: '#/components/schemas/Amount'
1839
+ scenario:
1840
+ $ref: '#/components/schemas/TransactionType'
1841
+ initiator:
1842
+ $ref: '#/components/schemas/TransactionInitiator'
1843
+ initiatorType:
1844
+ $ref: '#/components/schemas/TransactionInitiatorType'
1845
+ authenticationType:
1846
+ $ref: '#/components/schemas/AuthenticationType'
1847
+ requestToPayState:
1848
+ $ref: '#/components/schemas/TransactionRequestState'
1849
+ requestToPayTransferRequest:
1850
+ type: object
1851
+ required:
1852
+ - requestToPayTransactionId
1853
+ - from
1854
+ - to
1855
+ - amountType
1856
+ - currency
1857
+ - amount
1858
+ - scenario
1859
+ - initiator
1860
+ - initiatorType
1861
+ properties:
1862
+ requestToPayTransactionId:
1863
+ type: string
1864
+ description: >-
1865
+ Transaction ID from the DFSP backend, used to reconcile transactions
1866
+ between the Switch and DFSP backend systems.
1867
+ from:
1868
+ $ref: '#/components/schemas/transferParty'
1869
+ to:
1870
+ $ref: '#/components/schemas/transferParty'
1871
+ amountType:
1872
+ $ref: '#/components/schemas/AmountType'
1873
+ currency:
1874
+ $ref: '#/components/schemas/Currency'
1875
+ amount:
1876
+ $ref: '#/components/schemas/Amount'
1877
+ scenario:
1878
+ $ref: '#/components/schemas/TransactionType'
1879
+ initiator:
1880
+ $ref: '#/components/schemas/TransactionInitiator'
1881
+ initiatorType:
1882
+ $ref: '#/components/schemas/TransactionInitiatorType'
1883
+ note:
1884
+ $ref: '#/components/schemas/Note'
1885
+ requestToPayTransferResponse:
1886
+ type: object
1887
+ required:
1888
+ - requestToPayTransactionId
1889
+ - from
1890
+ - to
1891
+ - amountType
1892
+ - currency
1893
+ - amount
1894
+ - transactionType
1895
+ properties:
1896
+ transferId:
1897
+ $ref: '#/components/schemas/CorrelationId'
1898
+ requestToPayTransactionId:
1899
+ type: string
1900
+ description: >-
1901
+ Transaction ID from the DFSP backend, used to reconcile transactions
1902
+ between the Switch and DFSP backend systems.
1903
+ from:
1904
+ $ref: '#/components/schemas/transferParty'
1905
+ to:
1906
+ $ref: '#/components/schemas/transferParty'
1907
+ amountType:
1908
+ $ref: '#/components/schemas/AmountType'
1909
+ currency:
1910
+ $ref: '#/components/schemas/Currency'
1911
+ amount:
1912
+ $ref: '#/components/schemas/Amount'
1913
+ transactionType:
1914
+ $ref: '#/components/schemas/transactionType'
1915
+ note:
1916
+ $ref: '#/components/schemas/Note'
1917
+ currentState:
1918
+ $ref: '#/components/schemas/transferStatus'
1919
+ quoteId:
1920
+ $ref: '#/components/schemas/CorrelationId'
1921
+ quoteResponse:
1922
+ $ref: '#/components/schemas/QuotesIDPutResponse'
1923
+ quoteResponseSource:
1924
+ type: string
1925
+ description: >
1926
+ FSPID of the entity that supplied the quote response. This may not
1927
+ be the same as the FSPID of the entity which owns the end user
1928
+ account in the case of a FOREX transfer. i.e. it may be a FOREX
1929
+ gateway.
1930
+ fulfil:
1931
+ $ref: '#/components/schemas/TransfersIDPutResponse'
1932
+ lastError:
1933
+ description: >
1934
+ Object representing the last error to occur during a transfer
1935
+ process. This may be a Mojaloop API error returned from another
1936
+ entity in the scheme or an object representing other types of error
1937
+ e.g. exceptions that may occur inside the scheme adapter.
1938
+ $ref: '#/components/schemas/transferError'
1939
+ transferContinuationAcceptOTP:
1940
+ type: object
1941
+ required:
1942
+ - acceptOTP
1943
+ properties:
1944
+ acceptOTP:
1945
+ type: boolean
1946
+ enum:
1947
+ - true
1948
+ - false
1949
+ accountsRequest:
1950
+ type: array
1951
+ items:
1952
+ type: object
1953
+ required:
1954
+ - idType
1955
+ - idValue
1956
+ - currency
1957
+ properties:
1958
+ idType:
1959
+ $ref: '#/components/schemas/PartyIdType'
1960
+ idValue:
1961
+ $ref: '#/components/schemas/PartyIdentifier'
1962
+ idSubValue:
1963
+ $ref: '#/components/schemas/PartySubIdOrType'
1964
+ currency:
1965
+ $ref: '#/components/schemas/Currency'
1966
+ accountCreationStatus:
1967
+ type: array
1968
+ items:
1969
+ type: object
1970
+ required:
1971
+ - idType
1972
+ - idValue
1973
+ properties:
1974
+ idType:
1975
+ $ref: '#/components/schemas/PartyIdType'
1976
+ idValue:
1977
+ $ref: '#/components/schemas/PartyIdentifier'
1978
+ idSubValue:
1979
+ $ref: '#/components/schemas/PartySubIdOrType'
1980
+ error:
1981
+ $ref: '#/components/schemas/errorResponse'
1982
+ accountsCreationState:
1983
+ type: string
1984
+ enum:
1985
+ - ERROR_OCCURRED
1986
+ - COMPLETED
1987
+ accountsResponse:
1988
+ type: object
1989
+ required:
1990
+ - accounts
1991
+ properties:
1992
+ modelId:
1993
+ $ref: '#/components/schemas/CorrelationId'
1994
+ accounts:
1995
+ $ref: '#/components/schemas/accountsRequest'
1996
+ response:
1997
+ $ref: '#/components/schemas/accountCreationStatus'
1998
+ currentState:
1999
+ $ref: '#/components/schemas/accountsCreationState'
2000
+ lastError:
2001
+ $ref: '#/components/schemas/transferError'
2002
+ errorAccountsResponse:
2003
+ allOf:
2004
+ - $ref: '#/components/schemas/errorResponse'
2005
+ - type: object
2006
+ required:
2007
+ - executionState
2008
+ properties:
2009
+ executionState:
2010
+ $ref: '#/components/schemas/accountsResponse'
2011
+ PartyIdInfo:
2012
+ title: PartyIdInfo
2013
+ type: object
2014
+ description: Data model for the complex type PartyIdInfo.
2015
+ properties:
2016
+ partyIdType:
2017
+ $ref: '#/components/schemas/PartyIdType'
2018
+ partyIdentifier:
2019
+ $ref: '#/components/schemas/PartyIdentifier'
2020
+ partySubIdOrType:
2021
+ $ref: '#/components/schemas/PartySubIdOrType'
2022
+ fspId:
2023
+ $ref: '#/components/schemas/FspId'
2024
+ extensionList:
2025
+ $ref: '#/components/schemas/ExtensionList'
2026
+ required:
2027
+ - partyIdType
2028
+ - partyIdentifier
2029
+ PartyName:
2030
+ title: PartyName
2031
+ type: string
2032
+ minLength: 1
2033
+ maxLength: 128
2034
+ description: Name of the Party. Could be a real name or a nickname.
2035
+ PartyComplexName:
2036
+ title: PartyComplexName
2037
+ type: object
2038
+ description: Data model for the complex type PartyComplexName.
2039
+ properties:
2040
+ firstName:
2041
+ $ref: '#/components/schemas/FirstName'
2042
+ middleName:
2043
+ $ref: '#/components/schemas/MiddleName'
2044
+ lastName:
2045
+ $ref: '#/components/schemas/LastName'
2046
+ PartyPersonalInfo:
2047
+ title: PartyPersonalInfo
2048
+ type: object
2049
+ description: Data model for the complex type PartyPersonalInfo.
2050
+ properties:
2051
+ complexName:
2052
+ $ref: '#/components/schemas/PartyComplexName'
2053
+ dateOfBirth:
2054
+ $ref: '#/components/schemas/DateOfBirth'
2055
+ Party:
2056
+ title: Party
2057
+ type: object
2058
+ description: Data model for the complex type Party.
2059
+ properties:
2060
+ partyIdInfo:
2061
+ $ref: '#/components/schemas/PartyIdInfo'
2062
+ merchantClassificationCode:
2063
+ $ref: '#/components/schemas/MerchantClassificationCode'
2064
+ name:
2065
+ $ref: '#/components/schemas/PartyName'
2066
+ personalInfo:
2067
+ $ref: '#/components/schemas/PartyPersonalInfo'
2068
+ required:
2069
+ - partyIdInfo
2070
+ async2SyncCurrentState:
2071
+ type: string
2072
+ enum:
2073
+ - WAITING_FOR_ACTION
2074
+ - COMPLETED
2075
+ - ERROR_OCCURRED
2076
+ partiesByIdResponse:
2077
+ title: partiesByIdResponse
2078
+ type: object
2079
+ description: 'GET /parties/{Type}/{ID} response object'
2080
+ properties:
2081
+ party:
2082
+ $ref: '#/components/schemas/Party'
2083
+ description: Information regarding the requested Party.
2084
+ currentState:
2085
+ $ref: '#/components/schemas/async2SyncCurrentState'
2086
+ required:
2087
+ - party
2088
+ - currentState
2089
+ QuotesPostRequest:
2090
+ title: QuotesPostRequest
2091
+ type: object
2092
+ description: The object sent in the POST /quotes request.
2093
+ properties:
2094
+ quoteId:
2095
+ $ref: '#/components/schemas/CorrelationId'
2096
+ description: >-
2097
+ Common ID between the FSPs for the quote object, decided by the
2098
+ Payer FSP. The ID should be reused for resends of the same quote for
2099
+ a transaction. A new ID should be generated for each new quote for a
2100
+ transaction.
2101
+ example: b51ec534-ee48-4575-b6a9-ead2955b8069
2102
+ transactionId:
2103
+ $ref: '#/components/schemas/CorrelationId'
2104
+ description: >-
2105
+ Common ID (decided by the Payer FSP) between the FSPs for the future
2106
+ transaction object. The actual transaction will be created as part
2107
+ of a successful transfer process. The ID should be reused for
2108
+ resends of the same quote for a transaction. A new ID should be
2109
+ generated for each new quote for a transaction.
2110
+ example: a8323bc6-c228-4df2-ae82-e5a997baf899
2111
+ transactionRequestId:
2112
+ $ref: '#/components/schemas/CorrelationId'
2113
+ description: Identifies an optional previously-sent transaction request.
2114
+ example: a8323bc6-c228-4df2-ae82-e5a997baf890
2115
+ payee:
2116
+ $ref: '#/components/schemas/Party'
2117
+ description: Information about the Payee in the proposed financial transaction.
2118
+ payer:
2119
+ $ref: '#/components/schemas/Party'
2120
+ description: Information about the Payer in the proposed financial transaction.
2121
+ amountType:
2122
+ $ref: '#/components/schemas/AmountType'
2123
+ description: 'SEND for send amount, RECEIVE for receive amount.'
2124
+ example: SEND
2125
+ amount:
2126
+ $ref: '#/components/schemas/Money'
2127
+ description: >-
2128
+ Depending on amountType - If SEND - The amount the Payer would like
2129
+ to send, that is, the amount that should be withdrawn from the Payer
2130
+ account including any fees. The amount is updated by each
2131
+ participating entity in the transaction. If RECEIVE - The amount the
2132
+ Payee should receive, that is, the amount that should be sent to the
2133
+ receiver exclusive any fees. The amount is not updated by any of the
2134
+ participating entities.
2135
+ fees:
2136
+ $ref: '#/components/schemas/Money'
2137
+ description: >-
2138
+ The fees in the transaction. The fees element should be empty if
2139
+ fees should be non-disclosed. The fees element should be non-empty
2140
+ if fees should be disclosed.
2141
+ transactionType:
2142
+ $ref: '#/components/schemas/TransactionType'
2143
+ description: Type of transaction for which the quote is requested.
2144
+ geoCode:
2145
+ $ref: '#/components/schemas/GeoCode'
2146
+ description: >-
2147
+ Longitude and Latitude of the initiating Party. Can be used to
2148
+ detect fraud.
2149
+ note:
2150
+ $ref: '#/components/schemas/Note'
2151
+ description: A memo that will be attached to the transaction.
2152
+ example: Free-text memo.
2153
+ expiration:
2154
+ $ref: '#/components/schemas/DateTime'
2155
+ description: >-
2156
+ Expiration is optional. It can be set to get a quick failure in case
2157
+ the peer FSP takes too long to respond. Also, it may be beneficial
2158
+ for Consumer, Agent, and Merchant to know that their request has a
2159
+ time limit.
2160
+ example: '2016-05-24T08:38:08.699-04:00'
2161
+ extensionList:
2162
+ $ref: '#/components/schemas/ExtensionList'
2163
+ description: 'Optional extension, specific to deployment.'
2164
+ required:
2165
+ - quoteId
2166
+ - transactionId
2167
+ - payee
2168
+ - payer
2169
+ - amountType
2170
+ - amount
2171
+ - transactionType
2172
+ quotesPostRequest:
2173
+ title: QuotesPostRequest
2174
+ type: object
2175
+ properties:
2176
+ fspId:
2177
+ title: destination DFSP requested to calculate the quote
2178
+ $ref: '#/components/schemas/FspId'
2179
+ quotesPostRequest:
2180
+ $ref: '#/components/schemas/QuotesPostRequest'
2181
+ required:
2182
+ - fspId
2183
+ - quotesPostRequest
2184
+ quotesPostResponse:
2185
+ title: QuotesPostResponse
2186
+ type: object
2187
+ properties:
2188
+ quotes:
2189
+ title: QuotesIDPutResponse
2190
+ type: object
2191
+ description: 'The object sent in the PUT /quotes/{ID} callback.'
2192
+ properties:
2193
+ transferAmount:
2194
+ $ref: '#/components/schemas/Money'
2195
+ payeeReceiveAmount:
2196
+ $ref: '#/components/schemas/Money'
2197
+ payeeFspFee:
2198
+ $ref: '#/components/schemas/Money'
2199
+ payeeFspCommission:
2200
+ $ref: '#/components/schemas/Money'
2201
+ expiration:
2202
+ type: string
2203
+ description: >-
2204
+ Date and time until when the quotation is valid and can be
2205
+ honored when used in the subsequent transaction.
2206
+ example: '2016-05-24T08:38:08.699-04:00'
2207
+ geoCode:
2208
+ $ref: '#/components/schemas/GeoCode'
2209
+ ilpPacket:
2210
+ $ref: '#/components/schemas/IlpPacket'
2211
+ condition:
2212
+ $ref: '#/components/schemas/IlpCondition'
2213
+ extensionList:
2214
+ $ref: '#/components/schemas/ExtensionList'
2215
+ required:
2216
+ - transferAmount
2217
+ - expiration
2218
+ - ilpPacket
2219
+ - condition
2220
+ currentState:
2221
+ $ref: '#/components/schemas/async2SyncCurrentState'
2222
+ required:
2223
+ - quotes
2224
+ - currentState
2225
+ errorQuotesResponse:
2226
+ allOf:
2227
+ - $ref: '#/components/schemas/errorResponse'
2228
+ - type: object
2229
+ TransfersPostRequest:
2230
+ title: TransfersPostRequest
2231
+ type: object
2232
+ description: The object sent in the POST /transfers request.
2233
+ properties:
2234
+ transferId:
2235
+ $ref: '#/components/schemas/CorrelationId'
2236
+ payeeFsp:
2237
+ $ref: '#/components/schemas/FspId'
2238
+ payerFsp:
2239
+ $ref: '#/components/schemas/FspId'
2240
+ amount:
2241
+ $ref: '#/components/schemas/Money'
2242
+ ilpPacket:
2243
+ $ref: '#/components/schemas/IlpPacket'
2244
+ condition:
2245
+ $ref: '#/components/schemas/IlpCondition'
2246
+ expiration:
2247
+ $ref: '#/components/schemas/DateTime'
2248
+ extensionList:
2249
+ $ref: '#/components/schemas/ExtensionList'
2250
+ required:
2251
+ - transferId
2252
+ - payeeFsp
2253
+ - payerFsp
2254
+ - amount
2255
+ - ilpPacket
2256
+ - condition
2257
+ - expiration
2258
+ simpleTransfersPostRequest:
2259
+ title: SimpleTransfersPostRequest
2260
+ type: object
2261
+ properties:
2262
+ fspId:
2263
+ $ref: '#/components/schemas/FspId'
2264
+ transfersPostRequest:
2265
+ $ref: '#/components/schemas/TransfersPostRequest'
2266
+ required:
2267
+ - fspId
2268
+ - transfersPostRequest
2269
+ simpleTransfersPostResponse:
2270
+ title: SimpleTransfersPostResponse
2271
+ type: object
2272
+ properties:
2273
+ transfer:
2274
+ $ref: '#/components/schemas/TransfersIDPutResponse'
2275
+ currentState:
2276
+ $ref: '#/components/schemas/async2SyncCurrentState'
2277
+ required:
2278
+ - transfer
2279
+ - currentState
2280
+ errorSimpleTransfersResponse:
2281
+ allOf:
2282
+ - $ref: '#/components/schemas/errorResponse'
2283
+ - type: object
2284
+ AuthenticationType-2:
2285
+ title: AuthenticationType
2286
+ type: string
2287
+ enum:
2288
+ - OTP
2289
+ - QRCODE
2290
+ - U2F
2291
+ description: |-
2292
+ Below are the allowed values for the enumeration AuthenticationType.
2293
+ - OTP - One-time password generated by the Payer FSP.
2294
+ - QRCODE - QR code used as One Time Password.
2295
+ - U2F - U2F is a new addition isolated to Thirdparty stream.
2296
+ Integer:
2297
+ title: Integer
2298
+ type: string
2299
+ pattern: '^[1-9]\d*$'
2300
+ description: >-
2301
+ The API data type Integer is a JSON String consisting of digits only.
2302
+ Negative numbers and leading zeroes are not allowed. The data type is
2303
+ always limited to a specific number of digits.
2304
+ AuthorizationsPostRequest:
2305
+ title: AuthorizationsPostRequest
2306
+ description: POST /authorizations request object.
2307
+ type: object
2308
+ properties:
2309
+ authenticationType:
2310
+ $ref: '#/components/schemas/AuthenticationType-2'
2311
+ retriesLeft:
2312
+ $ref: '#/components/schemas/Integer'
2313
+ amount:
2314
+ $ref: '#/components/schemas/Money'
2315
+ transactionId:
2316
+ $ref: '#/components/schemas/CorrelationId'
2317
+ transactionRequestId:
2318
+ $ref: '#/components/schemas/CorrelationId'
2319
+ quote:
2320
+ $ref: '#/components/schemas/QuotesIDPutResponse'
2321
+ required:
2322
+ - authenticationType
2323
+ - retriesLeft
2324
+ - amount
2325
+ - transactionId
2326
+ - transactionRequestId
2327
+ - quote
2328
+ additionalProperties: false
2329
+ authorizationsPostRequest:
2330
+ title: AuthorizationsPostRequest
2331
+ description: POST /authorizations Request object
2332
+ type: object
2333
+ properties:
2334
+ fspId:
2335
+ title: destination DFSP
2336
+ $ref: '#/components/schemas/FspId'
2337
+ authorizationsPostRequest:
2338
+ $ref: '#/components/schemas/AuthorizationsPostRequest'
2339
+ required:
2340
+ - fspId
2341
+ - authorizationsPostRequest
2342
+ OtpValue:
2343
+ title: OtpValue
2344
+ type: string
2345
+ pattern: '^\d{3,10}$'
2346
+ description: >-
2347
+ The API data type OtpValue is a JSON String of 3 to 10 characters,
2348
+ consisting of digits only. Negative numbers are not allowed. One or more
2349
+ leading zeros are allowed.
2350
+ QRCODE:
2351
+ title: QRCODE
2352
+ type: string
2353
+ minLength: 1
2354
+ maxLength: 64
2355
+ description: QR code used as a One Time Password.
2356
+ U2FPIN:
2357
+ title: U2FPIN
2358
+ type: string
2359
+ pattern: '^\S{1,64}$'
2360
+ minLength: 1
2361
+ maxLength: 64
2362
+ description: >
2363
+ U2F challenge-response, where payer FSP verifies if the response
2364
+ provided by end-user device matches the previously registered key.
2365
+ U2FPinValue:
2366
+ title: U2FPinValue
2367
+ type: object
2368
+ description: >
2369
+ U2F challenge-response, where payer FSP verifies if the response
2370
+ provided by end-user device matches the previously registered key.
2371
+ properties:
2372
+ pinValue:
2373
+ allOf:
2374
+ - $ref: '#/components/schemas/U2FPIN'
2375
+ description: U2F challenge-response.
2376
+ counter:
2377
+ allOf:
2378
+ - $ref: '#/components/schemas/Integer'
2379
+ description: >-
2380
+ Sequential counter used for cloning detection. Present only for U2F
2381
+ authentication.
2382
+ required:
2383
+ - pinValue
2384
+ - counter
2385
+ FIDOPublicKeyCredentialAssertion:
2386
+ title: FIDOPublicKeyCredentialAssertion
2387
+ type: object
2388
+ description: >
2389
+ An object sent in a `PUT /thirdpartyRequests/authorization/{ID}`
2390
+ request.
2391
+
2392
+ based mostly on: https://webauthn.guide/#authentication
2393
+
2394
+ AuthenticatorAssertionResponse
2395
+ properties:
2396
+ id:
2397
+ type: string
2398
+ description: |
2399
+ credential id: identifier of pair of keys, base64 encoded
2400
+ https://w3c.github.io/webauthn/#ref-for-dom-credential-id
2401
+ minLength: 59
2402
+ maxLength: 118
2403
+ rawId:
2404
+ type: string
2405
+ description: |
2406
+ raw credential id: identifier of pair of keys, base64 encoded.
2407
+ minLength: 59
2408
+ maxLength: 118
2409
+ response:
2410
+ type: object
2411
+ description: |
2412
+ AuthenticatorAssertionResponse
2413
+ properties:
2414
+ authenticatorData:
2415
+ type: string
2416
+ description: |
2417
+ Authenticator data object.
2418
+ minLength: 49
2419
+ maxLength: 256
2420
+ clientDataJSON:
2421
+ type: string
2422
+ description: |
2423
+ JSON string with client data.
2424
+ minLength: 121
2425
+ maxLength: 512
2426
+ signature:
2427
+ type: string
2428
+ description: >
2429
+ The signature generated by the private key associated with this
2430
+ credential.
2431
+ minLength: 59
2432
+ maxLength: 256
2433
+ userHandle:
2434
+ type: string
2435
+ description: |
2436
+ This field is optionally provided by the authenticator, and
2437
+ represents the user.id that was supplied during registration.
2438
+ minLength: 1
2439
+ maxLength: 88
2440
+ required:
2441
+ - authenticatorData
2442
+ - clientDataJSON
2443
+ - signature
2444
+ additionalProperties: false
2445
+ type:
2446
+ type: string
2447
+ description: 'response type, we need only the type of public-key'
2448
+ enum:
2449
+ - public-key
2450
+ required:
2451
+ - id
2452
+ - rawId
2453
+ - response
2454
+ - type
2455
+ additionalProperties: false
2456
+ AuthenticationValue:
2457
+ title: AuthenticationValue
2458
+ anyOf:
2459
+ - $ref: '#/components/schemas/OtpValue'
2460
+ - $ref: '#/components/schemas/QRCODE'
2461
+ - $ref: '#/components/schemas/U2FPinValue'
2462
+ - $ref: '#/components/schemas/FIDOPublicKeyCredentialAssertion'
2463
+ description: >-
2464
+ Contains the authentication value. The format depends on the
2465
+ authentication type used in the AuthenticationInfo complex type.
2466
+ AuthenticationInfo:
2467
+ title: AuthenticationInfo
2468
+ type: object
2469
+ description: Data model for the complex type AuthenticationInfo.
2470
+ properties:
2471
+ authentication:
2472
+ $ref: '#/components/schemas/AuthenticationType-2'
2473
+ authenticationValue:
2474
+ $ref: '#/components/schemas/AuthenticationValue'
2475
+ required:
2476
+ - authentication
2477
+ - authenticationValue
2478
+ AuthorizationResponseType:
2479
+ title: AuthorizationResponseType
2480
+ description: |
2481
+ Enum containing response information; if the customer entered the
2482
+ authentication value, rejected the transaction, or requested a
2483
+ resend of the authentication value.
2484
+ type: string
2485
+ enum:
2486
+ - ENTERED
2487
+ - REJECTED
2488
+ - RESEND
2489
+ authorizationsPostResponse:
2490
+ title: AuthorizationsPostResponse
2491
+ description: POST /authorizations response object
2492
+ type: object
2493
+ properties:
2494
+ authorizations:
2495
+ type: object
2496
+ properties:
2497
+ authenticationInfo:
2498
+ $ref: '#/components/schemas/AuthenticationInfo'
2499
+ responseType:
2500
+ $ref: '#/components/schemas/AuthorizationResponseType'
2501
+ required:
2502
+ - responseType
2503
+ currentState:
2504
+ $ref: '#/components/schemas/async2SyncCurrentState'
2505
+ required:
2506
+ - authorizations
2507
+ - currentState
2508
+ additionalProperties: false
2509
+ errorAuthorizationsResponse:
2510
+ allOf:
2511
+ - $ref: '#/components/schemas/errorResponse'
2512
+ - type: object
2513
+ responses:
2514
+ transferSuccess:
2515
+ description: Transfer completed successfully
2516
+ content:
2517
+ application/json:
2518
+ schema:
2519
+ $ref: '#/components/schemas/transferResponse'
2520
+ transferBadRequest:
2521
+ description: 'Malformed or missing required body, headers or parameters'
2522
+ content:
2523
+ application/json:
2524
+ schema:
2525
+ $ref: '#/components/schemas/errorTransferResponse'
2526
+ transferServerError:
2527
+ description: An error occurred processing the transfer
2528
+ content:
2529
+ application/json:
2530
+ schema:
2531
+ $ref: '#/components/schemas/errorTransferResponse'
2532
+ transferTimeout:
2533
+ description: Timeout occurred processing the transfer
2534
+ content:
2535
+ application/json:
2536
+ schema:
2537
+ $ref: '#/components/schemas/errorTransferResponse'
2538
+ bulkTransferSuccess:
2539
+ description: Bulk transfer completed successfully
2540
+ content:
2541
+ application/json:
2542
+ schema:
2543
+ $ref: '#/components/schemas/bulkTransferResponse'
2544
+ bulkTransferBadRequest:
2545
+ description: 'Malformed or missing required body, headers or parameters'
2546
+ content:
2547
+ application/json:
2548
+ schema:
2549
+ $ref: '#/components/schemas/bulkTransferErrorResponse'
2550
+ bulkTransferServerError:
2551
+ description: An error occurred processing the bulk transfer
2552
+ content:
2553
+ application/json:
2554
+ schema:
2555
+ $ref: '#/components/schemas/bulkTransferErrorResponse'
2556
+ bulkTransferTimeout:
2557
+ description: Timeout occurred processing the bulk transfer
2558
+ content:
2559
+ application/json:
2560
+ schema:
2561
+ $ref: '#/components/schemas/bulkTransferErrorResponse'
2562
+ bulkQuoteSuccess:
2563
+ description: Bulk quote completed successfully
2564
+ content:
2565
+ application/json:
2566
+ schema:
2567
+ $ref: '#/components/schemas/bulkQuoteResponse'
2568
+ bulkQuoteBadRequest:
2569
+ description: 'Malformed or missing required body, headers or parameters'
2570
+ content:
2571
+ application/json:
2572
+ schema:
2573
+ $ref: '#/components/schemas/bulkQuoteErrorResponse'
2574
+ bulkQuoteServerError:
2575
+ description: An error occurred processing the bulk quote
2576
+ content:
2577
+ application/json:
2578
+ schema:
2579
+ $ref: '#/components/schemas/bulkQuoteErrorResponse'
2580
+ bulkQuoteTimeout:
2581
+ description: Timeout occurred processing the bulk quote
2582
+ content:
2583
+ application/json:
2584
+ schema:
2585
+ $ref: '#/components/schemas/bulkQuoteErrorResponse'
2586
+ requestToPaySuccess:
2587
+ description: Request to Pay completed successfully
2588
+ content:
2589
+ application/json:
2590
+ schema:
2591
+ $ref: '#/components/schemas/requestToPayResponse'
2592
+ requestToPayTransferSuccess:
2593
+ description: Transfer completed successfully
2594
+ content:
2595
+ application/json:
2596
+ schema:
2597
+ $ref: '#/components/schemas/requestToPayTransferResponse'
2598
+ requestToPayTransferBadRequest:
2599
+ description: 'Malformed or missing required body, headers or parameters'
2600
+ content:
2601
+ application/json:
2602
+ schema:
2603
+ $ref: '#/components/schemas/errorTransferResponse'
2604
+ accountsCreationCompleted:
2605
+ description: Accounts creation completed
2606
+ content:
2607
+ application/json:
2608
+ schema:
2609
+ $ref: '#/components/schemas/accountsResponse'
2610
+ accountsCreationError:
2611
+ description: An error occurred creating accounts
2612
+ content:
2613
+ application/json:
2614
+ schema:
2615
+ $ref: '#/components/schemas/errorAccountsResponse'
2616
+ accountsCreationTimeout:
2617
+ description: Timeout occurred creating accounts
2618
+ content:
2619
+ application/json:
2620
+ schema:
2621
+ $ref: '#/components/schemas/errorAccountsResponse'
2622
+ partiesByIdSuccess:
2623
+ description: PartiesByIdSuccess
2624
+ content:
2625
+ application/json:
2626
+ schema:
2627
+ $ref: '#/components/schemas/partiesByIdResponse'
2628
+ partiesByIdError404:
2629
+ description: PartiesByIdError404
2630
+ content:
2631
+ application/json:
2632
+ schema:
2633
+ type: object
2634
+ properties:
2635
+ errorInformation:
2636
+ $ref: '#/components/schemas/ErrorInformation'
2637
+ quotesPostSuccess:
2638
+ description: sync response from POST /quotes
2639
+ content:
2640
+ application/json:
2641
+ schema:
2642
+ $ref: '#/components/schemas/quotesPostResponse'
2643
+ quotesServerError:
2644
+ description: An error occurred processing the quotes request
2645
+ content:
2646
+ application/json:
2647
+ schema:
2648
+ $ref: '#/components/schemas/errorQuotesResponse'
2649
+ simpleTransfersPostSuccess:
2650
+ description: sync response from POST /simpleTransfers
2651
+ content:
2652
+ application/json:
2653
+ schema:
2654
+ $ref: '#/components/schemas/simpleTransfersPostResponse'
2655
+ simpleTransfersServerError:
2656
+ description: An error occurred processing the simple transfers request
2657
+ content:
2658
+ application/json:
2659
+ schema:
2660
+ $ref: '#/components/schemas/errorSimpleTransfersResponse'
2661
+ authorizationPostSuccess:
2662
+ description: Sync response from POST /authorizations
2663
+ content:
2664
+ application/json:
2665
+ schema:
2666
+ $ref: '#/components/schemas/authorizationsPostResponse'
2667
+ authorizationsServerError:
2668
+ description: An error occurred processing the authorizations request
2669
+ content:
2670
+ application/json:
2671
+ schema:
2672
+ $ref: '#/components/schemas/errorAuthorizationsResponse'
2673
+ parameters:
2674
+ transferId:
2675
+ name: transferId
2676
+ in: path
2677
+ required: true
2678
+ schema:
2679
+ $ref: '#/components/schemas/CorrelationId'
2680
+ description: >-
2681
+ Identifier of the transfer to continue as returned in the response to a
2682
+ `POST /transfers` request.
2683
+ bulkTransferId:
2684
+ name: bulkTransferId
2685
+ in: path
2686
+ required: true
2687
+ schema:
2688
+ $ref: '#/components/schemas/CorrelationId'
2689
+ description: >-
2690
+ Identifier of the bulk transfer to continue as returned in the response
2691
+ to a `POST /bulkTransfers` request.
2692
+ bulkQuoteId:
2693
+ name: bulkQuoteId
2694
+ in: path
2695
+ required: true
2696
+ schema:
2697
+ $ref: '#/components/schemas/CorrelationId'
2698
+ description: >-
2699
+ Identifier of the bulk transfer to continue as returned in the response
2700
+ to a `POST /bulkTransfers` request.
2701
+ requestToPayTransactionId:
2702
+ name: requestToPayTransactionId
2703
+ in: path
2704
+ required: true
2705
+ schema:
2706
+ $ref: '#/components/schemas/CorrelationId'
2707
+ description: >-
2708
+ Identifier of the merchant request to pay transfer to continue as
2709
+ returned in the response to a `POST /requestToPayTransfer` request.
2710
+ Type:
2711
+ name: Type
2712
+ in: path
2713
+ required: true
2714
+ schema:
2715
+ type: string
2716
+ description: 'The type of the party identifier. For example, `MSISDN`, `PERSONAL_ID`.'
2717
+ ID:
2718
+ name: ID
2719
+ in: path
2720
+ required: true
2721
+ schema:
2722
+ type: string
2723
+ description: The identifier value.
2724
+ SubId:
2725
+ name: SubId
2726
+ in: path
2727
+ required: true
2728
+ schema:
2729
+ type: string
2730
+ description: >-
2731
+ A sub-identifier of the party identifier, or a sub-type of the party
2732
+ identifier's type. For example, `PASSPORT`, `DRIVING_LICENSE`.