From 42a9d4a1c0625f33dda7a5f26e3ca29de00a4a28 Mon Sep 17 00:00:00 2001 From: vijayg10 <33152110+vijayg10@users.noreply.github.com> Date: Tue, 8 Nov 2022 23:45:56 +0530 Subject: [PATCH] feat: added two payee sdks and ttk as hub in func tests (#413) * chore: added improved ttk dynamic testcase * feat: added new payee sdk and ttk as hub * feat: added a script for calculating positions for the demo * feat(mojaloop/2949): [sdk-scheme-adapter][private-shared-lib] Update private-shared-lib to use v0.2 feat(mojaloop/2949): [sdk-scheme-adapter][private-shared-lib] Update private-shared-lib to use v0.2.0 of @mojaloop/platform-shared-lib - https://github.com/mojaloop/project/issues/2949 - upgraded @mojaloop/platform-shared-lib-nodejs-kafka-client-lib & @mojaloop/platform-shared-lib-messaging-types-lib dependencies, and re-factored messaging/kafka consumers/producers to use the raw Producers/Consumers - removed dependencies from ncurc since we can now upgrade them as normal - created IRawMessageHeader alias as IRawIMessageHeaders to reduce the re-factoring required * fix to remove resolutions from main package.json and yarn.lock * fix: ttk rule * feat: increased-the-limits-and-2000-transfers-passed * chore: updated ttk docker version in func tests * chore:parameterized api server payload limit * chore: parameterized kafka limits * chore: updated deps * fix: added name fields in nx project configs * fix: integration tests * chore: addressed pr comment * chore: disabled the log for bulk requests Co-authored-by: Miguel de Barros --- docker-compose.yml | 1 + modules/api-svc/.env.example | 4 + modules/api-svc/package.json | 2 +- modules/api-svc/project.json | 1 + modules/api-svc/src/InboundServer/index.js | 2 +- .../api-svc/src/InboundServer/middlewares.js | 8 +- modules/api-svc/src/OutboundServer/index.js | 2 +- modules/api-svc/src/config.js | 3 + .../config/default.json | 7 +- .../package.json | 2 +- .../project.json | 1 + .../src/shared/config.ts | 18 + .../config/default.json | 7 +- .../package.json | 2 +- .../project.json | 1 + .../src/shared/config.ts | 18 + modules/private-shared-lib/package.json | 4 +- modules/private-shared-lib/project.json | 1 + .../src/infra/kafka_command_event_consumer.ts | 1 + .../src/infra/kafka_command_event_producer.ts | 4 +- .../src/infra/kafka_domain_event_consumer.ts | 1 + .../src/infra/kafka_domain_event_producer.ts | 4 +- .../infra/ikafka_event_consumer_options.ts | 3 +- .../infra/ikafka_event_producer_options.ts | 5 +- package.json | 6 +- test/func/common-sdk.yml | 12 - .../outbound-command-event-handler.env | 10 - .../outbound-domain-event-handler.env | 7 - .../outbound-command-event-handler.env | 10 - .../outbound-domain-event-handler.env | 7 - test/func/config/sdk-ttksim1/api-svc.env | 153 + .../outbound-command-event-handler.env | 14 + .../outbound-domain-event-handler.env | 11 + .../{payer-sdk => sdk-ttksim2}/api-svc.env | 25 +- .../outbound-command-event-handler.env | 14 + .../outbound-domain-event-handler.env | 11 + .../{payee-sdk => sdk-ttksim3}/api-svc.env | 25 +- .../outbound-command-event-handler.env | 14 + .../outbound-domain-event-handler.env | 11 + .../als_admin_1.1/api_spec.yaml | 804 +++ .../central_admin_1.0/api_spec.yaml | 1854 ++++++ .../central_admin_1.0/response_map.json | 96 + .../central_admin_old_9.3/api_spec.yaml | 2467 ++++++++ .../central_admin_old_9.3/response_map.json | 96 + .../api_definitions/fspiop_1.0/api_spec.yaml | 4187 ++++++++++++++ .../fspiop_1.0/callback_map.json | 568 ++ .../api_definitions/fspiop_1.0/mockRef.json | 79 + .../transaction_request_followup.json | 126 + ...nsaction_request_followup_quotes_only.json | 97 + .../api_definitions/fspiop_1.1/api_spec.yaml | 3778 ++++++++++++ .../fspiop_1.1/callback_map.json | 568 ++ .../api_definitions/fspiop_1.1/mockRef.json | 79 + .../transaction_request_followup.json | 125 + .../api_definitions/fx-api_2.0/api_spec.yaml | 1765 ++++++ .../fx-api_2.0/callback_map.json | 188 + .../api_definitions/fx-api_2.0/mockRef.json | 83 + .../api_spec.yaml | 2603 +++++++++ .../mockRef.json | 0 .../response_map.json | 0 .../mojaloop_simulator_0.1/api_spec.yaml | 225 + .../mojaloop_simulator_sim_1.4/api_spec.yaml | 1087 ++++ .../mojaloop_simulator_sim_1.4/mockRef.json | 0 .../response_map.json | 55 + .../payment_manager_1.4/api_spec.yaml | 1389 +++++ .../settlements_1.0/api_spec.yaml | 983 ++++ .../settlements_1.0/mockRef.json | 38 + .../settlements_1.0/response_map.json | 34 + .../settlements_2.0/api_spec.yaml | 1001 ++++ .../settlements_2.0/mockRef.json | 38 + .../settlements_2.0/response_map.json | 34 + .../thirdparty_sdk_outbound_0.1/api_spec.yaml | 2141 +++++++ .../templates/newman/html_template.html | 0 .../templates/newman/pdf_template.html | 0 .../testcase_definition/table_view.html | 0 .../spec_files/rules_callback}/config.json | 0 .../spec_files/rules_callback/default.json | 1247 ++++ .../spec_files/rules_callback/p2p-limit.json | 129 + .../spec_files/rules_forward/config.json | 3 + .../spec_files/rules_forward/default.json | 356 ++ .../spec_files/rules_response/config.json | 3 + .../spec_files/rules_response/default.json | 278 + .../spec_files/rules_validation/config.json | 3 + .../spec_files/rules_validation}/default.json | 0 .../rules_validation/p2p-limit.json | 55 + .../ttk-hub/spec_files/system_config.json | 139 + .../ttk-hub/spec_files/user_config.json | 112 + .../api_spec.yaml | 42 +- .../callback_map.json | 0 .../mockRef.json | 22 + .../response_map.json | 21 + .../mojaloop_simulator_sim_1.4/api_spec.yaml | 0 .../mojaloop_simulator_sim_1.4/mockRef.json | 75 + .../response_map.json | 0 .../templates/newman/html_template.html | 1118 ++++ .../templates/newman/pdf_template.html | 785 +++ .../testcase_definition/table_view.html | 133 + .../spec_files/rules_callback/config.json | 0 .../spec_files/rules_callback}/default.json | 0 .../spec_files/rules_response/config.json | 3 + .../spec_files/rules_response/default.json | 0 .../spec_files/rules_validation/config.json | 0 .../spec_files/rules_validation/default.json | 1 + .../spec_files/system_config.json | 1 + .../spec_files/user_config.json | 3 +- .../api_spec.yaml | 5136 +++++++++++++++++ .../callback_map.json | 46 + .../mockRef.json | 22 + .../response_map.json | 21 + .../mojaloop_simulator_sim_1.4/api_spec.yaml | 1205 ++++ .../mojaloop_simulator_sim_1.4/mockRef.json | 75 + .../response_map.json | 60 + .../templates/newman/html_template.html | 1118 ++++ .../templates/newman/pdf_template.html | 785 +++ .../testcase_definition/table_view.html | 133 + .../spec_files/rules_callback/config.json | 3 + .../spec_files/rules_callback/default.json | 1 + .../spec_files/rules_response/config.json | 3 + .../spec_files/rules_response/default.json | 1949 +++++++ .../spec_files/rules_validation/config.json | 3 + .../spec_files/rules_validation/default.json | 1 + .../ttk-ttksim2/spec_files/system_config.json | 78 + .../ttk-ttksim2/spec_files/user_config.json | 47 + .../api_spec.yaml | 5136 +++++++++++++++++ .../callback_map.json | 46 + .../mockRef.json | 22 + .../response_map.json | 21 + .../mojaloop_simulator_sim_1.4/api_spec.yaml | 1205 ++++ .../mojaloop_simulator_sim_1.4/mockRef.json | 75 + .../response_map.json | 60 + .../templates/newman/html_template.html | 1118 ++++ .../templates/newman/pdf_template.html | 785 +++ .../testcase_definition/table_view.html | 133 + .../spec_files/rules_callback/config.json | 3 + .../spec_files/rules_callback/default.json | 1 + .../spec_files/rules_response/config.json | 3 + .../spec_files/rules_response/default.json | 1949 +++++++ .../spec_files/rules_validation/config.json | 3 + .../spec_files/rules_validation/default.json | 1 + .../ttk-ttksim3/spec_files/system_config.json | 78 + .../ttk-ttksim3/spec_files/user_config.json | 47 + test/func/docker-compose.yml | 186 +- .../bulk_happy_path_dynamic.json | 410 ++ yarn.lock | 77 +- 143 files changed, 53427 insertions(+), 167 deletions(-) delete mode 100644 test/func/config/payee-sdk/outbound-command-event-handler.env delete mode 100644 test/func/config/payee-sdk/outbound-domain-event-handler.env delete mode 100644 test/func/config/payer-sdk/outbound-command-event-handler.env delete mode 100644 test/func/config/payer-sdk/outbound-domain-event-handler.env create mode 100644 test/func/config/sdk-ttksim1/api-svc.env create mode 100644 test/func/config/sdk-ttksim1/outbound-command-event-handler.env create mode 100644 test/func/config/sdk-ttksim1/outbound-domain-event-handler.env rename test/func/config/{payer-sdk => sdk-ttksim2}/api-svc.env (88%) create mode 100644 test/func/config/sdk-ttksim2/outbound-command-event-handler.env create mode 100644 test/func/config/sdk-ttksim2/outbound-domain-event-handler.env rename test/func/config/{payee-sdk => sdk-ttksim3}/api-svc.env (88%) create mode 100644 test/func/config/sdk-ttksim3/outbound-command-event-handler.env create mode 100644 test/func/config/sdk-ttksim3/outbound-domain-event-handler.env create mode 100644 test/func/config/ttk-hub/spec_files/api_definitions/als_admin_1.1/api_spec.yaml create mode 100644 test/func/config/ttk-hub/spec_files/api_definitions/central_admin_1.0/api_spec.yaml create mode 100644 test/func/config/ttk-hub/spec_files/api_definitions/central_admin_1.0/response_map.json create mode 100644 test/func/config/ttk-hub/spec_files/api_definitions/central_admin_old_9.3/api_spec.yaml create mode 100644 test/func/config/ttk-hub/spec_files/api_definitions/central_admin_old_9.3/response_map.json create mode 100644 test/func/config/ttk-hub/spec_files/api_definitions/fspiop_1.0/api_spec.yaml create mode 100644 test/func/config/ttk-hub/spec_files/api_definitions/fspiop_1.0/callback_map.json create mode 100644 test/func/config/ttk-hub/spec_files/api_definitions/fspiop_1.0/mockRef.json create mode 100644 test/func/config/ttk-hub/spec_files/api_definitions/fspiop_1.0/trigger_templates/transaction_request_followup.json create mode 100644 test/func/config/ttk-hub/spec_files/api_definitions/fspiop_1.0/trigger_templates/transaction_request_followup_quotes_only.json create mode 100644 test/func/config/ttk-hub/spec_files/api_definitions/fspiop_1.1/api_spec.yaml create mode 100644 test/func/config/ttk-hub/spec_files/api_definitions/fspiop_1.1/callback_map.json create mode 100644 test/func/config/ttk-hub/spec_files/api_definitions/fspiop_1.1/mockRef.json create mode 100644 test/func/config/ttk-hub/spec_files/api_definitions/fspiop_1.1/trigger_templates/transaction_request_followup.json create mode 100644 test/func/config/ttk-hub/spec_files/api_definitions/fx-api_2.0/api_spec.yaml create mode 100644 test/func/config/ttk-hub/spec_files/api_definitions/fx-api_2.0/callback_map.json create mode 100644 test/func/config/ttk-hub/spec_files/api_definitions/fx-api_2.0/mockRef.json create mode 100644 test/func/config/ttk-hub/spec_files/api_definitions/mojaloop_sdk_outbound_scheme_adapter_1.0/api_spec.yaml rename test/func/config/{ml-testing-toolkit => ttk-hub}/spec_files/api_definitions/mojaloop_sdk_outbound_scheme_adapter_1.0/mockRef.json (100%) rename test/func/config/{ml-testing-toolkit => ttk-hub}/spec_files/api_definitions/mojaloop_sdk_outbound_scheme_adapter_1.0/response_map.json (100%) create mode 100644 test/func/config/ttk-hub/spec_files/api_definitions/mojaloop_simulator_0.1/api_spec.yaml create mode 100644 test/func/config/ttk-hub/spec_files/api_definitions/mojaloop_simulator_sim_1.4/api_spec.yaml rename test/func/config/{ml-testing-toolkit => ttk-hub}/spec_files/api_definitions/mojaloop_simulator_sim_1.4/mockRef.json (100%) create mode 100644 test/func/config/ttk-hub/spec_files/api_definitions/mojaloop_simulator_sim_1.4/response_map.json create mode 100644 test/func/config/ttk-hub/spec_files/api_definitions/payment_manager_1.4/api_spec.yaml create mode 100644 test/func/config/ttk-hub/spec_files/api_definitions/settlements_1.0/api_spec.yaml create mode 100644 test/func/config/ttk-hub/spec_files/api_definitions/settlements_1.0/mockRef.json create mode 100644 test/func/config/ttk-hub/spec_files/api_definitions/settlements_1.0/response_map.json create mode 100644 test/func/config/ttk-hub/spec_files/api_definitions/settlements_2.0/api_spec.yaml create mode 100644 test/func/config/ttk-hub/spec_files/api_definitions/settlements_2.0/mockRef.json create mode 100644 test/func/config/ttk-hub/spec_files/api_definitions/settlements_2.0/response_map.json create mode 100644 test/func/config/ttk-hub/spec_files/api_definitions/thirdparty_sdk_outbound_0.1/api_spec.yaml rename test/func/config/{ml-testing-toolkit => ttk-hub}/spec_files/reports/templates/newman/html_template.html (100%) rename test/func/config/{ml-testing-toolkit => ttk-hub}/spec_files/reports/templates/newman/pdf_template.html (100%) rename test/func/config/{ml-testing-toolkit => ttk-hub}/spec_files/reports/templates/testcase_definition/table_view.html (100%) rename test/func/config/{ml-testing-toolkit/spec_files/rules_response => ttk-hub/spec_files/rules_callback}/config.json (100%) create mode 100644 test/func/config/ttk-hub/spec_files/rules_callback/default.json create mode 100644 test/func/config/ttk-hub/spec_files/rules_callback/p2p-limit.json create mode 100644 test/func/config/ttk-hub/spec_files/rules_forward/config.json create mode 100644 test/func/config/ttk-hub/spec_files/rules_forward/default.json create mode 100644 test/func/config/ttk-hub/spec_files/rules_response/config.json create mode 100644 test/func/config/ttk-hub/spec_files/rules_response/default.json create mode 100644 test/func/config/ttk-hub/spec_files/rules_validation/config.json rename test/func/config/{ml-testing-toolkit/spec_files/rules_callback => ttk-hub/spec_files/rules_validation}/default.json (100%) create mode 100644 test/func/config/ttk-hub/spec_files/rules_validation/p2p-limit.json create mode 100644 test/func/config/ttk-hub/spec_files/system_config.json create mode 100644 test/func/config/ttk-hub/spec_files/user_config.json rename test/func/config/{ml-testing-toolkit => ttk-ttksim1}/spec_files/api_definitions/mojaloop_sdk_outbound_scheme_adapter_1.0/api_spec.yaml (98%) rename test/func/config/{ml-testing-toolkit => ttk-ttksim1}/spec_files/api_definitions/mojaloop_sdk_outbound_scheme_adapter_1.0/callback_map.json (100%) create mode 100644 test/func/config/ttk-ttksim1/spec_files/api_definitions/mojaloop_sdk_outbound_scheme_adapter_1.0/mockRef.json create mode 100644 test/func/config/ttk-ttksim1/spec_files/api_definitions/mojaloop_sdk_outbound_scheme_adapter_1.0/response_map.json rename test/func/config/{ml-testing-toolkit => ttk-ttksim1}/spec_files/api_definitions/mojaloop_simulator_sim_1.4/api_spec.yaml (100%) create mode 100644 test/func/config/ttk-ttksim1/spec_files/api_definitions/mojaloop_simulator_sim_1.4/mockRef.json rename test/func/config/{ml-testing-toolkit => ttk-ttksim1}/spec_files/api_definitions/mojaloop_simulator_sim_1.4/response_map.json (100%) create mode 100644 test/func/config/ttk-ttksim1/spec_files/reports/templates/newman/html_template.html create mode 100644 test/func/config/ttk-ttksim1/spec_files/reports/templates/newman/pdf_template.html create mode 100644 test/func/config/ttk-ttksim1/spec_files/reports/templates/testcase_definition/table_view.html rename test/func/config/{ml-testing-toolkit => ttk-ttksim1}/spec_files/rules_callback/config.json (100%) rename test/func/config/{ml-testing-toolkit/spec_files/rules_validation => ttk-ttksim1/spec_files/rules_callback}/default.json (100%) create mode 100644 test/func/config/ttk-ttksim1/spec_files/rules_response/config.json rename test/func/config/{ml-testing-toolkit => ttk-ttksim1}/spec_files/rules_response/default.json (100%) rename test/func/config/{ml-testing-toolkit => ttk-ttksim1}/spec_files/rules_validation/config.json (100%) create mode 100644 test/func/config/ttk-ttksim1/spec_files/rules_validation/default.json rename test/func/config/{ml-testing-toolkit => ttk-ttksim1}/spec_files/system_config.json (97%) rename test/func/config/{ml-testing-toolkit => ttk-ttksim1}/spec_files/user_config.json (93%) create mode 100644 test/func/config/ttk-ttksim2/spec_files/api_definitions/mojaloop_sdk_outbound_scheme_adapter_1.0/api_spec.yaml create mode 100644 test/func/config/ttk-ttksim2/spec_files/api_definitions/mojaloop_sdk_outbound_scheme_adapter_1.0/callback_map.json create mode 100644 test/func/config/ttk-ttksim2/spec_files/api_definitions/mojaloop_sdk_outbound_scheme_adapter_1.0/mockRef.json create mode 100644 test/func/config/ttk-ttksim2/spec_files/api_definitions/mojaloop_sdk_outbound_scheme_adapter_1.0/response_map.json create mode 100644 test/func/config/ttk-ttksim2/spec_files/api_definitions/mojaloop_simulator_sim_1.4/api_spec.yaml create mode 100644 test/func/config/ttk-ttksim2/spec_files/api_definitions/mojaloop_simulator_sim_1.4/mockRef.json create mode 100644 test/func/config/ttk-ttksim2/spec_files/api_definitions/mojaloop_simulator_sim_1.4/response_map.json create mode 100644 test/func/config/ttk-ttksim2/spec_files/reports/templates/newman/html_template.html create mode 100644 test/func/config/ttk-ttksim2/spec_files/reports/templates/newman/pdf_template.html create mode 100644 test/func/config/ttk-ttksim2/spec_files/reports/templates/testcase_definition/table_view.html create mode 100644 test/func/config/ttk-ttksim2/spec_files/rules_callback/config.json create mode 100644 test/func/config/ttk-ttksim2/spec_files/rules_callback/default.json create mode 100644 test/func/config/ttk-ttksim2/spec_files/rules_response/config.json create mode 100644 test/func/config/ttk-ttksim2/spec_files/rules_response/default.json create mode 100644 test/func/config/ttk-ttksim2/spec_files/rules_validation/config.json create mode 100644 test/func/config/ttk-ttksim2/spec_files/rules_validation/default.json create mode 100644 test/func/config/ttk-ttksim2/spec_files/system_config.json create mode 100644 test/func/config/ttk-ttksim2/spec_files/user_config.json create mode 100644 test/func/config/ttk-ttksim3/spec_files/api_definitions/mojaloop_sdk_outbound_scheme_adapter_1.0/api_spec.yaml create mode 100644 test/func/config/ttk-ttksim3/spec_files/api_definitions/mojaloop_sdk_outbound_scheme_adapter_1.0/callback_map.json create mode 100644 test/func/config/ttk-ttksim3/spec_files/api_definitions/mojaloop_sdk_outbound_scheme_adapter_1.0/mockRef.json create mode 100644 test/func/config/ttk-ttksim3/spec_files/api_definitions/mojaloop_sdk_outbound_scheme_adapter_1.0/response_map.json create mode 100644 test/func/config/ttk-ttksim3/spec_files/api_definitions/mojaloop_simulator_sim_1.4/api_spec.yaml create mode 100644 test/func/config/ttk-ttksim3/spec_files/api_definitions/mojaloop_simulator_sim_1.4/mockRef.json create mode 100644 test/func/config/ttk-ttksim3/spec_files/api_definitions/mojaloop_simulator_sim_1.4/response_map.json create mode 100644 test/func/config/ttk-ttksim3/spec_files/reports/templates/newman/html_template.html create mode 100644 test/func/config/ttk-ttksim3/spec_files/reports/templates/newman/pdf_template.html create mode 100644 test/func/config/ttk-ttksim3/spec_files/reports/templates/testcase_definition/table_view.html create mode 100644 test/func/config/ttk-ttksim3/spec_files/rules_callback/config.json create mode 100644 test/func/config/ttk-ttksim3/spec_files/rules_callback/default.json create mode 100644 test/func/config/ttk-ttksim3/spec_files/rules_response/config.json create mode 100644 test/func/config/ttk-ttksim3/spec_files/rules_response/default.json create mode 100644 test/func/config/ttk-ttksim3/spec_files/rules_validation/config.json create mode 100644 test/func/config/ttk-ttksim3/spec_files/rules_validation/default.json create mode 100644 test/func/config/ttk-ttksim3/spec_files/system_config.json create mode 100644 test/func/config/ttk-ttksim3/spec_files/user_config.json create mode 100644 test/func/ttk-testcases/bulk_happy_path_dynamic.json diff --git a/docker-compose.yml b/docker-compose.yml index 5767df26b..32fd9cadf 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -110,6 +110,7 @@ services: KAFKA_INTER_BROKER_LISTENER_NAME: LISTENER_INTERN KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1 KAFKA_CFG_ZOOKEEPER_CONNECT: zookeeper:2181 + KAFKA_CFG_MESSAGE_MAX_BYTES: 200000000 depends_on: - zookeeper healthcheck: diff --git a/modules/api-svc/.env.example b/modules/api-svc/.env.example index fc6bcc954..e6ebf8d2d 100644 --- a/modules/api-svc/.env.example +++ b/modules/api-svc/.env.example @@ -154,3 +154,7 @@ MGMT_API_WS_PORT=4005 # Set to true to enable the use of PM4ML-related services e.g MCM, Management API service # when running the scheme-adapter as a mojaloop connector component within Payment Manager for Mojaloop. PM4ML_ENABLED=false + +# Maximum payload limits +FSPIOP_API_SERVER_MAX_REQUEST_BYTES=209715200 +BACKEND_API_SERVER_MAX_REQUEST_BYTES=209715200 diff --git a/modules/api-svc/package.json b/modules/api-svc/package.json index 05e45fdef..f14d561aa 100644 --- a/modules/api-svc/package.json +++ b/modules/api-svc/package.json @@ -104,7 +104,7 @@ "jest": "^29.3.0", "jest-junit": "^14.0.1", "nock": "^13.2.9", - "npm-check-updates": "^16.3.16", + "npm-check-updates": "^16.3.18", "openapi-response-validator": "^12.0.2", "openapi-typescript": "^5.4.1", "redis-mock": "^0.56.3", diff --git a/modules/api-svc/project.json b/modules/api-svc/project.json index a895b19ce..9b2e178cf 100644 --- a/modules/api-svc/project.json +++ b/modules/api-svc/project.json @@ -1,4 +1,5 @@ { + "name": "modules-api-svc", "root": "modules/api-svc/", "sourceRoot": "modules/api-svc/src", "projectType": "application", diff --git a/modules/api-svc/src/InboundServer/index.js b/modules/api-svc/src/InboundServer/index.js index 98e83b1f1..9209b515b 100644 --- a/modules/api-svc/src/InboundServer/index.js +++ b/modules/api-svc/src/InboundServer/index.js @@ -95,7 +95,7 @@ class InboundApi extends EventEmitter { api.use(middlewares.createErrorHandler(logger)); api.use(middlewares.createRequestIdGenerator()); - api.use(middlewares.createHeaderValidator(logger)); + api.use(middlewares.createHeaderValidator(conf, logger)); if (conf.validateInboundJws) { const jwsExclusions = conf.validateInboundPutPartiesJws ? [] : ['putParties']; api.use(middlewares.createJwsValidator(logger, jwsVerificationKeys, jwsExclusions)); diff --git a/modules/api-svc/src/InboundServer/middlewares.js b/modules/api-svc/src/InboundServer/middlewares.js index d53552e5f..c3e348b0e 100644 --- a/modules/api-svc/src/InboundServer/middlewares.js +++ b/modules/api-svc/src/InboundServer/middlewares.js @@ -174,7 +174,7 @@ const createRequestIdGenerator = () => async (ctx, next) => { * @return {Function} */ // -const createHeaderValidator = (logger) => async ( +const createHeaderValidator = (conf, logger) => async ( ctx, next, resources = defaultProtocolResources, @@ -264,7 +264,7 @@ const createHeaderValidator = (logger) => async ( } try { - ctx.request.body = await coBody.json(ctx.req); + ctx.request.body = await coBody.json(ctx.req, { limit: conf.fspiopApiServerMaxRequestBytes }); } catch(err) { // error parsing body @@ -356,7 +356,9 @@ const createLogger = (logger) => async (ctx, next) => { path: ctx.path, method: ctx.method }}); - if (!ctx.state.logExcludePaths.includes(ctx.path)) { + await ctx.state.logger.log('Request received'); + // TODO: we need to disable the following log message based on a configurable parameter like DEBUG + if (!ctx.state.logExcludePaths.includes(ctx.path) && !ctx.path.startsWith('/bulk')) { ctx.state.logger.push({body: ctx.request.body}).log('Request received'); } try { diff --git a/modules/api-svc/src/OutboundServer/index.js b/modules/api-svc/src/OutboundServer/index.js index 990983db5..b1f5e9e6c 100644 --- a/modules/api-svc/src/OutboundServer/index.js +++ b/modules/api-svc/src/OutboundServer/index.js @@ -38,7 +38,7 @@ class OutboundApi extends EventEmitter { this._api.use(middlewares.createErrorHandler(this._logger)); this._api.use(middlewares.createRequestIdGenerator()); - this._api.use(koaBody()); // outbound always expects application/json + this._api.use(koaBody({ formidable: { maxFieldsSize: conf.backendApiServerMaxRequestBytes } })); // outbound always expects application/json this._api.use(middlewares.applyState({ cache, wso2, conf, metricsClient, logExcludePaths, eventProducer, eventLogger })); this._api.use(middlewares.createLogger(this._logger)); diff --git a/modules/api-svc/src/config.js b/modules/api-svc/src/config.js index 9977a5680..127112ce0 100644 --- a/modules/api-svc/src/config.js +++ b/modules/api-svc/src/config.js @@ -209,4 +209,7 @@ module.exports = { allowDifferentTransferTransactionId: env.get('ALLOW_DIFFERENT_TRANSFER_TRANSACTION_ID').default('false').asBool(), pm4mlEnabled: env.get('PM4ML_ENABLED').default('false').asBool(), + + fspiopApiServerMaxRequestBytes: env.get('FSPIOP_API_SERVER_MAX_REQUEST_BYTES').default('209715200').asIntPositive(), // Default is 200mb + backendApiServerMaxRequestBytes: env.get('BACKEND_API_SERVER_MAX_REQUEST_BYTES').default('209715200').asIntPositive(), // Default is 200mb }; diff --git a/modules/outbound-command-event-handler/config/default.json b/modules/outbound-command-event-handler/config/default.json index de369810d..5443a758e 100644 --- a/modules/outbound-command-event-handler/config/default.json +++ b/modules/outbound-command-event-handler/config/default.json @@ -12,12 +12,15 @@ "brokerList": "localhost:9092", "groupId": "command_events_consumer_group", "clientId": "command_events_consumer_client_id", - "topics": ["topic-sdk-outbound-command-events"] + "topics": ["topic-sdk-outbound-command-events"], + "messageMaxBytes": 200000000 }, "DOMAIN_EVENT_PRODUCER": { "brokerList": "localhost:9092", "clientId": "domain_events_producer_client_id", - "topic": "topic-sdk-outbound-domain-events" + "topic": "topic-sdk-outbound-domain-events", + "messageMaxBytes": 200000000, + "compressionCodec": "none" } } } \ No newline at end of file diff --git a/modules/outbound-command-event-handler/package.json b/modules/outbound-command-event-handler/package.json index 9b9e10400..0d5412ac5 100644 --- a/modules/outbound-command-event-handler/package.json +++ b/modules/outbound-command-event-handler/package.json @@ -67,7 +67,7 @@ "eslint": "^8.27.0", "jest": "^29.3.0", "nodemon": "^2.0.20", - "npm-check-updates": "^16.3.16", + "npm-check-updates": "^16.3.18", "replace": "^1.2.2", "standard-version": "^9.5.0", "ts-jest": "^29.0.3", diff --git a/modules/outbound-command-event-handler/project.json b/modules/outbound-command-event-handler/project.json index 82389f842..a86f13bfd 100644 --- a/modules/outbound-command-event-handler/project.json +++ b/modules/outbound-command-event-handler/project.json @@ -1,4 +1,5 @@ { + "name": "modules-outbound-command-event-handler", "root": "modules/outbound-command-event-handler/", "sourceRoot": "modules/outbound-command-event-handler/src", "projectType": "application", diff --git a/modules/outbound-command-event-handler/src/shared/config.ts b/modules/outbound-command-event-handler/src/shared/config.ts index a46fc03e5..1c1187339 100644 --- a/modules/outbound-command-event-handler/src/shared/config.ts +++ b/modules/outbound-command-event-handler/src/shared/config.ts @@ -97,6 +97,12 @@ const config = Convict({ default: ['topic-sdk-outbound-command-events'], env: 'COMMAND_EVENT_CONSUMER_TOPICS', }, + messageMaxBytes: { + doc: 'messageMaxBytes', + format: Number, + default: 200000000, + env: 'COMMAND_EVENT_CONSUMER_MESSAGE_MAX_BYTES', + }, }, DOMAIN_EVENT_PRODUCER: { brokerList: { @@ -117,6 +123,18 @@ const config = Convict({ default: 'topic-sdk-outbound-domain-events', env: 'DOMAIN_EVENT_PRODUCER_TOPIC', }, + messageMaxBytes: { + doc: 'messageMaxBytes', + format: Number, + default: 200000000, + env: 'DOMAIN_EVENT_PRODUCER_MESSAGE_MAX_BYTES', + }, + compressionCodec: { + doc: 'compressionCodec', + format: String, + default: 'none', + env: 'DOMAIN_EVENT_PRODUCER_COMPRESSION_CODEC', + }, }, }, MAX_ITEMS_PER_BATCH: { diff --git a/modules/outbound-domain-event-handler/config/default.json b/modules/outbound-domain-event-handler/config/default.json index c134883d7..b3f0367f7 100644 --- a/modules/outbound-domain-event-handler/config/default.json +++ b/modules/outbound-domain-event-handler/config/default.json @@ -12,12 +12,15 @@ "brokerList": "localhost:9092", "groupId": "domain_events_consumer_group", "clientId": "domain_events_consumer_client_id", - "topics": ["topic-sdk-outbound-domain-events"] + "topics": ["topic-sdk-outbound-domain-events"], + "messageMaxBytes": 200000000 }, "COMMAND_EVENT_PRODUCER": { "brokerList": "localhost:9092", "clientId": "command_events_producer_client_id", - "topic": "topic-sdk-outbound-command-events" + "topic": "topic-sdk-outbound-command-events", + "messageMaxBytes": 200000000, + "compressionCodec": "none" } } } diff --git a/modules/outbound-domain-event-handler/package.json b/modules/outbound-domain-event-handler/package.json index cd0ab912b..cb75063e8 100644 --- a/modules/outbound-domain-event-handler/package.json +++ b/modules/outbound-domain-event-handler/package.json @@ -65,7 +65,7 @@ "eslint": "^8.27.0", "jest": "^29.3.0", "nodemon": "^2.0.20", - "npm-check-updates": "^16.3.16", + "npm-check-updates": "^16.3.18", "replace": "^1.2.2", "standard-version": "^9.5.0", "ts-jest": "^29.0.3", diff --git a/modules/outbound-domain-event-handler/project.json b/modules/outbound-domain-event-handler/project.json index bbb0180bc..edb3acb48 100644 --- a/modules/outbound-domain-event-handler/project.json +++ b/modules/outbound-domain-event-handler/project.json @@ -1,4 +1,5 @@ { + "name": "modules-outbound-domain-event-handler", "root": "modules/outbound-domain-event-handler/", "sourceRoot": "modules/outbound-domain-event-handler/src", "projectType": "application", diff --git a/modules/outbound-domain-event-handler/src/shared/config.ts b/modules/outbound-domain-event-handler/src/shared/config.ts index 54fae78dd..093a4d367 100644 --- a/modules/outbound-domain-event-handler/src/shared/config.ts +++ b/modules/outbound-domain-event-handler/src/shared/config.ts @@ -95,6 +95,12 @@ const config = Convict({ default: ['topic-sdk-outbound-domain-events'], env: 'DOMAIN_EVENT_CONSUMER_TOPICS', }, + messageMaxBytes: { + doc: 'messageMaxBytes', + format: Number, + default: 200000000, + env: 'DOMAIN_EVENT_CONSUMER_MESSAGE_MAX_BYTES', + }, }, COMMAND_EVENT_PRODUCER: { brokerList: { @@ -115,6 +121,18 @@ const config = Convict({ default: 'topic-sdk-outbound-command-events', env: 'COMMAND_EVENT_PRODUCER_TOPIC', }, + messageMaxBytes: { + doc: 'messageMaxBytes', + format: Number, + default: 200000000, + env: 'COMMAND_EVENT_PRODUCER_MESSAGE_MAX_BYTES', + }, + compressionCodec: { + doc: 'compressionCodec', + format: String, + default: 'none', + env: 'COMMAND_EVENT_PRODUCER_COMPRESSION_CODEC', + }, }, }, }); diff --git a/modules/private-shared-lib/package.json b/modules/private-shared-lib/package.json index 8113b4cb1..6593c7d49 100644 --- a/modules/private-shared-lib/package.json +++ b/modules/private-shared-lib/package.json @@ -31,7 +31,7 @@ "@mojaloop/central-services-shared": "^17.3.1", "@mojaloop/logging-bc-public-types-lib": "^0.1.12", "@mojaloop/platform-shared-lib-messaging-types-lib": "^0.2.16", - "@mojaloop/platform-shared-lib-nodejs-kafka-client-lib": "^0.2.13", + "@mojaloop/platform-shared-lib-nodejs-kafka-client-lib": "^0.2.14-snapshot.0", "ajv": "^8.11.0", "redis": "^4.4.0", "uuid": "^9.0.0" @@ -40,7 +40,7 @@ "@types/node": "^18.11.9", "eslint": "^8.27.0", "jest": "^29.3.0", - "npm-check-updates": "^16.3.16", + "npm-check-updates": "^16.3.18", "replace": "^1.2.2", "standard-version": "^9.5.0", "ts-jest": "^29.0.3", diff --git a/modules/private-shared-lib/project.json b/modules/private-shared-lib/project.json index e973b7aa0..64c042f89 100644 --- a/modules/private-shared-lib/project.json +++ b/modules/private-shared-lib/project.json @@ -1,4 +1,5 @@ { + "name": "modules-private-shared-lib", "root": "modules/private-shared-lib/", "sourceRoot": "modules/private-shared-lib/src", "projectType": "library", diff --git a/modules/private-shared-lib/src/infra/kafka_command_event_consumer.ts b/modules/private-shared-lib/src/infra/kafka_command_event_consumer.ts index 154ef9b33..fe4217021 100644 --- a/modules/private-shared-lib/src/infra/kafka_command_event_consumer.ts +++ b/modules/private-shared-lib/src/infra/kafka_command_event_consumer.ts @@ -50,6 +50,7 @@ export class KafkaCommandEventConsumer extends KafkaEventConsumer { kafkaBrokerList: consumerOptions.brokerList, kafkaGroupId: consumerOptions.groupId, outputType: MLKafkaRawConsumerOutputType.Json, + messageMaxBytes: consumerOptions.messageMaxBytes || 200000000, }; super(mlConsumerOptions, consumerOptions.topics, superHandlerFn, logger); } diff --git a/modules/private-shared-lib/src/infra/kafka_command_event_producer.ts b/modules/private-shared-lib/src/infra/kafka_command_event_producer.ts index 4fd043d05..fd0804fd6 100644 --- a/modules/private-shared-lib/src/infra/kafka_command_event_producer.ts +++ b/modules/private-shared-lib/src/infra/kafka_command_event_producer.ts @@ -28,7 +28,7 @@ // TODO: Try to use the generic kafka producer from platform-shared-lib and investigate if there is any value in maintaining these classes here. -import { MLKafkaRawProducerOptions } from '@mojaloop/platform-shared-lib-nodejs-kafka-client-lib'; +import { MLKafkaRawProducerOptions, MLKafkaRawProdOpCompressionCodecEnum } from '@mojaloop/platform-shared-lib-nodejs-kafka-client-lib'; import { KafkaEventProducer } from './kafka_event_producer'; import { ILogger } from '@mojaloop/logging-bc-public-types-lib'; import { CommandEvent } from '../events'; @@ -46,6 +46,8 @@ export class KafkaCommandEventProducer extends KafkaEventProducer implements ICo kafkaBrokerList: producerOptions.brokerList, producerClientId: producerOptions.clientId, skipAcknowledgements: true, + messageMaxBytes: producerOptions.messageMaxBytes || 200000000, + compressionCodec: producerOptions.compressionCodec || MLKafkaRawProdOpCompressionCodecEnum.none, }; super(mlProducerOptions, logger); this._topic = producerOptions.topic; diff --git a/modules/private-shared-lib/src/infra/kafka_domain_event_consumer.ts b/modules/private-shared-lib/src/infra/kafka_domain_event_consumer.ts index 3c0155bca..13861e8e3 100644 --- a/modules/private-shared-lib/src/infra/kafka_domain_event_consumer.ts +++ b/modules/private-shared-lib/src/infra/kafka_domain_event_consumer.ts @@ -50,6 +50,7 @@ export class KafkaDomainEventConsumer extends KafkaEventConsumer { kafkaBrokerList: consumerOptions.brokerList, kafkaGroupId: consumerOptions.groupId, outputType: MLKafkaRawConsumerOutputType.Json, + messageMaxBytes: consumerOptions.messageMaxBytes || 200000000, }; super(mlConsumerOptions, consumerOptions.topics, superHandlerFn, logger); } diff --git a/modules/private-shared-lib/src/infra/kafka_domain_event_producer.ts b/modules/private-shared-lib/src/infra/kafka_domain_event_producer.ts index 6a844c179..1b71c5ced 100644 --- a/modules/private-shared-lib/src/infra/kafka_domain_event_producer.ts +++ b/modules/private-shared-lib/src/infra/kafka_domain_event_producer.ts @@ -28,7 +28,7 @@ // TODO: Try to use the generic kafka producer from platform-shared-lib and investigate if there is any value in maintaining these classes here. -import { MLKafkaRawProducerOptions } from '@mojaloop/platform-shared-lib-nodejs-kafka-client-lib'; +import { MLKafkaRawProducerOptions, MLKafkaRawProdOpCompressionCodecEnum } from '@mojaloop/platform-shared-lib-nodejs-kafka-client-lib'; import { KafkaEventProducer } from './kafka_event_producer'; import { ILogger } from '@mojaloop/logging-bc-public-types-lib'; import { DomainEvent } from '../events'; @@ -46,6 +46,8 @@ export class KafkaDomainEventProducer extends KafkaEventProducer implements IDom kafkaBrokerList: producerOptions.brokerList, producerClientId: producerOptions.clientId, skipAcknowledgements: true, + messageMaxBytes: producerOptions.messageMaxBytes || 200000000, + compressionCodec: producerOptions.compressionCodec || MLKafkaRawProdOpCompressionCodecEnum.none, }; super(mlProducerOptions, logger); this._topic = producerOptions.topic; diff --git a/modules/private-shared-lib/src/types/infra/ikafka_event_consumer_options.ts b/modules/private-shared-lib/src/types/infra/ikafka_event_consumer_options.ts index a60a3020b..06ae13627 100644 --- a/modules/private-shared-lib/src/types/infra/ikafka_event_consumer_options.ts +++ b/modules/private-shared-lib/src/types/infra/ikafka_event_consumer_options.ts @@ -28,5 +28,6 @@ export type IKafkaEventConsumerOptions = { brokerList: string, groupId: string, clientId: string, - topics: string[] + topics: string[], + messageMaxBytes?: number, }; diff --git a/modules/private-shared-lib/src/types/infra/ikafka_event_producer_options.ts b/modules/private-shared-lib/src/types/infra/ikafka_event_producer_options.ts index 0aeca5d65..8af5ceddb 100644 --- a/modules/private-shared-lib/src/types/infra/ikafka_event_producer_options.ts +++ b/modules/private-shared-lib/src/types/infra/ikafka_event_producer_options.ts @@ -23,9 +23,12 @@ ******/ 'use strict'; +import { MLKafkaRawProdOpCompressionCodecEnum } from '@mojaloop/platform-shared-lib-nodejs-kafka-client-lib'; export type IKafkaEventProducerOptions = { brokerList: string, clientId: string, - topic: string + topic: string, + messageMaxBytes?: number, + compressionCodec?: MLKafkaRawProdOpCompressionCodecEnum, }; diff --git a/package.json b/package.json index 4e2ad077a..1ace9bf53 100644 --- a/package.json +++ b/package.json @@ -67,7 +67,7 @@ "wait-4-docker": "node ./scripts/_wait4_all.js" }, "dependencies": { - "nx": "15.0.10", + "nx": "15.0.12", "tslib": "^2.4.1" }, "devDependencies": { @@ -80,10 +80,10 @@ "eslint": "^8.27.0", "eslint-config-airbnb-typescript": "^17.0.0", "eslint-plugin-import": "latest", - "husky": "^8.0.1", + "husky": "^8.0.2", "jest": "^29.3.0", "nodemon": "^2.0.20", - "npm-check-updates": "^16.3.16", + "npm-check-updates": "^16.3.18", "replace": "^1.2.2", "standard-version": "^9.5.0", "ts-jest": "^29.0.3", diff --git a/test/func/common-sdk.yml b/test/func/common-sdk.yml index 57602035c..da6612761 100644 --- a/test/func/common-sdk.yml +++ b/test/func/common-sdk.yml @@ -84,15 +84,3 @@ services: # start_period: 40s # interval: 30s - redis: - networks: - - mojaloop-net - image: "redis:5.0.4-alpine" - # ports: - # - "6379:6379" - healthcheck: - test: ["CMD" ,"sh", "-c", "redis-cli","ping"] - timeout: 20s - retries: 10 - start_period: 40s - interval: 30s diff --git a/test/func/config/payee-sdk/outbound-command-event-handler.env b/test/func/config/payee-sdk/outbound-command-event-handler.env deleted file mode 100644 index 55acaa7be..000000000 --- a/test/func/config/payee-sdk/outbound-command-event-handler.env +++ /dev/null @@ -1,10 +0,0 @@ -LOG_LEVEL=info -API_SERVER_ENABLED=false -API_SERVER_PORT=8000 -REDIS_CONNECTION_URL=redis://payee-redis:6379 -COMMAND_EVENT_CONSUMER_BROKER_LIST=kafka:9092 -DOMAIN_EVENT_PRODUCER_BROKER_LIST=kafka:9092 -MAX_ITEMS_PER_BATCH=1000 -COMMAND_EVENT_CONSUMER_GROUP_ID=payee-command_events_consumer_group -COMMAND_EVENT_CONSUMER_TOPICS=payee-topic-sdk-outbound-command-events -DOMAIN_EVENT_PRODUCER_TOPIC=payee-topic-sdk-outbound-domain-events \ No newline at end of file diff --git a/test/func/config/payee-sdk/outbound-domain-event-handler.env b/test/func/config/payee-sdk/outbound-domain-event-handler.env deleted file mode 100644 index c19cd6e4b..000000000 --- a/test/func/config/payee-sdk/outbound-domain-event-handler.env +++ /dev/null @@ -1,7 +0,0 @@ -LOG_LEVEL=info -REDIS_CONNECTION_URL=redis://payee-redis:6379 -DOMAIN_EVENT_CONSUMER_BROKER_LIST=kafka:9092 -COMMAND_EVENT_PRODUCER_BROKER_LIST=kafka:9092 -DOMAIN_EVENT_CONSUMER_GROUP_ID=payee-domain_events_consumer_group -DOMAIN_EVENT_CONSUMER_TOPICS=payee-topic-sdk-outbound-domain-events -COMMAND_EVENT_PRODUCER_TOPIC=payee-topic-sdk-outbound-command-events \ No newline at end of file diff --git a/test/func/config/payer-sdk/outbound-command-event-handler.env b/test/func/config/payer-sdk/outbound-command-event-handler.env deleted file mode 100644 index ebc0a26f1..000000000 --- a/test/func/config/payer-sdk/outbound-command-event-handler.env +++ /dev/null @@ -1,10 +0,0 @@ -LOG_LEVEL=info -API_SERVER_ENABLED=true -API_SERVER_PORT=8000 -REDIS_CONNECTION_URL=redis://payer-redis:6379 -COMMAND_EVENT_CONSUMER_BROKER_LIST=kafka:9093 -DOMAIN_EVENT_PRODUCER_BROKER_LIST=kafka:9093 -MAX_ITEMS_PER_BATCH=1000 -COMMAND_EVENT_CONSUMER_GROUP_ID=payer-command_events_consumer_group -COMMAND_EVENT_CONSUMER_TOPICS=payer-topic-sdk-outbound-command-events -DOMAIN_EVENT_PRODUCER_TOPIC=payer-topic-sdk-outbound-domain-events \ No newline at end of file diff --git a/test/func/config/payer-sdk/outbound-domain-event-handler.env b/test/func/config/payer-sdk/outbound-domain-event-handler.env deleted file mode 100644 index c43ead0f3..000000000 --- a/test/func/config/payer-sdk/outbound-domain-event-handler.env +++ /dev/null @@ -1,7 +0,0 @@ -LOG_LEVEL=info -REDIS_CONNECTION_URL=redis://payer-redis:6379 -DOMAIN_EVENT_CONSUMER_BROKER_LIST=kafka:9093 -COMMAND_EVENT_PRODUCER_BROKER_LIST=kafka:9093 -DOMAIN_EVENT_CONSUMER_GROUP_ID=payer-domain_events_consumer_group -DOMAIN_EVENT_CONSUMER_TOPICS=payer-topic-sdk-outbound-domain-events -COMMAND_EVENT_PRODUCER_TOPIC=payer-topic-sdk-outbound-command-events \ No newline at end of file diff --git a/test/func/config/sdk-ttksim1/api-svc.env b/test/func/config/sdk-ttksim1/api-svc.env new file mode 100644 index 000000000..dfa247004 --- /dev/null +++ b/test/func/config/sdk-ttksim1/api-svc.env @@ -0,0 +1,153 @@ +# Port number that the inbound (Mojaloop API) HTTP server will listen on +INBOUND_LISTEN_PORT=4000 + +# Port number that the outbound (simplified DFSP outbound API) HTTP server will listen on +OUTBOUND_LISTEN_PORT=4001 + +# Enable mutual TLS authentication. Useful when not running in a secure +# environment, i.e. when you're running it locally against your own implementation. +INBOUND_MUTUAL_TLS_ENABLED=false +OUTBOUND_MUTUAL_TLS_ENABLED=false + +# Enable verification or incoming JWS signatures +# Note that signatures will be required on incoming messages +# and will be validated against a public key. +VALIDATE_INBOUND_JWS=false + +# applicable only if VALIDATE_INBOUND_JWS is "true" +# allows disabling of validation on incoming PUT /parties/{idType}/{idValue} requests +VALIDATE_INBOUND_PUT_PARTIES_JWS=false + +# Enable signing of outgoing requests +JWS_SIGN=false + +# applicable only if JWS_SIGN is "true" +# allows disabling of signing on outgoing PUT /parties/{idType}/{idValue} requests +JWS_SIGN_PUT_PARTIES=false + +# Path to JWS signing key (private key of THIS DFSP) +JWS_SIGNING_KEY_PATH=secrets/jwsSigningKey.key +JWS_VERIFICATION_KEYS_DIRECTORY=secrets/jwsVerificationKeys + +# Location of certs and key required for TLS +# IN_CA_CERT_PATH=./secrets/cacert.pem +# IN_SERVER_CERT_PATH=./secrets/servercert.pem +# IN_SERVER_KEY_PATH=./secrets/serverkey.pem + +# OUT_CA_CERT_PATH=./secrets/cacert.pem +# OUT_CLIENT_CERT_PATH=./secrets/servercert.pem +# OUT_CLIENT_KEY_PATH=./secrets/serverkey.pem + +# The number of space characters by which to indent pretty-printed logs. If set to zero, log events +# will each be printed on a single line. +LOG_INDENT=0 + +# REDIS CACHE CONNECTION +CACHE_URL=redis://redis:6379/1 +CACHE_SHOULD_EXPIRE=false +CACHE_EXPIRY_SECONDS=3600 + +# SWITCH ENDPOINT +# The option 'PEER_ENDPOINT' has no effect if the remaining options 'ALS_ENDPOINT', 'QUOTES_ENDPOINT', +# 'BULK_QUOTES_ENDPOINT', 'TRANSFERS_ENDPOINT', 'BULK_TRANSFERS_ENDPOINT', 'TRANSACTION_REQUESTS_ENDPOINT' are specified. +# PEER_ENDPOINT=payee-sdk-api-svc:4000 +PEER_ENDPOINT=ttk-hub:4040 +#ALS_ENDPOINT=account-lookup-service.local +#QUOTES_ENDPOINT=quoting-service.local +#TRANSFERS_ENDPOINT=ml-api-adapter.local +#BULK_TRANSFERS_ENDPOINT=bulk-api-adapter.local +#TRANSACTION_REQUESTS_ENDPOINT=transaction-requests-service.local + +# BACKEND ENDPOINT +BACKEND_ENDPOINT=ttk-ttksim1:4040 + +# FSPID of this DFSP +DFSP_ID=ttksim1 + +# Secret used for generation and verification of secure ILP +ILP_SECRET=Quaixohyaesahju3thivuiChai5cahng + +# expiry period in seconds for quote and transfers issued by the SDK +EXPIRY_SECONDS=60 + +# if set to false the SDK will not automatically accept all returned quotes +# but will halt the transfer after a quote response is received. A further +# confirmation call will be required to complete the final transfer stage. +AUTO_ACCEPT_QUOTES=false + +# if set to false the SDK will not automatically accept a resolved party +# but will halt the transer after a party lookup response is received. A further +# cnofirmation call will be required to progress the transfer to quotes state. +AUTO_ACCEPT_PARTY=false + +# when set to true, when sending money via the outbound API, the SDK will use the value +# of FSPIOP-Source header from the received quote response as the payeeFsp value in the +# transfer prepare request body instead of the value received in the payee party lookup. +# This behaviour should be enabled when the SDK user DFSP is in a forex enabled switch +# ecosystem and expects quotes and transfers to be rerouted by the switch to forex +# entities i.e. forex providing DFSPs. Please see the SDK documentation and switch +# operator documentation for more information on forex use cases. +USE_QUOTE_SOURCE_FSP_AS_TRANSFER_PAYEE_FSP=false + +# set to true to validate ILP, otherwise false to ignore ILP +CHECK_ILP=true + +# set to true to enable test features such as request cacheing and retrieval endpoints +ENABLE_TEST_FEATURES=false + +# set to true to mock WSO2 oauth2 token endpoint +ENABLE_OAUTH_TOKEN_ENDPOINT=false +OAUTH_TOKEN_ENDPOINT_CLIENT_KEY=test-client-key +OAUTH_TOKEN_ENDPOINT_CLIENT_SECRET=test-client-secret +OAUTH_TOKEN_ENDPOINT_LISTEN_PORT=6000 + +# WSO2 Bearer Token specific to golden-fsp instance and environment +WSO2_BEARER_TOKEN=7718fa9b-be13-3fe7-87f0-a12cf1628168 + +# OAuth2 data used to obtain WSO2 bearer token +OAUTH_TOKEN_ENDPOINT= +OAUTH_CLIENT_KEY= +OAUTH_CLIENT_SECRET= +OAUTH_REFRESH_SECONDS=3600 + +# Set to true to respect expirity timestamps +REJECT_EXPIRED_QUOTE_RESPONSES=false +REJECT_TRANSFERS_ON_EXPIRED_QUOTES=false +REJECT_EXPIRED_TRANSFER_FULFILS=false + +# Timeout for GET/POST/DELETE - PUT flow processing +REQUEST_PROCESSING_TIMEOUT_SECONDS=60 + +# To allow transfer without a previous quote request, set this value to true. +# The incoming transfer request should consists of an ILP packet and a matching condition in this case. +# The fulfilment will be generated from the provided ILP packet, and must hash to the provided condition. +ALLOW_TRANSFER_WITHOUT_QUOTE=false + +# To enable request for notification on fulfiled transfer +RESERVE_NOTIFICATION=true +# resources API versions should be string in format: "resourceOneName=1.0,resourceTwoName=1.1" +RESOURCE_VERSIONS="transfers=1.1,participants=1.1" + +# Management API websocket connection settings. +# The Management API uses this for exchanging connector management messages. +MGMT_API_WS_URL=127.0.0.1 +MGMT_API_WS_PORT=4005 + +# Set to true to enable the use of PM4ML-related services e.g MCM, Management API service +# when running the scheme-adapter as a mojaloop connector component within Payment Manager for Mojaloop. +PM4ML_ENABLED=false + +BACKEND_EVENT_CONSUMER_BROKER_LIST=kafka:9093 +BACKEND_EVENT_PRODUCER_BROKER_LIST=kafka:9093 +FSPIOP_EVENT_CONSUMER_BROKER_LIST=kafka:9093 +FSPIOP_EVENT_PRODUCER_BROKER_LIST=kafka:9093 +BACKEND_EVENT_CONSUMER_GROUP_ID=ttksim1-domain_events_consumer_api_svc_backend_group +FSPIOP_EVENT_CONSUMER_GROUP_ID=ttksim1-domain_events_consumer_api_svc_fspiop_group +BACKEND_EVENT_CONSUMER_TOPICS=ttksim1-topic-sdk-outbound-domain-events +BACKEND_EVENT_PRODUCER_TOPIC=ttksim1-topic-sdk-outbound-domain-events +FSPIOP_EVENT_CONSUMER_TOPICS=ttksim1-topic-sdk-outbound-domain-events +FSPIOP_EVENT_PRODUCER_TOPIC=ttksim1-topic-sdk-outbound-domain-events + +# Maximum payload limits +FSPIOP_API_SERVER_MAX_REQUEST_BYTES=209715200 +BACKEND_API_SERVER_MAX_REQUEST_BYTES=209715200 \ No newline at end of file diff --git a/test/func/config/sdk-ttksim1/outbound-command-event-handler.env b/test/func/config/sdk-ttksim1/outbound-command-event-handler.env new file mode 100644 index 000000000..ea6db8f6d --- /dev/null +++ b/test/func/config/sdk-ttksim1/outbound-command-event-handler.env @@ -0,0 +1,14 @@ +LOG_LEVEL=info +API_SERVER_ENABLED=true +API_SERVER_PORT=8000 +REDIS_CONNECTION_URL=redis://redis:6379/1 +COMMAND_EVENT_CONSUMER_BROKER_LIST=kafka:9093 +DOMAIN_EVENT_PRODUCER_BROKER_LIST=kafka:9093 +MAX_ITEMS_PER_BATCH=1000 +COMMAND_EVENT_CONSUMER_GROUP_ID=ttksim1-command_events_consumer_group +COMMAND_EVENT_CONSUMER_TOPICS=ttksim1-topic-sdk-outbound-command-events +DOMAIN_EVENT_PRODUCER_TOPIC=ttksim1-topic-sdk-outbound-domain-events + +DOMAIN_EVENT_PRODUCER_COMPRESSION_CODEC=lz4 +DOMAIN_EVENT_PRODUCER_MESSAGE_MAX_BYTES=200000000 +COMMAND_EVENT_CONSUMER_MESSAGE_MAX_BYTES=200000000 \ No newline at end of file diff --git a/test/func/config/sdk-ttksim1/outbound-domain-event-handler.env b/test/func/config/sdk-ttksim1/outbound-domain-event-handler.env new file mode 100644 index 000000000..769b51f47 --- /dev/null +++ b/test/func/config/sdk-ttksim1/outbound-domain-event-handler.env @@ -0,0 +1,11 @@ +LOG_LEVEL=info +REDIS_CONNECTION_URL=redis://redis:6379/1 +DOMAIN_EVENT_CONSUMER_BROKER_LIST=kafka:9093 +COMMAND_EVENT_PRODUCER_BROKER_LIST=kafka:9093 +DOMAIN_EVENT_CONSUMER_GROUP_ID=ttksim1-domain_events_consumer_group +DOMAIN_EVENT_CONSUMER_TOPICS=ttksim1-topic-sdk-outbound-domain-events +COMMAND_EVENT_PRODUCER_TOPIC=ttksim1-topic-sdk-outbound-command-events + +COMMAND_EVENT_PRODUCER_COMPRESSION_CODEC=lz4 +COMMAND_EVENT_PRODUCER_MESSAGE_MAX_BYTES=200000000 +DOMAIN_EVENT_CONSUMER_MESSAGE_MAX_BYTES=200000000 diff --git a/test/func/config/payer-sdk/api-svc.env b/test/func/config/sdk-ttksim2/api-svc.env similarity index 88% rename from test/func/config/payer-sdk/api-svc.env rename to test/func/config/sdk-ttksim2/api-svc.env index b3ca028ed..ed8a8e2f0 100644 --- a/test/func/config/payer-sdk/api-svc.env +++ b/test/func/config/sdk-ttksim2/api-svc.env @@ -43,14 +43,15 @@ JWS_VERIFICATION_KEYS_DIRECTORY=secrets/jwsVerificationKeys LOG_INDENT=0 # REDIS CACHE CONNECTION -CACHE_URL=redis://payer-redis:6379 +CACHE_URL=redis://redis:6379/2 CACHE_SHOULD_EXPIRE=false CACHE_EXPIRY_SECONDS=3600 # SWITCH ENDPOINT # The option 'PEER_ENDPOINT' has no effect if the remaining options 'ALS_ENDPOINT', 'QUOTES_ENDPOINT', # 'BULK_QUOTES_ENDPOINT', 'TRANSFERS_ENDPOINT', 'BULK_TRANSFERS_ENDPOINT', 'TRANSACTION_REQUESTS_ENDPOINT' are specified. -PEER_ENDPOINT=payee-sdk-api-svc:4000 +# PEER_ENDPOINT=payer-sdk-api-svc:4000 +PEER_ENDPOINT=ttk-hub:4040 #ALS_ENDPOINT=account-lookup-service.local #QUOTES_ENDPOINT=quoting-service.local #TRANSFERS_ENDPOINT=ml-api-adapter.local @@ -58,10 +59,10 @@ PEER_ENDPOINT=payee-sdk-api-svc:4000 #TRANSACTION_REQUESTS_ENDPOINT=transaction-requests-service.local # BACKEND ENDPOINT -BACKEND_ENDPOINT=ml-testing-toolkit:4040 +BACKEND_ENDPOINT=ttk-ttksim2:4040 # FSPID of this DFSP -DFSP_ID=mojaloop-sdk +DFSP_ID=ttksim2 # Secret used for generation and verification of secure ILP ILP_SECRET=Quaixohyaesahju3thivuiChai5cahng @@ -140,9 +141,13 @@ BACKEND_EVENT_CONSUMER_BROKER_LIST=kafka:9093 BACKEND_EVENT_PRODUCER_BROKER_LIST=kafka:9093 FSPIOP_EVENT_CONSUMER_BROKER_LIST=kafka:9093 FSPIOP_EVENT_PRODUCER_BROKER_LIST=kafka:9093 -BACKEND_EVENT_CONSUMER_GROUP_ID=payer-domain_events_consumer_api_svc_backend_group -FSPIOP_EVENT_CONSUMER_GROUP_ID=payer-domain_events_consumer_api_svc_fspiop_group -BACKEND_EVENT_CONSUMER_TOPICS=payer-topic-sdk-outbound-domain-events -BACKEND_EVENT_PRODUCER_TOPIC=payer-topic-sdk-outbound-domain-events -FSPIOP_EVENT_CONSUMER_TOPICS=payer-topic-sdk-outbound-domain-events -FSPIOP_EVENT_PRODUCER_TOPIC=payer-topic-sdk-outbound-domain-events \ No newline at end of file +BACKEND_EVENT_CONSUMER_GROUP_ID=ttksim2-domain_events_consumer_api_svc_backend_group +FSPIOP_EVENT_CONSUMER_GROUP_ID=ttksim2-domain_events_consumer_api_svc_fspiop_group +BACKEND_EVENT_CONSUMER_TOPICS=ttksim2-topic-sdk-outbound-domain-events +BACKEND_EVENT_PRODUCER_TOPIC=ttksim2-topic-sdk-outbound-domain-events +FSPIOP_EVENT_CONSUMER_TOPICS=ttksim2-topic-sdk-outbound-domain-events +FSPIOP_EVENT_PRODUCER_TOPIC=ttksim2-topic-sdk-outbound-domain-events + +# Maximum payload limits +FSPIOP_API_SERVER_MAX_REQUEST_BYTES=209715200 +BACKEND_API_SERVER_MAX_REQUEST_BYTES=209715200 diff --git a/test/func/config/sdk-ttksim2/outbound-command-event-handler.env b/test/func/config/sdk-ttksim2/outbound-command-event-handler.env new file mode 100644 index 000000000..bcd88e87f --- /dev/null +++ b/test/func/config/sdk-ttksim2/outbound-command-event-handler.env @@ -0,0 +1,14 @@ +LOG_LEVEL=info +API_SERVER_ENABLED=false +API_SERVER_PORT=8000 +REDIS_CONNECTION_URL=redis://redis:6379/2 +COMMAND_EVENT_CONSUMER_BROKER_LIST=kafka:9092 +DOMAIN_EVENT_PRODUCER_BROKER_LIST=kafka:9092 +MAX_ITEMS_PER_BATCH=1000 +COMMAND_EVENT_CONSUMER_GROUP_ID=ttksim2-command_events_consumer_group +COMMAND_EVENT_CONSUMER_TOPICS=ttksim2-topic-sdk-outbound-command-events +DOMAIN_EVENT_PRODUCER_TOPIC=ttksim2-topic-sdk-outbound-domain-events + +DOMAIN_EVENT_PRODUCER_COMPRESSION_CODEC=lz4 +DOMAIN_EVENT_PRODUCER_MESSAGE_MAX_BYTES=200000000 +COMMAND_EVENT_CONSUMER_MESSAGE_MAX_BYTES=200000000 \ No newline at end of file diff --git a/test/func/config/sdk-ttksim2/outbound-domain-event-handler.env b/test/func/config/sdk-ttksim2/outbound-domain-event-handler.env new file mode 100644 index 000000000..65c6d4500 --- /dev/null +++ b/test/func/config/sdk-ttksim2/outbound-domain-event-handler.env @@ -0,0 +1,11 @@ +LOG_LEVEL=info +REDIS_CONNECTION_URL=redis://redis:6379/2 +DOMAIN_EVENT_CONSUMER_BROKER_LIST=kafka:9092 +COMMAND_EVENT_PRODUCER_BROKER_LIST=kafka:9092 +DOMAIN_EVENT_CONSUMER_GROUP_ID=ttksim2-domain_events_consumer_group +DOMAIN_EVENT_CONSUMER_TOPICS=ttksim2-topic-sdk-outbound-domain-events +COMMAND_EVENT_PRODUCER_TOPIC=ttksim2-topic-sdk-outbound-command-events + +COMMAND_EVENT_PRODUCER_COMPRESSION_CODEC=lz4 +COMMAND_EVENT_PRODUCER_MESSAGE_MAX_BYTES=200000000 +DOMAIN_EVENT_CONSUMER_MESSAGE_MAX_BYTES=200000000 \ No newline at end of file diff --git a/test/func/config/payee-sdk/api-svc.env b/test/func/config/sdk-ttksim3/api-svc.env similarity index 88% rename from test/func/config/payee-sdk/api-svc.env rename to test/func/config/sdk-ttksim3/api-svc.env index 7639cfb17..04da19453 100644 --- a/test/func/config/payee-sdk/api-svc.env +++ b/test/func/config/sdk-ttksim3/api-svc.env @@ -43,14 +43,15 @@ JWS_VERIFICATION_KEYS_DIRECTORY=secrets/jwsVerificationKeys LOG_INDENT=0 # REDIS CACHE CONNECTION -CACHE_URL=redis://payee-redis:6379 +CACHE_URL=redis://redis:6379/2 CACHE_SHOULD_EXPIRE=false CACHE_EXPIRY_SECONDS=3600 # SWITCH ENDPOINT # The option 'PEER_ENDPOINT' has no effect if the remaining options 'ALS_ENDPOINT', 'QUOTES_ENDPOINT', # 'BULK_QUOTES_ENDPOINT', 'TRANSFERS_ENDPOINT', 'BULK_TRANSFERS_ENDPOINT', 'TRANSACTION_REQUESTS_ENDPOINT' are specified. -PEER_ENDPOINT=payer-sdk-api-svc:4000 +# PEER_ENDPOINT=payer-sdk-api-svc:4000 +PEER_ENDPOINT=ttk-hub:4040 #ALS_ENDPOINT=account-lookup-service.local #QUOTES_ENDPOINT=quoting-service.local #TRANSFERS_ENDPOINT=ml-api-adapter.local @@ -58,10 +59,10 @@ PEER_ENDPOINT=payer-sdk-api-svc:4000 #TRANSACTION_REQUESTS_ENDPOINT=transaction-requests-service.local # BACKEND ENDPOINT -BACKEND_ENDPOINT=ml-testing-toolkit:4040 +BACKEND_ENDPOINT=ttk-ttksim3:4040 # FSPID of this DFSP -DFSP_ID=mojaloop-sdk +DFSP_ID=ttksim3 # Secret used for generation and verification of secure ILP ILP_SECRET=Quaixohyaesahju3thivuiChai5cahng @@ -140,9 +141,13 @@ BACKEND_EVENT_CONSUMER_BROKER_LIST=kafka:9093 BACKEND_EVENT_PRODUCER_BROKER_LIST=kafka:9093 FSPIOP_EVENT_CONSUMER_BROKER_LIST=kafka:9093 FSPIOP_EVENT_PRODUCER_BROKER_LIST=kafka:9093 -BACKEND_EVENT_CONSUMER_GROUP_ID=payee-domain_events_consumer_api_svc_backend_group -FSPIOP_EVENT_CONSUMER_GROUP_ID=payee-domain_events_consumer_api_svc_fspiop_group -BACKEND_EVENT_CONSUMER_TOPICS=payee-topic-sdk-outbound-domain-events -BACKEND_EVENT_PRODUCER_TOPIC=payee-topic-sdk-outbound-domain-events -FSPIOP_EVENT_CONSUMER_TOPICS=payee-topic-sdk-outbound-domain-events -FSPIOP_EVENT_PRODUCER_TOPIC=payee-topic-sdk-outbound-domain-events +BACKEND_EVENT_CONSUMER_GROUP_ID=ttksim3-domain_events_consumer_api_svc_backend_group +FSPIOP_EVENT_CONSUMER_GROUP_ID=ttksim3-domain_events_consumer_api_svc_fspiop_group +BACKEND_EVENT_CONSUMER_TOPICS=ttksim3-topic-sdk-outbound-domain-events +BACKEND_EVENT_PRODUCER_TOPIC=ttksim3-topic-sdk-outbound-domain-events +FSPIOP_EVENT_CONSUMER_TOPICS=ttksim3-topic-sdk-outbound-domain-events +FSPIOP_EVENT_PRODUCER_TOPIC=ttksim3-topic-sdk-outbound-domain-events + +# Maximum payload limits +FSPIOP_API_SERVER_MAX_REQUEST_BYTES=209715200 +BACKEND_API_SERVER_MAX_REQUEST_BYTES=209715200 diff --git a/test/func/config/sdk-ttksim3/outbound-command-event-handler.env b/test/func/config/sdk-ttksim3/outbound-command-event-handler.env new file mode 100644 index 000000000..8566dded2 --- /dev/null +++ b/test/func/config/sdk-ttksim3/outbound-command-event-handler.env @@ -0,0 +1,14 @@ +LOG_LEVEL=info +API_SERVER_ENABLED=false +API_SERVER_PORT=8000 +REDIS_CONNECTION_URL=redis://redis:6379/2 +COMMAND_EVENT_CONSUMER_BROKER_LIST=kafka:9092 +DOMAIN_EVENT_PRODUCER_BROKER_LIST=kafka:9092 +MAX_ITEMS_PER_BATCH=1000 +COMMAND_EVENT_CONSUMER_GROUP_ID=ttksim3-command_events_consumer_group +COMMAND_EVENT_CONSUMER_TOPICS=ttksim3-topic-sdk-outbound-command-events +DOMAIN_EVENT_PRODUCER_TOPIC=ttksim3-topic-sdk-outbound-domain-events + +DOMAIN_EVENT_PRODUCER_COMPRESSION_CODEC=lz4 +DOMAIN_EVENT_PRODUCER_MESSAGE_MAX_BYTES=200000000 +COMMAND_EVENT_CONSUMER_MESSAGE_MAX_BYTES=200000000 \ No newline at end of file diff --git a/test/func/config/sdk-ttksim3/outbound-domain-event-handler.env b/test/func/config/sdk-ttksim3/outbound-domain-event-handler.env new file mode 100644 index 000000000..c311f5920 --- /dev/null +++ b/test/func/config/sdk-ttksim3/outbound-domain-event-handler.env @@ -0,0 +1,11 @@ +LOG_LEVEL=info +REDIS_CONNECTION_URL=redis://redis:6379/2 +DOMAIN_EVENT_CONSUMER_BROKER_LIST=kafka:9092 +COMMAND_EVENT_PRODUCER_BROKER_LIST=kafka:9092 +DOMAIN_EVENT_CONSUMER_GROUP_ID=ttksim3-domain_events_consumer_group +DOMAIN_EVENT_CONSUMER_TOPICS=ttksim3-topic-sdk-outbound-domain-events +COMMAND_EVENT_PRODUCER_TOPIC=ttksim3-topic-sdk-outbound-command-events + +COMMAND_EVENT_PRODUCER_COMPRESSION_CODEC=lz4 +COMMAND_EVENT_PRODUCER_MESSAGE_MAX_BYTES=200000000 +DOMAIN_EVENT_CONSUMER_MESSAGE_MAX_BYTES=200000000 \ No newline at end of file diff --git a/test/func/config/ttk-hub/spec_files/api_definitions/als_admin_1.1/api_spec.yaml b/test/func/config/ttk-hub/spec_files/api_definitions/als_admin_1.1/api_spec.yaml new file mode 100644 index 000000000..51822bc16 --- /dev/null +++ b/test/func/config/ttk-hub/spec_files/api_definitions/als_admin_1.1/api_spec.yaml @@ -0,0 +1,804 @@ +openapi: 3.0.1 +info: + title: Open API for ALS Admin API + description: Open API for ALS Admin API + license: + name: Apache 2.0 + version: "1.1" +servers: + - url: / +paths: + /oracles: + parameters: + - $ref: '#/components/parameters/Content-Type' + - $ref: '#/components/parameters/Date' + get: + tags: + - admin + - sampled + summary: Get Oracles + description: The HTTP request GET /oracles is used to return the list of all + oracle endpoints. There are optional fields for type and currency i.e. /admin/oracles?type=MSISDN¤cy=USD + which can be used to get more filtered results or a specific entry + operationId: OraclesGet + parameters: + - $ref: '#/components/parameters/type' + - $ref: '#/components/parameters/currency' + - $ref: '#/components/parameters/Accept' + responses: + 200: + $ref: '#/components/responses/Response200' + 400: + $ref: '#/components/responses/ErrorResponse400' + 401: + $ref: '#/components/responses/ErrorResponse401' + 403: + $ref: '#/components/responses/ErrorResponse403' + 404: + $ref: '#/components/responses/ErrorResponse404' + 405: + $ref: '#/components/responses/ErrorResponse405' + 406: + $ref: '#/components/responses/ErrorResponse406' + 501: + $ref: '#/components/responses/ErrorResponse501' + 503: + $ref: '#/components/responses/ErrorResponse503' + post: + tags: + - admin + - sampled + summary: Create Oracles + description: The HTTP request POST /oracles is used to create information in + the server regarding the provided oracles. This request should be used for + creation of Oracle information. + operationId: OraclesPost + parameters: + - $ref: '#/components/parameters/Accept' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OracleInfo' + required: true + responses: + 201: + $ref: '#/components/responses/Response201' + 400: + $ref: '#/components/responses/ErrorResponse400' + 401: + $ref: '#/components/responses/ErrorResponse401' + 403: + $ref: '#/components/responses/ErrorResponse403' + 404: + $ref: '#/components/responses/ErrorResponse404' + 405: + $ref: '#/components/responses/ErrorResponse405' + 406: + $ref: '#/components/responses/ErrorResponse406' + 501: + $ref: '#/components/responses/ErrorResponse501' + 503: + $ref: '#/components/responses/ErrorResponse503' + /oracles/{ID}: + parameters: + - $ref: '#/components/parameters/Content-Type' + - $ref: '#/components/parameters/Date' + - $ref: '#/components/parameters/ID' + put: + tags: + - admin + - sampled + summary: Update Oracle + description: The HTTP request PUT /oracles/{ID} is used to update information + in the server regarding the provided oracle. This request should be used for + individual update of Oracle information. + operationId: OraclesByIdPut + parameters: + - $ref: '#/components/parameters/Content-Length' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OracleInfo' + required: true + responses: + 204: + $ref: '#/components/responses/Response204' + 400: + $ref: '#/components/responses/ErrorResponse400' + 401: + $ref: '#/components/responses/ErrorResponse401' + 403: + $ref: '#/components/responses/ErrorResponse403' + 404: + $ref: '#/components/responses/ErrorResponse404' + 405: + $ref: '#/components/responses/ErrorResponse405' + 406: + $ref: '#/components/responses/ErrorResponse406' + 501: + $ref: '#/components/responses/ErrorResponse501' + 503: + $ref: '#/components/responses/ErrorResponse503' + delete: + tags: + - admin + - sampled + summary: Delete Oracle + description: The HTTP request DELETE /oracles/{ID} is used to delete information + in the server regarding the provided oracle. + operationId: OraclesByIdDelete + parameters: + - $ref: '#/components/parameters/Accept' + responses: + 204: + $ref: '#/components/responses/Response204' + 400: + $ref: '#/components/responses/ErrorResponse400' + 401: + $ref: '#/components/responses/ErrorResponse401' + 403: + $ref: '#/components/responses/ErrorResponse403' + 404: + $ref: '#/components/responses/ErrorResponse404' + 405: + $ref: '#/components/responses/ErrorResponse405' + 406: + $ref: '#/components/responses/ErrorResponse406' + 501: + $ref: '#/components/responses/ErrorResponse501' + 503: + $ref: '#/components/responses/ErrorResponse503' + /health: + get: + tags: + - admin + summary: Get Oracles + description: The HTTP request GET /health is used to return the current status + of the Admin API. + operationId: HealthGet + responses: + 200: + $ref: '#/components/responses/ResponseHealth200' + 400: + $ref: '#/components/responses/ErrorResponse400' + 401: + $ref: '#/components/responses/ErrorResponse401' + 403: + $ref: '#/components/responses/ErrorResponse403' + 404: + $ref: '#/components/responses/ErrorResponse404' + 405: + $ref: '#/components/responses/ErrorResponse405' + 406: + $ref: '#/components/responses/ErrorResponse406' + 501: + $ref: '#/components/responses/ErrorResponse501' + 503: + $ref: '#/components/responses/ErrorResponse503' +components: + schemas: + ErrorCode: + title: ErrorCode + pattern: ^[1-9]\d{3}$ + type: string + description: The API data type ErrorCode is a JSON String of four characters, + consisting of digits only. Negative numbers are not allowed. A leading zero + is not allowed. Each error code in the API is a four-digit number, for example, + 1234, where the first number (1 in the example) represents the high-level + error category, the second number (2 in the example) represents the low-level + error category, and the last two numbers (34 in the example) represents the + specific error. + ErrorDescription: + title: ErrorDescription + maxLength: 128 + minLength: 1 + type: string + description: Error description string. + ExtensionKey: + title: ExtensionKey + maxLength: 32 + minLength: 1 + type: string + description: Extension key. + ExtensionValue: + title: ExtensionValue + maxLength: 128 + minLength: 1 + type: string + description: Extension value. + Currency: + title: CurrencyEnum + maxLength: 3 + minLength: 3 + type: string + description: The currency codes defined in ISO 4217 as three-letter alphabetic + codes are used as the standard naming representation for currencies. + enum: + - AED + - AFN + - ALL + - AMD + - ANG + - AOA + - ARS + - AUD + - AWG + - AZN + - BAM + - BBD + - BDT + - BGN + - BHD + - BIF + - BMD + - BND + - BOB + - BRL + - BSD + - BTN + - BWP + - BYN + - BZD + - CAD + - CDF + - CHF + - CLP + - CNY + - COP + - CRC + - CUC + - CUP + - CVE + - CZK + - DJF + - DKK + - DOP + - DZD + - EGP + - ERN + - ETB + - EUR + - FJD + - FKP + - GBP + - GEL + - GGP + - GHS + - GIP + - GMD + - GNF + - GTQ + - GYD + - HKD + - HNL + - HRK + - HTG + - HUF + - IDR + - ILS + - IMP + - INR + - IQD + - IRR + - ISK + - JEP + - JMD + - JOD + - JPY + - KES + - KGS + - KHR + - KMF + - KPW + - KRW + - KWD + - KYD + - KZT + - LAK + - LBP + - LKR + - LRD + - LSL + - LYD + - MAD + - MDL + - MGA + - MKD + - MMK + - MNT + - MOP + - MRO + - MUR + - MVR + - MWK + - MXN + - MYR + - MZN + - NAD + - NGN + - NIO + - NOK + - NPR + - NZD + - OMR + - PAB + - PEN + - PGK + - PHP + - PKR + - PLN + - PYG + - QAR + - RON + - RSD + - RUB + - RWF + - SAR + - SBD + - SCR + - SDG + - SEK + - SGD + - SHP + - SLL + - SOS + - SPL + - SRD + - STD + - SVC + - SYP + - SZL + - THB + - TJS + - TMT + - TND + - TOP + - TRY + - TTD + - TVD + - TWD + - TZS + - UAH + - UGX + - USD + - UYU + - UZS + - VEF + - VND + - VUV + - WST + - XAF + - XCD + - XDR + - XOF + - XPF + - XTS + - XXX + - YER + - ZAR + - ZMW + - ZWD + ErrorInformation: + title: ErrorInformation + required: + - errorCode + - errorDescription + type: object + properties: + errorCode: + $ref: '#/components/schemas/ErrorCode' + errorDescription: + $ref: '#/components/schemas/ErrorDescription' + extensionList: + $ref: '#/components/schemas/ExtensionList' + description: Data model for the complex type ErrorInformation. + ErrorInformationResponse: + title: ErrorInformationResponse + type: object + properties: + errorInformation: + $ref: '#/components/schemas/ErrorInformation' + description: Data model for the complex type object that contains an optional + element ErrorInformation used along with 4xx and 5xx responses. + Extension: + title: Extension + required: + - key + - value + type: object + properties: + key: + $ref: '#/components/schemas/ExtensionKey' + value: + $ref: '#/components/schemas/ExtensionValue' + description: Data model for the complex type Extension + ExtensionList: + title: ExtensionList + required: + - extension + type: object + properties: + extension: + maxItems: 16 + minItems: 1 + type: array + description: Number of Extension elements + items: + $ref: '#/components/schemas/Extension' + description: Data model for the complex type ExtensionList + Endpoint: + title: Endpoint + required: + - endpointType + - value + type: object + properties: + value: + type: string + description: An endpoint for the Oracle. + endpointType: + $ref: '#/components/schemas/EndpointType' + description: Contains information about an endpoint + EndpointType: + title: EndpointType + type: string + description: The type of endpoint requested + enum: + - URL + HealthStatusType: + title: HealthStatusType + type: string + description: Below are the allowed values for the enumeration HealthStatusType + - OK - DOWN + enum: + - OK + - DOWN + HealthServicesType: + title: HealthServicesType + type: object + properties: + name: + type: string + status: + $ref: '#/components/schemas/HealthStatusType' + description: Data model for the complex type HealthServicesType. Contains health + services information. + OracleInfo: + title: OracleInfo + required: + - endpoint + - oracleIdType + type: object + properties: + oracleIdType: + $ref: '#/components/schemas/PartyIdType' + endpoint: + $ref: '#/components/schemas/Endpoint' + currency: + $ref: '#/components/schemas/Currency' + isDefault: + type: boolean + description: Is the endpoint default or not + description: Data model for the complex type OracleInfo. + OracleInfoGetResponse: + title: OracleInfoGetResponse + required: + - endpoint + - oracleIdType + type: object + properties: + oracleId: + type: string + description: Oracle type entry's unique identified + oracleIdType: + $ref: '#/components/schemas/PartyIdType' + endpoint: + $ref: '#/components/schemas/Endpoint' + currency: + $ref: '#/components/schemas/Currency' + isDefault: + type: boolean + description: Is the endpoint default or not + description: Data model for the complex type OracleInfo. + OracleInfoGetResponseList: + title: OracleInfoGetResponseList + type: array + description: List of OracleInfoGetResponse + items: + $ref: '#/components/schemas/OracleInfoGetResponse' + PartyIdType: + title: PartyIdTypeEnum + type: string + description: Below are the allowed values for the enumeration - MSISDN An MSISDN + (Mobile Station International Subscriber Directory Number, that is, the phone + number) is used as reference to a participant. The MSISDN identifier should + be in international format according to the ITU-T E.164 standard. Optionally, + the MSISDN may be prefixed by a single plus sign, indicating the international + prefix. - EMAIL An email is used as reference to a participant. The format + of the email should be according to the informational RFC 3696. - PERSONAL_ID + A personal identifier is used as reference to a participant. Examples of personal + identification are passport number, birth certificate number, and national + registration number. The identifier number is added in the PartyIdentifier + element. The personal identifier type is added in the PartySubIdOrType element. + - BUSINESS A specific Business (for example, an organization or a company) + is used as reference to a participant. The BUSINESS identifier can be in any + format. To make a transaction connected to a specific username or bill number + in a Business, the PartySubIdOrType element should be used. - DEVICE A specific + device (for example, a POS or ATM) ID connected to a specific business or + organization is used as reference to a Party. For referencing a specific device + under a specific business or organization, use the PartySubIdOrType element. + - ACCOUNT_ID A bank account number or FSP account ID should be used as reference + to a participant. The ACCOUNT_ID identifier can be in any format, as formats + can greatly differ depending on country and FSP. - IBAN A bank account number + or FSP account ID is used as reference to a participant. The IBAN identifier + can consist of up to 34 alphanumeric characters and should be entered without + whitespace. - ALIAS An alias is used as reference to a participant. The alias + should be created in the FSP as an alternative reference to an account owner. + Another example of an alias is a username in the FSP system. The ALIAS identifier + can be in any format. It is also possible to use the PartySubIdOrType element + for identifying an account under an Alias defined by the PartyIdentifier. + enum: + - MSISDN + - EMAIL + - PERSONAL_ID + - BUSINESS + - DEVICE + - ACCOUNT_ID + - IBAN + - ALIAS + Status: + title: Status + type: object + properties: + status: + type: string + description: The return status, usually "OK" + uptime: + type: number + description: The amount of time in seconds that the server has been up for. + startTime: + type: string + description: The UTC time that the server started up + versionNumber: + type: string + description: Current version of the API + services: + type: array + description: An list of the statuses of services that the API requires + items: + $ref: '#/components/schemas/HealthServicesType' + description: Data model for the api status. + responses: + ErrorResponse400: + description: Bad Request - The application cannot process the request; for example, + due to malformed syntax or the payload exceeded size restrictions. + headers: + Content-Length: + description: The Content-Length header field indicates the anticipated size + of the payload body. Only sent if there is a body. + schema: + type: integer + Content-Type: + description: The Content-Type header indicates the specific version of the + API used to send the payload body. + schema: + type: string + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorInformationResponse' + ErrorResponse401: + description: Unauthorized - The request requires authentication in order to + be processed. + headers: + Content-Length: + description: The Content-Length header field indicates the anticipated size + of the payload body. Only sent if there is a body. + schema: + type: integer + Content-Type: + description: The Content-Type header indicates the specific version of the + API used to send the payload body. + schema: + type: string + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorInformationResponse' + ErrorResponse403: + description: Forbidden - The request was denied and will be denied in the future. + headers: + Content-Length: + description: The Content-Length header field indicates the anticipated size + of the payload body. Only sent if there is a body. + schema: + type: integer + Content-Type: + description: The Content-Type header indicates the specific version of the + API used to send the payload body. + schema: + type: string + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorInformationResponse' + ErrorResponse404: + description: Not Found - The resource specified in the URI was not found. + headers: + Content-Length: + description: The Content-Length header field indicates the anticipated size + of the payload body. Only sent if there is a body. + schema: + type: integer + Content-Type: + description: The Content-Type header indicates the specific version of the + API used to send the payload body. + schema: + type: string + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorInformationResponse' + ErrorResponse405: + description: Method Not Allowed - An unsupported HTTP method for the request + was used. + headers: + Content-Length: + description: The Content-Length header field indicates the anticipated size + of the payload body. Only sent if there is a body. + schema: + type: integer + Content-Type: + description: The Content-Type header indicates the specific version of the + API used to send the payload body. + schema: + type: string + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorInformationResponse' + ErrorResponse406: + description: Not acceptable - The server is not capable of generating content + according to the Accept headers sent in the request. Used in the API to indicate + that the server does not support the version that the client is requesting. + headers: + Content-Length: + description: The Content-Length header field indicates the anticipated size + of the payload body. Only sent if there is a body. + schema: + type: integer + Content-Type: + description: The Content-Type header indicates the specific version of the + API used to send the payload body. + schema: + type: string + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorInformationResponse' + ErrorResponse501: + description: Not Implemented - The server does not support the requested service. + The client should not retry. + headers: + Content-Length: + description: The Content-Length header field indicates the anticipated size + of the payload body. Only sent if there is a body. + schema: + type: integer + Content-Type: + description: The Content-Type header indicates the specific version of the + API used to send the payload body. + schema: + type: string + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorInformationResponse' + ErrorResponse503: + description: Service Unavailable - The server is currently unavailable to accept + any new service requests. This should be a temporary state, and the client + should retry within a reasonable time frame. + headers: + Content-Length: + description: The Content-Length header field indicates the anticipated size + of the payload body. Only sent if there is a body. + schema: + type: integer + Content-Type: + description: The Content-Type header indicates the specific version of the + API used to send the payload body. + schema: + type: string + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorInformationResponse' + Response200: + description: OK + headers: + Content-Length: + description: The Content-Length header field indicates the anticipated size + of the payload body. Only sent if there is a body. + schema: + type: integer + Content-Type: + description: The Content-Type header indicates the specific version of the + API used to send the payload body. + schema: + type: string + content: + application/json: + schema: + $ref: '#/components/schemas/OracleInfoGetResponseList' + Response201: + description: Created + content: {} + Response204: + description: No Content + content: {} + ResponseHealth200: + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + parameters: + Accept: + name: accept + in: header + description: The Accept header field indicates the version of the API the client + would like the server to use. + required: true + schema: + type: string + Accept-Optional: + name: accept + in: header + description: The Accept header field indicates the version of the API the client + would like the server to use. + schema: + type: string + Content-Length: + name: content-length + in: header + description: The Content-Length header field indicates the anticipated size + of the payload body. Only sent if there is a body. Note - The API supports + a maximum size of 5242880 bytes (5 Megabytes) + schema: + type: integer + Content-Type: + name: content-type + in: header + description: The Content-Type header indicates the specific version of the API + used to send the payload body. + required: true + schema: + type: string + Date: + name: date + in: header + description: The Date header field indicates the date when the request was sent. + required: true + schema: + type: string + ID: + name: ID + in: path + description: ID relating to the oracle endpoint entry + required: true + schema: + type: string + type: + name: type + in: query + description: type of oracle entry + schema: + type: string + currency: + name: currency + in: query + description: currency relating to the oracle endpoint entry + schema: + type: string diff --git a/test/func/config/ttk-hub/spec_files/api_definitions/central_admin_1.0/api_spec.yaml b/test/func/config/ttk-hub/spec_files/api_definitions/central_admin_1.0/api_spec.yaml new file mode 100644 index 000000000..06177ebd8 --- /dev/null +++ b/test/func/config/ttk-hub/spec_files/api_definitions/central_admin_1.0/api_spec.yaml @@ -0,0 +1,1854 @@ +openapi: 3.0.1 +info: + title: Central Ledger API Documentation + version: "1.0" +servers: +- url: http://127.0.0.1:3001/ +tags: [] +paths: + /enums: + get: + tags: + - enums + operationId: getEnums + responses: + default: + description: Successful + content: + '*/*': + schema: + type: string + /health: + get: + tags: + - health + operationId: getHealth + responses: + default: + description: Successful + content: + '*/*': + schema: + type: string + /metrics: + get: + tags: + - metrics + summary: Prometheus metrics endpoint + operationId: getMetrics + responses: + default: + description: Successful + content: + '*/*': + schema: + type: string + /participants: + get: + tags: + - participants + operationId: getParticipants + responses: + default: + description: Successful + content: + '*/*': + schema: + type: string + post: + tags: + - participants + operationId: postParticipants + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/PostParticipantsRequest' + required: false + responses: + default: + description: Successful + content: + '*/*': + schema: + type: string + x-codegen-request-body-name: body + /participants/limits: + get: + tags: + - participants + summary: View limits for all participants + operationId: getParticipantsLimits + parameters: + - name: currency + in: query + description: Currency code + schema: + type: string + enum: + - AED + - AFA + - AFN + - ALL + - AMD + - ANG + - AOA + - AOR + - ARS + - AUD + - AWG + - AZN + - BAM + - BBD + - BDT + - BGN + - BHD + - BIF + - BMD + - BND + - BOB + - BRL + - BSD + - BTN + - BWP + - BYN + - BZD + - CAD + - CDF + - CHF + - CLP + - CNY + - COP + - CRC + - CUC + - CUP + - CVE + - CZK + - DJF + - DKK + - DOP + - DZD + - EEK + - EGP + - ERN + - ETB + - EUR + - FJD + - FKP + - GBP + - GEL + - GGP + - GHS + - GIP + - GMD + - GNF + - GTQ + - GYD + - HKD + - HNL + - HRK + - HTG + - HUF + - IDR + - ILS + - IMP + - INR + - IQD + - IRR + - ISK + - JEP + - JMD + - JOD + - JPY + - KES + - KGS + - KHR + - KMF + - KPW + - KRW + - KWD + - KYD + - KZT + - LAK + - LBP + - LKR + - LRD + - LSL + - LTL + - LVL + - LYD + - MAD + - MDL + - MGA + - MKD + - MMK + - MNT + - MOP + - MRO + - MUR + - MVR + - MWK + - MXN + - MYR + - MZN + - NAD + - NGN + - NIO + - NOK + - NPR + - NZD + - OMR + - PAB + - PEN + - PGK + - PHP + - PKR + - PLN + - PYG + - QAR + - RON + - RSD + - RUB + - RWF + - SAR + - SBD + - SCR + - SDG + - SEK + - SGD + - SHP + - SLL + - SOS + - SPL + - SRD + - STD + - SVC + - SYP + - SZL + - THB + - TJS + - TMT + - TND + - TOP + - TRY + - TTD + - TVD + - TWD + - TZS + - UAH + - UGX + - USD + - UYU + - UZS + - VEF + - VND + - VUV + - WST + - XAF + - XAG + - XAU + - XCD + - XDR + - XFO + - XFU + - XOF + - XPD + - XPF + - XPT + - XTS + - XXX + - YER + - ZAR + - ZMK + - ZMW + - ZWD + - ZWL + - ZWN + - ZWR + - name: type + in: query + description: Limit Type + schema: + type: string + responses: + default: + description: Successful + content: + '*/*': + schema: + type: string + /participants/{name}: + get: + tags: + - participants + operationId: getParticipantsName + parameters: + - name: name + in: path + description: Participant name + required: true + schema: + type: string + responses: + default: + description: Successful + content: + '*/*': + schema: + type: string + put: + tags: + - participants + operationId: putParticipantsName + parameters: + - name: name + in: path + description: Participant name + required: true + schema: + type: string + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/ParticipantIsActive' + required: false + responses: + default: + description: Successful + content: + '*/*': + schema: + type: string + x-codegen-request-body-name: body + /participants/{name}/endpoints: + get: + tags: + - participants + summary: View participant endpoints + operationId: getParticipantsNameEndpoints + parameters: + - name: name + in: path + description: Name of the participant + required: true + schema: + maxLength: 30 + minLength: 2 + type: string + x-format: + alphanum: true + x-format: + alphanum: true + responses: + default: + description: Successful + content: + '*/*': + schema: + type: string + post: + tags: + - participants + summary: Add/Update participant endpoints + operationId: postParticipantsNameEndpoints + parameters: + - name: name + in: path + description: Name of the participant + required: true + schema: + maxLength: 30 + minLength: 2 + type: string + x-format: + alphanum: true + x-format: + alphanum: true + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/PostParticipantsNameEndpointsRequest' + required: false + responses: + default: + description: Successful + content: + '*/*': + schema: + type: string + x-codegen-request-body-name: body + /participants/{name}/limits: + get: + tags: + - participants + summary: View participant limits + operationId: getParticipantsNameLimits + parameters: + - name: name + in: path + description: Name of the participant + required: true + schema: + maxLength: 30 + minLength: 2 + type: string + x-format: + alphanum: true + x-format: + alphanum: true + - name: currency + in: query + description: Currency code + schema: + type: string + enum: + - AED + - AFA + - AFN + - ALL + - AMD + - ANG + - AOA + - AOR + - ARS + - AUD + - AWG + - AZN + - BAM + - BBD + - BDT + - BGN + - BHD + - BIF + - BMD + - BND + - BOB + - BRL + - BSD + - BTN + - BWP + - BYN + - BZD + - CAD + - CDF + - CHF + - CLP + - CNY + - COP + - CRC + - CUC + - CUP + - CVE + - CZK + - DJF + - DKK + - DOP + - DZD + - EEK + - EGP + - ERN + - ETB + - EUR + - FJD + - FKP + - GBP + - GEL + - GGP + - GHS + - GIP + - GMD + - GNF + - GTQ + - GYD + - HKD + - HNL + - HRK + - HTG + - HUF + - IDR + - ILS + - IMP + - INR + - IQD + - IRR + - ISK + - JEP + - JMD + - JOD + - JPY + - KES + - KGS + - KHR + - KMF + - KPW + - KRW + - KWD + - KYD + - KZT + - LAK + - LBP + - LKR + - LRD + - LSL + - LTL + - LVL + - LYD + - MAD + - MDL + - MGA + - MKD + - MMK + - MNT + - MOP + - MRO + - MUR + - MVR + - MWK + - MXN + - MYR + - MZN + - NAD + - NGN + - NIO + - NOK + - NPR + - NZD + - OMR + - PAB + - PEN + - PGK + - PHP + - PKR + - PLN + - PYG + - QAR + - RON + - RSD + - RUB + - RWF + - SAR + - SBD + - SCR + - SDG + - SEK + - SGD + - SHP + - SLL + - SOS + - SPL + - SRD + - STD + - SVC + - SYP + - SZL + - THB + - TJS + - TMT + - TND + - TOP + - TRY + - TTD + - TVD + - TWD + - TZS + - UAH + - UGX + - USD + - UYU + - UZS + - VEF + - VND + - VUV + - WST + - XAF + - XAG + - XAU + - XCD + - XDR + - XFO + - XFU + - XOF + - XPD + - XPF + - XPT + - XTS + - XXX + - YER + - ZAR + - ZMK + - ZMW + - ZWD + - ZWL + - ZWN + - ZWR + - name: type + in: query + description: Limit Type + schema: + type: string + responses: + default: + description: Successful + content: + '*/*': + schema: + type: string + put: + tags: + - participants + summary: Adjust participant limits + operationId: putParticipantsNameLimits + parameters: + - name: name + in: path + description: Name of the participant + required: true + schema: + maxLength: 30 + minLength: 2 + type: string + x-format: + alphanum: true + x-format: + alphanum: true + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/PutParticipantsNameLimitsRequest' + required: false + responses: + default: + description: Successful + content: + '*/*': + schema: + type: string + x-codegen-request-body-name: body + /participants/{name}/positions: + get: + tags: + - participants + summary: View participant positions + operationId: getParticipantsNamePositions + parameters: + - name: name + in: path + description: Name of the participant + required: true + schema: + maxLength: 30 + minLength: 2 + type: string + x-format: + alphanum: true + x-format: + alphanum: true + - name: currency + in: query + description: Currency code + schema: + type: string + enum: + - AED + - AFA + - AFN + - ALL + - AMD + - ANG + - AOA + - AOR + - ARS + - AUD + - AWG + - AZN + - BAM + - BBD + - BDT + - BGN + - BHD + - BIF + - BMD + - BND + - BOB + - BRL + - BSD + - BTN + - BWP + - BYN + - BZD + - CAD + - CDF + - CHF + - CLP + - CNY + - COP + - CRC + - CUC + - CUP + - CVE + - CZK + - DJF + - DKK + - DOP + - DZD + - EEK + - EGP + - ERN + - ETB + - EUR + - FJD + - FKP + - GBP + - GEL + - GGP + - GHS + - GIP + - GMD + - GNF + - GTQ + - GYD + - HKD + - HNL + - HRK + - HTG + - HUF + - IDR + - ILS + - IMP + - INR + - IQD + - IRR + - ISK + - JEP + - JMD + - JOD + - JPY + - KES + - KGS + - KHR + - KMF + - KPW + - KRW + - KWD + - KYD + - KZT + - LAK + - LBP + - LKR + - LRD + - LSL + - LTL + - LVL + - LYD + - MAD + - MDL + - MGA + - MKD + - MMK + - MNT + - MOP + - MRO + - MUR + - MVR + - MWK + - MXN + - MYR + - MZN + - NAD + - NGN + - NIO + - NOK + - NPR + - NZD + - OMR + - PAB + - PEN + - PGK + - PHP + - PKR + - PLN + - PYG + - QAR + - RON + - RSD + - RUB + - RWF + - SAR + - SBD + - SCR + - SDG + - SEK + - SGD + - SHP + - SLL + - SOS + - SPL + - SRD + - STD + - SVC + - SYP + - SZL + - THB + - TJS + - TMT + - TND + - TOP + - TRY + - TTD + - TVD + - TWD + - TZS + - UAH + - UGX + - USD + - UYU + - UZS + - VEF + - VND + - VUV + - WST + - XAF + - XAG + - XAU + - XCD + - XDR + - XFO + - XFU + - XOF + - XPD + - XPF + - XPT + - XTS + - XXX + - YER + - ZAR + - ZMK + - ZMW + - ZWD + - ZWL + - ZWN + - ZWR + responses: + default: + description: Successful + content: + '*/*': + schema: + type: string + /participants/{name}/accounts: + get: + tags: + - participants + summary: View participant accounts and balances + operationId: getParticipantsNameAccounts + parameters: + - name: name + in: path + description: Name of the participant + required: true + schema: + maxLength: 30 + minLength: 2 + type: string + x-format: + alphanum: true + x-format: + alphanum: true + responses: + default: + description: Successful + content: + '*/*': + schema: + type: string + post: + tags: + - participants + summary: Create hub accounts + operationId: postParticipantsNameAccounts + parameters: + - name: name + in: path + description: Participant name + required: true + schema: + type: string + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/PostParticipantsNameAccountsRequest' + required: false + responses: + default: + description: Successful + content: + '*/*': + schema: + type: string + x-codegen-request-body-name: body + /participants/{name}/initialPositionAndLimits: + post: + tags: + - participants + summary: Add initial participant limits and position + operationId: postParticipantsNameInitialpositionandlimits + parameters: + - name: name + in: path + description: Name of the participant + required: true + schema: + maxLength: 30 + minLength: 2 + type: string + x-format: + alphanum: true + x-format: + alphanum: true + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/PostInitialPositionAndLimitsRequest' + required: false + responses: + default: + description: Successful + content: + '*/*': + schema: + type: string + x-codegen-request-body-name: body + /participants/{name}/accounts/{id}: + put: + tags: + - participants + summary: Update participant accounts + operationId: putParticipantsNameAccountsId + parameters: + - name: name + in: path + description: Name of the participant + required: true + schema: + maxLength: 30 + minLength: 2 + type: string + x-format: + alphanum: true + x-format: + alphanum: true + - name: id + in: path + required: true + schema: + type: integer + x-constraint: + positive: true + x-constraint: + positive: true + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/CurrencyIsActive' + required: false + responses: + default: + description: Successful + content: + '*/*': + schema: + type: string + x-codegen-request-body-name: body + post: + tags: + - participants + summary: Record Funds In or Out of participant account + operationId: postParticipantsNameAccountsId + parameters: + - name: name + in: path + description: Name of the participant + required: true + schema: + maxLength: 30 + minLength: 2 + type: string + x-format: + alphanum: true + x-format: + alphanum: true + - name: id + in: path + required: true + schema: + type: integer + x-constraint: + positive: true + x-constraint: + positive: true + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/Participants' + required: false + responses: + default: + description: Successful + content: + '*/*': + schema: + type: string + x-codegen-request-body-name: body + /participants/{name}/accounts/{id}/transfers/{transferId}: + put: + tags: + - participants + summary: Record Funds In or Out of participant account + operationId: putParticipantsNameAccountsIdTransfersTransferid + parameters: + - name: name + in: path + description: Name of the participant + required: true + schema: + maxLength: 30 + minLength: 2 + type: string + x-format: + alphanum: true + x-format: + alphanum: true + - name: id + in: path + required: true + schema: + type: integer + x-constraint: + positive: true + x-constraint: + positive: true + - name: transferId + in: path + required: true + schema: + type: string + x-format: + guid: true + x-format: + guid: true + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/RecordFundsOut' + required: false + responses: + default: + description: Successful + content: + '*/*': + schema: + type: string + x-codegen-request-body-name: body + /ledgerAccountTypes: + get: + tags: + - ledgerAccountTypes + summary: View all ledger account types + operationId: getLedgerAccountTypes + responses: + default: + description: Successful + content: + '*/*': + schema: + type: array + items: + $ref: '#/components/schemas/LedgerAccountType' + post: + tags: + - ledgerAccountType + summary: Create a ledgerAccount type + operationId: postLedgerAccountType + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/LedgerAccountType' + required: true + responses: + default: + description: Successful + content: + '*/*': + schema: + type: string + x-codegen-request-body-name: body + /settlementModels: + get: + tags: + - settlementModels + summary: View all settlement models + operationId: getSettlementmodels + responses: + default: + description: Successful + content: + '*/*': + schema: + type: string + post: + tags: + - settlementModels + summary: Create a settlement model. This will create any associated ledgerAccountTypes + for every participant that matches the settlementModel's currency + operationId: postSettlementmodels + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/SettlementModel' + required: false + responses: + default: + description: Successful + content: + '*/*': + schema: + type: string + x-codegen-request-body-name: body + /settlementModels/{name}: + get: + tags: + - settlementModels + summary: View settlement model by name + operationId: getSettlementmodelsName + parameters: + - name: name + in: path + description: SettlementModel name + required: true + schema: + type: string + responses: + default: + description: Successful + content: + '*/*': + schema: + type: string + put: + tags: + - settlementModels + summary: Update a settlement model + operationId: putSettlementmodelsName + parameters: + - name: name + in: path + description: settlementModel name + required: true + schema: + type: string + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/SettlementModelIsActive' + required: false + responses: + default: + description: Successful + content: + '*/*': + schema: + type: string + x-codegen-request-body-name: body + /transactions/{id}: + get: + tags: + - transaction + summary: Retrieve transaction details by a transferId + operationId: getTransfer + parameters: + - name: id + in: path + description: Transfer Id + required: true + schema: + type: string + responses: + default: + description: Successful + content: + '*/*': + schema: + $ref: '#/components/schemas/GetTransactionResponse' +components: + schemas: + PostParticipantsRequest: + required: + - name + type: object + properties: + name: + maxLength: 30 + minLength: 2 + type: string + description: Name of the participant + x-format: + alphanum: true + currency: + $ref: '#/components/schemas/Currency' + PostParticipantsNameEndpointsRequest: + required: + - type + - value + type: object + properties: + type: + type: string + description: Endpoint Type + value: + type: string + description: Endpoint Value + Limit: + required: + - type + - value + type: object + properties: + type: + type: string + description: Limit Type + value: + type: number + description: Limit Value + x-constraint: + positive: true + description: Participant Limit + PostInitialPositionAndLimitsRequest: + required: + - limit + type: object + properties: + currency: + $ref: '#/components/schemas/Currency' + limit: + $ref: '#/components/schemas/Limit' + initialPosition: + type: number + description: Initial Position Value + PostParticipantsNameAccountsRequest: + required: + - type + type: object + properties: + currency: + $ref: '#/components/schemas/Currency' + type: + type: string + description: Account type + NoAmountProvided: + required: + - amount + type: object + properties: + amount: + type: number + x-constraint: + precision: 4 + positive: true + currency: + $ref: '#/components/schemas/Currency' + Participants: + required: + - action + - amount + - externalReference + - reason + - transferId + type: object + properties: + transferId: + type: string + x-format: + guid: true + externalReference: + type: string + action: + type: string + enum: + - recordFundsIn + - recordFundsOutPrepareReserve + reason: + type: string + amount: + $ref: '#/components/schemas/NoAmountProvided' + extensionList: + $ref: '#/components/schemas/ExtensionList' + ParticipantIsActive: + required: + - isActive + type: object + properties: + isActive: + type: boolean + description: Participant isActive boolean + ParticipantLimit: + required: + - alarmPercentage + - type + - value + type: object + properties: + type: + type: string + description: Limit Type + value: + type: number + description: Limit Value + alarmPercentage: + type: number + description: limit threshold alarm percentage value + description: Participant Limit + PutParticipantsNameLimitsRequest: + required: + - limit + type: object + properties: + currency: + $ref: '#/components/schemas/Currency' + limit: + $ref: '#/components/schemas/ParticipantLimit' + CurrencyIsActive: + required: + - isActive + type: object + properties: + isActive: + type: boolean + description: Participant currency isActive boolean + RecordFundsOut: + required: + - reason + type: object + properties: + action: + type: string + enum: + - recordFundsOutCommit + - recordFundsOutAbort + reason: + type: string + LedgerAccountType: + required: + - description + - isActive + - isSettleable + - name + type: object + properties: + name: + maxLength: 30 + minLength: 2 + pattern: ^\w+$ + type: string + description: Name of the ledger account type + description: + type: string + description: Description of the ledger account type + isActive: + type: boolean + description: Determines whether the ledger account is active + isSettleable: + type: boolean + description: Determines whether the ledger account is settleable + SettlementModel: + required: + - autoPositionReset + - currency + - ledgerAccountType + - name + - requireLiquidityCheck + - settlementAccountType + - settlementDelay + - settlementGranularity + - settlementInterchange + type: object + properties: + name: + maxLength: 30 + minLength: 2 + type: string + description: Name of the settlement model + x-format: + alphanum: true + settlementGranularity: + type: string + description: Granularity type for the settlement model GROSS or NET + enum: + - GROSS + - NET + settlementInterchange: + type: string + description: Interchange type for the settlement model BILATERAL or MULTILATERAL + enum: + - BILATERAL + - MULTILATERAL + settlementDelay: + type: string + description: Delay type for the settlement model IMMEDIATE or DEFERRED + enum: + - DEFERRED + - IMMEDIATE + currency: + $ref: '#/components/schemas/Currency' + requireLiquidityCheck: + type: boolean + description: Liquidity Check boolean + ledgerAccountType: + type: string + description: Account type for the settlement model + enum: + - INTERCHANGE_FEE + - POSITION + settlementAccountType: + type: string + description: 'Account type into which the settlement should be settled into + : POSITION, SETTLEMENT or INTERCHANGE_FEE_SETTLEMENT' + autoPositionReset: + type: boolean + description: Automatic position reset setting, which determines whether + to execute the settlement transfer or not + SettlementModelIsActive: + required: + - isActive + type: object + properties: + isActive: + type: boolean + description: settlementModel isActive boolean + GetTransactionResponse: + title: GetTransactionResponse + type: object + properties: + quoteId: + $ref: '#/components/schemas/QuoteId' + transactionId: + $ref: '#/components/schemas/TransactionId' + transactionRequestId: + type: string + description: Identifies an optional previously-sent transaction request. + payee: + $ref: '#/components/schemas/Party' + payer: + $ref: '#/components/schemas/Party' + amount: + $ref: '#/components/schemas/Money' + transactionType: + $ref: '#/components/schemas/TransactionType' + note: + type: string + description: A memo that will be attached to the transaction. + extensionList: + $ref: '#/components/schemas/ExtensionList' + description: GET /transaction/{id} response object + QuoteId: + title: QuoteId + minLength: 1 + pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + type: string + description: Quote Identifier. The API data type UUID (Universally Unique Identifier) + is a JSON String in canonical format, conforming to RFC 4122, that is restricted + by a regular expression for interoperability reasons. An UUID is always 36 + characters long, 32 hexadecimal symbols and 4 dashes (‘-‘). A minLength of + 1 has been specified due to the regex not being validated on empty strings, + this should be removed once the enjoi module has been fixed. + TransactionId: + title: TransactionId + minLength: 1 + pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + type: string + description: Transaction Identifier. The API data type UUID (Universally Unique + Identifier) is a JSON String in canonical format, conforming to RFC 4122, + that is restricted by a regular expression for interoperability reasons. An + UUID is always 36 characters long, 32 hexadecimal symbols and 4 dashes (‘-‘). + A minLength of 1 has been specified due to the regex not being validated on + empty strings, this should be removed once the enjoi module has been fixed. + Party: + title: Party + required: + - partyIdInfo + type: object + properties: + partyIdInfo: + $ref: '#/components/schemas/PartyIdInfo' + merchantClassificationCode: + type: string + description: Used in the context of Payee Information, where the Payee happens + to be a merchant accepting merchant payments. + name: + type: string + description: Display name of the Party, could be a real name or a nick name. + personalInfo: + $ref: '#/components/schemas/PartyPersonalInfo' + description: Data model for the complex type Party. + PartyIdInfo: + title: PartyIdInfo + required: + - partyIdType + - partyIdentifier + type: object + properties: + partyIdType: + $ref: '#/components/schemas/PartyIdType' + partyIdentifier: + $ref: '#/components/schemas/PartyIdentifier' + partySubIdOrType: + type: string + description: A sub-identifier or sub-type for the Party. + fspId: + type: string + description: FSP id (if known) + extensionList: + $ref: '#/components/schemas/ExtensionList' + description: Data model for the complex type PartyIdInfo. + PartyIdType: + title: PartyIdTypeEnum + type: string + description: Below are the allowed values for the enumeration - MSISDN An MSISDN + (Mobile Station International Subscriber Directory Number, that is, the phone + number) is used as reference to a participant. The MSISDN identifier should + be in international format according to the ITU-T E.164 standard. Optionally, + the MSISDN may be prefixed by a single plus sign, indicating the international + prefix. - EMAIL An email is used as reference to a participant. The format + of the email should be according to the informational RFC 3696. - PERSONAL_ID + A personal identifier is used as reference to a participant. Examples of personal + identification are passport number, birth certificate number, and national + registration number. The identifier number is added in the PartyIdentifier + element. The personal identifier type is added in the PartySubIdOrType element. + - BUSINESS A specific Business (for example, an organization or a company) + is used as reference to a participant. The BUSINESS identifier can be in any + format. To make a transaction connected to a specific username or bill number + in a Business, the PartySubIdOrType element should be used. - DEVICE A specific + device (for example, a POS or ATM) id connected to a specific business or + organization is used as reference to a Party. For referencing a specific device + under a specific business or organization, use the PartySubIdOrType element. + - ACCOUNT_ID A bank account number or FSP account id should be used as reference + to a participant. The ACCOUNT_ID identifier can be in any format, as formats + can greatly differ depending on country and FSP. - IBAN A bank account number + or FSP account id is used as reference to a participant. The IBAN identifier + can consist of up to 34 alphanumeric characters and should be entered without + whitespace. - ALIAS An alias is used as reference to a participant. The alias + should be created in the FSP as an alternative reference to an account owner. + Another example of an alias is a username in the FSP system. The ALIAS identifier + can be in any format. It is also possible to use the PartySubIdOrType element + for identifying an account under an Alias defined by the PartyIdentifier. + enum: + - MSISDN + - EMAIL + - PERSONAL_ID + - BUSINESS + - DEVICE + - ACCOUNT_ID + - IBAN + - ALIAS + PartyIdentifier: + title: PartyIdentifier + maxLength: 128 + minLength: 1 + type: string + description: Identifier of the Party. + ExtensionList: + title: ExtensionList + required: + - extension + type: object + properties: + extension: + maxItems: 16 + minItems: 1 + type: array + description: Number of Extension elements + items: + $ref: '#/components/schemas/Extension' + description: Data model for the complex type ExtensionList + Extension: + title: Extension + required: + - key + - value + type: object + properties: + key: + type: string + description: Extension key. + value: + type: string + description: Extension value. + description: Data model for the complex type Extension + PartyPersonalInfo: + title: PartyPersonalInfo + type: object + properties: + complexName: + $ref: '#/components/schemas/PartyComplexName' + dateOfBirth: + type: string + description: Date of birth for the Party. + description: Data model for the complex type PartyPersonalInfo. + PartyComplexName: + title: PartyComplexName + type: object + properties: + firstName: + type: string + description: Party’s first name. + middleName: + type: string + description: Party’s middle name. + lastName: + type: string + description: Party’s last name. + description: Data model for the complex type PartyComplexName. + TransactionType: + title: TransactionType + required: + - initiator + - initiatorType + - scenario + type: object + properties: + scenario: + type: string + description: Deposit, withdrawal, refund, … + subScenario: + type: string + description: Possible sub-scenario, defined locally within the scheme. + initiator: + type: string + description: Who is initiating the transaction - Payer or Payee + initiatorType: + type: string + description: Consumer, agent, business, … + refundInfo: + $ref: '#/components/schemas/Refund' + balanceOfPayments: + type: string + description: Balance of Payments code. + description: Data model for the complex type TransactionType. + Refund: + title: Refund + required: + - originalTransactionId + type: object + properties: + originalTransactionId: + type: string + description: Reference to the original transaction id that is requested + to be refunded. + refundReason: + type: string + description: Free text indicating the reason for the refund. + description: Data model for the complex type Refund. + Money: + title: Money + required: + - amount + - currency + type: object + properties: + currency: + $ref: '#/components/schemas/Currency' + amount: + $ref: '#/components/schemas/Amount' + description: Data model for the complex type Money. + Currency: + title: CurrencyEnum + maxLength: 3 + minLength: 3 + type: string + description: The currency codes defined in ISO 4217 as three-letter alphabetic + codes are used as the standard naming representation for currencies. + enum: + - AED + - AFN + - ALL + - AMD + - ANG + - AOA + - ARS + - AUD + - AWG + - AZN + - BAM + - BBD + - BDT + - BGN + - BHD + - BIF + - BMD + - BND + - BOB + - BRL + - BSD + - BTN + - BWP + - BYN + - BZD + - CAD + - CDF + - CHF + - CLP + - CNY + - COP + - CRC + - CUC + - CUP + - CVE + - CZK + - DJF + - DKK + - DOP + - DZD + - EGP + - ERN + - ETB + - EUR + - FJD + - FKP + - GBP + - GEL + - GGP + - GHS + - GIP + - GMD + - GNF + - GTQ + - GYD + - HKD + - HNL + - HRK + - HTG + - HUF + - IDR + - ILS + - IMP + - INR + - IQD + - IRR + - ISK + - JEP + - JMD + - JOD + - JPY + - KES + - KGS + - KHR + - KMF + - KPW + - KRW + - KWD + - KYD + - KZT + - LAK + - LBP + - LKR + - LRD + - LSL + - LYD + - MAD + - MDL + - MGA + - MKD + - MMK + - MNT + - MOP + - MRO + - MUR + - MVR + - MWK + - MXN + - MYR + - MZN + - NAD + - NGN + - NIO + - NOK + - NPR + - NZD + - OMR + - PAB + - PEN + - PGK + - PHP + - PKR + - PLN + - PYG + - QAR + - RON + - RSD + - RUB + - RWF + - SAR + - SBD + - SCR + - SDG + - SEK + - SGD + - SHP + - SLL + - SOS + - SPL + - SRD + - STD + - SVC + - SYP + - SZL + - THB + - TJS + - TMT + - TND + - TOP + - TRY + - TTD + - TVD + - TWD + - TZS + - UAH + - UGX + - USD + - UYU + - UZS + - VEF + - VND + - VUV + - WST + - XAF + - XCD + - XDR + - XOF + - XPF + - XTS + - XXX + - YER + - ZAR + - ZMW + - ZWD + Amount: + title: Amount + pattern: ^([0]|([1-9][0-9]{0,17}))([.][0-9]{0,3}[1-9])?$ + type: string + description: The API data type Amount is a JSON String in a canonical format + that is restricted by a regular expression for interoperability reasons. This + pattern does not allow any trailing zeroes at all, but allows an amount without + a minor currency unit. It also only allows four digits in the minor currency + unit; a negative value is not allowed. Using more than 18 digits in the major + currency unit is not allowed. diff --git a/test/func/config/ttk-hub/spec_files/api_definitions/central_admin_1.0/response_map.json b/test/func/config/ttk-hub/spec_files/api_definitions/central_admin_1.0/response_map.json new file mode 100644 index 000000000..e04829cd6 --- /dev/null +++ b/test/func/config/ttk-hub/spec_files/api_definitions/central_admin_1.0/response_map.json @@ -0,0 +1,96 @@ +{ + "/health": { + "get": { + "response": {} + } + }, + "/metrics": { + "get": { + "response": {} + } + }, + "/participants": { + "get": { + "response": {} + }, + "post": { + "response": {} + } + }, + "/participants/limits": { + "get": { + "response": {} + } + }, + "/participants/{name}": { + "get": { + "response": {} + }, + "put": { + "response": {} + } + }, + "/participants/{name}/endpoints": { + "get": { + "response": {} + }, + "post": { + "response": {} + } + }, + "/participants/{name}/limits": { + "get": { + "response": {} + }, + "put": { + "response": {} + } + }, + "/participants/{name}/positions": { + "get": { + "response": {} + } + }, + "/participants/{name}/accounts": { + "get": { + "response": {} + }, + "post": { + "response": {} + } + }, + "/participants/{name}/initialPositionAndLimits": { + "post": { + "response": {} + } + }, + "/participants/{name}/accounts/{id}": { + "put": { + "response": {} + }, + "post": { + "response": {} + } + }, + "/participants/{name}/accounts/{id}/transfers/{transferId}": { + "put": { + "response": {} + } + }, + "/settlementModels": { + "get": { + "response": {} + }, + "post": { + "response": {} + } + }, + "/settlementModels/{name}": { + "get": { + "response": {} + }, + "put": { + "response": {} + } + } +} \ No newline at end of file diff --git a/test/func/config/ttk-hub/spec_files/api_definitions/central_admin_old_9.3/api_spec.yaml b/test/func/config/ttk-hub/spec_files/api_definitions/central_admin_old_9.3/api_spec.yaml new file mode 100644 index 000000000..7cfdfd692 --- /dev/null +++ b/test/func/config/ttk-hub/spec_files/api_definitions/central_admin_old_9.3/api_spec.yaml @@ -0,0 +1,2467 @@ +openapi: 3.0.1 +info: + title: Central Ledger API + version: 9.3.0 old + description: Central Ledger API, this is old version. The version number is baselined to 1.0 with some changes in the API. So please use the latest version 1.0. +servers: +- url: http://127.0.0.1:3001/ +tags: [] +paths: + /enums: + get: + tags: + - enums + operationId: getEnums + responses: + default: + description: Successful + content: + '*/*': + schema: + type: string + /health: + get: + tags: + - health + operationId: getHealth + responses: + default: + description: Successful + content: + '*/*': + schema: + type: string + /metrics: + get: + tags: + - metrics + summary: Prometheus metrics endpoint + operationId: getMetrics + responses: + default: + description: Successful + content: + '*/*': + schema: + type: string + /participants: + get: + tags: + - participants + operationId: getParticipants + responses: + default: + description: Successful + content: + '*/*': + schema: + type: string + post: + tags: + - participants + operationId: postParticipants + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/Model%201' + required: false + responses: + default: + description: Successful + content: + '*/*': + schema: + type: string + x-codegen-request-body-name: body + /participants/limits: + get: + tags: + - participants + summary: View limits for all participants + operationId: getParticipantsLimits + parameters: + - name: currency + in: query + description: Currency code + schema: + type: string + enum: + - AED + - AFA + - AFN + - ALL + - AMD + - ANG + - AOA + - AOR + - ARS + - AUD + - AWG + - AZN + - BAM + - BBD + - BDT + - BGN + - BHD + - BIF + - BMD + - BND + - BOB + - BRL + - BSD + - BTN + - BWP + - BYN + - BZD + - CAD + - CDF + - CHF + - CLP + - CNY + - COP + - CRC + - CUC + - CUP + - CVE + - CZK + - DJF + - DKK + - DOP + - DZD + - EEK + - EGP + - ERN + - ETB + - EUR + - FJD + - FKP + - GBP + - GEL + - GGP + - GHS + - GIP + - GMD + - GNF + - GTQ + - GYD + - HKD + - HNL + - HRK + - HTG + - HUF + - IDR + - ILS + - IMP + - INR + - IQD + - IRR + - ISK + - JEP + - JMD + - JOD + - JPY + - KES + - KGS + - KHR + - KMF + - KPW + - KRW + - KWD + - KYD + - KZT + - LAK + - LBP + - LKR + - LRD + - LSL + - LTL + - LVL + - LYD + - MAD + - MDL + - MGA + - MKD + - MMK + - MNT + - MOP + - MRO + - MUR + - MVR + - MWK + - MXN + - MYR + - MZN + - NAD + - NGN + - NIO + - NOK + - NPR + - NZD + - OMR + - PAB + - PEN + - PGK + - PHP + - PKR + - PLN + - PYG + - QAR + - RON + - RSD + - RUB + - RWF + - SAR + - SBD + - SCR + - SDG + - SEK + - SGD + - SHP + - SLL + - SOS + - SPL + - SRD + - STD + - SVC + - SYP + - SZL + - THB + - TJS + - TMT + - TND + - TOP + - TRY + - TTD + - TVD + - TWD + - TZS + - UAH + - UGX + - USD + - UYU + - UZS + - VEF + - VND + - VUV + - WST + - XAF + - XAG + - XAU + - XCD + - XDR + - XFO + - XFU + - XOF + - XPD + - XPF + - XPT + - XTS + - XXX + - YER + - ZAR + - ZMK + - ZMW + - ZWD + - ZWL + - ZWN + - ZWR + - name: type + in: query + description: Limit Type + schema: + type: string + responses: + default: + description: Successful + content: + '*/*': + schema: + type: string + /participants/{name}: + get: + tags: + - participants + operationId: getParticipantsName + parameters: + - $ref: '#/components/parameters/name' + responses: + default: + description: Successful + content: + '*/*': + schema: + type: string + put: + tags: + - participants + operationId: putParticipantsName + parameters: + - name: name + in: path + description: Participant name + required: true + schema: + type: string + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/Model%207' + required: false + responses: + default: + description: Successful + content: + '*/*': + schema: + type: string + x-codegen-request-body-name: body + /participants/{name}/endpoints: + get: + tags: + - participants + summary: View participant endpoints + operationId: getParticipantsNameEndpoints + parameters: + - name: name + in: path + description: Name of the participant + required: true + schema: + maxLength: 30 + minLength: 2 + type: string + x-format: + alphanum: true + x-format: + alphanum: true + responses: + default: + description: Successful + content: + '*/*': + schema: + type: string + post: + tags: + - participants + summary: Add/Update participant endpoints + operationId: postParticipantsNameEndpoints + parameters: + - name: name + in: path + description: Name of the participant + required: true + schema: + maxLength: 30 + minLength: 2 + type: string + x-format: + alphanum: true + x-format: + alphanum: true + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/Model%202' + required: false + responses: + default: + description: Successful + content: + '*/*': + schema: + type: string + x-codegen-request-body-name: body + /participants/{name}/limits: + get: + tags: + - participants + summary: View participant limits + operationId: getParticipantsNameLimits + parameters: + - name: name + in: path + description: Name of the participant + required: true + schema: + maxLength: 30 + minLength: 2 + type: string + x-format: + alphanum: true + x-format: + alphanum: true + - name: currency + in: query + description: Currency code + schema: + type: string + enum: + - AED + - AFA + - AFN + - ALL + - AMD + - ANG + - AOA + - AOR + - ARS + - AUD + - AWG + - AZN + - BAM + - BBD + - BDT + - BGN + - BHD + - BIF + - BMD + - BND + - BOB + - BRL + - BSD + - BTN + - BWP + - BYN + - BZD + - CAD + - CDF + - CHF + - CLP + - CNY + - COP + - CRC + - CUC + - CUP + - CVE + - CZK + - DJF + - DKK + - DOP + - DZD + - EEK + - EGP + - ERN + - ETB + - EUR + - FJD + - FKP + - GBP + - GEL + - GGP + - GHS + - GIP + - GMD + - GNF + - GTQ + - GYD + - HKD + - HNL + - HRK + - HTG + - HUF + - IDR + - ILS + - IMP + - INR + - IQD + - IRR + - ISK + - JEP + - JMD + - JOD + - JPY + - KES + - KGS + - KHR + - KMF + - KPW + - KRW + - KWD + - KYD + - KZT + - LAK + - LBP + - LKR + - LRD + - LSL + - LTL + - LVL + - LYD + - MAD + - MDL + - MGA + - MKD + - MMK + - MNT + - MOP + - MRO + - MUR + - MVR + - MWK + - MXN + - MYR + - MZN + - NAD + - NGN + - NIO + - NOK + - NPR + - NZD + - OMR + - PAB + - PEN + - PGK + - PHP + - PKR + - PLN + - PYG + - QAR + - RON + - RSD + - RUB + - RWF + - SAR + - SBD + - SCR + - SDG + - SEK + - SGD + - SHP + - SLL + - SOS + - SPL + - SRD + - STD + - SVC + - SYP + - SZL + - THB + - TJS + - TMT + - TND + - TOP + - TRY + - TTD + - TVD + - TWD + - TZS + - UAH + - UGX + - USD + - UYU + - UZS + - VEF + - VND + - VUV + - WST + - XAF + - XAG + - XAU + - XCD + - XDR + - XFO + - XFU + - XOF + - XPD + - XPF + - XPT + - XTS + - XXX + - YER + - ZAR + - ZMK + - ZMW + - ZWD + - ZWL + - ZWN + - ZWR + - name: type + in: query + description: Limit Type + schema: + type: string + responses: + default: + description: Successful + content: + '*/*': + schema: + type: string + put: + tags: + - participants + summary: Adjust participant limits + operationId: putParticipantsNameLimits + parameters: + - name: name + in: path + description: Name of the participant + required: true + schema: + maxLength: 30 + minLength: 2 + type: string + x-format: + alphanum: true + x-format: + alphanum: true + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/Model%209' + required: false + responses: + default: + description: Successful + content: + '*/*': + schema: + type: string + x-codegen-request-body-name: body + /participants/{name}/positions: + get: + tags: + - participants + summary: View participant positions + operationId: getParticipantsNamePositions + parameters: + - name: name + in: path + description: Name of the participant + required: true + schema: + maxLength: 30 + minLength: 2 + type: string + x-format: + alphanum: true + x-format: + alphanum: true + - name: currency + in: query + description: Currency code + schema: + type: string + enum: + - AED + - AFA + - AFN + - ALL + - AMD + - ANG + - AOA + - AOR + - ARS + - AUD + - AWG + - AZN + - BAM + - BBD + - BDT + - BGN + - BHD + - BIF + - BMD + - BND + - BOB + - BRL + - BSD + - BTN + - BWP + - BYN + - BZD + - CAD + - CDF + - CHF + - CLP + - CNY + - COP + - CRC + - CUC + - CUP + - CVE + - CZK + - DJF + - DKK + - DOP + - DZD + - EEK + - EGP + - ERN + - ETB + - EUR + - FJD + - FKP + - GBP + - GEL + - GGP + - GHS + - GIP + - GMD + - GNF + - GTQ + - GYD + - HKD + - HNL + - HRK + - HTG + - HUF + - IDR + - ILS + - IMP + - INR + - IQD + - IRR + - ISK + - JEP + - JMD + - JOD + - JPY + - KES + - KGS + - KHR + - KMF + - KPW + - KRW + - KWD + - KYD + - KZT + - LAK + - LBP + - LKR + - LRD + - LSL + - LTL + - LVL + - LYD + - MAD + - MDL + - MGA + - MKD + - MMK + - MNT + - MOP + - MRO + - MUR + - MVR + - MWK + - MXN + - MYR + - MZN + - NAD + - NGN + - NIO + - NOK + - NPR + - NZD + - OMR + - PAB + - PEN + - PGK + - PHP + - PKR + - PLN + - PYG + - QAR + - RON + - RSD + - RUB + - RWF + - SAR + - SBD + - SCR + - SDG + - SEK + - SGD + - SHP + - SLL + - SOS + - SPL + - SRD + - STD + - SVC + - SYP + - SZL + - THB + - TJS + - TMT + - TND + - TOP + - TRY + - TTD + - TVD + - TWD + - TZS + - UAH + - UGX + - USD + - UYU + - UZS + - VEF + - VND + - VUV + - WST + - XAF + - XAG + - XAU + - XCD + - XDR + - XFO + - XFU + - XOF + - XPD + - XPF + - XPT + - XTS + - XXX + - YER + - ZAR + - ZMK + - ZMW + - ZWD + - ZWL + - ZWN + - ZWR + responses: + default: + description: Successful + content: + '*/*': + schema: + type: string + /participants/{name}/accounts: + get: + tags: + - participants + summary: View participant accounts and balances + operationId: getParticipantsNameAccounts + parameters: + - name: name + in: path + description: Name of the participant + required: true + schema: + maxLength: 30 + minLength: 2 + type: string + x-format: + alphanum: true + x-format: + alphanum: true + responses: + default: + description: Successful + content: + '*/*': + schema: + type: string + post: + tags: + - participants + summary: Create hub accounts + operationId: postParticipantsNameAccounts + parameters: + - name: name + in: path + description: Participant name + required: true + schema: + type: string + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/Model%204' + required: false + responses: + default: + description: Successful + content: + '*/*': + schema: + type: string + x-codegen-request-body-name: body + /participants/{name}/initialPositionAndLimits: + post: + tags: + - participants + summary: Add initial participant limits and position + operationId: postParticipantsNameInitialpositionandlimits + parameters: + - name: name + in: path + description: Name of the participant + required: true + schema: + maxLength: 30 + minLength: 2 + type: string + x-format: + alphanum: true + x-format: + alphanum: true + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/Model%203' + required: false + responses: + default: + description: Successful + content: + '*/*': + schema: + type: string + x-codegen-request-body-name: body + /participants/{name}/accounts/{id}: + put: + tags: + - participants + summary: Update participant accounts + operationId: putParticipantsNameAccountsId + parameters: + - name: name + in: path + description: Name of the participant + required: true + schema: + maxLength: 30 + minLength: 2 + type: string + x-format: + alphanum: true + x-format: + alphanum: true + - name: id + in: path + required: true + schema: + type: integer + x-constraint: + positive: true + x-constraint: + positive: true + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/Model%2010' + required: false + responses: + default: + description: Successful + content: + '*/*': + schema: + type: string + x-codegen-request-body-name: body + post: + tags: + - participants + summary: Record Funds In or Out of participant account + operationId: postParticipantsNameAccountsId + parameters: + - name: name + in: path + description: Name of the participant + required: true + schema: + maxLength: 30 + minLength: 2 + type: string + x-format: + alphanum: true + x-format: + alphanum: true + - name: id + in: path + required: true + schema: + type: integer + x-constraint: + positive: true + x-constraint: + positive: true + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/Model%206' + required: false + responses: + default: + description: Successful + content: + '*/*': + schema: + type: string + x-codegen-request-body-name: body + /participants/{name}/accounts/{id}/transfers/{transferId}: + put: + tags: + - participants + summary: Record Funds In or Out of participant account + operationId: putParticipantsNameAccountsIdTransfersTransferid + parameters: + - name: name + in: path + description: Name of the participant + required: true + schema: + maxLength: 30 + minLength: 2 + type: string + x-format: + alphanum: true + x-format: + alphanum: true + - name: id + in: path + required: true + schema: + type: integer + x-constraint: + positive: true + x-constraint: + positive: true + - name: transferId + in: path + required: true + schema: + type: string + x-format: + guid: true + x-format: + guid: true + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/Model%2011' + required: false + responses: + default: + description: Successful + content: + '*/*': + schema: + type: string + x-codegen-request-body-name: body + /settlementModels: + get: + tags: + - settlementModels + operationId: getSettlementmodels + responses: + default: + description: Successful + content: + '*/*': + schema: + type: string + post: + tags: + - settlementModels + operationId: postSettlementmodels + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/Model%2012' + required: false + responses: + default: + description: Successful + content: + '*/*': + schema: + type: string + x-codegen-request-body-name: body + /settlementModels/{name}: + get: + tags: + - settlementModels + operationId: getSettlementmodelsName + parameters: + - name: name + in: path + description: SettlementModel name + required: true + schema: + type: string + responses: + default: + description: Successful + content: + '*/*': + schema: + type: string + put: + tags: + - settlementModels + operationId: putSettlementmodelsName + parameters: + - name: name + in: path + description: settlementModel name + required: true + schema: + type: string + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/Model%2013' + required: false + responses: + default: + description: Successful + content: + '*/*': + schema: + type: string + x-codegen-request-body-name: body +components: + parameters: + name: + name: name + in: path + required: true + schema: + type: string + schemas: + Model 1: + required: + - name + type: object + properties: + name: + maxLength: 30 + minLength: 2 + type: string + description: Name of the participant + x-format: + alphanum: true + currency: + type: string + description: Currency code + enum: + - AED + - AFA + - AFN + - ALL + - AMD + - ANG + - AOA + - AOR + - ARS + - AUD + - AWG + - AZN + - BAM + - BBD + - BDT + - BGN + - BHD + - BIF + - BMD + - BND + - BOB + - BRL + - BSD + - BTN + - BWP + - BYN + - BZD + - CAD + - CDF + - CHF + - CLP + - CNY + - COP + - CRC + - CUC + - CUP + - CVE + - CZK + - DJF + - DKK + - DOP + - DZD + - EEK + - EGP + - ERN + - ETB + - EUR + - FJD + - FKP + - GBP + - GEL + - GGP + - GHS + - GIP + - GMD + - GNF + - GTQ + - GYD + - HKD + - HNL + - HRK + - HTG + - HUF + - IDR + - ILS + - IMP + - INR + - IQD + - IRR + - ISK + - JEP + - JMD + - JOD + - JPY + - KES + - KGS + - KHR + - KMF + - KPW + - KRW + - KWD + - KYD + - KZT + - LAK + - LBP + - LKR + - LRD + - LSL + - LTL + - LVL + - LYD + - MAD + - MDL + - MGA + - MKD + - MMK + - MNT + - MOP + - MRO + - MUR + - MVR + - MWK + - MXN + - MYR + - MZN + - NAD + - NGN + - NIO + - NOK + - NPR + - NZD + - OMR + - PAB + - PEN + - PGK + - PHP + - PKR + - PLN + - PYG + - QAR + - RON + - RSD + - RUB + - RWF + - SAR + - SBD + - SCR + - SDG + - SEK + - SGD + - SHP + - SLL + - SOS + - SPL + - SRD + - STD + - SVC + - SYP + - SZL + - THB + - TJS + - TMT + - TND + - TOP + - TRY + - TTD + - TVD + - TWD + - TZS + - UAH + - UGX + - USD + - UYU + - UZS + - VEF + - VND + - VUV + - WST + - XAF + - XAG + - XAU + - XCD + - XDR + - XFO + - XFU + - XOF + - XPD + - XPF + - XPT + - XTS + - XXX + - YER + - ZAR + - ZMK + - ZMW + - ZWD + - ZWL + - ZWN + - ZWR + Model 2: + required: + - type + - value + type: object + properties: + type: + type: string + description: Endpoint Type + value: + type: string + description: Endpoint Value + limit: + required: + - type + - value + type: object + properties: + type: + type: string + description: Limit Type + value: + type: number + description: Limit Value + x-constraint: + positive: true + description: Participant Limit + Model 3: + required: + - limit + type: object + properties: + currency: + type: string + description: Currency code + enum: + - AED + - AFA + - AFN + - ALL + - AMD + - ANG + - AOA + - AOR + - ARS + - AUD + - AWG + - AZN + - BAM + - BBD + - BDT + - BGN + - BHD + - BIF + - BMD + - BND + - BOB + - BRL + - BSD + - BTN + - BWP + - BYN + - BZD + - CAD + - CDF + - CHF + - CLP + - CNY + - COP + - CRC + - CUC + - CUP + - CVE + - CZK + - DJF + - DKK + - DOP + - DZD + - EEK + - EGP + - ERN + - ETB + - EUR + - FJD + - FKP + - GBP + - GEL + - GGP + - GHS + - GIP + - GMD + - GNF + - GTQ + - GYD + - HKD + - HNL + - HRK + - HTG + - HUF + - IDR + - ILS + - IMP + - INR + - IQD + - IRR + - ISK + - JEP + - JMD + - JOD + - JPY + - KES + - KGS + - KHR + - KMF + - KPW + - KRW + - KWD + - KYD + - KZT + - LAK + - LBP + - LKR + - LRD + - LSL + - LTL + - LVL + - LYD + - MAD + - MDL + - MGA + - MKD + - MMK + - MNT + - MOP + - MRO + - MUR + - MVR + - MWK + - MXN + - MYR + - MZN + - NAD + - NGN + - NIO + - NOK + - NPR + - NZD + - OMR + - PAB + - PEN + - PGK + - PHP + - PKR + - PLN + - PYG + - QAR + - RON + - RSD + - RUB + - RWF + - SAR + - SBD + - SCR + - SDG + - SEK + - SGD + - SHP + - SLL + - SOS + - SPL + - SRD + - STD + - SVC + - SYP + - SZL + - THB + - TJS + - TMT + - TND + - TOP + - TRY + - TTD + - TVD + - TWD + - TZS + - UAH + - UGX + - USD + - UYU + - UZS + - VEF + - VND + - VUV + - WST + - XAF + - XAG + - XAU + - XCD + - XDR + - XFO + - XFU + - XOF + - XPD + - XPF + - XPT + - XTS + - XXX + - YER + - ZAR + - ZMK + - ZMW + - ZWD + - ZWL + - ZWN + - ZWR + limit: + $ref: '#/components/schemas/limit' + initialPosition: + type: number + description: Initial Position Value + Model 4: + required: + - type + type: object + properties: + currency: + type: string + description: Currency code + enum: + - AED + - AFA + - AFN + - ALL + - AMD + - ANG + - AOA + - AOR + - ARS + - AUD + - AWG + - AZN + - BAM + - BBD + - BDT + - BGN + - BHD + - BIF + - BMD + - BND + - BOB + - BRL + - BSD + - BTN + - BWP + - BYN + - BZD + - CAD + - CDF + - CHF + - CLP + - CNY + - COP + - CRC + - CUC + - CUP + - CVE + - CZK + - DJF + - DKK + - DOP + - DZD + - EEK + - EGP + - ERN + - ETB + - EUR + - FJD + - FKP + - GBP + - GEL + - GGP + - GHS + - GIP + - GMD + - GNF + - GTQ + - GYD + - HKD + - HNL + - HRK + - HTG + - HUF + - IDR + - ILS + - IMP + - INR + - IQD + - IRR + - ISK + - JEP + - JMD + - JOD + - JPY + - KES + - KGS + - KHR + - KMF + - KPW + - KRW + - KWD + - KYD + - KZT + - LAK + - LBP + - LKR + - LRD + - LSL + - LTL + - LVL + - LYD + - MAD + - MDL + - MGA + - MKD + - MMK + - MNT + - MOP + - MRO + - MUR + - MVR + - MWK + - MXN + - MYR + - MZN + - NAD + - NGN + - NIO + - NOK + - NPR + - NZD + - OMR + - PAB + - PEN + - PGK + - PHP + - PKR + - PLN + - PYG + - QAR + - RON + - RSD + - RUB + - RWF + - SAR + - SBD + - SCR + - SDG + - SEK + - SGD + - SHP + - SLL + - SOS + - SPL + - SRD + - STD + - SVC + - SYP + - SZL + - THB + - TJS + - TMT + - TND + - TOP + - TRY + - TTD + - TVD + - TWD + - TZS + - UAH + - UGX + - USD + - UYU + - UZS + - VEF + - VND + - VUV + - WST + - XAF + - XAG + - XAU + - XCD + - XDR + - XFO + - XFU + - XOF + - XPD + - XPF + - XPT + - XTS + - XXX + - YER + - ZAR + - ZMK + - ZMW + - ZWD + - ZWL + - ZWN + - ZWR + type: + type: string + description: Account type + No amount provided: + required: + - amount + type: object + properties: + amount: + type: number + x-constraint: + precision: 4 + positive: true + currency: + type: string + description: Currency code + enum: + - AED + - AFA + - AFN + - ALL + - AMD + - ANG + - AOA + - AOR + - ARS + - AUD + - AWG + - AZN + - BAM + - BBD + - BDT + - BGN + - BHD + - BIF + - BMD + - BND + - BOB + - BRL + - BSD + - BTN + - BWP + - BYN + - BZD + - CAD + - CDF + - CHF + - CLP + - CNY + - COP + - CRC + - CUC + - CUP + - CVE + - CZK + - DJF + - DKK + - DOP + - DZD + - EEK + - EGP + - ERN + - ETB + - EUR + - FJD + - FKP + - GBP + - GEL + - GGP + - GHS + - GIP + - GMD + - GNF + - GTQ + - GYD + - HKD + - HNL + - HRK + - HTG + - HUF + - IDR + - ILS + - IMP + - INR + - IQD + - IRR + - ISK + - JEP + - JMD + - JOD + - JPY + - KES + - KGS + - KHR + - KMF + - KPW + - KRW + - KWD + - KYD + - KZT + - LAK + - LBP + - LKR + - LRD + - LSL + - LTL + - LVL + - LYD + - MAD + - MDL + - MGA + - MKD + - MMK + - MNT + - MOP + - MRO + - MUR + - MVR + - MWK + - MXN + - MYR + - MZN + - NAD + - NGN + - NIO + - NOK + - NPR + - NZD + - OMR + - PAB + - PEN + - PGK + - PHP + - PKR + - PLN + - PYG + - QAR + - RON + - RSD + - RUB + - RWF + - SAR + - SBD + - SCR + - SDG + - SEK + - SGD + - SHP + - SLL + - SOS + - SPL + - SRD + - STD + - SVC + - SYP + - SZL + - THB + - TJS + - TMT + - TND + - TOP + - TRY + - TTD + - TVD + - TWD + - TZS + - UAH + - UGX + - USD + - UYU + - UZS + - VEF + - VND + - VUV + - WST + - XAF + - XAG + - XAU + - XCD + - XDR + - XFO + - XFU + - XOF + - XPD + - XPF + - XPT + - XTS + - XXX + - YER + - ZAR + - ZMK + - ZMW + - ZWD + - ZWL + - ZWN + - ZWR + Model 5: + type: object + properties: + key: + type: string + value: + type: string + extension: + type: array + items: + $ref: '#/components/schemas/Model%205' + extensionList: + type: object + properties: + extension: + $ref: '#/components/schemas/extension' + Model 6: + required: + - action + - amount + - externalReference + - reason + - transferId + type: object + properties: + transferId: + type: string + x-format: + guid: true + externalReference: + type: string + action: + type: string + enum: + - recordFundsIn + - recordFundsOutPrepareReserve + reason: + type: string + amount: + $ref: '#/components/schemas/No%20amount%20provided' + extensionList: + $ref: '#/components/schemas/extensionList' + Model 7: + required: + - isActive + type: object + properties: + isActive: + type: boolean + description: Participant isActive boolean + Model 8: + required: + - alarmPercentage + - type + - value + type: object + properties: + type: + type: string + description: Limit Type + value: + type: number + description: Limit Value + alarmPercentage: + type: number + description: limit threshold alarm percentage value + description: Participant Limit + Model 9: + required: + - limit + type: object + properties: + currency: + type: string + description: Currency code + enum: + - AED + - AFA + - AFN + - ALL + - AMD + - ANG + - AOA + - AOR + - ARS + - AUD + - AWG + - AZN + - BAM + - BBD + - BDT + - BGN + - BHD + - BIF + - BMD + - BND + - BOB + - BRL + - BSD + - BTN + - BWP + - BYN + - BZD + - CAD + - CDF + - CHF + - CLP + - CNY + - COP + - CRC + - CUC + - CUP + - CVE + - CZK + - DJF + - DKK + - DOP + - DZD + - EEK + - EGP + - ERN + - ETB + - EUR + - FJD + - FKP + - GBP + - GEL + - GGP + - GHS + - GIP + - GMD + - GNF + - GTQ + - GYD + - HKD + - HNL + - HRK + - HTG + - HUF + - IDR + - ILS + - IMP + - INR + - IQD + - IRR + - ISK + - JEP + - JMD + - JOD + - JPY + - KES + - KGS + - KHR + - KMF + - KPW + - KRW + - KWD + - KYD + - KZT + - LAK + - LBP + - LKR + - LRD + - LSL + - LTL + - LVL + - LYD + - MAD + - MDL + - MGA + - MKD + - MMK + - MNT + - MOP + - MRO + - MUR + - MVR + - MWK + - MXN + - MYR + - MZN + - NAD + - NGN + - NIO + - NOK + - NPR + - NZD + - OMR + - PAB + - PEN + - PGK + - PHP + - PKR + - PLN + - PYG + - QAR + - RON + - RSD + - RUB + - RWF + - SAR + - SBD + - SCR + - SDG + - SEK + - SGD + - SHP + - SLL + - SOS + - SPL + - SRD + - STD + - SVC + - SYP + - SZL + - THB + - TJS + - TMT + - TND + - TOP + - TRY + - TTD + - TVD + - TWD + - TZS + - UAH + - UGX + - USD + - UYU + - UZS + - VEF + - VND + - VUV + - WST + - XAF + - XAG + - XAU + - XCD + - XDR + - XFO + - XFU + - XOF + - XPD + - XPF + - XPT + - XTS + - XXX + - YER + - ZAR + - ZMK + - ZMW + - ZWD + - ZWL + - ZWN + - ZWR + limit: + $ref: '#/components/schemas/Model%208' + Model 10: + required: + - isActive + type: object + properties: + isActive: + type: boolean + description: Participant currency isActive boolean + Model 11: + required: + - reason + type: object + properties: + action: + type: string + enum: + - recordFundsOutCommit + - recordFundsOutAbort + reason: + type: string + Model 12: + required: + - autoPositionReset + - ledgerAccountType + - name + - requireLiquidityCheck + - settlementDelay + - settlementGranularity + - settlementInterchange + type: object + properties: + name: + maxLength: 30 + minLength: 2 + type: string + description: Name of the settlement model + x-format: + alphanum: true + settlementGranularity: + type: string + description: Granularity type for the settlement model GROSS or NET + enum: + - GROSS + - NET + settlementInterchange: + type: string + description: Interchange type for the settlement model BILATERAL or MULTILATERAL + enum: + - BILATERAL + - MULTILATERAL + settlementDelay: + type: string + description: Delay type for the settlement model IMMEDIATE or DEFERRED + enum: + - DEFERRED + - IMMEDIATE + currency: + type: string + description: Currency code + enum: + - AED + - AFA + - AFN + - ALL + - AMD + - ANG + - AOA + - AOR + - ARS + - AUD + - AWG + - AZN + - BAM + - BBD + - BDT + - BGN + - BHD + - BIF + - BMD + - BND + - BOB + - BOV + - BRL + - BSD + - BTN + - BWP + - BYN + - BYR + - BZD + - CAD + - CDF + - CHE + - CHF + - CHW + - CLF + - CLP + - CNY + - COP + - COU + - CRC + - CUC + - CUP + - CVE + - CZK + - DJF + - DKK + - DOP + - DZD + - EEK + - EGP + - ERN + - ETB + - EUR + - FJD + - FKP + - GBP + - GEL + - GGP + - GHS + - GIP + - GMD + - GNF + - GTQ + - GYD + - HKD + - HNL + - HRK + - HTG + - HUF + - IDR + - ILS + - IMP + - INR + - IQD + - IRR + - ISK + - JEP + - JMD + - JOD + - JPY + - KES + - KGS + - KHR + - KMF + - KPW + - KRW + - KWD + - KYD + - KZT + - LAK + - LBP + - LKR + - LRD + - LSL + - LTL + - LVL + - LYD + - MAD + - MDL + - MGA + - MKD + - MMK + - MNT + - MOP + - MRO + - MUR + - MVR + - MWK + - MXN + - MXV + - MYR + - MZN + - NAD + - NGN + - NIO + - NOK + - NPR + - NZD + - OMR + - PAB + - PEN + - PGK + - PHP + - PKR + - PLN + - PYG + - QAR + - RON + - RSD + - RUB + - RWF + - SAR + - SBD + - SCR + - SDG + - SEK + - SGD + - SHP + - SLL + - SOS + - SPL + - SRD + - SSP + - STD + - SVC + - SYP + - SZL + - THB + - TJS + - TMT + - TND + - TOP + - TRY + - TTD + - TVD + - TWD + - TZS + - UAH + - UGX + - USD + - USN + - UYI + - UYU + - UZS + - VEF + - VND + - VUV + - WST + - XAF + - XAG + - XAU + - XCD + - XDR + - XFO + - XFU + - XOF + - XPD + - XPF + - XPT + - XSU + - XTS + - XUA + - XXX + - YER + - ZAR + - ZMK + - ZMW + - ZWD + - ZWL + - ZWN + - ZWR + requireLiquidityCheck: + type: boolean + description: Liquidity Check boolean + ledgerAccountType: + type: string + description: Account type for the settlement model POSITION, SETTLEMENT + or INTERCHANGE_FEE + enum: + - INTERCHANGE_FEE + - POSITION + autoPositionReset: + type: boolean + description: Automatic position reset setting, which determines whether + to execute the settlement transfer or not + Model 13: + required: + - isActive + type: object + properties: + isActive: + type: boolean + description: settlementModel isActive boolean diff --git a/test/func/config/ttk-hub/spec_files/api_definitions/central_admin_old_9.3/response_map.json b/test/func/config/ttk-hub/spec_files/api_definitions/central_admin_old_9.3/response_map.json new file mode 100644 index 000000000..e04829cd6 --- /dev/null +++ b/test/func/config/ttk-hub/spec_files/api_definitions/central_admin_old_9.3/response_map.json @@ -0,0 +1,96 @@ +{ + "/health": { + "get": { + "response": {} + } + }, + "/metrics": { + "get": { + "response": {} + } + }, + "/participants": { + "get": { + "response": {} + }, + "post": { + "response": {} + } + }, + "/participants/limits": { + "get": { + "response": {} + } + }, + "/participants/{name}": { + "get": { + "response": {} + }, + "put": { + "response": {} + } + }, + "/participants/{name}/endpoints": { + "get": { + "response": {} + }, + "post": { + "response": {} + } + }, + "/participants/{name}/limits": { + "get": { + "response": {} + }, + "put": { + "response": {} + } + }, + "/participants/{name}/positions": { + "get": { + "response": {} + } + }, + "/participants/{name}/accounts": { + "get": { + "response": {} + }, + "post": { + "response": {} + } + }, + "/participants/{name}/initialPositionAndLimits": { + "post": { + "response": {} + } + }, + "/participants/{name}/accounts/{id}": { + "put": { + "response": {} + }, + "post": { + "response": {} + } + }, + "/participants/{name}/accounts/{id}/transfers/{transferId}": { + "put": { + "response": {} + } + }, + "/settlementModels": { + "get": { + "response": {} + }, + "post": { + "response": {} + } + }, + "/settlementModels/{name}": { + "get": { + "response": {} + }, + "put": { + "response": {} + } + } +} \ No newline at end of file diff --git a/test/func/config/ttk-hub/spec_files/api_definitions/fspiop_1.0/api_spec.yaml b/test/func/config/ttk-hub/spec_files/api_definitions/fspiop_1.0/api_spec.yaml new file mode 100644 index 000000000..506c582cb --- /dev/null +++ b/test/func/config/ttk-hub/spec_files/api_definitions/fspiop_1.0/api_spec.yaml @@ -0,0 +1,4187 @@ +openapi: 3.0.0 +info: + version: '1.0' + title: Open API for FSP Interoperability (FSPIOP) + description: >- + Based on API Definition.docx updated on 2018-03-13 Version 1.0. Note - The + API supports a maximum size of 65536 bytes (64 Kilobytes) in the HTTP + header. + license: + name: Open API for FSP Interoperability (FSPIOP) +paths: + '/participants/{ID}/error': + put: + description: >- + If there is an error during FSP information creation in the server, the + error callback PUT /participants//error is used. The in the URI should + contain the requestId that was used for the creation of the participant + information. + summary: ParticipantsByIDAndError + tags: + - participants + operationId: ParticipantsByIDAndError + parameters: + - $ref: '#/components/parameters/ID' + - $ref: '#/components/parameters/Content-Length' + - $ref: '#/components/parameters/Content-Type' + - $ref: '#/components/parameters/Date' + - $ref: '#/components/parameters/X-Forwarded-For' + - $ref: '#/components/parameters/FSPIOP-Source' + - $ref: '#/components/parameters/FSPIOP-Destination' + - $ref: '#/components/parameters/FSPIOP-Encryption' + - $ref: '#/components/parameters/FSPIOP-Signature' + - $ref: '#/components/parameters/FSPIOP-URI' + - $ref: '#/components/parameters/FSPIOP-HTTP-Method' + x-examples: + application/json: + errorInformation: + errorCode: '5100' + errorDescription: This is an error description + extensionList: + extension: + - key: errorDescription + value: This is a more detailed error description + - key: errorDescription + value: This is a more detailed error description + responses: + '200': + $ref: '#/components/responses/Response200' + '400': + $ref: '#/components/responses/ErrorResponse400' + '401': + $ref: '#/components/responses/ErrorResponse401' + '403': + $ref: '#/components/responses/ErrorResponse403' + '404': + $ref: '#/components/responses/ErrorResponse404' + '405': + $ref: '#/components/responses/ErrorResponse405' + '406': + $ref: '#/components/responses/ErrorResponse406' + '501': + $ref: '#/components/responses/ErrorResponse501' + '503': + $ref: '#/components/responses/ErrorResponse503' + requestBody: + $ref: '#/components/requestBodies/ErrorInformationObject' + '/participants/{ID}': + put: + description: >- + The callback PUT /participants/ is used to inform the client of the + result of the creation of the provided list of identities. + summary: ParticipantsByID + tags: + - participants + operationId: ParticipantsByIDPut + parameters: + - $ref: '#/components/parameters/ID' + - $ref: '#/components/parameters/Content-Length' + - $ref: '#/components/parameters/Content-Type' + - $ref: '#/components/parameters/Date' + - $ref: '#/components/parameters/X-Forwarded-For' + - $ref: '#/components/parameters/FSPIOP-Source' + - $ref: '#/components/parameters/FSPIOP-Destination' + - $ref: '#/components/parameters/FSPIOP-Encryption' + - $ref: '#/components/parameters/FSPIOP-Signature' + - $ref: '#/components/parameters/FSPIOP-URI' + - $ref: '#/components/parameters/FSPIOP-HTTP-Method' + x-examples: + application/json: + partyList: + - partyId: + partyIdType: PERSONAL_ID + partyIdentifier: personal_id + - partyId: + partyIdType: PERSONAL_ID + partyIdentifier: personal_id + currency: USD + responses: + '200': + $ref: '#/components/responses/Response200' + '400': + $ref: '#/components/responses/ErrorResponse400' + '401': + $ref: '#/components/responses/ErrorResponse401' + '403': + $ref: '#/components/responses/ErrorResponse403' + '404': + $ref: '#/components/responses/ErrorResponse404' + '405': + $ref: '#/components/responses/ErrorResponse405' + '406': + $ref: '#/components/responses/ErrorResponse406' + '501': + $ref: '#/components/responses/ErrorResponse501' + '503': + $ref: '#/components/responses/ErrorResponse503' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ParticipantsIDPutResponse' + required: true + '/participants/{Type}/{ID}/error': + put: + description: >- + If the server is unable to find, create or delete the associated FSP of + the provided identity, or another processing error occurred, the error + callback PUT /participants///error (or PUT /participants////error) is + used. + summary: ParticipantsErrorByTypeAndID + tags: + - participants + operationId: ParticipantsErrorByTypeAndID + parameters: + - $ref: '#/components/parameters/Type' + - $ref: '#/components/parameters/ID' + - $ref: '#/components/parameters/Content-Length' + - $ref: '#/components/parameters/Content-Type' + - $ref: '#/components/parameters/Date' + - $ref: '#/components/parameters/X-Forwarded-For' + - $ref: '#/components/parameters/FSPIOP-Source' + - $ref: '#/components/parameters/FSPIOP-Destination' + - $ref: '#/components/parameters/FSPIOP-Encryption' + - $ref: '#/components/parameters/FSPIOP-Signature' + - $ref: '#/components/parameters/FSPIOP-URI' + - $ref: '#/components/parameters/FSPIOP-HTTP-Method' + x-examples: + application/json: + errorInformation: + errorCode: '5100' + errorDescription: This is an error description + extensionList: + extension: + - key: errorDescription + value: This is a more detailed error description + - key: errorDescription + value: This is a more detailed error description + responses: + '200': + $ref: '#/components/responses/Response200' + '400': + $ref: '#/components/responses/ErrorResponse400' + '401': + $ref: '#/components/responses/ErrorResponse401' + '403': + $ref: '#/components/responses/ErrorResponse403' + '404': + $ref: '#/components/responses/ErrorResponse404' + '405': + $ref: '#/components/responses/ErrorResponse405' + '406': + $ref: '#/components/responses/ErrorResponse406' + '501': + $ref: '#/components/responses/ErrorResponse501' + '503': + $ref: '#/components/responses/ErrorResponse503' + requestBody: + $ref: '#/components/requestBodies/ErrorInformationObject' + '/participants/{Type}/{ID}/{SubId}/error': + put: + description: >- + If the server is unable to find, create or delete the associated FSP of + the provided identity, or another processing error occurred, the error + callback PUT /participants///error (or PUT /participants////error) is + used. + summary: ParticipantsSubIdErrorByTypeAndID + tags: + - participants + operationId: ParticipantsSubIdErrorByTypeAndID + parameters: + - $ref: '#/components/parameters/Type' + - $ref: '#/components/parameters/ID' + - $ref: '#/components/parameters/SubId' + - $ref: '#/components/parameters/Content-Length' + - $ref: '#/components/parameters/Content-Type' + - $ref: '#/components/parameters/Date' + - $ref: '#/components/parameters/X-Forwarded-For' + - $ref: '#/components/parameters/FSPIOP-Source' + - $ref: '#/components/parameters/FSPIOP-Destination' + - $ref: '#/components/parameters/FSPIOP-Encryption' + - $ref: '#/components/parameters/FSPIOP-Signature' + - $ref: '#/components/parameters/FSPIOP-URI' + - $ref: '#/components/parameters/FSPIOP-HTTP-Method' + x-examples: + application/json: + errorInformation: + errorCode: '5100' + errorDescription: This is an error description + extensionList: + extension: + - key: errorDescription + value: This is a more detailed error description + - key: errorDescription + value: This is a more detailed error description + responses: + '200': + $ref: '#/components/responses/Response200' + '400': + $ref: '#/components/responses/ErrorResponse400' + '401': + $ref: '#/components/responses/ErrorResponse401' + '403': + $ref: '#/components/responses/ErrorResponse403' + '404': + $ref: '#/components/responses/ErrorResponse404' + '405': + $ref: '#/components/responses/ErrorResponse405' + '406': + $ref: '#/components/responses/ErrorResponse406' + '501': + $ref: '#/components/responses/ErrorResponse501' + '503': + $ref: '#/components/responses/ErrorResponse503' + requestBody: + $ref: '#/components/requestBodies/ErrorInformationObject' + '/participants/{Type}/{ID}/{SubId}': + parameters: + - $ref: '#/components/parameters/Type' + - $ref: '#/components/parameters/ID' + - $ref: '#/components/parameters/SubId' + - $ref: '#/components/parameters/Content-Type' + - $ref: '#/components/parameters/Date' + - $ref: '#/components/parameters/X-Forwarded-For' + - $ref: '#/components/parameters/FSPIOP-Source' + - $ref: '#/components/parameters/FSPIOP-Destination' + - $ref: '#/components/parameters/FSPIOP-Encryption' + - $ref: '#/components/parameters/FSPIOP-Signature' + - $ref: '#/components/parameters/FSPIOP-URI' + - $ref: '#/components/parameters/FSPIOP-HTTP-Method' + get: + description: >- + The HTTP request GET /participants// (or GET /participants///) is used + to find out in which FSP the requested Party, defined by , and + optionally , is located (for example, GET + /participants/MSISDN/123456789, or GET + /participants/BUSINESS/shoecompany/employee1). This HTTP request should + support a query string for filtering of currency. To use filtering of + currency, the HTTP request GET /participants//?currency=XYZ should be + used, where XYZ is the requested currency. + summary: ParticipantsSubIdByTypeAndID + tags: + - participants + operationId: ParticipantsSubIdByTypeAndID + parameters: + - $ref: '#/components/parameters/Accept' + responses: + '202': + $ref: '#/components/responses/Response202' + '400': + $ref: '#/components/responses/ErrorResponse400' + '401': + $ref: '#/components/responses/ErrorResponse401' + '403': + $ref: '#/components/responses/ErrorResponse403' + '404': + $ref: '#/components/responses/ErrorResponse404' + '405': + $ref: '#/components/responses/ErrorResponse405' + '406': + $ref: '#/components/responses/ErrorResponse406' + '501': + $ref: '#/components/responses/ErrorResponse501' + '503': + $ref: '#/components/responses/ErrorResponse503' + put: + description: >- + The callback PUT /participants// (or PUT /participants///) is used to + inform the client of a successful result of the lookup, creation, or + deletion of the FSP information related to the Party. If the FSP + information is deleted, the fspId element should be empty; otherwise the + element should include the FSP information for the Party. + summary: ParticipantsSubIdByTypeAndID + tags: + - participants + operationId: ParticipantsSubIdByTypeAndID3 + parameters: + - $ref: '#/components/parameters/Content-Length' + x-examples: + application/json: + fspId: '1234' + responses: + '200': + $ref: '#/components/responses/Response200' + '400': + $ref: '#/components/responses/ErrorResponse400' + '401': + $ref: '#/components/responses/ErrorResponse401' + '403': + $ref: '#/components/responses/ErrorResponse403' + '404': + $ref: '#/components/responses/ErrorResponse404' + '405': + $ref: '#/components/responses/ErrorResponse405' + '406': + $ref: '#/components/responses/ErrorResponse406' + '501': + $ref: '#/components/responses/ErrorResponse501' + '503': + $ref: '#/components/responses/ErrorResponse503' + requestBody: + $ref: '#/components/requestBodies/ParticipantsTypeIDPutResponse' + post: + description: >- + The HTTP request POST /participants// (or POST /participants///) is used + to create information in the server regarding the provided identity, + defined by , , and optionally (for example, POST + /participants/MSISDN/123456789 or POST + /participants/BUSINESS/shoecompany/employee1). + summary: ParticipantsSubIdByTypeAndID + tags: + - participants + operationId: ParticipantsSubIdByTypeAndIDPost + parameters: + - $ref: '#/components/parameters/Accept' + - $ref: '#/components/parameters/Content-Length' + x-examples: + application/json: + fspId: '1234' + currency: USD + responses: + '202': + $ref: '#/components/responses/Response202' + '400': + $ref: '#/components/responses/ErrorResponse400' + '401': + $ref: '#/components/responses/ErrorResponse401' + '403': + $ref: '#/components/responses/ErrorResponse403' + '404': + $ref: '#/components/responses/ErrorResponse404' + '405': + $ref: '#/components/responses/ErrorResponse405' + '406': + $ref: '#/components/responses/ErrorResponse406' + '501': + $ref: '#/components/responses/ErrorResponse501' + '503': + $ref: '#/components/responses/ErrorResponse503' + requestBody: + $ref: '#/components/requestBodies/ParticipantsTypeIDSubIDPostRequest' + delete: + description: >- + The HTTP request DELETE /participants// (or DELETE /participants///) is + used to delete information in the server regarding the provided + identity, defined by and ) (for example, DELETE + /participants/MSISDN/123456789), and optionally . This HTTP request + should support a query string to delete FSP information regarding a + specific currency only. To delete a specific currency only, the HTTP + request DELETE /participants//?currency=XYZ should be used, where XYZ is + the requested currency. Note - The Account Lookup System should verify + that it is the Party’s current FSP that is deleting the FSP information. + summary: ParticipantsSubIdByTypeAndID + tags: + - participants + operationId: ParticipantsSubIdByTypeAndID2 + parameters: + - $ref: '#/components/parameters/Accept' + responses: + '202': + $ref: '#/components/responses/Response202' + '400': + $ref: '#/components/responses/ErrorResponse400' + '401': + $ref: '#/components/responses/ErrorResponse401' + '403': + $ref: '#/components/responses/ErrorResponse403' + '404': + $ref: '#/components/responses/ErrorResponse404' + '405': + $ref: '#/components/responses/ErrorResponse405' + '406': + $ref: '#/components/responses/ErrorResponse406' + '501': + $ref: '#/components/responses/ErrorResponse501' + '503': + $ref: '#/components/responses/ErrorResponse503' + '/participants/{Type}/{ID}': + parameters: + - $ref: '#/components/parameters/Type' + - $ref: '#/components/parameters/ID' + - $ref: '#/components/parameters/Content-Type' + - $ref: '#/components/parameters/Date' + - $ref: '#/components/parameters/X-Forwarded-For' + - $ref: '#/components/parameters/FSPIOP-Source' + - $ref: '#/components/parameters/FSPIOP-Destination' + - $ref: '#/components/parameters/FSPIOP-Encryption' + - $ref: '#/components/parameters/FSPIOP-Signature' + - $ref: '#/components/parameters/FSPIOP-URI' + - $ref: '#/components/parameters/FSPIOP-HTTP-Method' + get: + description: >- + The HTTP request GET /participants// (or GET /participants///) is used + to find out in which FSP the requested Party, defined by , and + optionally , is located (for example, GET + /participants/MSISDN/123456789, or GET + /participants/BUSINESS/shoecompany/employee1). This HTTP request should + support a query string for filtering of currency. To use filtering of + currency, the HTTP request GET /participants//?currency=XYZ should be + used, where XYZ is the requested currency. + summary: ParticipantsByTypeAndID + tags: + - participants + operationId: ParticipantsByTypeAndID + parameters: + - $ref: '#/components/parameters/Accept' + responses: + '202': + $ref: '#/components/responses/Response202' + '400': + $ref: '#/components/responses/ErrorResponse400' + '401': + $ref: '#/components/responses/ErrorResponse401' + '403': + $ref: '#/components/responses/ErrorResponse403' + '404': + $ref: '#/components/responses/ErrorResponse404' + '405': + $ref: '#/components/responses/ErrorResponse405' + '406': + $ref: '#/components/responses/ErrorResponse406' + '501': + $ref: '#/components/responses/ErrorResponse501' + '503': + $ref: '#/components/responses/ErrorResponse503' + put: + description: >- + The callback PUT /participants// (or PUT /participants///) is used to + inform the client of a successful result of the lookup, creation, or + deletion of the FSP information related to the Party. If the FSP + information is deleted, the fspId element should be empty; otherwise the + element should include the FSP information for the Party. + summary: ParticipantsByTypeAndID + tags: + - participants + operationId: ParticipantsByTypeAndID3 + parameters: + - $ref: '#/components/parameters/Content-Length' + x-examples: + application/json: + fspId: '1234' + responses: + '200': + $ref: '#/components/responses/Response200' + '400': + $ref: '#/components/responses/ErrorResponse400' + '401': + $ref: '#/components/responses/ErrorResponse401' + '403': + $ref: '#/components/responses/ErrorResponse403' + '404': + $ref: '#/components/responses/ErrorResponse404' + '405': + $ref: '#/components/responses/ErrorResponse405' + '406': + $ref: '#/components/responses/ErrorResponse406' + '501': + $ref: '#/components/responses/ErrorResponse501' + '503': + $ref: '#/components/responses/ErrorResponse503' + requestBody: + $ref: '#/components/requestBodies/ParticipantsTypeIDPutResponse' + post: + description: >- + The HTTP request POST /participants// (or POST /participants///) is used + to create information in the server regarding the provided identity, + defined by , , and optionally (for example, POST + /participants/MSISDN/123456789 or POST + /participants/BUSINESS/shoecompany/employee1). + summary: ParticipantsByIDAndType + tags: + - participants + operationId: ParticipantsByIDAndType + parameters: + - $ref: '#/components/parameters/Accept' + - $ref: '#/components/parameters/Content-Length' + x-examples: + application/json: + fspId: '1234' + currency: USD + responses: + '202': + $ref: '#/components/responses/Response202' + '400': + $ref: '#/components/responses/ErrorResponse400' + '401': + $ref: '#/components/responses/ErrorResponse401' + '403': + $ref: '#/components/responses/ErrorResponse403' + '404': + $ref: '#/components/responses/ErrorResponse404' + '405': + $ref: '#/components/responses/ErrorResponse405' + '406': + $ref: '#/components/responses/ErrorResponse406' + '501': + $ref: '#/components/responses/ErrorResponse501' + '503': + $ref: '#/components/responses/ErrorResponse503' + requestBody: + $ref: '#/components/requestBodies/ParticipantsTypeIDSubIDPostRequest' + delete: + description: >- + The HTTP request DELETE /participants// (or DELETE /participants///) is + used to delete information in the server regarding the provided + identity, defined by and ) (for example, DELETE + /participants/MSISDN/123456789), and optionally . This HTTP request + should support a query string to delete FSP information regarding a + specific currency only. To delete a specific currency only, the HTTP + request DELETE /participants//?currency=XYZ should be used, where XYZ is + the requested currency. Note - The Account Lookup System should verify + that it is the Party’s current FSP that is deleting the FSP information. + summary: ParticipantsByTypeAndID + tags: + - participants + operationId: ParticipantsByTypeAndID2 + parameters: + - $ref: '#/components/parameters/Accept' + responses: + '202': + $ref: '#/components/responses/Response202' + '400': + $ref: '#/components/responses/ErrorResponse400' + '401': + $ref: '#/components/responses/ErrorResponse401' + '403': + $ref: '#/components/responses/ErrorResponse403' + '404': + $ref: '#/components/responses/ErrorResponse404' + '405': + $ref: '#/components/responses/ErrorResponse405' + '406': + $ref: '#/components/responses/ErrorResponse406' + '501': + $ref: '#/components/responses/ErrorResponse501' + '503': + $ref: '#/components/responses/ErrorResponse503' + /participants: + post: + description: >- + The HTTP request POST /participants is used to create information in the + server regarding the provided list of identities. This request should be + used for bulk creation of FSP information for more than one Party. The + optional currency parameter should indicate that each provided Party + supports the currency + summary: Participants + tags: + - participants + operationId: Participants1 + parameters: + - $ref: '#/components/parameters/Accept' + - $ref: '#/components/parameters/Content-Length' + - $ref: '#/components/parameters/Content-Type' + - $ref: '#/components/parameters/Date' + - $ref: '#/components/parameters/X-Forwarded-For' + - $ref: '#/components/parameters/FSPIOP-Source' + - $ref: '#/components/parameters/FSPIOP-Destination' + - $ref: '#/components/parameters/FSPIOP-Encryption' + - $ref: '#/components/parameters/FSPIOP-Signature' + - $ref: '#/components/parameters/FSPIOP-URI' + - $ref: '#/components/parameters/FSPIOP-HTTP-Method' + x-examples: + application/json: + requestId: b51ec534-ee48-4575-b6a9-ead2955b8069 + partyList: + - partyIdType: PERSONAL_ID + partyIdentifier: '16135551212' + partySubIdOrType: PASSPORT + fspId: '1234' + - partyIdType: PERSONAL_ID + partyIdentifier: '16135551234' + partySubIdOrType: DRIVING_LICENSE + fspId: '1234' + currency: USD + responses: + '202': + $ref: '#/components/responses/Response202' + '400': + $ref: '#/components/responses/ErrorResponse400' + '401': + $ref: '#/components/responses/ErrorResponse401' + '403': + $ref: '#/components/responses/ErrorResponse403' + '404': + $ref: '#/components/responses/ErrorResponse404' + '405': + $ref: '#/components/responses/ErrorResponse405' + '406': + $ref: '#/components/responses/ErrorResponse406' + '501': + $ref: '#/components/responses/ErrorResponse501' + '503': + $ref: '#/components/responses/ErrorResponse503' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ParticipantsPostRequest' + required: true + '/parties/{Type}/{ID}': + parameters: + - $ref: '#/components/parameters/Type' + - $ref: '#/components/parameters/ID' + - $ref: '#/components/parameters/Content-Type' + - $ref: '#/components/parameters/Date' + - $ref: '#/components/parameters/X-Forwarded-For' + - $ref: '#/components/parameters/FSPIOP-Source' + - $ref: '#/components/parameters/FSPIOP-Destination' + - $ref: '#/components/parameters/FSPIOP-Encryption' + - $ref: '#/components/parameters/FSPIOP-Signature' + - $ref: '#/components/parameters/FSPIOP-URI' + - $ref: '#/components/parameters/FSPIOP-HTTP-Method' + get: + description: >- + The HTTP request GET /parties// (or GET /parties///) is used to lookup + information regarding the requested Party, defined by , and optionally + (for example, GET /parties/MSISDN/123456789, or GET + /parties/BUSINESS/shoecompany/employee1). + summary: PartiesByTypeAndID + tags: + - parties + operationId: PartiesByTypeAndID + parameters: + - $ref: '#/components/parameters/Accept' + responses: + '202': + $ref: '#/components/responses/Response202' + '400': + $ref: '#/components/responses/ErrorResponse400' + '401': + $ref: '#/components/responses/ErrorResponse401' + '403': + $ref: '#/components/responses/ErrorResponse403' + '404': + $ref: '#/components/responses/ErrorResponse404' + '405': + $ref: '#/components/responses/ErrorResponse405' + '406': + $ref: '#/components/responses/ErrorResponse406' + '501': + $ref: '#/components/responses/ErrorResponse501' + '503': + $ref: '#/components/responses/ErrorResponse503' + put: + description: >- + The callback PUT /parties// (or PUT /parties///) is used to inform the + client of a successful result of the Party information lookup. + summary: PartiesByTypeAndID2 + tags: + - parties + operationId: PartiesByTypeAndID2 + parameters: + - $ref: '#/components/parameters/Content-Length' + x-examples: + application/json: + party: + partyIdInfo: + partyIdType: PERSONAL_ID + partyIdentifier: '16135551212' + partySubIdOrType: DRIVING_LICENSE + fspId: '1234' + merchantClassificationCode: '4321' + name: Justin Trudeau + personalInfo: + complexName: + firstName: Justin + middleName: Pierre + lastName: Trudeau + dateOfBirth: '1971-12-25' + responses: + '200': + $ref: '#/components/responses/Response200' + '400': + $ref: '#/components/responses/ErrorResponse400' + '401': + $ref: '#/components/responses/ErrorResponse401' + '403': + $ref: '#/components/responses/ErrorResponse403' + '404': + $ref: '#/components/responses/ErrorResponse404' + '405': + $ref: '#/components/responses/ErrorResponse405' + '406': + $ref: '#/components/responses/ErrorResponse406' + '501': + $ref: '#/components/responses/ErrorResponse501' + '503': + $ref: '#/components/responses/ErrorResponse503' + requestBody: + $ref: '#/components/requestBodies/PartiesTypeIDPutResponse' + '/parties/{Type}/{ID}/error': + put: + description: >- + If the server is unable to find Party information of the provided + identity, or another processing error occurred, the error callback PUT + /parties///error (or PUT /parties////error) is used. + summary: PartiesErrorByTypeAndID + tags: + - parties + operationId: PartiesErrorByTypeAndID + parameters: + - $ref: '#/components/parameters/Type' + - $ref: '#/components/parameters/ID' + - $ref: '#/components/parameters/Content-Length' + - $ref: '#/components/parameters/Content-Type' + - $ref: '#/components/parameters/Date' + - $ref: '#/components/parameters/X-Forwarded-For' + - $ref: '#/components/parameters/FSPIOP-Source' + - $ref: '#/components/parameters/FSPIOP-Destination' + - $ref: '#/components/parameters/FSPIOP-Encryption' + - $ref: '#/components/parameters/FSPIOP-Signature' + - $ref: '#/components/parameters/FSPIOP-URI' + - $ref: '#/components/parameters/FSPIOP-HTTP-Method' + x-examples: + application/json: + errorInformation: + errorCode: '5100' + errorDescription: This is an error description + extensionList: + extension: + - key: errorDescription + value: This is a more detailed error description + - key: errorDescription + value: This is a more detailed error description + responses: + '200': + $ref: '#/components/responses/Response200' + '400': + $ref: '#/components/responses/ErrorResponse400' + '401': + $ref: '#/components/responses/ErrorResponse401' + '403': + $ref: '#/components/responses/ErrorResponse403' + '404': + $ref: '#/components/responses/ErrorResponse404' + '405': + $ref: '#/components/responses/ErrorResponse405' + '406': + $ref: '#/components/responses/ErrorResponse406' + '501': + $ref: '#/components/responses/ErrorResponse501' + '503': + $ref: '#/components/responses/ErrorResponse503' + requestBody: + $ref: '#/components/requestBodies/ErrorInformationObject' + '/parties/{Type}/{ID}/{SubId}': + parameters: + - $ref: '#/components/parameters/Type' + - $ref: '#/components/parameters/ID' + - $ref: '#/components/parameters/SubId' + - $ref: '#/components/parameters/Content-Type' + - $ref: '#/components/parameters/Date' + - $ref: '#/components/parameters/X-Forwarded-For' + - $ref: '#/components/parameters/FSPIOP-Source' + - $ref: '#/components/parameters/FSPIOP-Destination' + - $ref: '#/components/parameters/FSPIOP-Encryption' + - $ref: '#/components/parameters/FSPIOP-Signature' + - $ref: '#/components/parameters/FSPIOP-URI' + - $ref: '#/components/parameters/FSPIOP-HTTP-Method' + get: + description: >- + The HTTP request GET /parties// (or GET /parties///) is used to lookup + information regarding the requested Party, defined by , and optionally + (for example, GET /parties/MSISDN/123456789, or GET + /parties/BUSINESS/shoecompany/employee1). + summary: PartiesSubIdByTypeAndID + tags: + - parties + operationId: PartiesSubIdByTypeAndID + parameters: + - $ref: '#/components/parameters/Accept' + responses: + '202': + $ref: '#/components/responses/Response202' + '400': + $ref: '#/components/responses/ErrorResponse400' + '401': + $ref: '#/components/responses/ErrorResponse401' + '403': + $ref: '#/components/responses/ErrorResponse403' + '404': + $ref: '#/components/responses/ErrorResponse404' + '405': + $ref: '#/components/responses/ErrorResponse405' + '406': + $ref: '#/components/responses/ErrorResponse406' + '501': + $ref: '#/components/responses/ErrorResponse501' + '503': + $ref: '#/components/responses/ErrorResponse503' + put: + description: >- + The callback PUT /parties// (or PUT /parties///) is used to inform the + client of a successful result of the Party information lookup. + summary: PartiesSubIdByTypeAndID + tags: + - parties + operationId: PartiesSubIdByTypeAndIDPut + parameters: + - $ref: '#/components/parameters/Content-Length' + x-examples: + application/json: + party: + partyIdInfo: + partyIdType: PERSONAL_ID + partyIdentifier: '16135551212' + partySubIdOrType: DRIVING_LICENSE + fspId: '1234' + merchantClassificationCode: '4321' + name: Justin Trudeau + personalInfo: + complexName: + firstName: Justin + middleName: Pierre + lastName: Trudeau + dateOfBirth: '1971-12-25' + responses: + '200': + $ref: '#/components/responses/Response200' + '400': + $ref: '#/components/responses/ErrorResponse400' + '401': + $ref: '#/components/responses/ErrorResponse401' + '403': + $ref: '#/components/responses/ErrorResponse403' + '404': + $ref: '#/components/responses/ErrorResponse404' + '405': + $ref: '#/components/responses/ErrorResponse405' + '406': + $ref: '#/components/responses/ErrorResponse406' + '501': + $ref: '#/components/responses/ErrorResponse501' + '503': + $ref: '#/components/responses/ErrorResponse503' + requestBody: + $ref: '#/components/requestBodies/PartiesTypeIDPutResponse' + '/parties/{Type}/{ID}/{SubId}/error': + put: + description: >- + If the server is unable to find Party information of the provided + identity, or another processing error occurred, the error callback PUT + /parties///error (or PUT /parties////error) is used. + summary: PartiesSubIdErrorByTypeAndID + tags: + - parties + operationId: PartiesSubIdErrorByTypeAndID + parameters: + - $ref: '#/components/parameters/Type' + - $ref: '#/components/parameters/ID' + - $ref: '#/components/parameters/SubId' + - $ref: '#/components/parameters/Content-Length' + - $ref: '#/components/parameters/Content-Type' + - $ref: '#/components/parameters/Date' + - $ref: '#/components/parameters/X-Forwarded-For' + - $ref: '#/components/parameters/FSPIOP-Source' + - $ref: '#/components/parameters/FSPIOP-Destination' + - $ref: '#/components/parameters/FSPIOP-Encryption' + - $ref: '#/components/parameters/FSPIOP-Signature' + - $ref: '#/components/parameters/FSPIOP-URI' + - $ref: '#/components/parameters/FSPIOP-HTTP-Method' + x-examples: + application/json: + errorInformation: + errorCode: '5100' + errorDescription: This is an error description + extensionList: + extension: + - key: errorDescription + value: This is a more detailed error description + - key: errorDescription + value: This is a more detailed error description + responses: + '200': + $ref: '#/components/responses/Response200' + '400': + $ref: '#/components/responses/ErrorResponse400' + '401': + $ref: '#/components/responses/ErrorResponse401' + '403': + $ref: '#/components/responses/ErrorResponse403' + '404': + $ref: '#/components/responses/ErrorResponse404' + '405': + $ref: '#/components/responses/ErrorResponse405' + '406': + $ref: '#/components/responses/ErrorResponse406' + '501': + $ref: '#/components/responses/ErrorResponse501' + '503': + $ref: '#/components/responses/ErrorResponse503' + requestBody: + $ref: '#/components/requestBodies/ErrorInformationObject' + '/transactionRequests/{ID}/error': + put: + description: >- + If the server is unable to find or create a transaction request, or + another processing error occurs, the error callback PUT + /transactionRequests//error is used. The in the URI should contain the + transactionRequestId that was used for the creation of the transaction + request, or the that was used in the GET /transactionRequests/. + summary: TransactionRequestsErrorByID + tags: + - transactionRequests + operationId: TransactionRequestsErrorByID + parameters: + - $ref: '#/components/parameters/ID' + - $ref: '#/components/parameters/Content-Length' + - $ref: '#/components/parameters/Content-Type' + - $ref: '#/components/parameters/Date' + - $ref: '#/components/parameters/X-Forwarded-For' + - $ref: '#/components/parameters/FSPIOP-Source' + - $ref: '#/components/parameters/FSPIOP-Destination' + - $ref: '#/components/parameters/FSPIOP-Encryption' + - $ref: '#/components/parameters/FSPIOP-Signature' + - $ref: '#/components/parameters/FSPIOP-URI' + - $ref: '#/components/parameters/FSPIOP-HTTP-Method' + x-examples: + application/json: + errorInformation: + errorCode: '5100' + errorDescription: This is an error description + extensionList: + extension: + - key: errorDescription + value: This is a more detailed error description + - key: errorDescription + value: This is a more detailed error description + responses: + '200': + $ref: '#/components/responses/Response200' + '400': + $ref: '#/components/responses/ErrorResponse400' + '401': + $ref: '#/components/responses/ErrorResponse401' + '403': + $ref: '#/components/responses/ErrorResponse403' + '404': + $ref: '#/components/responses/ErrorResponse404' + '405': + $ref: '#/components/responses/ErrorResponse405' + '406': + $ref: '#/components/responses/ErrorResponse406' + '501': + $ref: '#/components/responses/ErrorResponse501' + '503': + $ref: '#/components/responses/ErrorResponse503' + requestBody: + $ref: '#/components/requestBodies/ErrorInformationObject' + '/transactionRequests/{ID}': + parameters: + - $ref: '#/components/parameters/ID' + - $ref: '#/components/parameters/Content-Type' + - $ref: '#/components/parameters/Date' + - $ref: '#/components/parameters/X-Forwarded-For' + - $ref: '#/components/parameters/FSPIOP-Source' + - $ref: '#/components/parameters/FSPIOP-Destination' + - $ref: '#/components/parameters/FSPIOP-Encryption' + - $ref: '#/components/parameters/FSPIOP-Signature' + - $ref: '#/components/parameters/FSPIOP-URI' + - $ref: '#/components/parameters/FSPIOP-HTTP-Method' + get: + description: >- + The HTTP request GET /transactionRequests/ is used to get information + regarding an earlier created or requested transaction request. The in + the URI should contain the transactionRequestId that was used for the + creation of the transaction request. + summary: TransactionRequestsByID + tags: + - transactionRequests + operationId: TransactionRequestsByID + parameters: + - $ref: '#/components/parameters/Accept' + responses: + '202': + $ref: '#/components/responses/Response202' + '400': + $ref: '#/components/responses/ErrorResponse400' + '401': + $ref: '#/components/responses/ErrorResponse401' + '403': + $ref: '#/components/responses/ErrorResponse403' + '404': + $ref: '#/components/responses/ErrorResponse404' + '405': + $ref: '#/components/responses/ErrorResponse405' + '406': + $ref: '#/components/responses/ErrorResponse406' + '501': + $ref: '#/components/responses/ErrorResponse501' + '503': + $ref: '#/components/responses/ErrorResponse503' + put: + description: >- + The callback PUT /transactionRequests/ is used to inform the client of a + requested or created transaction request. The in the URI should contain + the transactionRequestId that was used for the creation of the + transaction request, or the that was used in the GET + /transactionRequests/. + summary: TransactionRequestsByID + tags: + - transactionRequests + operationId: TransactionRequestsByIDPut + parameters: + - $ref: '#/components/parameters/Content-Length' + x-examples: + application/json: + transactionId: b51ec534-ee48-4575-b6a9-ead2955b8069 + transactionRequestState: RECEIVED + extensionList: + extension: + - key: errorDescription + value: This is a more detailed error description + - key: errorDescription + value: This is a more detailed error description + responses: + '200': + $ref: '#/components/responses/Response200' + '400': + $ref: '#/components/responses/ErrorResponse400' + '401': + $ref: '#/components/responses/ErrorResponse401' + '403': + $ref: '#/components/responses/ErrorResponse403' + '404': + $ref: '#/components/responses/ErrorResponse404' + '405': + $ref: '#/components/responses/ErrorResponse405' + '406': + $ref: '#/components/responses/ErrorResponse406' + '501': + $ref: '#/components/responses/ErrorResponse501' + '503': + $ref: '#/components/responses/ErrorResponse503' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TransactionRequestsIDPutResponse' + required: true + /transactionRequests: + post: + description: >- + The HTTP request POST /transactionRequests is used to request the + creation of a transaction request for the provided financial transaction + in the server. + summary: TransactionRequests + tags: + - transactionRequests + operationId: TransactionRequests + parameters: + - $ref: '#/components/parameters/Accept' + - $ref: '#/components/parameters/Content-Length' + - $ref: '#/components/parameters/Content-Type' + - $ref: '#/components/parameters/Date' + - $ref: '#/components/parameters/X-Forwarded-For' + - $ref: '#/components/parameters/FSPIOP-Source' + - $ref: '#/components/parameters/FSPIOP-Destination' + - $ref: '#/components/parameters/FSPIOP-Encryption' + - $ref: '#/components/parameters/FSPIOP-Signature' + - $ref: '#/components/parameters/FSPIOP-URI' + - $ref: '#/components/parameters/FSPIOP-HTTP-Method' + x-examples: + application/json: + transactionRequestId: b51ec534-ee48-4575-b6a9-ead2955b8069 + payee: + partyIdInfo: + partyIdType: PERSONAL_ID + partyIdentifier: '16135551212' + partySubIdOrType: DRIVING_LICENSE + fspId: '1234' + merchantClassificationCode: '4321' + name: Justin Trudeau + personalInfo: + complexName: + firstName: Justin + middleName: Pierre + lastName: Trudeau + dateOfBirth: '1971-12-25' + payer: + partyIdType: PERSONAL_ID + partyIdentifier: '16135551212' + partySubIdOrType: DRIVING_LICENSE + fspId: '1234' + amount: + currency: USD + amount: '123.45' + transactionType: + scenario: DEPOSIT + subScenario: locally defined sub-scenario + initiator: PAYEE + initiatorType: CONSUMER + refundInfo: + originalTransactionId: b51ec534-ee48-4575-b6a9-ead2955b8069 + refundReason: free text indicating reason for the refund + balanceOfPayments: '123' + note: Free-text memo + geoCode: + latitude: '+45.4215' + longitude: '+75.6972' + authenticationType: OTP + expiration: '2016-05-24T08:38:08.699-04:00' + extensionList: + extension: + - key: errorDescription + value: This is a more detailed error description + - key: errorDescription + value: This is a more detailed error description + responses: + '202': + $ref: '#/components/responses/Response202' + '400': + $ref: '#/components/responses/ErrorResponse400' + '401': + $ref: '#/components/responses/ErrorResponse401' + '403': + $ref: '#/components/responses/ErrorResponse403' + '404': + $ref: '#/components/responses/ErrorResponse404' + '405': + $ref: '#/components/responses/ErrorResponse405' + '406': + $ref: '#/components/responses/ErrorResponse406' + '501': + $ref: '#/components/responses/ErrorResponse501' + '503': + $ref: '#/components/responses/ErrorResponse503' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TransactionRequestsPostRequest' + required: true + '/quotes/{ID}/error': + put: + description: >- + If the server is unable to find or create a quote, or some other + processing error occurs, the error callback PUT /quotes//error is used. + The in the URI should contain the quoteId that was used for the + creation of the quote, or the that was used in the GET /quotes/. + summary: QuotesByIDAndError + tags: + - quotes + operationId: QuotesByIDAndError + parameters: + - $ref: '#/components/parameters/ID' + - $ref: '#/components/parameters/Content-Length' + - $ref: '#/components/parameters/Content-Type' + - $ref: '#/components/parameters/Date' + - $ref: '#/components/parameters/X-Forwarded-For' + - $ref: '#/components/parameters/FSPIOP-Source' + - $ref: '#/components/parameters/FSPIOP-Destination' + - $ref: '#/components/parameters/FSPIOP-Encryption' + - $ref: '#/components/parameters/FSPIOP-Signature' + - $ref: '#/components/parameters/FSPIOP-URI' + - $ref: '#/components/parameters/FSPIOP-HTTP-Method' + x-examples: + application/json: + errorInformation: + errorCode: '5100' + errorDescription: This is an error description + extensionList: + extension: + - key: errorDescription + value: This is a more detailed error description + - key: errorDescription + value: This is a more detailed error description + responses: + '200': + $ref: '#/components/responses/Response200' + '400': + $ref: '#/components/responses/ErrorResponse400' + '401': + $ref: '#/components/responses/ErrorResponse401' + '403': + $ref: '#/components/responses/ErrorResponse403' + '404': + $ref: '#/components/responses/ErrorResponse404' + '405': + $ref: '#/components/responses/ErrorResponse405' + '406': + $ref: '#/components/responses/ErrorResponse406' + '501': + $ref: '#/components/responses/ErrorResponse501' + '503': + $ref: '#/components/responses/ErrorResponse503' + requestBody: + $ref: '#/components/requestBodies/ErrorInformationObject' + '/quotes/{ID}': + parameters: + - $ref: '#/components/parameters/ID' + - $ref: '#/components/parameters/Content-Type' + - $ref: '#/components/parameters/Date' + - $ref: '#/components/parameters/X-Forwarded-For' + - $ref: '#/components/parameters/FSPIOP-Source' + - $ref: '#/components/parameters/FSPIOP-Destination' + - $ref: '#/components/parameters/FSPIOP-Encryption' + - $ref: '#/components/parameters/FSPIOP-Signature' + - $ref: '#/components/parameters/FSPIOP-URI' + - $ref: '#/components/parameters/FSPIOP-HTTP-Method' + get: + description: >- + The HTTP request GET /quotes/ is used to get information regarding an + earlier created or requested quote. The in the URI should contain the + quoteId that was used for the creation of the quote. + summary: QuotesByID + tags: + - quotes + operationId: QuotesByID + parameters: + - $ref: '#/components/parameters/Accept' + responses: + '202': + $ref: '#/components/responses/Response202' + '400': + $ref: '#/components/responses/ErrorResponse400' + '401': + $ref: '#/components/responses/ErrorResponse401' + '403': + $ref: '#/components/responses/ErrorResponse403' + '404': + $ref: '#/components/responses/ErrorResponse404' + '405': + $ref: '#/components/responses/ErrorResponse405' + '406': + $ref: '#/components/responses/ErrorResponse406' + '501': + $ref: '#/components/responses/ErrorResponse501' + '503': + $ref: '#/components/responses/ErrorResponse503' + put: + description: >- + The callback PUT /quotes/ is used to inform the client of a requested or + created quote. The in the URI should contain the quoteId that was used + for the creation of the quote, or the that was used in the GET + /quotes/GET /quotes/. + summary: QuotesByID + tags: + - quotes + operationId: QuotesByID1 + parameters: + - $ref: '#/components/parameters/Content-Length' + x-examples: + application/json: + transferAmount: + currency: USD + amount: '124.45' + payeeReceiveAmount: + currency: USD + amount: '123.45' + payeeFspFee: + currency: USD + amount: '1.45' + payeeFspCommission: + currency: USD + amount: '0' + expiration: '2016-05-24T08:38:08.699-04:00' + geoCode: + latitude: '+45.4215' + longitude: '+75.6972' + ilpPacket: >- + AYIBgQAAAAAAAASwNGxldmVsb25lLmRmc3AxLm1lci45T2RTOF81MDdqUUZERmZlakgyOVc4bXFmNEpLMHlGTFGCAUBQU0svMS4wCk5vbmNlOiB1SXlweUYzY3pYSXBFdzVVc05TYWh3CkVuY3J5cHRpb246IG5vbmUKUGF5bWVudC1JZDogMTMyMzZhM2ItOGZhOC00MTYzLTg0NDctNGMzZWQzZGE5OGE3CgpDb250ZW50LUxlbmd0aDogMTM1CkNvbnRlbnQtVHlwZTogYXBwbGljYXRpb24vanNvbgpTZW5kZXItSWRlbnRpZmllcjogOTI4MDYzOTEKCiJ7XCJmZWVcIjowLFwidHJhbnNmZXJDb2RlXCI6XCJpbnZvaWNlXCIsXCJkZWJpdE5hbWVcIjpcImFsaWNlIGNvb3BlclwiLFwiY3JlZGl0TmFtZVwiOlwibWVyIGNoYW50XCIsXCJkZWJpdElkZW50aWZpZXJcIjpcIjkyODA2MzkxXCJ9IgA + condition: f5sqb7tBTWPd5Y8BDFdMm9BJR_MNI4isf8p8n4D5pHA + extensionList: + extension: + - key: errorDescription + value: This is a more detailed error description + - key: errorDescription + value: This is a more detailed error description + responses: + '200': + $ref: '#/components/responses/Response200' + '400': + $ref: '#/components/responses/ErrorResponse400' + '401': + $ref: '#/components/responses/ErrorResponse401' + '403': + $ref: '#/components/responses/ErrorResponse403' + '404': + $ref: '#/components/responses/ErrorResponse404' + '405': + $ref: '#/components/responses/ErrorResponse405' + '406': + $ref: '#/components/responses/ErrorResponse406' + '501': + $ref: '#/components/responses/ErrorResponse501' + '503': + $ref: '#/components/responses/ErrorResponse503' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/QuotesIDPutResponse' + required: true + /quotes: + post: + description: >- + The HTTP request POST /quotes is used to request the creation of a quote + for the provided financial transaction in the server. + summary: Quotes + tags: + - quotes + operationId: Quotes + parameters: + - $ref: '#/components/parameters/Accept' + - $ref: '#/components/parameters/Content-Length' + - $ref: '#/components/parameters/Content-Type' + - $ref: '#/components/parameters/Date' + - $ref: '#/components/parameters/X-Forwarded-For' + - $ref: '#/components/parameters/FSPIOP-Source' + - $ref: '#/components/parameters/FSPIOP-Destination' + - $ref: '#/components/parameters/FSPIOP-Encryption' + - $ref: '#/components/parameters/FSPIOP-Signature' + - $ref: '#/components/parameters/FSPIOP-URI' + - $ref: '#/components/parameters/FSPIOP-HTTP-Method' + x-examples: + application/json: + quoteId: b51ec534-ee48-4575-b6a9-ead2955b8069 + transactionId: a8323bc6-c228-4df2-ae82-e5a997baf899 + transactionRequestId: a8323bc6-c228-4df2-ae82-e5a997baf890 + payee: + partyIdInfo: + partyIdType: PERSONAL_ID + partyIdentifier: '16135551212' + partySubIdOrType: DRIVING_LICENSE + fspId: '1234' + merchantClassificationCode: '4321' + name: Justin Trudeau + personalInfo: + complexName: + firstName: Justin + middleName: Pierre + lastName: Trudeau + dateOfBirth: '1971-12-25' + payer: + partyIdInfo: + partyIdType: PERSONAL_ID + partyIdentifier: '16135551212' + partySubIdOrType: PASSPORT + fspId: '1234' + merchantClassificationCode: '1234' + name: Donald Trump + personalInfo: + complexName: + firstName: Donald + middleName: John + lastName: Trump + dateOfBirth: '1946-06-14' + amountType: SEND + amount: + currency: USD + amount: '123.45' + fees: + currency: USD + amount: '1.25' + transactionType: + scenario: DEPOSIT + subScenario: locally defined sub-scenario + initiator: PAYEE + initiatorType: CONSUMER + refundInfo: + originalTransactionId: b51ec534-ee48-4575-b6a9-ead2955b8069 + refundReason: free text indicating reason for the refund + balanceOfPayments: '123' + geoCode: + latitude: '+45.4215' + longitude: '+75.6972' + note: Free-text memo + expiration: '2016-05-24T08:38:08.699-04:00' + extensionList: + extension: + - key: errorDescription + value: This is a more detailed error description + - key: errorDescription + value: This is a more detailed error description + responses: + '202': + $ref: '#/components/responses/Response202' + '400': + $ref: '#/components/responses/ErrorResponse400' + '401': + $ref: '#/components/responses/ErrorResponse401' + '403': + $ref: '#/components/responses/ErrorResponse403' + '404': + $ref: '#/components/responses/ErrorResponse404' + '405': + $ref: '#/components/responses/ErrorResponse405' + '406': + $ref: '#/components/responses/ErrorResponse406' + '501': + $ref: '#/components/responses/ErrorResponse501' + '503': + $ref: '#/components/responses/ErrorResponse503' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/QuotesPostRequest' + required: true + '/authorizations/{ID}': + parameters: + - $ref: '#/components/parameters/ID' + - $ref: '#/components/parameters/Content-Type' + - $ref: '#/components/parameters/Date' + - $ref: '#/components/parameters/X-Forwarded-For' + - $ref: '#/components/parameters/FSPIOP-Source' + - $ref: '#/components/parameters/FSPIOP-Destination' + - $ref: '#/components/parameters/FSPIOP-Encryption' + - $ref: '#/components/parameters/FSPIOP-Signature' + - $ref: '#/components/parameters/FSPIOP-URI' + - $ref: '#/components/parameters/FSPIOP-HTTP-Method' + get: + description: >- + The HTTP request GET /authorizations/ is used to request the Payer to + enter the applicable credentials in the Payee FSP system. The in the + URI should contain the transactionRequestID, received from the POST + /transactionRequests service earlier in the process. This request + requires a query string to be included in the URI, with the following + key-value pairs - authenticationType=, where value is a valid + authentication type from the enumeration AuthenticationType. + retriesLeft==, where is the number of retries left before the financial + transaction is rejected. must be expressed in the form of the data type + Integer. retriesLeft=1 means that this is the last retry before the + financial transaction is rejected. amount=, where is the transaction + amount that will be withdrawn from the Payer’s account. must be + expressed in the form of the data type Amount. currency=, where is the + transaction currency for the amount that will be withdrawn from the + Payer’s account. The value must be expressed in the form of the + enumeration CurrencyCode. An example URI containing all the required + key-value pairs in the query string is the following - GET + /authorization/3d492671-b7af-4f3f-88de-76169b1bdf88?authenticationType=OTP&retriesLeft=2&amount=102¤cy=USD + summary: AuthorizationsByID + tags: + - authorizations + operationId: AuthorizationsByIDGet + parameters: + - $ref: '#/components/parameters/Accept' + responses: + '202': + $ref: '#/components/responses/Response202' + '400': + $ref: '#/components/responses/ErrorResponse400' + '401': + $ref: '#/components/responses/ErrorResponse401' + '403': + $ref: '#/components/responses/ErrorResponse403' + '404': + $ref: '#/components/responses/ErrorResponse404' + '405': + $ref: '#/components/responses/ErrorResponse405' + '406': + $ref: '#/components/responses/ErrorResponse406' + '501': + $ref: '#/components/responses/ErrorResponse501' + '503': + $ref: '#/components/responses/ErrorResponse503' + put: + description: >- + The callback PUT /authorizations/ is used to inform the client of the + result of a previously-requested authorization. The in the URI should + contain the that was used in the GET /authorizations/. + summary: AuthorizationsByID + tags: + - authorizations + operationId: AuthorizationsByIDPut + parameters: + - $ref: '#/components/parameters/Content-Length' + x-examples: + application/json: + authenticationInfo: + authentication: OTP + authenticationValue: '1234' + responseType: ENTERED + responses: + '200': + $ref: '#/components/responses/Response200' + '400': + $ref: '#/components/responses/ErrorResponse400' + '401': + $ref: '#/components/responses/ErrorResponse401' + '403': + $ref: '#/components/responses/ErrorResponse403' + '404': + $ref: '#/components/responses/ErrorResponse404' + '405': + $ref: '#/components/responses/ErrorResponse405' + '406': + $ref: '#/components/responses/ErrorResponse406' + '501': + $ref: '#/components/responses/ErrorResponse501' + '503': + $ref: '#/components/responses/ErrorResponse503' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AuthorizationsIDPutResponse' + required: true + '/authorizations/{ID}/error': + put: + description: >- + If the server is unable to find the transaction request, or another + processing error occurs, the error callback PUT /authorizations//error + is used. The in the URI should contain the that was used in the GET + /authorizations/. + summary: AuthorizationsByIDAndError + tags: + - authorizations + operationId: AuthorizationsByIDAndError + parameters: + - $ref: '#/components/parameters/ID' + - $ref: '#/components/parameters/Content-Length' + - $ref: '#/components/parameters/Content-Type' + - $ref: '#/components/parameters/Date' + - $ref: '#/components/parameters/X-Forwarded-For' + - $ref: '#/components/parameters/FSPIOP-Source' + - $ref: '#/components/parameters/FSPIOP-Destination' + - $ref: '#/components/parameters/FSPIOP-Encryption' + - $ref: '#/components/parameters/FSPIOP-Signature' + - $ref: '#/components/parameters/FSPIOP-URI' + - $ref: '#/components/parameters/FSPIOP-HTTP-Method' + x-examples: + application/json: + errorInformation: + errorCode: '5100' + errorDescription: This is an error description + extensionList: + extension: + - key: errorDescription + value: This is a more detailed error description + - key: errorDescription + value: This is a more detailed error description + responses: + '200': + $ref: '#/components/responses/Response200' + '400': + $ref: '#/components/responses/ErrorResponse400' + '401': + $ref: '#/components/responses/ErrorResponse401' + '403': + $ref: '#/components/responses/ErrorResponse403' + '404': + $ref: '#/components/responses/ErrorResponse404' + '405': + $ref: '#/components/responses/ErrorResponse405' + '406': + $ref: '#/components/responses/ErrorResponse406' + '501': + $ref: '#/components/responses/ErrorResponse501' + '503': + $ref: '#/components/responses/ErrorResponse503' + requestBody: + $ref: '#/components/requestBodies/ErrorInformationObject' + '/transfers/{ID}': + parameters: + - $ref: '#/components/parameters/ID' + - $ref: '#/components/parameters/Content-Type' + - $ref: '#/components/parameters/Date' + - $ref: '#/components/parameters/X-Forwarded-For' + - $ref: '#/components/parameters/FSPIOP-Source' + - $ref: '#/components/parameters/FSPIOP-Destination' + - $ref: '#/components/parameters/FSPIOP-Encryption' + - $ref: '#/components/parameters/FSPIOP-Signature' + - $ref: '#/components/parameters/FSPIOP-URI' + - $ref: '#/components/parameters/FSPIOP-HTTP-Method' + get: + description: >- + The HTTP request GET /transfers/ is used to get information regarding an + earlier created or requested transfer. The in the URI should contain + the transferId that was used for the creation of the transfer. + summary: TransfersByIDGet + tags: + - transfers + operationId: TransfersByIDGet + parameters: + - $ref: '#/components/parameters/Accept' + responses: + '202': + $ref: '#/components/responses/Response202' + '400': + $ref: '#/components/responses/ErrorResponse400' + '401': + $ref: '#/components/responses/ErrorResponse401' + '403': + $ref: '#/components/responses/ErrorResponse403' + '404': + $ref: '#/components/responses/ErrorResponse404' + '405': + $ref: '#/components/responses/ErrorResponse405' + '406': + $ref: '#/components/responses/ErrorResponse406' + '501': + $ref: '#/components/responses/ErrorResponse501' + '503': + $ref: '#/components/responses/ErrorResponse503' + put: + description: >- + The callback PUT /transfers/ is used to inform the client of a requested + or created transfer. The in the URI should contain the transferId that + was used for the creation of the transfer, or the that was used in the + GET /transfers/. + summary: TransfersByIDPut + tags: + - transfers + operationId: TransfersByIDPut + parameters: + - $ref: '#/components/parameters/Content-Length' + x-examples: + application/json: + fulfilment: WLctttbu2HvTsa1XWvUoGRcQozHsqeu9Ahl2JW9Bsu8 + completedTimestamp: '2016-05-24T08:38:08.699-04:00' + transferState: RESERVED + extensionList: + extension: + - key: errorDescription + value: This is a more detailed error description + - key: errorDescription + value: This is a more detailed error description + responses: + '200': + $ref: '#/components/responses/Response200' + '400': + $ref: '#/components/responses/ErrorResponse400' + '401': + $ref: '#/components/responses/ErrorResponse401' + '403': + $ref: '#/components/responses/ErrorResponse403' + '404': + $ref: '#/components/responses/ErrorResponse404' + '405': + $ref: '#/components/responses/ErrorResponse405' + '406': + $ref: '#/components/responses/ErrorResponse406' + '501': + $ref: '#/components/responses/ErrorResponse501' + '503': + $ref: '#/components/responses/ErrorResponse503' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TransfersIDPutResponse' + required: true + '/transfers/{ID}/error': + put: + description: >- + If the server is unable to find or create a transfer, or another + processing error occurs, the error callback PUT /transfers//error is + used. The in the URI should contain the transferId that was used for + the creation of the transfer, or the that was used in the GET + /transfers/. + summary: TransfersByIDAndError + tags: + - transfers + operationId: TransfersByIDAndError + parameters: + - $ref: '#/components/parameters/ID' + - $ref: '#/components/parameters/Content-Length' + - $ref: '#/components/parameters/Content-Type' + - $ref: '#/components/parameters/Date' + - $ref: '#/components/parameters/X-Forwarded-For' + - $ref: '#/components/parameters/FSPIOP-Source' + - $ref: '#/components/parameters/FSPIOP-Destination' + - $ref: '#/components/parameters/FSPIOP-Encryption' + - $ref: '#/components/parameters/FSPIOP-Signature' + - $ref: '#/components/parameters/FSPIOP-URI' + - $ref: '#/components/parameters/FSPIOP-HTTP-Method' + x-examples: + application/json: + errorInformation: + errorCode: '5100' + errorDescription: This is an error description + extensionList: + extension: + - key: errorDescription + value: This is a more detailed error description + - key: errorDescription + value: This is a more detailed error description + responses: + '200': + $ref: '#/components/responses/Response200' + '400': + $ref: '#/components/responses/ErrorResponse400' + '401': + $ref: '#/components/responses/ErrorResponse401' + '403': + $ref: '#/components/responses/ErrorResponse403' + '404': + $ref: '#/components/responses/ErrorResponse404' + '405': + $ref: '#/components/responses/ErrorResponse405' + '406': + $ref: '#/components/responses/ErrorResponse406' + '501': + $ref: '#/components/responses/ErrorResponse501' + '503': + $ref: '#/components/responses/ErrorResponse503' + requestBody: + $ref: '#/components/requestBodies/ErrorInformationObject' + /transfers: + post: + description: >- + The HTTP request POST /transfers is used to request the creation of a + transfer for the next ledger, and a financial transaction for the Payee + FSP. + summary: Transfers + tags: + - transfers + operationId: transfers + parameters: + - $ref: '#/components/parameters/Accept' + - $ref: '#/components/parameters/Content-Length' + - $ref: '#/components/parameters/Content-Type' + - $ref: '#/components/parameters/Date' + - $ref: '#/components/parameters/X-Forwarded-For' + - $ref: '#/components/parameters/FSPIOP-Source' + - $ref: '#/components/parameters/FSPIOP-Destination' + - $ref: '#/components/parameters/FSPIOP-Encryption' + - $ref: '#/components/parameters/FSPIOP-Signature' + - $ref: '#/components/parameters/FSPIOP-URI' + - $ref: '#/components/parameters/FSPIOP-HTTP-Method' + x-examples: + application/json: + transferId: b51ec534-ee48-4575-b6a9-ead2955b8069 + payeeFsp: '1234' + payerFsp: '5678' + amount: + currency: USD + amount: '123.45' + ilpPacket: >- + AYIBgQAAAAAAAASwNGxldmVsb25lLmRmc3AxLm1lci45T2RTOF81MDdqUUZERmZlakgyOVc4bXFmNEpLMHlGTFGCAUBQU0svMS4wCk5vbmNlOiB1SXlweUYzY3pYSXBFdzVVc05TYWh3CkVuY3J5cHRpb246IG5vbmUKUGF5bWVudC1JZDogMTMyMzZhM2ItOGZhOC00MTYzLTg0NDctNGMzZWQzZGE5OGE3CgpDb250ZW50LUxlbmd0aDogMTM1CkNvbnRlbnQtVHlwZTogYXBwbGljYXRpb24vanNvbgpTZW5kZXItSWRlbnRpZmllcjogOTI4MDYzOTEKCiJ7XCJmZWVcIjowLFwidHJhbnNmZXJDb2RlXCI6XCJpbnZvaWNlXCIsXCJkZWJpdE5hbWVcIjpcImFsaWNlIGNvb3BlclwiLFwiY3JlZGl0TmFtZVwiOlwibWVyIGNoYW50XCIsXCJkZWJpdElkZW50aWZpZXJcIjpcIjkyODA2MzkxXCJ9IgA + condition: f5sqb7tBTWPd5Y8BDFdMm9BJR_MNI4isf8p8n4D5pHA + expiration: '2016-05-24T08:38:08.699-04:00' + extensionList: + extension: + - key: errorDescription + value: This is a more detailed error description + - key: errorDescription + value: This is a more detailed error description + responses: + '202': + $ref: '#/components/responses/Response202' + '400': + $ref: '#/components/responses/ErrorResponse400' + '401': + $ref: '#/components/responses/ErrorResponse401' + '403': + $ref: '#/components/responses/ErrorResponse403' + '404': + $ref: '#/components/responses/ErrorResponse404' + '405': + $ref: '#/components/responses/ErrorResponse405' + '406': + $ref: '#/components/responses/ErrorResponse406' + '501': + $ref: '#/components/responses/ErrorResponse501' + '503': + $ref: '#/components/responses/ErrorResponse503' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TransfersPostRequest' + required: true + '/transactions/{ID}': + parameters: + - $ref: '#/components/parameters/ID' + - $ref: '#/components/parameters/Content-Type' + - $ref: '#/components/parameters/Date' + - $ref: '#/components/parameters/X-Forwarded-For' + - $ref: '#/components/parameters/FSPIOP-Source' + - $ref: '#/components/parameters/FSPIOP-Destination' + - $ref: '#/components/parameters/FSPIOP-Encryption' + - $ref: '#/components/parameters/FSPIOP-Signature' + - $ref: '#/components/parameters/FSPIOP-URI' + - $ref: '#/components/parameters/FSPIOP-HTTP-Method' + get: + description: >- + The HTTP request GET /transactions/ is used to get transaction + information regarding a financial transaction created earlier. The in + the URI should contain the transactionId that was used for the creation + of the quote, as the transaction is created as part of another process + (the transfer process). + summary: TransactionsByID + tags: + - transactions + operationId: TransactionsByID + parameters: + - $ref: '#/components/parameters/Accept' + responses: + '202': + $ref: '#/components/responses/Response202' + '400': + $ref: '#/components/responses/ErrorResponse400' + '401': + $ref: '#/components/responses/ErrorResponse401' + '403': + $ref: '#/components/responses/ErrorResponse403' + '404': + $ref: '#/components/responses/ErrorResponse404' + '405': + $ref: '#/components/responses/ErrorResponse405' + '406': + $ref: '#/components/responses/ErrorResponse406' + '501': + $ref: '#/components/responses/ErrorResponse501' + '503': + $ref: '#/components/responses/ErrorResponse503' + put: + description: >- + The callback PUT /transactions/ is used to inform the client of a + requested transaction. The in the URI should contain the that was used + in the GET /transactions/. + summary: TransactionsByID + tags: + - transactions + operationId: TransactionsByID1 + parameters: + - $ref: '#/components/parameters/Content-Length' + x-examples: + application/json: + completedTimestamp": '2016-05-24T08:38:08.699-04:00' + transactionState: RECEIVED + code: Test-Code + extensionList: + extension: + - key: errorDescription + value: This is a more detailed error description + - key: errorDescription + value: This is a more detailed error description + responses: + '200': + $ref: '#/components/responses/Response200' + '400': + $ref: '#/components/responses/ErrorResponse400' + '401': + $ref: '#/components/responses/ErrorResponse401' + '403': + $ref: '#/components/responses/ErrorResponse403' + '404': + $ref: '#/components/responses/ErrorResponse404' + '405': + $ref: '#/components/responses/ErrorResponse405' + '406': + $ref: '#/components/responses/ErrorResponse406' + '501': + $ref: '#/components/responses/ErrorResponse501' + '503': + $ref: '#/components/responses/ErrorResponse503' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TransactionsIDPutResponse' + required: true + '/transactions/{ID}/error': + put: + description: >- + If the server is unable to find or create a transaction, or another + processing error occurs, the error callback PUT /transactions//error is + used. The in the URI should contain the that was used in the GET + /transactions/. + summary: TransactionsErrorByID + tags: + - transactions + operationId: TransactionsErrorByID + parameters: + - $ref: '#/components/parameters/ID' + - $ref: '#/components/parameters/Content-Length' + - $ref: '#/components/parameters/Content-Type' + - $ref: '#/components/parameters/Date' + - $ref: '#/components/parameters/X-Forwarded-For' + - $ref: '#/components/parameters/FSPIOP-Source' + - $ref: '#/components/parameters/FSPIOP-Destination' + - $ref: '#/components/parameters/FSPIOP-Encryption' + - $ref: '#/components/parameters/FSPIOP-Signature' + - $ref: '#/components/parameters/FSPIOP-URI' + - $ref: '#/components/parameters/FSPIOP-HTTP-Method' + x-examples: + application/json: + errorInformation: + errorCode: '5100' + errorDescription: This is an error description + extensionList: + extension: + - key: errorDescription + value: This is a more detailed error description + - key: errorDescription + value: This is a more detailed error description + responses: + '200': + $ref: '#/components/responses/Response200' + '400': + $ref: '#/components/responses/ErrorResponse400' + '401': + $ref: '#/components/responses/ErrorResponse401' + '403': + $ref: '#/components/responses/ErrorResponse403' + '404': + $ref: '#/components/responses/ErrorResponse404' + '405': + $ref: '#/components/responses/ErrorResponse405' + '406': + $ref: '#/components/responses/ErrorResponse406' + '501': + $ref: '#/components/responses/ErrorResponse501' + '503': + $ref: '#/components/responses/ErrorResponse503' + requestBody: + $ref: '#/components/requestBodies/ErrorInformationObject' + '/bulkQuotes/{ID}/error': + put: + description: >- + If the server is unable to find or create a bulk quote, or another + processing error occurs, the error callback PUT /bulkQuotes//error is + used. The in the URI should contain the bulkQuoteId that was used for + the creation of the bulk quote, or the that was used in the GET + /bulkQuotes/. + summary: BulkQuotesErrorByID + tags: + - bulkQuotes + operationId: BulkQuotesErrorByID + parameters: + - $ref: '#/components/parameters/ID' + - $ref: '#/components/parameters/Content-Length' + - $ref: '#/components/parameters/Content-Type' + - $ref: '#/components/parameters/Date' + - $ref: '#/components/parameters/X-Forwarded-For' + - $ref: '#/components/parameters/FSPIOP-Source' + - $ref: '#/components/parameters/FSPIOP-Destination' + - $ref: '#/components/parameters/FSPIOP-Encryption' + - $ref: '#/components/parameters/FSPIOP-Signature' + - $ref: '#/components/parameters/FSPIOP-URI' + - $ref: '#/components/parameters/FSPIOP-HTTP-Method' + x-examples: + application/json: + errorInformation: + errorCode: '5100' + errorDescription: This is an error description + extensionList: + extension: + - key: errorDescription + value: This is a more detailed error description + - key: errorDescription + value: This is a more detailed error description + responses: + '200': + $ref: '#/components/responses/Response200' + '400': + $ref: '#/components/responses/ErrorResponse400' + '401': + $ref: '#/components/responses/ErrorResponse401' + '403': + $ref: '#/components/responses/ErrorResponse403' + '404': + $ref: '#/components/responses/ErrorResponse404' + '405': + $ref: '#/components/responses/ErrorResponse405' + '406': + $ref: '#/components/responses/ErrorResponse406' + '501': + $ref: '#/components/responses/ErrorResponse501' + '503': + $ref: '#/components/responses/ErrorResponse503' + requestBody: + $ref: '#/components/requestBodies/ErrorInformationObject' + '/bulkQuotes/{ID}': + parameters: + - $ref: '#/components/parameters/ID' + - $ref: '#/components/parameters/Content-Type' + - $ref: '#/components/parameters/Date' + - $ref: '#/components/parameters/X-Forwarded-For' + - $ref: '#/components/parameters/FSPIOP-Source' + - $ref: '#/components/parameters/FSPIOP-Destination' + - $ref: '#/components/parameters/FSPIOP-Encryption' + - $ref: '#/components/parameters/FSPIOP-Signature' + - $ref: '#/components/parameters/FSPIOP-URI' + - $ref: '#/components/parameters/FSPIOP-HTTP-Method' + get: + description: >- + The HTTP request GET /bulkQuotes/ is used to get information regarding + an earlier created or requested bulk quote. The in the URI should + contain the bulkQuoteId that was used for the creation of the bulk + quote. + summary: BulkQuotesByID + tags: + - bulkQuotes + operationId: BulkQuotesByID + parameters: + - $ref: '#/components/parameters/Accept' + responses: + '202': + $ref: '#/components/responses/Response202' + '400': + $ref: '#/components/responses/ErrorResponse400' + '401': + $ref: '#/components/responses/ErrorResponse401' + '403': + $ref: '#/components/responses/ErrorResponse403' + '404': + $ref: '#/components/responses/ErrorResponse404' + '405': + $ref: '#/components/responses/ErrorResponse405' + '406': + $ref: '#/components/responses/ErrorResponse406' + '501': + $ref: '#/components/responses/ErrorResponse501' + '503': + $ref: '#/components/responses/ErrorResponse503' + put: + description: >- + The callback PUT /bulkQuotes/ is used to inform the client of a + requested or created bulk quote. The in the URI should contain the + bulkQuoteId that was used for the creation of the bulk quote, or the + that was used in the GET /bulkQuotes/. + summary: BulkQuotesByID + tags: + - bulkQuotes + operationId: BulkQuotesByID1 + parameters: + - $ref: '#/components/parameters/Content-Length' + x-examples: + application/json: + individualQuoteResults: + - quoteId: b51ec534-ee48-4575-b6a9-ead2955b8069 + payee: + partyIdInfo: + partyIdType: PERSONAL_ID + partyIdentifier: '16135551212' + partySubIdOrType: DRIVING_LICENSE + fspId: '1234' + merchantClassificationCode: '4321' + name: Justin Trudeau + personalInfo: + complexName: + firstName: Justin + middleName: Pierre + lastName: Trudeau + dateOfBirth: '1971-12-25' + receiveAmount: + currency: USD + amount: '123.45' + payeeFspFee: + currency: USD + amount: '1.45' + payeeFspCommission: + currency: USD + amount: '1.45' + ilpPacket: >- + AYIBgQAAAAAAAASwNGxldmVsb25lLmRmc3AxLm1lci45T2RTOF81MDdqUUZERmZlakgyOVc4bXFmNEpLMHlGTFGCAUBQU0svMS4wCk5vbmNlOiB1SXlweUYzY3pYSXBFdzVVc05TYWh3CkVuY3J5cHRpb246IG5vbmUKUGF5bWVudC1JZDogMTMyMzZhM2ItOGZhOC00MTYzLTg0NDctNGMzZWQzZGE5OGE3CgpDb250ZW50LUxlbmd0aDogMTM1CkNvbnRlbnQtVHlwZTogYXBwbGljYXRpb24vanNvbgpTZW5kZXItSWRlbnRpZmllcjogOTI4MDYzOTEKCiJ7XCJmZWVcIjowLFwidHJhbnNmZXJDb2RlXCI6XCJpbnZvaWNlXCIsXCJkZWJpdE5hbWVcIjpcImFsaWNlIGNvb3BlclwiLFwiY3JlZGl0TmFtZVwiOlwibWVyIGNoYW50XCIsXCJkZWJpdElkZW50aWZpZXJcIjpcIjkyODA2MzkxXCJ9IgA + condition: f5sqb7tBTWPd5Y8BDFdMm9BJR_MNI4isf8p8n4D5pHA + errorInformation: + errorCode: '5100' + errorDescription: This is an error description + extensionList: + extension: + - key: errorDescription + value: This is a more detailed error description + - key: errorDescription + value: This is a more detailed error description + extensionList: + extension: + - key: errorDescription + value: This is a more detailed error description + - key: errorDescription + value: This is a more detailed error description + expiration: '2016-05-24T08:38:08.699-04:00' + extensionList: + extension: + - key: errorDescription + value: This is a more detailed error description + - key: errorDescription + value: This is a more detailed error description + responses: + '200': + $ref: '#/components/responses/Response200' + '400': + $ref: '#/components/responses/ErrorResponse400' + '401': + $ref: '#/components/responses/ErrorResponse401' + '403': + $ref: '#/components/responses/ErrorResponse403' + '404': + $ref: '#/components/responses/ErrorResponse404' + '405': + $ref: '#/components/responses/ErrorResponse405' + '406': + $ref: '#/components/responses/ErrorResponse406' + '501': + $ref: '#/components/responses/ErrorResponse501' + '503': + $ref: '#/components/responses/ErrorResponse503' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/BulkQuotesIDPutResponse' + required: true + /bulkQuotes: + post: + description: >- + The HTTP request POST /bulkQuotes is used to request the creation of a + bulk quote for the provided financial transactions in the server. + summary: BulkQuotes + tags: + - bulkQuotes + operationId: BulkQuotes + parameters: + - $ref: '#/components/parameters/Accept' + - $ref: '#/components/parameters/Content-Length' + - $ref: '#/components/parameters/Content-Type' + - $ref: '#/components/parameters/Date' + - $ref: '#/components/parameters/X-Forwarded-For' + - $ref: '#/components/parameters/FSPIOP-Source' + - $ref: '#/components/parameters/FSPIOP-Destination' + - $ref: '#/components/parameters/FSPIOP-Encryption' + - $ref: '#/components/parameters/FSPIOP-Signature' + - $ref: '#/components/parameters/FSPIOP-URI' + - $ref: '#/components/parameters/FSPIOP-HTTP-Method' + x-examples: + application/json: + bulkQuoteId: b51ec534-ee48-4575-b6a9-ead2955b8069 + payer: + partyIdInfo: + partyIdType: PERSONAL_ID + partyIdentifier: '16135551212' + partySubIdOrType: PASSPORT + fspId: '1234' + merchantClassificationCode: '1234' + name: Justin Trudeau + personalInfo: + complexName: + firstName: Justin + middleName: Pierre + lastName: Trudeau + dateOfBirth: '1971-12-25' + geoCode: + latitude: '+45.4215' + longitude: '+75.6972' + individualQuotes: + - quoteId: b51ec534-ee48-4575-b6a9-ead2955b8069 + transactionId: b51ec534-ee48-4575-b6a9-ead2955b8069 + payee: + partyIdInfo: + partyIdType: PERSONAL_ID + partyIdentifier: '16135551212' + partySubIdOrType: PASSPORT + fspId: '1234' + merchantClassificationCode: '1234' + name: Justin Trudeau + personalInfo: + complexName: + firstName: Justin + middleName: Pierre + lastName: Trudeau + dateOfBirth: '1971-12-25' + amountType: RECEIVE + amount: + currency: USD + amount: '123.45' + fees: + currency: USD + amount: '1.45' + transactionType: + scenario: DEPOSIT + subScenario: locally defined sub-scenario + initiator: PAYEE + initiatorType: CONSUMER + refundInfo: + originalTransactionId: b51ec534-ee48-4575-b6a9-ead2955b8069 + refundReason: free text indicating reason for the refund + balanceOfPayments: '123' + note: Note sent to Payee + extensionList: + extension: + - key: errorDescription + value: This is a more detailed error description + - key: errorDescription + value: This is a more detailed error description + expiration: '2016-05-24T08:38:08.699-04:00' + extensionList: + extension: + - key: errorDescription + value: This is a more detailed error description + - key: errorDescription + value: This is a more detailed error description + responses: + '202': + $ref: '#/components/responses/Response202' + '400': + $ref: '#/components/responses/ErrorResponse400' + '401': + $ref: '#/components/responses/ErrorResponse401' + '403': + $ref: '#/components/responses/ErrorResponse403' + '404': + $ref: '#/components/responses/ErrorResponse404' + '405': + $ref: '#/components/responses/ErrorResponse405' + '406': + $ref: '#/components/responses/ErrorResponse406' + '501': + $ref: '#/components/responses/ErrorResponse501' + '503': + $ref: '#/components/responses/ErrorResponse503' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/BulkQuotesPostRequest' + required: true + '/bulkTransfers/{ID}': + parameters: + - $ref: '#/components/parameters/ID' + - $ref: '#/components/parameters/Content-Type' + - $ref: '#/components/parameters/Date' + - $ref: '#/components/parameters/X-Forwarded-For' + - $ref: '#/components/parameters/FSPIOP-Source' + - $ref: '#/components/parameters/FSPIOP-Destination' + - $ref: '#/components/parameters/FSPIOP-Encryption' + - $ref: '#/components/parameters/FSPIOP-Signature' + - $ref: '#/components/parameters/FSPIOP-URI' + - $ref: '#/components/parameters/FSPIOP-HTTP-Method' + get: + description: >- + The HTTP request GET /bulkTransfers/ is used to get information + regarding an earlier created or requested bulk transfer. The in the URI + should contain the bulkTransferId that was used for the creation of the + bulk transfer. + summary: BulkTransferByID + tags: + - bulkTransfers + operationId: BulkTransferByID + parameters: + - $ref: '#/components/parameters/Accept' + responses: + '202': + $ref: '#/components/responses/Response202' + '400': + $ref: '#/components/responses/ErrorResponse400' + '401': + $ref: '#/components/responses/ErrorResponse401' + '403': + $ref: '#/components/responses/ErrorResponse403' + '404': + $ref: '#/components/responses/ErrorResponse404' + '405': + $ref: '#/components/responses/ErrorResponse405' + '406': + $ref: '#/components/responses/ErrorResponse406' + '501': + $ref: '#/components/responses/ErrorResponse501' + '503': + $ref: '#/components/responses/ErrorResponse503' + put: + description: >- + The callback PUT /bulkTransfers/ is used to inform the client of a + requested or created bulk transfer. The in the URI should contain the + bulkTransferId that was used for the creation of the bulk transfer (POST + /bulkTransfers), or the that was used in the GET /bulkTransfers/. + summary: BulkTransfersByIDPut + tags: + - bulkTransfers + operationId: BulkTransfersByIDPut + parameters: + - $ref: '#/components/parameters/Content-Length' + x-examples: + application/json: + completedTimestamp": '2016-05-24T08:38:08.699-04:00' + individualTransferResults: + - transferId: b51ec534-ee48-4575-b6a9-ead2955b8069 + fulfilment: WLctttbu2HvTsa1XWvUoGRcQozHsqeu9Ahl2JW9Bsu8 + errorInformation: + errorCode: '5100' + errorDescription: This is an error description + extensionList: + extension: + - key: errorDescription + value: This is a more detailed error description + - key: errorDescription + value: This is a more detailed error description + extensionList: + extension: + - key: errorDescription + value: This is a more detailed error description + - key: errorDescription + value: This is a more detailed error description + - transferId: a8323bc6-c228-4df2-ae82-e5a997baf890 + fulfilment: WLctttbu2HvTsa1XWvUoGRcQozHsqeu9Ahl2JW9Bsu8 + errorInformation: + errorCode: '5100' + errorDescription: This is an error description + extensionList: + extension: + - key: errorDescription + value: This is a more detailed error description + - key: errorDescription + value: This is a more detailed error description + extensionList: + extension: + - key: errorDescription + value: This is a more detailed error description + - key: errorDescription + value: This is a more detailed error description + bulkTransferState: RECEIVED + extensionList: + extension: + - key: errorDescription + value: This is a more detailed error description + - key: errorDescription + value: This is a more detailed error description + responses: + '200': + $ref: '#/components/responses/Response200' + '400': + $ref: '#/components/responses/ErrorResponse400' + '401': + $ref: '#/components/responses/ErrorResponse401' + '403': + $ref: '#/components/responses/ErrorResponse403' + '404': + $ref: '#/components/responses/ErrorResponse404' + '405': + $ref: '#/components/responses/ErrorResponse405' + '406': + $ref: '#/components/responses/ErrorResponse406' + '501': + $ref: '#/components/responses/ErrorResponse501' + '503': + $ref: '#/components/responses/ErrorResponse503' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/BulkTransfersIDPutResponse' + required: true + /bulkTransfers: + post: + description: >- + The HTTP request POST /bulkTransfers is used to request the creation of + a bulk transfer in the server. + summary: BulkTransfers + tags: + - bulkTransfers + operationId: BulkTransfers + parameters: + - $ref: '#/components/parameters/Accept' + - $ref: '#/components/parameters/Content-Length' + - $ref: '#/components/parameters/Content-Type' + - $ref: '#/components/parameters/Date' + - $ref: '#/components/parameters/X-Forwarded-For' + - $ref: '#/components/parameters/FSPIOP-Source' + - $ref: '#/components/parameters/FSPIOP-Destination' + - $ref: '#/components/parameters/FSPIOP-Encryption' + - $ref: '#/components/parameters/FSPIOP-Signature' + - $ref: '#/components/parameters/FSPIOP-URI' + - $ref: '#/components/parameters/FSPIOP-HTTP-Method' + x-examples: + application/json: + bulkTransferId: b51ec534-ee48-4575-b6a9-ead2955b8069 + bulkQuoteId: b51ec534-ee48-4575-b6a9-ead2955b8069 + payeeFsp: '1234' + payerFsp: '5678' + individualTransfers: + - transferId: b51ec534-ee48-4575-b6a9-ead2955b8069 + transferAmount: + currency: USD + amount: '123.45' + ilpPacket: >- + AYIBgQAAAAAAAASwNGxldmVsb25lLmRmc3AxLm1lci45T2RTOF81MDdqUUZERmZlakgyOVc4bXFmNEpLMHlGTFGCAUBQU0svMS4wCk5vbmNlOiB1SXlweUYzY3pYSXBFdzVVc05TYWh3CkVuY3J5cHRpb246IG5vbmUKUGF5bWVudC1JZDogMTMyMzZhM2ItOGZhOC00MTYzLTg0NDctNGMzZWQzZGE5OGE3CgpDb250ZW50LUxlbmd0aDogMTM1CkNvbnRlbnQtVHlwZTogYXBwbGljYXRpb24vanNvbgpTZW5kZXItSWRlbnRpZmllcjogOTI4MDYzOTEKCiJ7XCJmZWVcIjowLFwidHJhbnNmZXJDb2RlXCI6XCJpbnZvaWNlXCIsXCJkZWJpdE5hbWVcIjpcImFsaWNlIGNvb3BlclwiLFwiY3JlZGl0TmFtZVwiOlwibWVyIGNoYW50XCIsXCJkZWJpdElkZW50aWZpZXJcIjpcIjkyODA2MzkxXCJ9IgA + condition: f5sqb7tBTWPd5Y8BDFdMm9BJR_MNI4isf8p8n4D5pHA + extensionList: + extension: + - key: errorDescription + value: This is a more detailed error description + - key: errorDescription + value: This is a more detailed error description + - transferId: b51ec534-ee48-4575-b6a9-ead2955b8069 + transferAmount: + currency: USD + amount: '1233.55' + ilpPacket: >- + AYIBgQAAAAAAAASwNGxldmVsb25lLmRmc3AxLm1lci45T2RTOF81MDdqUUZERmZlakgyOVc4bXFmNEpLMHlGTFGCAUBQU0svMS4wCk5vbmNlOiB1SXlweUYzY3pYSXBFdzVVc05TYWh3CkVuY3J5cHRpb246IG5vbmUKUGF5bWVudC1JZDogMTMyMzZhM2ItOGZhOC00MTYzLTg0NDctNGMzZWQzZGE5OGE3CgpDb250ZW50LUxlbmd0aDogMTM1CkNvbnRlbnQtVHlwZTogYXBwbGljYXRpb24vanNvbgpTZW5kZXItSWRlbnRpZmllcjogOTI4MDYzOTEKCiJ7XCJmZWVcIjowLFwidHJhbnNmZXJDb2RlXCI6XCJpbnZvaWNlXCIsXCJkZWJpdE5hbWVcIjpcImFsaWNlIGNvb3BlclwiLFwiY3JlZGl0TmFtZVwiOlwibWVyIGNoYW50XCIsXCJkZWJpdElkZW50aWZpZXJcIjpcIjkyODA2MzkxXCJ9IgA + condition: f5sqb7tBTWPd5Y8BDFdMm9BJR_MNI4isf8p8n4D5pHA + extensionList: + extension: + - key: errorDescription + value: This is a more detailed error description + - key: errorDescription + value: This is a more detailed error description + expiration: '2016-05-24T08:38:08.699-04:00' + extensionList: + extension: + - key: errorDescription + value: This is a more detailed error description + - key: errorDescription + value: This is a more detailed error description + responses: + '202': + $ref: '#/components/responses/Response202' + '400': + $ref: '#/components/responses/ErrorResponse400' + '401': + $ref: '#/components/responses/ErrorResponse401' + '403': + $ref: '#/components/responses/ErrorResponse403' + '404': + $ref: '#/components/responses/ErrorResponse404' + '405': + $ref: '#/components/responses/ErrorResponse405' + '406': + $ref: '#/components/responses/ErrorResponse406' + '501': + $ref: '#/components/responses/ErrorResponse501' + '503': + $ref: '#/components/responses/ErrorResponse503' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/BulkTransfersPostRequest' + required: true + '/bulkTransfers/{ID}/error': + put: + description: >- + If the server is unable to find or create a bulk transfer, or another + processing error occurs, the error callback PUT /bulkTransfers//error is + used. The in the URI should contain the bulkTransferId that was used + for the creation of the bulk transfer (POST /bulkTransfers), or the + that was used in the GET /bulkTransfers/. + summary: BulkTransfersErrorByID + tags: + - bulkTransfers + operationId: BulkTransfersErrorByID + parameters: + - $ref: '#/components/parameters/ID' + - $ref: '#/components/parameters/Content-Length' + - $ref: '#/components/parameters/Content-Type' + - $ref: '#/components/parameters/Date' + - $ref: '#/components/parameters/X-Forwarded-For' + - $ref: '#/components/parameters/FSPIOP-Source' + - $ref: '#/components/parameters/FSPIOP-Destination' + - $ref: '#/components/parameters/FSPIOP-Encryption' + - $ref: '#/components/parameters/FSPIOP-Signature' + - $ref: '#/components/parameters/FSPIOP-URI' + - $ref: '#/components/parameters/FSPIOP-HTTP-Method' + x-examples: + application/json: + errorInformation: + errorCode: '5100' + errorDescription: This is an error description + extensionList: + extension: + - key: errorDescription + value: This is a more detailed error description + - key: errorDescription + value: This is a more detailed error description + responses: + '200': + $ref: '#/components/responses/Response200' + '400': + $ref: '#/components/responses/ErrorResponse400' + '401': + $ref: '#/components/responses/ErrorResponse401' + '403': + $ref: '#/components/responses/ErrorResponse403' + '404': + $ref: '#/components/responses/ErrorResponse404' + '405': + $ref: '#/components/responses/ErrorResponse405' + '406': + $ref: '#/components/responses/ErrorResponse406' + '501': + $ref: '#/components/responses/ErrorResponse501' + '503': + $ref: '#/components/responses/ErrorResponse503' + requestBody: + $ref: '#/components/requestBodies/ErrorInformationObject' + + '/requests/{ID}': + get: + description: Test support method. Allows the caller to see the body of a previous request + summary: getRequestsById + tags: + - test + operationId: getRequestsById + parameters: + - $ref: '#/components/parameters/ID' + responses: + '200': + description: Response + content: + application/json: + schema: + type: object + '/callbacks/{ID}': + get: + description: Test support method. Allows the caller to see the body of a previous callback + summary: getRequestsById + tags: + - test + operationId: getCallbackById + parameters: + - $ref: '#/components/parameters/ID' + responses: + '200': + description: Response + content: + application/json: + schema: + type: object +components: + parameters: + Accept: + name: Accept + in: header + required: true + description: >- + The Accept header field indicates the version of the API the client + would like the server to use. + schema: + type: string + Content-Length: + name: Content-Length + in: header + required: false + description: >- + The Content-Length header field indicates the anticipated size of the + payload body. Only sent if there is a body. Note - The API supports a + maximum size of 5242880 bytes (5 Megabytes) + schema: + type: integer + Content-Type: + name: Content-Type + in: header + required: true + description: >- + The Content-Type header indicates the specific version of the API used + to send the payload body. + schema: + type: string + Date: + name: Date + in: header + required: true + description: The Date header field indicates the date when the request was sent. + schema: + type: string + X-Forwarded-For: + name: X-Forwarded-For + in: header + required: false + description: >- + The X-Forwarded-For header field is an unofficially accepted standard + used for informational purposes of the originating client IP address, as + a request might pass multiple proxies, firewalls, and so on. Multiple + X-Forwarded-For values as in the example shown here should be expected + and supported by implementers of the API. Note - An alternative to + X-Forwarded-For is defined in RFC 7239. However, to this point RFC 7239 + is less-used and supported than X-Forwarded-For. + schema: + type: string + FSPIOP-Source: + name: FSPIOP-Source + in: header + required: true + description: >- + The FSPIOP-Source header field is a non-HTTP standard field used by the + API for identifying the sender of the HTTP request. The field should be + set by the original sender of the request. Required for routing and + signature verification (see header field FSPIOP-Signature). + schema: + type: string + FSPIOP-Destination: + name: FSPIOP-Destination + in: header + required: false + description: >- + The FSPIOP-Destination header field is a non-HTTP standard field used by + the API for HTTP header based routing of requests and responses to the + destination. The field should be set by the original sender of the + request (if known), so that any entities between the client and the + server do not need to parse the payload for routing purposes. + schema: + type: string + FSPIOP-Encryption: + name: FSPIOP-Encryption + in: header + required: false + description: >- + The FSPIOP-Encryption header field is a non-HTTP standard field used by + the API for applying end-to-end encryption of the request. + schema: + type: string + FSPIOP-Signature: + name: FSPIOP-Signature + in: header + required: false + description: >- + The FSPIOP-Signature header field is a non-HTTP standard field used by + the API for applying an end-to-end request signature. + schema: + type: string + FSPIOP-URI: + name: FSPIOP-URI + in: header + required: false + description: >- + The FSPIOP-URI header field is a non-HTTP standard field used by the API + for signature verification, should contain the service URI. Required if + signature verification is used, for more information see API Signature + document. + schema: + type: string + FSPIOP-HTTP-Method: + name: FSPIOP-HTTP-Method + in: header + required: false + description: >- + The FSPIOP-HTTP-Method header field is a non-HTTP standard field used by + the API for signature verification, should contain the service HTTP + method. Required if signature verification is used, for more information + see API Signature document. + schema: + type: string + ID: + name: ID + in: path + required: true + schema: + type: string + Type: + name: Type + in: path + required: true + schema: + $ref: '#/components/schemas/PartyIdType' + SubId: + name: SubId + in: path + required: true + schema: + type: string + responses: + Response200: + description: OK + Response202: + description: Accepted + ErrorResponse400: + description: >- + Bad Request - The application cannot process the request; for example, + due to malformed syntax or the payload exceeded size restrictions. + headers: + Content-Length: + description: >- + The Content-Length header field indicates the anticipated size of + the payload body. Only sent if there is a body. + schema: + type: integer + Content-Type: + description: >- + The Content-Type header indicates the specific version of the API + used to send the payload body. + schema: + type: string + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorInformationResponse' + ErrorResponse401: + description: >- + Unauthorized - The request requires authentication in order to be + processed. + headers: + Content-Length: + description: >- + The Content-Length header field indicates the anticipated size of + the payload body. Only sent if there is a body. + schema: + type: integer + Content-Type: + description: >- + The Content-Type header indicates the specific version of the API + used to send the payload body. + schema: + type: string + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorInformationResponse' + ErrorResponse403: + description: Forbidden - The request was denied and will be denied in the future. + headers: + Content-Length: + description: >- + The Content-Length header field indicates the anticipated size of + the payload body. Only sent if there is a body. + schema: + type: integer + Content-Type: + description: >- + The Content-Type header indicates the specific version of the API + used to send the payload body. + schema: + type: string + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorInformationResponse' + ErrorResponse404: + description: Not Found - The resource specified in the URI was not found. + headers: + Content-Length: + description: >- + The Content-Length header field indicates the anticipated size of + the payload body. Only sent if there is a body. + schema: + type: integer + Content-Type: + description: >- + The Content-Type header indicates the specific version of the API + used to send the payload body. + schema: + type: string + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorInformationResponse' + ErrorResponse405: + description: >- + Method Not Allowed - An unsupported HTTP method for the request was + used. + headers: + Content-Length: + description: >- + The Content-Length header field indicates the anticipated size of + the payload body. Only sent if there is a body. + schema: + type: integer + Content-Type: + description: >- + The Content-Type header indicates the specific version of the API + used to send the payload body. + schema: + type: string + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorInformationResponse' + ErrorResponse406: + description: >- + Not acceptable - The server is not capable of generating content + according to the Accept headers sent in the request. Used in the API to + indicate that the server does not support the version that the client is + requesting. + headers: + Content-Length: + description: >- + The Content-Length header field indicates the anticipated size of + the payload body. Only sent if there is a body. + schema: + type: integer + Content-Type: + description: >- + The Content-Type header indicates the specific version of the API + used to send the payload body. + schema: + type: string + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorInformationResponse' + ErrorResponse501: + description: >- + Not Implemented - The server does not support the requested service. The + client should not retry. + headers: + Content-Length: + description: >- + The Content-Length header field indicates the anticipated size of + the payload body. Only sent if there is a body. + schema: + type: integer + Content-Type: + description: >- + The Content-Type header indicates the specific version of the API + used to send the payload body. + schema: + type: string + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorInformationResponse' + ErrorResponse503: + description: >- + Service Unavailable - The server is currently unavailable to accept any + new service requests. This should be a temporary state, and the client + should retry within a reasonable time frame. + headers: + Content-Length: + description: >- + The Content-Length header field indicates the anticipated size of + the payload body. Only sent if there is a body. + schema: + type: integer + Content-Type: + description: >- + The Content-Type header indicates the specific version of the API + used to send the payload body. + schema: + type: string + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorInformationResponse' + requestBodies: + ParticipantsTypeIDSubIDPostRequest: + content: + application/json: + schema: + $ref: '#/components/schemas/ParticipantsTypeIDSubIDPostRequest' + required: true + ErrorInformationObject: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorInformationObject' + required: true + ParticipantsTypeIDPutResponse: + content: + application/json: + schema: + $ref: '#/components/schemas/ParticipantsTypeIDPutResponse' + required: true + PartiesTypeIDPutResponse: + content: + application/json: + schema: + $ref: '#/components/schemas/PartiesTypeIDPutResponse' + required: true + schemas: + Amount: + title: Amount + type: string + pattern: '^([0]|([1-9][0-9]{0,17}))([.][0-9]{0,3}[1-9])?$' + description: >- + The API data type Amount is a JSON String in a canonical format that is + restricted by a regular expression for interoperability reasons. This + pattern does not allow any trailing zeroes at all, but allows an amount + without a minor currency unit. It also only allows four digits in the + minor currency unit; a negative value is not allowed. Using more than 18 + digits in the major currency unit is not allowed. + AmountType: + title: AmountType + type: string + enum: + - SEND + - RECEIVE + description: >- + Below are the allowed values for the enumeration AmountType - SEND + Amount the Payer would like to send, that is, the amount that should be + withdrawn from the Payer account including any fees. - RECEIVE Amount + the Payer would like the Payee to receive, that is, the amount that + should be sent to the receiver exclusive fees. + AuthenticationType: + title: AuthenticationTypeEnum + type: string + enum: + - OTP + - QRCODE + description: >- + Below are the allowed values for the enumeration AuthenticationType. - + OTP One-time password generated by the Payer FSP. - QRCODE QR code used + as One Time Password. + AuthenticationValue: + title: AuthenticationValue + type: string + pattern: '^\d{3,10}$|^\S{1,64}$' + description: >- + Contains the authentication value. The format depends on the + authentication type used in the AuthenticationInfo complex type. + AuthorizationResponse: + title: AuthorizationResponse + type: string + enum: + - ENTERED + - REJECTED + - RESEND + description: >- + Below are the allowed values for the enumeration - ENTERED Consumer + entered the authentication value. - REJECTED Consumer rejected the + transaction. - RESEND Consumer requested to resend the authentication + value. + BalanceOfPayments: + title: BalanceOfPayments + type: string + pattern: '^[1-9]\d{2}$' + description: >- + (BopCode) The API data type BopCode is a JSON String of 3 characters, + consisting of digits only. Negative numbers are not allowed. A leading + zero is not allowed. https://www.imf.org/external/np/sta/bopcode/ + BinaryString: + type: string + pattern: '^[A-Za-z0-9-_]+[=]{0,2}$' + description: >- + The API data type BinaryString is a JSON String. The string is a + base64url encoding of a string of raw bytes, where padding (character + ‘=’) is added at the end of the data if needed to ensure that the string + is a multiple of 4 characters. The length restriction indicates the + allowed number of characters. + BinaryString32: + type: string + pattern: '^[A-Za-z0-9-_]{43}$' + description: >- + The API data type BinaryString32 is a fixed size version of the API data + type BinaryString, where the raw underlying data is always of 32 bytes. + The data type BinaryString32 should not use a padding character as the + size of the underlying data is fixed. + BulkTransferState: + title: BulkTransactionStateEnum + type: string + enum: + - RECEIVED + - PENDING + - ACCEPTED + - PROCESSING + - COMPLETED + - REJECTED + description: >- + Below are the allowed values for the enumeration - RECEIVED Payee FSP + has received the bulk transfer from the Payer FSP. - PENDING Payee FSP + has validated the bulk transfer. - ACCEPTED Payee FSP has accepted to + process the bulk transfer. - PROCESSING Payee FSP has started to + transfer fund to the Payees. - COMPLETED Payee FSP has completed + transfer of funds to the Payees. - REJECTED Payee FSP has rejected to + process the bulk transfer. + Code: + title: Code + type: string + pattern: '^[0-9a-zA-Z]{4,32}$' + description: Any code/token returned by the Payee FSP (TokenCode Type). + CorrelationId: + title: CorrelationId + type: string + pattern: >- + ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + description: >- + Identifier that correlates all messages of the same sequence. The API + data type UUID (Universally Unique Identifier) is a JSON String in + canonical format, conforming to RFC 4122, that is restricted by a + regular expression for interoperability reasons. An UUID is always 36 + characters long, 32 hexadecimal symbols and 4 dashes (‘-‘). + Currency: + title: CurrencyEnum + description: >- + The currency codes defined in ISO 4217 as three-letter alphabetic codes + are used as the standard naming representation for currencies. + type: string + minLength: 3 + maxLength: 3 + enum: + - AED + - AFN + - ALL + - AMD + - ANG + - AOA + - ARS + - AUD + - AWG + - AZN + - BAM + - BBD + - BDT + - BGN + - BHD + - BIF + - BMD + - BND + - BOB + - BRL + - BSD + - BTN + - BWP + - BYN + - BZD + - CAD + - CDF + - CHF + - CLP + - CNY + - COP + - CRC + - CUC + - CUP + - CVE + - CZK + - DJF + - DKK + - DOP + - DZD + - EGP + - ERN + - ETB + - EUR + - FJD + - FKP + - GBP + - GEL + - GGP + - GHS + - GIP + - GMD + - GNF + - GTQ + - GYD + - HKD + - HNL + - HRK + - HTG + - HUF + - IDR + - ILS + - IMP + - INR + - IQD + - IRR + - ISK + - JEP + - JMD + - JOD + - JPY + - KES + - KGS + - KHR + - KMF + - KPW + - KRW + - KWD + - KYD + - KZT + - LAK + - LBP + - LKR + - LRD + - LSL + - LYD + - MAD + - MDL + - MGA + - MKD + - MMK + - MNT + - MOP + - MRO + - MUR + - MVR + - MWK + - MXN + - MYR + - MZN + - NAD + - NGN + - NIO + - NOK + - NPR + - NZD + - OMR + - PAB + - PEN + - PGK + - PHP + - PKR + - PLN + - PYG + - QAR + - RON + - RSD + - RUB + - RWF + - SAR + - SBD + - SCR + - SDG + - SEK + - SGD + - SHP + - SLL + - SOS + - SPL + - SRD + - STD + - SVC + - SYP + - SZL + - THB + - TJS + - TMT + - TND + - TOP + - TRY + - TTD + - TVD + - TWD + - TZS + - UAH + - UGX + - USD + - UYU + - UZS + - VEF + - VND + - VUV + - WST + - XAF + - XCD + - XDR + - XOF + - XPF + - XTS + - XXX + - YER + - ZAR + - ZMW + - ZWD + Date: + title: Date + type: string + pattern: >- + ^(?:[1-9]\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\d|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-02-29)$ + description: >- + The API data type Date is a JSON String in a lexical format that is + restricted by a regular expression for interoperability reasons. This + format, as specified in ISO 8601, contains a date only. A more readable + version of the format is yyyy-MM-dd. Examples - "1982-05-23", + "1987-08-05 + DateOfBirth: + title: DateofBirth (type Date) + type: string + pattern: >- + ^(?:[1-9]\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\d|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-02-29)$ + description: Date of Birth of the Party. + DateTime: + title: DateTime + type: string + pattern: >- + ^(?:[1-9]\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\d|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-02-29)T(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:(\.\d{3}))(?:Z|[+-][01]\d:[0-5]\d)$ + description: >- + The API data type DateTime is a JSON String in a lexical format that is + restricted by a regular expression for interoperability reasons. The + format is according to ISO 8601, expressed in a combined date, time and + time zone format. A more readable version of the format is + yyyy-MM-ddTHH:mm:ss.SSS[-HH:MM]. Examples - + "2016-05-24T08:38:08.699-04:00", "2016-05-24T08:38:08.699Z" (where Z + indicates Zulu time zone, same as UTC). + ErrorCode: + title: ErrorCode + type: string + pattern: '^[1-9]\d{3}$' + description: >- + The API data type ErrorCode is a JSON String of four characters, + consisting of digits only. Negative numbers are not allowed. A leading + zero is not allowed. Each error code in the API is a four-digit number, + for example, 1234, where the first number (1 in the example) represents + the high-level error category, the second number (2 in the example) + represents the low-level error category, and the last two numbers (34 in + the example) represents the specific error. + ErrorDescription: + title: ErrorDescription + type: string + minLength: 1 + maxLength: 128 + description: Error description string. + ExtensionKey: + title: ExtensionKey + type: string + minLength: 1 + maxLength: 32 + description: Extension key. + ExtensionValue: + title: ExtensionValue + type: string + minLength: 1 + maxLength: 128 + description: Extension value. + FirstName: + title: FirstName + type: string + minLength: 1 + maxLength: 128 + pattern: '^(?!\s*$)[\p{L}\p{gc=Mark}\p{digit}\p{gc=Connector_Punctuation}\p{Join_Control} .,''-]{1,128}$' + description: First name of the Party (Name Type). + FspId: + title: FspId + type: string + minLength: 1 + maxLength: 32 + description: FSP identifier. + IlpCondition: + title: IlpCondition + type: string + pattern: '^[A-Za-z0-9-_]{43}$' + maxLength: 48 + description: Condition that must be attached to the transfer by the Payer. + IlpFulfilment: + title: IlpFulfilment + type: string + pattern: '^[A-Za-z0-9-_]{43}$' + maxLength: 48 + description: Fulfilment that must be attached to the transfer by the Payee. + IlpPacket: + title: IlpPacket + type: string + pattern: '^[A-Za-z0-9-_]+[=]{0,2}$' + minLength: 1 + maxLength: 32768 + description: Information for recipient (transport layer information). + Integer: + title: Integer + type: string + pattern: '^[1-9]\d*$' + description: >- + The API data type Integer is a JSON String consisting of digits only. + Negative numbers and leading zeroes are not allowed. The data type is + always limited to a specific number of digits. + LastName: + title: LastName + type: string + minLength: 1 + maxLength: 128 + pattern: '^(?!\s*$)[\p{L}\p{gc=Mark}\p{digit}\p{gc=Connector_Punctuation}\p{Join_Control} .,''-]{1,128}$' + description: Last name of the Party (Name Type). + Latitude: + title: Latitude + type: string + pattern: >- + ^(\+|-)?(?:90(?:(?:\.0{1,6})?)|(?:[0-9]|[1-8][0-9])(?:(?:\.[0-9]{1,6})?))$ + description: >- + The API data type Latitude is a JSON String in a lexical format that is + restricted by a regular expression for interoperability reasons. + Longitude: + title: Longitude + type: string + pattern: >- + ^(\+|-)?(?:180(?:(?:\.0{1,6})?)|(?:[0-9]|[1-9][0-9]|1[0-7][0-9])(?:(?:\.[0-9]{1,6})?))$ + description: >- + The API data type Longitude is a JSON String in a lexical format that is + restricted by a regular expression for interoperability reasons. + MerchantClassificationCode: + title: MerchantClassificationCode + type: string + pattern: '^[\d]{1,4}$' + description: >- + A limited set of pre-defined numbers. This list would be a limited set + of numbers identifying a set of popular merchant types like School Fees, + Pubs and Restaurants, Groceries, etc. + MiddleName: + title: MiddleName + type: string + minLength: 1 + maxLength: 128 + pattern: '^(?!\s*$)[\p{L}\p{gc=Mark}\p{digit}\p{gc=Connector_Punctuation}\p{Join_Control} .,''-]{1,128}$' + description: Middle name of the Party (Name Type). + Name: + title: Name + type: string + pattern: '^(?!\s*$)[\p{L}\p{gc=Mark}\p{digit}\p{gc=Connector_Punctuation}\p{Join_Control} .,''-]{1,128}$' + description: >- + The API data type Name is a JSON String, restricted by a regular + expression to avoid characters which are generally not used in a name. + Regular Expression - The regular expression for restricting the Name + type is '^(?!\s*$)[\p{L}\p{gc=Mark}\p{digit}\p{gc=Connector_Punctuation}\p{Join_Control} .,''-]{1,128}$'. + The restriction does not allow a string consisting of whitespace only, + all Unicode characters are allowed, as well as the period (.) (apostrophe (‘), + dash (-), comma (,)and space characters ( ). Note - In some programming languages, + Unicode support must be specifically enabled. For example, if Java is used the + flag UNICODE_CHARACTER_CLASS must be enabled to allow Unicode + characters. + Note: + title: Note + type: string + minLength: 1 + maxLength: 128 + description: Memo assigned to transaction + OtpValue: + title: OtpValue + type: string + pattern: '^\d{3,10}$' + description: >- + The API data type OtpValue is a JSON String of 3 to 10 characters, + consisting of digits only. Negative numbers are not allowed. One or more + leading zeros are allowed. + PartyIdentifier: + title: PartyIdentifier + type: string + minLength: 1 + maxLength: 128 + description: Identifier of the Party. + PartyIdType: + title: PartyIdTypeEnum + type: string + enum: + - MSISDN + - EMAIL + - PERSONAL_ID + - BUSINESS + - DEVICE + - ACCOUNT_ID + - IBAN + - ALIAS + description: >- + Below are the allowed values for the enumeration - MSISDN An MSISDN + (Mobile Station International Subscriber Directory Number, that is, the + phone number) is used as reference to a participant. The MSISDN + identifier should be in international format according to the ITU-T + E.164 standard. Optionally, the MSISDN may be prefixed by a single plus + sign, indicating the international prefix. - EMAIL An email is used as + reference to a participant. The format of the email should be according + to the informational RFC 3696. - PERSONAL_ID A personal identifier is + used as reference to a participant. Examples of personal identification + are passport number, birth certificate number, and national registration + number. The identifier number is added in the PartyIdentifier element. + The personal identifier type is added in the PartySubIdOrType element. - + BUSINESS A specific Business (for example, an organization or a company) + is used as reference to a participant. The BUSINESS identifier can be in + any format. To make a transaction connected to a specific username or + bill number in a Business, the PartySubIdOrType element should be used. + - DEVICE A specific device (for example, a POS or ATM) ID connected to a + specific business or organization is used as reference to a Party. For + referencing a specific device under a specific business or organization, + use the PartySubIdOrType element. - ACCOUNT_ID A bank account number or + FSP account ID should be used as reference to a participant. The + ACCOUNT_ID identifier can be in any format, as formats can greatly + differ depending on country and FSP. - IBAN A bank account number or FSP + account ID is used as reference to a participant. The IBAN identifier + can consist of up to 34 alphanumeric characters and should be entered + without whitespace. - ALIAS An alias is used as reference to a + participant. The alias should be created in the FSP as an alternative + reference to an account owner. Another example of an alias is a username + in the FSP system. The ALIAS identifier can be in any format. It is also + possible to use the PartySubIdOrType element for identifying an account + under an Alias defined by the PartyIdentifier. + PartyName: + title: PartyName + type: string + minLength: 1 + maxLength: 128 + description: Name of the Party. Could be a real name or a nickname. + PartySubIdOrType: + title: PartySubIdOrType + type: string + minLength: 1 + maxLength: 128 + description: >- + Either a sub-identifier of a PartyIdentifier, or a sub-type of the + PartyIdType, normally a PersonalIdentifierType. + PersonalIdentifierType: + title: PersonalIdentifierType + type: string + enum: + - PASSPORT + - NATIONAL_REGISTRATION + - DRIVING_LICENSE + - ALIEN_REGISTRATION + - NATIONAL_ID_CARD + - EMPLOYER_ID + - TAX_ID_NUMBER + - SENIOR_CITIZENS_CARD + - MARRIAGE_CERTIFICATE + - HEALTH_CARD + - VOTERS_ID + - UNITED_NATIONS + - OTHER_ID + description: >- + Below are the allowed values for the enumeration - PASSPORT A passport + number is used as reference to a Party. - NATIONAL_REGISTRATION A + national registration number is used as reference to a Party. - + DRIVING_LICENSE A driving license is used as reference to a Party. - + ALIEN_REGISTRATION An alien registration number is used as reference to + a Party. - NATIONAL_ID_CARD A national ID card number is used as + reference to a Party. - EMPLOYER_ID A tax identification number is used + as reference to a Party. - TAX_ID_NUMBER A tax identification number is + used as reference to a Party. - SENIOR_CITIZENS_CARD A senior citizens + card number is used as reference to a Party. - MARRIAGE_CERTIFICATE A + marriage certificate number is used as reference to a Party. - + HEALTH_CARD A health card number is used as reference to a Party. - + VOTERS_ID A voter’s identification number is used as reference to a + Party. - UNITED_NATIONS An UN (United Nations) number is used as + reference to a Party. - OTHER_ID Any other type of identification type + number is used as reference to a Party. + QRCODE: + title: QRCODE + type: string + minLength: 1 + maxLength: 64 + description: QR code used as One Time Password. + RefundReason: + title: RefundReason + type: string + minLength: 1 + maxLength: 128 + description: Reason for the refund. + TokenCode: + title: TokenCode + type: string + pattern: '^[0-9a-zA-Z]{4,32}$' + description: >- + The API data type TokenCode is a JSON String between 4 and 32 + characters, consisting of digits or upper or lowercase characters from a + to z. + TransactionInitiator: + title: TransactionInitiatorEnum + type: string + enum: + - PAYER + - PAYEE + description: >- + Below are the allowed values for the enumeration - PAYER Sender of funds + is initiating the transaction. The account to send from is either owned + by the Payer or is connected to the Payer in some way. - PAYEE Recipient + of the funds is initiating the transaction by sending a transaction + request. The Payer must approve the transaction, either automatically by + a pre-generated OTP or by pre-approval of the Payee, or by manually + approving in his or her own Device. + TransactionInitiatorType: + title: TransactionInitiatorTypeEnum + type: string + enum: + - CONSUMER + - AGENT + - BUSINESS + - DEVICE + description: >- + Below are the allowed values for the enumeration - CONSUMER Consumer is + the initiator of the transaction. - AGENT Agent is the initiator of the + transaction. - BUSINESS Business is the initiator of the transaction. - + DEVICE Device is the initiator of the transaction. + TransactionRequestState: + title: TransactionRequestStateEnum + type: string + enum: + - RECEIVED + - PENDING + - ACCEPTED + - REJECTED + description: >- + Below are the allowed values for the enumeration - RECEIVED Payer FSP + has received the transaction from the Payee FSP. - PENDING Payer FSP has + sent the transaction request to the Payer. - ACCEPTED Payer has approved + the transaction. - REJECTED Payer has rejected the transaction. + TransactionScenario: + title: TransactionScenarioEnum + type: string + enum: + - DEPOSIT + - WITHDRAWAL + - TRANSFER + - PAYMENT + - REFUND + description: >- + Below are the allowed values for the enumeration - DEPOSIT Used for + performing a Cash-In (deposit) transaction. In a normal scenario, + electronic funds are transferred from a Business account to a Consumer + account, and physical cash is given from the Consumer to the Business + User. - WITHDRAWAL Used for performing a Cash-Out (withdrawal) + transaction. In a normal scenario, electronic funds are transferred from + a Consumer’s account to a Business account, and physical cash is given + from the Business User to the Consumer. - TRANSFER Used for performing a + P2P (Peer to Peer, or Consumer to Consumer) transaction. - PAYMENT + Usually used for performing a transaction from a Consumer to a Merchant + or Organization, but could also be for a B2B (Business to Business) + payment. The transaction could be online for a purchase in an Internet + store, in a physical store where both the Consumer and Business User are + present, a bill payment, a donation, and so on. - REFUND Used for + performing a refund of transaction. + TransactionState: + title: TransactionStateEnum + type: string + enum: + - RECEIVED + - PENDING + - COMPLETED + - REJECTED + description: >- + Below are the allowed values for the enumeration - RECEIVED Payee FSP + has received the transaction from the Payer FSP. - PENDING Payee FSP has + validated the transaction. - COMPLETED Payee FSP has successfully + performed the transaction. - REJECTED Payee FSP has failed to perform + the transaction. + TransactionSubScenario: + title: TransactionSubScenario + type: string + pattern: '^[A-Z_]{1,32}$' + description: >- + Possible sub-scenario, defined locally within the scheme (UndefinedEnum + Type). + TransferState: + title: TransferStateEnum + type: string + enum: + - RECEIVED + - RESERVED + - COMMITTED + - ABORTED + description: >- + Below are the allowed values for the enumeration - RECEIVED Next ledger + has received the transfer. - RESERVED Next ledger has reserved the + transfer. - COMMITTED Next ledger has successfully performed the + transfer. - ABORTED Next ledger has aborted the transfer due a rejection + or failure to perform the transfer. + UndefinedEnum: + title: UndefinedEnum + type: string + pattern: '^[A-Z_]{1,32}$' + description: >- + The API data type UndefinedEnum is a JSON String consisting of 1 to 32 + uppercase characters including an underscore character (_). + AuthenticationInfo: + title: AuthenticationInfo + type: object + description: Data model for the complex type AuthenticationInfo + properties: + authentication: + $ref: '#/components/schemas/AuthenticationType' + authenticationValue: + $ref: '#/components/schemas/AuthenticationValue' + required: + - authentication + - authenticationValue + AuthorizationsIDPutResponse: + title: AuthorizationsIDPutResponse + type: object + description: 'PUT /authorizations/{ID} object' + properties: + authenticationInfo: + $ref: '#/components/schemas/AuthenticationInfo' + responseType: + $ref: '#/components/schemas/AuthorizationResponse' + required: + - responseType + BulkQuotesPostRequest: + title: BulkQuotesPostRequest + type: object + description: POST /bulkQuotes object + properties: + bulkQuoteId: + $ref: '#/components/schemas/CorrelationId' + payer: + $ref: '#/components/schemas/Party' + geoCode: + $ref: '#/components/schemas/GeoCode' + expiration: + $ref: '#/components/schemas/DateTime' + individualQuotes: + type: array + minItems: 1 + maxItems: 1000 + items: + $ref: '#/components/schemas/IndividualQuote' + extensionList: + $ref: '#/components/schemas/ExtensionList' + required: + - bulkQuoteId + - payer + - individualQuotes + BulkQuotesIDPutResponse: + title: BulkQuotesIDPutResponse + type: object + description: 'PUT /bulkQuotes/{ID} object' + properties: + individualQuoteResults: + type: array + maxItems: 1000 + items: + $ref: '#/components/schemas/IndividualQuoteResult' + expiration: + $ref: '#/components/schemas/DateTime' + extensionList: + $ref: '#/components/schemas/ExtensionList' + required: + - expiration + BulkTransfersPostRequest: + title: BulkTransfersPostRequest + type: object + description: POST /bulkTransfers object + properties: + bulkTransferId: + $ref: '#/components/schemas/CorrelationId' + bulkQuoteId: + $ref: '#/components/schemas/CorrelationId' + payerFsp: + $ref: '#/components/schemas/FspId' + payeeFsp: + $ref: '#/components/schemas/FspId' + individualTransfers: + type: array + minItems: 1 + maxItems: 1000 + items: + $ref: '#/components/schemas/IndividualTransfer' + expiration: + $ref: '#/components/schemas/DateTime' + extensionList: + $ref: '#/components/schemas/ExtensionList' + required: + - bulkTransferId + - bulkQuoteId + - payerFsp + - payeeFsp + - individualTransfers + - expiration + BulkTransfersIDPutResponse: + title: BulkTransfersIDPutResponse + type: object + description: 'PUT /bulkTransfers/{ID} object' + properties: + completedTimestamp: + $ref: '#/components/schemas/DateTime' + individualTransferResults: + type: array + maxItems: 1000 + items: + $ref: '#/components/schemas/IndividualTransferResult' + bulkTransferState: + $ref: '#/components/schemas/BulkTransferState' + extensionList: + $ref: '#/components/schemas/ExtensionList' + required: + - bulkTransferState + ErrorInformation: + title: ErrorInformation + type: object + description: Data model for the complex type ErrorInformation. + properties: + errorCode: + $ref: '#/components/schemas/ErrorCode' + errorDescription: + $ref: '#/components/schemas/ErrorDescription' + extensionList: + $ref: '#/components/schemas/ExtensionList' + required: + - errorCode + - errorDescription + ErrorInformationObject: + title: ErrorInformationObject + type: object + description: Data model for the complex type object that contains ErrorInformation. + properties: + errorInformation: + $ref: '#/components/schemas/ErrorInformation' + required: + - errorInformation + ErrorInformationResponse: + title: ErrorInformationResponse + type: object + description: >- + Data model for the complex type object that contains an optional element + ErrorInformation used along with 4xx and 5xx responses. + properties: + errorInformation: + $ref: '#/components/schemas/ErrorInformation' + Extension: + title: Extension + type: object + description: Data model for the complex type Extension + properties: + key: + $ref: '#/components/schemas/ExtensionKey' + value: + $ref: '#/components/schemas/ExtensionValue' + required: + - key + - value + ExtensionList: + title: ExtensionList + type: object + description: Data model for the complex type ExtensionList + properties: + extension: + type: array + items: + $ref: '#/components/schemas/Extension' + minItems: 1 + maxItems: 16 + description: Number of Extension elements + required: + - extension + GeoCode: + title: GeoCode + type: object + description: >- + Data model for the complex type GeoCode. Indicates the geographic + location from where the transaction was initiated. + properties: + latitude: + $ref: '#/components/schemas/Latitude' + longitude: + $ref: '#/components/schemas/Longitude' + required: + - latitude + - longitude + IndividualQuote: + title: IndividualQuote + type: object + description: Data model for the complex type IndividualQuote. + properties: + quoteId: + $ref: '#/components/schemas/CorrelationId' + transactionId: + $ref: '#/components/schemas/CorrelationId' + payee: + $ref: '#/components/schemas/Party' + amountType: + $ref: '#/components/schemas/AmountType' + amount: + $ref: '#/components/schemas/Money' + fees: + $ref: '#/components/schemas/Money' + transactionType: + $ref: '#/components/schemas/TransactionType' + note: + $ref: '#/components/schemas/Note' + extensionList: + $ref: '#/components/schemas/ExtensionList' + required: + - quoteId + - transactionId + - payee + - amountType + - amount + - transactionType + IndividualQuoteResult: + title: IndividualQuoteResult + type: object + description: Data model for the complex type IndividualQuoteResult. + properties: + quoteId: + $ref: '#/components/schemas/CorrelationId' + payee: + $ref: '#/components/schemas/Party' + transferAmount: + $ref: '#/components/schemas/Money' + payeeReceiveAmount: + $ref: '#/components/schemas/Money' + payeeFspFee: + $ref: '#/components/schemas/Money' + payeeFspCommission: + $ref: '#/components/schemas/Money' + ilpPacket: + $ref: '#/components/schemas/IlpPacket' + condition: + $ref: '#/components/schemas/IlpCondition' + errorInformation: + $ref: '#/components/schemas/ErrorInformation' + extensionList: + $ref: '#/components/schemas/ExtensionList' + required: + - quoteId + IndividualTransfer: + title: IndividualTransfer + type: object + description: Data model for the complex type IndividualTransfer. + properties: + transferId: + $ref: '#/components/schemas/CorrelationId' + transferAmount: + $ref: '#/components/schemas/Money' + ilpPacket: + $ref: '#/components/schemas/IlpPacket' + condition: + $ref: '#/components/schemas/IlpCondition' + extensionList: + $ref: '#/components/schemas/ExtensionList' + required: + - transferId + - transferAmount + - ilpPacket + - condition + IndividualTransferResult: + title: IndividualTransferResult + type: object + description: Data model for the complex type IndividualTransferResult. + properties: + transferId: + $ref: '#/components/schemas/CorrelationId' + fulfilment: + $ref: '#/components/schemas/IlpFulfilment' + errorInformation: + $ref: '#/components/schemas/ErrorInformation' + extensionList: + $ref: '#/components/schemas/ExtensionList' + required: + - transferId + Money: + title: Money + type: object + description: Data model for the complex type Money. + properties: + currency: + $ref: '#/components/schemas/Currency' + amount: + $ref: '#/components/schemas/Amount' + required: + - currency + - amount + ParticipantsTypeIDSubIDPostRequest: + title: ParticipantsTypeIDSubIDPostRequest + type: object + description: 'POST /participants/{Type}/{ID}/{SubId}, /participants/{Type}/{ID} object' + properties: + fspId: + $ref: '#/components/schemas/FspId' + currency: + $ref: '#/components/schemas/Currency' + required: + - fspId + ParticipantsTypeIDPutResponse: + title: ParticipantsTypeIDPutResponse + type: object + description: 'PUT /participants/{Type}/{ID}/{SubId}, /participants/{Type}/{ID} object' + properties: + fspId: + $ref: '#/components/schemas/FspId' + ParticipantsIDPutResponse: + title: ParticipantsIDPutResponse + type: object + description: 'PUT /participants/{ID} object' + properties: + partyList: + type: array + items: + $ref: '#/components/schemas/PartyResult' + minItems: 1 + maxItems: 10000 + description: >- + List of PartyResult elements that were either created or failed to + be created. + currency: + $ref: '#/components/schemas/Currency' + required: + - partyList + ParticipantsPostRequest: + title: ParticipantsPostRequest + type: object + description: POST /participants object + properties: + requestId: + $ref: '#/components/schemas/CorrelationId' + partyList: + type: array + items: + $ref: '#/components/schemas/PartyIdInfo' + minItems: 1 + maxItems: 10000 + description: >- + List of PartyIdInfo elements that the client would like to update or + create FSP information about. + currency: + $ref: '#/components/schemas/Currency' + required: + - requestId + - partyList + Party: + title: Party + type: object + description: Data model for the complex type Party. + properties: + partyIdInfo: + $ref: '#/components/schemas/PartyIdInfo' + merchantClassificationCode: + $ref: '#/components/schemas/MerchantClassificationCode' + name: + $ref: '#/components/schemas/PartyName' + personalInfo: + $ref: '#/components/schemas/PartyPersonalInfo' + required: + - partyIdInfo + PartyComplexName: + title: PartyComplexName + type: object + description: Data model for the complex type PartyComplexName. + properties: + firstName: + $ref: '#/components/schemas/FirstName' + middleName: + $ref: '#/components/schemas/MiddleName' + lastName: + $ref: '#/components/schemas/LastName' + PartyIdInfo: + title: PartyIdInfo + type: object + description: Data model for the complex type PartyIdInfo. + properties: + partyIdType: + $ref: '#/components/schemas/PartyIdType' + partyIdentifier: + $ref: '#/components/schemas/PartyIdentifier' + partySubIdOrType: + $ref: '#/components/schemas/PartySubIdOrType' + fspId: + $ref: '#/components/schemas/FspId' + required: + - partyIdType + - partyIdentifier + PartiesTypeIDPutResponse: + title: PartiesTypeIDPutResponse + type: object + description: 'PUT /parties/{Type}/{ID} object' + properties: + party: + $ref: '#/components/schemas/Party' + required: + - party + PartyPersonalInfo: + title: PartyPersonalInfo + type: object + description: Data model for the complex type PartyPersonalInfo. + properties: + complexName: + $ref: '#/components/schemas/PartyComplexName' + dateOfBirth: + $ref: '#/components/schemas/DateOfBirth' + PartyResult: + title: PartyResult + type: object + description: Data model for the complex type PartyResult. + properties: + partyId: + $ref: '#/components/schemas/PartyIdInfo' + errorInformation: + $ref: '#/components/schemas/ErrorInformation' + required: + - partyId + QuotesPostRequest: + title: QuotesPostRequest + type: object + description: POST /quotes object + properties: + quoteId: + $ref: '#/components/schemas/CorrelationId' + transactionId: + $ref: '#/components/schemas/CorrelationId' + transactionRequestId: + $ref: '#/components/schemas/CorrelationId' + payee: + $ref: '#/components/schemas/Party' + payer: + $ref: '#/components/schemas/Party' + amountType: + $ref: '#/components/schemas/AmountType' + amount: + $ref: '#/components/schemas/Money' + fees: + $ref: '#/components/schemas/Money' + transactionType: + $ref: '#/components/schemas/TransactionType' + geoCode: + $ref: '#/components/schemas/GeoCode' + note: + $ref: '#/components/schemas/Note' + expiration: + $ref: '#/components/schemas/DateTime' + extensionList: + $ref: '#/components/schemas/ExtensionList' + required: + - quoteId + - transactionId + - payee + - payer + - amountType + - amount + - transactionType + QuotesIDPutResponse: + title: QuotesIDPutResponse + type: object + description: 'PUT /quotes/{ID} object' + properties: + transferAmount: + $ref: '#/components/schemas/Money' + payeeReceiveAmount: + $ref: '#/components/schemas/Money' + payeeFspFee: + $ref: '#/components/schemas/Money' + payeeFspCommission: + $ref: '#/components/schemas/Money' + expiration: + $ref: '#/components/schemas/DateTime' + geoCode: + $ref: '#/components/schemas/GeoCode' + ilpPacket: + $ref: '#/components/schemas/IlpPacket' + condition: + $ref: '#/components/schemas/IlpCondition' + extensionList: + $ref: '#/components/schemas/ExtensionList' + required: + - transferAmount + - expiration + - ilpPacket + - condition + Refund: + title: Refund + type: object + description: Data model for the complex type Refund. + properties: + originalTransactionId: + $ref: '#/components/schemas/CorrelationId' + refundReason: + $ref: '#/components/schemas/RefundReason' + required: + - originalTransactionId + Transaction: + title: Transaction + type: object + description: >- + Data model for the complex type Transaction. The Transaction type is + used to carry end-to-end data between the Payer FSP and the Payee FSP in + the ILP Packet. Both the transactionId and the quoteId in the data model + are decided by the Payer FSP in the POST /quotes. + properties: + transactionId: + $ref: '#/components/schemas/CorrelationId' + quoteId: + $ref: '#/components/schemas/CorrelationId' + payee: + $ref: '#/components/schemas/Party' + payer: + $ref: '#/components/schemas/Party' + amount: + $ref: '#/components/schemas/Money' + transactionType: + $ref: '#/components/schemas/TransactionType' + note: + $ref: '#/components/schemas/Note' + extensionList: + $ref: '#/components/schemas/ExtensionList' + required: + - transactionId + - quoteId + - payee + - payer + - amount + - transactionType + TransactionRequestsIDPutResponse: + title: TransactionRequestsIDPutResponse + type: object + description: 'PUT /transactionRequests/{ID} object' + properties: + transactionId: + $ref: '#/components/schemas/CorrelationId' + transactionRequestState: + $ref: '#/components/schemas/TransactionRequestState' + extensionList: + $ref: '#/components/schemas/ExtensionList' + required: + - transactionRequestState + TransactionsIDPutResponse: + title: TransactionsIDPutResponse + type: object + description: 'PUT /transactions/{ID} object' + properties: + completedTimestamp: + $ref: '#/components/schemas/DateTime' + transactionState: + $ref: '#/components/schemas/TransactionState' + code: + $ref: '#/components/schemas/Code' + extensionList: + $ref: '#/components/schemas/ExtensionList' + required: + - transactionState + TransactionType: + title: TransactionType + type: object + description: Data model for the complex type TransactionType. + properties: + scenario: + $ref: '#/components/schemas/TransactionScenario' + subScenario: + $ref: '#/components/schemas/TransactionSubScenario' + initiator: + $ref: '#/components/schemas/TransactionInitiator' + initiatorType: + $ref: '#/components/schemas/TransactionInitiatorType' + refundInfo: + $ref: '#/components/schemas/Refund' + balanceOfPayments: + $ref: '#/components/schemas/BalanceOfPayments' + required: + - scenario + - initiator + - initiatorType + TransfersPostRequest: + title: TransfersPostRequest + type: object + description: POST /transfers Request object + properties: + transferId: + $ref: '#/components/schemas/CorrelationId' + payeeFsp: + $ref: '#/components/schemas/FspId' + payerFsp: + $ref: '#/components/schemas/FspId' + amount: + $ref: '#/components/schemas/Money' + ilpPacket: + $ref: '#/components/schemas/IlpPacket' + condition: + $ref: '#/components/schemas/IlpCondition' + expiration: + $ref: '#/components/schemas/DateTime' + extensionList: + $ref: '#/components/schemas/ExtensionList' + required: + - transferId + - payeeFsp + - payerFsp + - amount + - ilpPacket + - condition + - expiration + TransactionRequestsPostRequest: + title: TransactionRequestsPostRequest + type: object + description: POST /transactionRequests object + properties: + transactionRequestId: + $ref: '#/components/schemas/CorrelationId' + payee: + $ref: '#/components/schemas/Party' + payer: + $ref: '#/components/schemas/PartyIdInfo' + amount: + $ref: '#/components/schemas/Money' + transactionType: + $ref: '#/components/schemas/TransactionType' + note: + $ref: '#/components/schemas/Note' + geoCode: + $ref: '#/components/schemas/GeoCode' + authenticationType: + $ref: '#/components/schemas/AuthenticationType' + expiration: + $ref: '#/components/schemas/DateTime' + extensionList: + $ref: '#/components/schemas/ExtensionList' + required: + - transactionRequestId + - payee + - payer + - amount + - transactionType + TransfersIDPutResponse: + title: TransfersIDPutResponse + type: object + description: 'PUT /transfers/{ID} object' + properties: + fulfilment: + $ref: '#/components/schemas/IlpFulfilment' + completedTimestamp: + $ref: '#/components/schemas/DateTime' + transferState: + $ref: '#/components/schemas/TransferState' + extensionList: + $ref: '#/components/schemas/ExtensionList' + required: + - transferState diff --git a/test/func/config/ttk-hub/spec_files/api_definitions/fspiop_1.0/callback_map.json b/test/func/config/ttk-hub/spec_files/api_definitions/fspiop_1.0/callback_map.json new file mode 100644 index 000000000..6b34b4d07 --- /dev/null +++ b/test/func/config/ttk-hub/spec_files/api_definitions/fspiop_1.0/callback_map.json @@ -0,0 +1,568 @@ +{ + "/transfers": { + "post": { + "fspid": "{$request.headers.fspiop-source}", + "successCallback": { + "method": "put", + "path": "/transfers/{ID}", + "pathPattern": "/transfers/{$request.body.transferId}", + "headerOverride": { + "FSPIOP-Source": "{$request.body.payeeFsp}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}", + "Content-Type": "{$session.negotiatedContentType}", + "Date": "{$request.headers.date}" + }, + "bodyOverride": { + "completedTimestamp": "{$function.generic.curDateISO}", + "transferState": "COMMITTED", + "extensionList": null + } + }, + "errorCallback": { + "method": "put", + "path": "/transfers/{ID}/error", + "pathPattern": "/transfers/{$request.body.transferId}/error", + "headerOverride": { + "FSPIOP-Source": "{$config.FSPID}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}", + "Content-Type": "{$session.negotiatedContentType}", + "Date": "{$request.headers.date}" + } + } + } + }, + "/transfers/{ID}": { + "get": { + "fspid": "{$request.headers.fspiop-source}", + "successCallback": { + "method": "put", + "path": "/transfers/{ID}", + "pathPattern": "/transfers/{$request.params.ID}", + "headerOverride": { + "FSPIOP-Source": "{$config.FSPID}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}", + "Content-Type": "{$session.negotiatedContentType}", + "Date": "{$request.headers.date}" + } + }, + "errorCallback": { + "method": "put", + "path": "/transfers/{ID}/error", + "pathPattern": "/transfers/{$request.params.ID}/error", + "headerOverride": { + "FSPIOP-Source": "{$config.FSPID}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}", + "Content-Type": "{$session.negotiatedContentType}", + "Date": "{$request.headers.date}" + } + } + } + }, + "/quotes": { + "post": { + "fspid": "{$request.headers.fspiop-source}", + "successCallback": { + "method": "put", + "path": "/quotes/{ID}", + "pathPattern": "/quotes/{$request.body.quoteId}", + "headerOverride": { + "FSPIOP-Source": "{$request.body.payee.partyIdInfo.fspId}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}", + "Content-Type": "{$session.negotiatedContentType}", + "Date": "{$request.headers.date}" + }, + "bodyOverride": { + "transferAmount": { + "currency": "{$request.body.amount.currency}", + "amount": "{$request.body.amount.amount}" + }, + "expiration": "2040-01-01T01:01:01.001Z", + "extensionList": null + } + }, + "errorCallback": { + "method": "put", + "path": "/quotes/{ID}/error", + "pathPattern": "/quotes/{$request.body.quoteId}/error", + "headerOverride": { + "FSPIOP-Source": "{$config.FSPID}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}", + "Content-Type": "{$session.negotiatedContentType}", + "Date": "{$request.headers.date}" + } + } + } + }, + "/quotes/{ID}": { + "get": { + "fspid": "{$request.headers.fspiop-source}", + "successCallback": { + "method": "put", + "path": "/quotes/{ID}", + "pathPattern": "/quotes/{$request.params.ID}", + "headerOverride": { + "FSPIOP-Source": "{$config.FSPID}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}", + "Content-Type": "{$session.negotiatedContentType}", + "Date": "{$request.headers.date}" + } + }, + "errorCallback": { + "method": "put", + "path": "/quotes/{ID}/error", + "pathPattern": "/quotes/{$request.params.ID}/error", + "headerOverride": { + "FSPIOP-Source": "{$config.FSPID}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}", + "Content-Type": "{$session.negotiatedContentType}", + "Date": "{$request.headers.date}" + } + } + } + }, + "/parties/{Type}/{ID}": { + "get": { + "fspid": "{$request.headers.fspiop-source}", + "successCallback": { + "method": "put", + "path": "/parties/{Type}/{ID}", + "pathPattern": "/parties/{$request.params.Type}/{$request.params.ID}", + "headerOverride": { + "FSPIOP-Source": "{$config.FSPID}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}", + "Content-Type": "{$session.negotiatedContentType}", + "Date": "{$request.headers.date}" + }, + "bodyOverride": { + "party": { + "partyIdInfo": { + "partyIdType": "{$request.params.Type}", + "partyIdentifier": "{$request.params.ID}", + "fspId": "{$config.FSPID}" + } + } + } + }, + "errorCallback": { + "method": "put", + "path": "/parties/{Type}/{ID}/error", + "pathPattern": "/parties/{$request.params.Type}/{$request.params.ID}/error", + "headerOverride": { + "FSPIOP-Source": "{$config.FSPID}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}", + "Content-Type": "{$session.negotiatedContentType}", + "Date": "{$request.headers.date}" + } + } + } + }, + "/parties/{Type}/{ID}/{SubId}": { + "get": { + "fspid": "{$request.headers.fspiop-source}", + "successCallback": { + "method": "put", + "path": "/parties/{Type}/{ID}/{SubId}", + "pathPattern": "/parties/{$request.params.Type}/{$request.params.ID}/{$request.params.SubId}", + "headerOverride": { + "FSPIOP-Source": "{$config.FSPID}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}", + "Content-Type": "{$session.negotiatedContentType}", + "Date": "{$request.headers.date}" + }, + "bodyOverride": { + "party": { + "partyIdInfo": { + "partyIdType": "{$request.params.Type}", + "partyIdentifier": "{$request.params.ID}", + "partySubIdOrType": null, + "fspId": "{$config.FSPID}" + } + } + } + }, + "errorCallback": { + "method": "put", + "path": "/parties/{Type}/{ID}/{SubId}/error", + "pathPattern": "/parties/{$request.params.Type}/{$request.params.ID}/{$request.params.SubId}/error", + "headerOverride": { + "FSPIOP-Source": "{$config.FSPID}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}", + "Content-Type": "{$session.negotiatedContentType}", + "Date": "{$request.headers.date}" + } + } + } + }, + "/transactionRequests": { + "post": { + "fspid": "{$request.headers.fspiop-source}", + "successCallback": { + "method": "put", + "path": "/transactionRequests/{ID}", + "pathPattern": "/transactionRequests/{$request.body.transactionRequestId}", + "headerOverride": { + "FSPIOP-Source": "{$config.FSPID}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}", + "Content-Type": "{$session.negotiatedContentType}", + "Date": "{$request.headers.date}" + } + }, + "errorCallback": { + "method": "put", + "path": "/transactionRequests/{ID}/error", + "pathPattern": "/transactionRequests/{$request.body.transactionRequestId}/error", + "headerOverride": { + "FSPIOP-Source": "{$config.FSPID}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}", + "Content-Type": "{$session.negotiatedContentType}", + "Date": "{$request.headers.date}" + } + } + } + }, + "/transactionRequests/{ID}": { + "get": { + "fspid": "{$request.headers.fspiop-source}", + "successCallback": { + "method": "put", + "path": "/transactionRequests/{ID}", + "pathPattern": "/transactionRequests/{$request.params.ID}", + "headerOverride": { + "FSPIOP-Source": "{$config.FSPID}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}", + "Content-Type": "{$session.negotiatedContentType}", + "Date": "{$request.headers.date}" + } + }, + "errorCallback": { + "method": "put", + "path": "/transactionRequests/{ID}/error", + "pathPattern": "/transactionRequests/{$request.params.ID}/error", + "headerOverride": { + "FSPIOP-Source": "{$config.FSPID}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}", + "Content-Type": "{$session.negotiatedContentType}", + "Date": "{$request.headers.date}" + } + } + } + }, + "/participants": { + "post": { + "fspid": "{$request.headers.fspiop-source}", + "successCallback": { + "method": "put", + "path": "/participants/{ID}", + "pathPattern": "/participants/{$request.body.requestId}", + "headerOverride": { + "FSPIOP-Source": "{$config.FSPID}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}", + "Content-Type": "{$session.negotiatedContentType}", + "Date": "{$request.headers.date}" + } + }, + "errorCallback": { + "method": "put", + "path": "/participants/{ID}/error", + "pathPattern": "/participants/{$request.body.requestId}/error", + "headerOverride": { + "FSPIOP-Source": "{$config.FSPID}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}", + "Content-Type": "{$session.negotiatedContentType}", + "Date": "{$request.headers.date}" + } + } + } + }, + "/participants/{Type}/{ID}": { + "get": { + "fspid": "{$request.headers.fspiop-source}", + "successCallback": { + "method": "put", + "path": "/participants/{Type}/{ID}", + "pathPattern": "/participants/{$request.params.Type}/{$request.params.ID}", + "headerOverride": { + "FSPIOP-Source": "{$config.FSPID}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}", + "Content-Type": "{$session.negotiatedContentType}", + "Date": "{$request.headers.date}" + } + }, + "errorCallback": { + "method": "put", + "path": "/participants/{Type}/{ID}/error", + "pathPattern": "/participants/{$request.params.Type}/{$request.params.ID}/error", + "headerOverride": { + "FSPIOP-Source": "{$config.FSPID}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}", + "Content-Type": "{$session.negotiatedContentType}", + "Date": "{$request.headers.date}" + } + } + }, + "post": { + "fspid": "{$request.headers.fspiop-source}", + "successCallback": { + "method": "put", + "path": "/participants/{Type}/{ID}", + "pathPattern": "/participants/{$request.params.Type}/{$request.params.ID}", + "headerOverride": { + "FSPIOP-Source": "{$config.FSPID}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}", + "Content-Type": "{$session.negotiatedContentType}", + "Date": "{$request.headers.date}" + } + }, + "errorCallback": { + "method": "put", + "path": "/participants/{Type}/{ID}/error", + "pathPattern": "/participants/{$request.params.Type}/{$request.params.ID}/error", + "headerOverride": { + "FSPIOP-Source": "{$config.FSPID}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}", + "Content-Type": "{$session.negotiatedContentType}", + "Date": "{$request.headers.date}" + } + } + }, + "delete": { + "fspid": "{$request.headers.fspiop-source}", + "successCallback": { + "method": "put", + "path": "/participants/{Type}/{ID}", + "pathPattern": "/participants/{$request.params.Type}/{$request.params.ID}", + "headerOverride": { + "FSPIOP-Source": "{$config.FSPID}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}", + "Content-Type": "{$session.negotiatedContentType}", + "Date": "{$request.headers.date}" + } + }, + "errorCallback": { + "method": "put", + "path": "/participants/{Type}/{ID}/error", + "pathPattern": "/participants/{$request.params.Type}/{$request.params.ID}/error", + "headerOverride": { + "FSPIOP-Source": "{$config.FSPID}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}", + "Content-Type": "{$session.negotiatedContentType}", + "Date": "{$request.headers.date}" + } + } + } + }, + "/participants/{Type}/{ID}/{SubId}": { + "get": { + "fspid": "{$request.headers.fspiop-source}", + "successCallback": { + "method": "put", + "path": "/participants/{Type}/{ID}/{SubId}", + "pathPattern": "/participants/{$request.params.Type}/{$request.params.ID}", + "headerOverride": { + "FSPIOP-Source": "{$config.FSPID}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}", + "Content-Type": "{$session.negotiatedContentType}", + "Date": "{$request.headers.date}" + } + }, + "errorCallback": { + "method": "put", + "path": "/participants/{Type}/{ID}/{SubId}/error", + "pathPattern": "/participants/{$request.params.Type}/{$request.params.ID}/error", + "headerOverride": { + "FSPIOP-Source": "{$config.FSPID}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}", + "Content-Type": "{$session.negotiatedContentType}", + "Date": "{$request.headers.date}" + } + } + }, + "post": { + "fspid": "{$request.headers.fspiop-source}", + "successCallback": { + "method": "put", + "path": "/participants/{Type}/{ID}/{SubId}", + "pathPattern": "/participants/{$request.params.Type}/{$request.params.ID}", + "headerOverride": { + "FSPIOP-Source": "{$config.FSPID}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}", + "Content-Type": "{$session.negotiatedContentType}", + "Date": "{$request.headers.date}" + } + }, + "errorCallback": { + "method": "put", + "path": "/participants/{Type}/{ID}/{SubId}/error", + "pathPattern": "/participants/{$request.params.Type}/{$request.params.ID}/error", + "headerOverride": { + "FSPIOP-Source": "{$config.FSPID}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}", + "Content-Type": "{$session.negotiatedContentType}", + "Date": "{$request.headers.date}" + } + } + } + }, + "/authorizations/{ID}": { + "get": { + "fspid": "{$request.headers.fspiop-source}", + "successCallback": { + "method": "put", + "path": "/authorizations/{ID}", + "pathPattern": "/authorizations/{$request.params.ID}", + "headerOverride": { + "FSPIOP-Source": "{$config.FSPID}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}", + "Content-Type": "{$session.negotiatedContentType}", + "Date": "{$request.headers.date}" + } + }, + "errorCallback": { + "method": "put", + "path": "/authorizations/{ID}/error", + "pathPattern": "/authorizations/{$request.params.ID}/error", + "headerOverride": { + "FSPIOP-Source": "{$config.FSPID}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}", + "Content-Type": "{$session.negotiatedContentType}", + "Date": "{$request.headers.date}" + } + } + } + }, + "/transactions/{ID}": { + "get": { + "fspid": "{$request.headers.fspiop-source}", + "successCallback": { + "method": "put", + "path": "/transactions/{ID}", + "pathPattern": "/transactions/{$request.params.ID}", + "headerOverride": { + "FSPIOP-Source": "{$config.FSPID}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}", + "Content-Type": "{$session.negotiatedContentType}", + "Date": "{$request.headers.date}" + } + }, + "errorCallback": { + "method": "put", + "path": "/transactions/{ID}/error", + "pathPattern": "/transactions/{$request.params.ID}/error", + "headerOverride": { + "FSPIOP-Source": "{$config.FSPID}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}", + "Content-Type": "{$session.negotiatedContentType}", + "Date": "{$request.headers.date}" + } + } + } + }, + "/bulkQuotes": { + "post": { + "fspid": "{$request.headers.fspiop-source}", + "successCallback": { + "method": "put", + "path": "/bulkQuotes/{ID}", + "pathPattern": "/bulkQuotes/{$request.body.bulkQuoteId}", + "headerOverride": { + "FSPIOP-Source": "{$config.FSPID}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}", + "Content-Type": "{$session.negotiatedContentType}", + "Date": "{$request.headers.date}" + } + }, + "errorCallback": { + "method": "put", + "path": "/bulkQuotes/{ID}/error", + "pathPattern": "/bulkQuotes/{$request.body.bulkQuoteId}/error", + "headerOverride": { + "FSPIOP-Source": "{$config.FSPID}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}", + "Content-Type": "{$session.negotiatedContentType}", + "Date": "{$request.headers.date}" + } + } + } + }, + "/bulkQuotes/{ID}": { + "get": { + "fspid": "{$request.headers.fspiop-source}", + "successCallback": { + "method": "put", + "path": "/bulkQuotes/{ID}", + "pathPattern": "/bulkQuotes/{$request.params.ID}", + "headerOverride": { + "FSPIOP-Source": "{$config.FSPID}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}", + "Content-Type": "{$session.negotiatedContentType}", + "Date": "{$request.headers.date}" + } + }, + "errorCallback": { + "method": "put", + "path": "/bulkQuotes/{ID}/error", + "pathPattern": "/bulkQuotes/{$request.params.ID}/error", + "headerOverride": { + "FSPIOP-Source": "{$config.FSPID}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}", + "Content-Type": "{$session.negotiatedContentType}", + "Date": "{$request.headers.date}" + } + } + } + }, + "/bulkTransfers": { + "post": { + "fspid": "{$request.headers.fspiop-source}", + "successCallback": { + "method": "put", + "path": "/bulkTransfers/{ID}", + "pathPattern": "/bulkTransfers/{$request.body.bulkTransferId}", + "headerOverride": { + "FSPIOP-Source": "{$config.FSPID}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}", + "Content-Type": "{$session.negotiatedContentType}", + "Date": "{$request.headers.date}" + } + }, + "errorCallback": { + "method": "put", + "path": "/bulkTransfers/{ID}/error", + "pathPattern": "/bulkTransfers/{$request.body.bulkTransferId}/error", + "headerOverride": { + "FSPIOP-Source": "{$config.FSPID}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}", + "Content-Type": "{$session.negotiatedContentType}", + "Date": "{$request.headers.date}" + } + } + } + }, + "/bulkTransfers/{ID}": { + "get": { + "fspid": "{$request.headers.fspiop-source}", + "successCallback": { + "method": "put", + "path": "/bulkTransfers/{ID}", + "pathPattern": "/bulkTransfers/{$request.params.ID}", + "headerOverride": { + "FSPIOP-Source": "{$config.FSPID}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}", + "Content-Type": "{$session.negotiatedContentType}", + "Date": "{$request.headers.date}" + } + }, + "errorCallback": { + "method": "put", + "path": "/bulkTransfers/{ID}/error", + "pathPattern": "/bulkTransfers/{$request.params.ID}/error", + "headerOverride": { + "FSPIOP-Source": "{$config.FSPID}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}", + "Content-Type": "{$session.negotiatedContentType}", + "Date": "{$request.headers.date}" + } + } + } + } +} \ No newline at end of file diff --git a/test/func/config/ttk-hub/spec_files/api_definitions/fspiop_1.0/mockRef.json b/test/func/config/ttk-hub/spec_files/api_definitions/fspiop_1.0/mockRef.json new file mode 100644 index 000000000..77f657ccc --- /dev/null +++ b/test/func/config/ttk-hub/spec_files/api_definitions/fspiop_1.0/mockRef.json @@ -0,0 +1,79 @@ +[ + { + "id": "party.personalInfo.complexName.firstName", + "pattern": "John|David|Michael|Chris|Mike|Mark|Paul|Daniel|James|Maria" + }, + { + "id": "party.personalInfo.complexName.middleName", + "pattern": "G|P|N|S" + }, + { + "id": "party.personalInfo.complexName.lastName", + "pattern": "Smith|Jones|Johnson|Lee|Brown|Williams|Rodriguez|Garcia|Gonzalez|Lopez" + }, + { + "id": "party.personalInfo.dateOfBirth", + "pattern": "^(19)\\d\\d[-](0[1-9]|1[012])[-](0[1-9]|[12][0-9]|2[0-8])$" + }, + { + "id": "transferId", + "faker": "internet.email" + }, + { + "id": "transferState", + "pattern": "COMMITTED|RESERVED|ABORTED|RECEIVED" + }, + { + "id": "fulfilment", + "pattern": "[A-Fa-f0-9]{64}" + }, + { + "id": "condition", + "pattern": "[A-Fa-f0-9]{64}" + }, + { + "id": "ilpPacket", + "pattern": "[A-Fa-f0-9]{256}" + }, + { + "id": "transferAmount.currency", + "pattern": "USD" + }, + { + "id": "transferAmount.amount", + "pattern": "123" + }, + { + "id": "payeeReceiveAmount.currency", + "pattern": "USD" + }, + { + "id": "payeeReceiveAmount.amount", + "pattern": "123" + }, + { + "id": "payeeFspFee.currency", + "pattern": "USD" + }, + { + "id": "payeeFspFee.amount", + "pattern": "2" + }, + { + "id": "payeeFspCommission.currency", + "pattern": "USD" + }, + { + "id": "payeeFspCommission.amount", + "pattern": "3" + }, + + { + "id": "errorInformation.errorCode", + "pattern": "600[1-9]" + }, + { + "id": "errorInformation.errorDescription", + "pattern": "This is a mock error description" + } +] \ No newline at end of file diff --git a/test/func/config/ttk-hub/spec_files/api_definitions/fspiop_1.0/trigger_templates/transaction_request_followup.json b/test/func/config/ttk-hub/spec_files/api_definitions/fspiop_1.0/trigger_templates/transaction_request_followup.json new file mode 100644 index 000000000..d23b75e2b --- /dev/null +++ b/test/func/config/ttk-hub/spec_files/api_definitions/fspiop_1.0/trigger_templates/transaction_request_followup.json @@ -0,0 +1,126 @@ +{ + "name": "Transaction Request Service Followup", + "inputValues": { + "payerFirstName": "Vijay", + "payerLastName": "Kumar", + "payerDOB": "1984-01-01", + "accept": "application/vnd.interoperability.parties+json;version=1.0", + "contentType": "application/vnd.interoperability.parties+json;version=1.0", + "transactionId": "e8c4572c-0826-22f4-aa3e-f5bbe928afa6", + "TrsNote": "note", + "TrsCurrency": "USD", + "TrsAmount": "100", + "TrsPayerIdType": "MSISDN", + "TrsPayerIdValue": "44123456789", + "TrsPayerFspId": "testingtoolkitdfsp", + "TrsPayeeIdType": "MSISDN", + "TrsPayeeIdValue": "9876543210", + "TrsPayeeFspId": "userdfsp", + "TrsScenario": "DEPOSIT", + "TrsInitiator": "PAYEE", + "TrsInitiatorType": "CONSUMER" + }, + "test_cases": [ + { + "id": 1, + "name": "Transaction Request Followup", + "requests": [ + { + "id": 2, + "description": "Get quote", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "operationPath": "/quotes", + "method": "post", + "headers": { + "Accept": "{$inputs.accept}", + "Content-Type": "{$inputs.contentType}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.TrsPayerFspId}" + }, + "body": { + "quoteId": "{$function.generic.generateUUID}", + "transactionId": "{$inputs.transactionId}", + "payer": { + "partyIdInfo": { + "partyIdType": "{$inputs.TrsPayerIdType}", + "partyIdentifier": "{$inputs.TrsPayerIdValue}", + "fspId": "{$inputs.TrsPayerFspId}" + }, + "personalInfo": { + "complexName": { + "firstName": "{$inputs.payerFirstName}", + "lastName": "{$inputs.payerLastName}" + }, + "dateOfBirth": "{$inputs.payerDOB}" + } + }, + "payee": { + "partyIdInfo": { + "partyIdType": "{$inputs.TrsPayeeIdType}", + "partyIdentifier": "{$inputs.TrsPayeeIdValue}", + "fspId": "{$inputs.TrsPayeeFspId}" + } + }, + "amountType": "SEND", + "amount": { + "amount": "{$inputs.TrsAmount}", + "currency": "{$inputs.TrsCurrency}" + }, + "transactionType": { + "scenario": "{$inputs.TrsScenario}", + "initiator": "{$inputs.TrsInitiator}", + "initiatorType": "{$inputs.TrsInitiatorType}" + }, + "transactionRequestId": "{$inputs.TrsTransactionRequestId}", + "note": "{$inputs.TrsNote}" + }, + "tests": { + "assertions": [] + }, + "params": { + "Type": "", + "ID": "" + } + }, + { + "id": 3, + "description": "Send transfer", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "operationPath": "/transfers", + "method": "post", + "headers": { + "Accept": "{$inputs.accept}", + "Content-Type": "{$inputs.contentType}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.TrsPayerFspId}" + }, + "body": { + "transferId": "{$prev.2.request.body.transactionId}", + "payerFsp": "{$inputs.TrsPayerFspId}", + "payeeFsp": "{$inputs.TrsPayeeFspId}", + "amount": { + "amount": "{$inputs.TrsAmount}", + "currency": "{$inputs.TrsCurrency}" + }, + "expiration": "{$prev.2.callback.body.expiration}", + "ilpPacket": "{$prev.2.callback.body.ilpPacket}", + "condition": "{$prev.2.callback.body.condition}" + }, + "tests": { + "assertions": [] + } + } + ] + } + ] +} \ No newline at end of file diff --git a/test/func/config/ttk-hub/spec_files/api_definitions/fspiop_1.0/trigger_templates/transaction_request_followup_quotes_only.json b/test/func/config/ttk-hub/spec_files/api_definitions/fspiop_1.0/trigger_templates/transaction_request_followup_quotes_only.json new file mode 100644 index 000000000..93fadbe26 --- /dev/null +++ b/test/func/config/ttk-hub/spec_files/api_definitions/fspiop_1.0/trigger_templates/transaction_request_followup_quotes_only.json @@ -0,0 +1,97 @@ +{ + "name": "Transaction Request Service Followup", + "inputValues": { + "payerFirstName": "Vijay", + "payerLastName": "Kumar", + "payerDOB": "1984-01-01", + "accept": "application/vnd.interoperability.quotes+json;version=1.0", + "contentType": "application/vnd.interoperability.quotes+json;version=1.0", + "transactionId": "e8c4572c-0826-22f4-aa3e-f5bbe928afa6", + "TrsNote": "note", + "TrsCurrency": "USD", + "TrsAmount": "100", + "TrsPayerIdType": "MSISDN", + "TrsPayerIdValue": "44123456789", + "TrsPayerFspId": "testingtoolkitdfsp", + "TrsPayeeIdType": "MSISDN", + "TrsPayeeIdValue": "9876543210", + "TrsPayeeFspId": "userdfsp", + "TrsScenario": "DEPOSIT", + "TrsInitiator": "PAYEE", + "TrsInitiatorType": "CONSUMER", + "HOST_QUOTING_SERVICE": "http://dev1-quoting-service.mojaloop.live" + }, + "test_cases": [ + { + "id": 1, + "name": "Transaction Request Followup", + "requests": [ + { + "id": 2, + "description": "Get quote", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "operationPath": "/quotes", + "method": "post", + "headers": { + "Accept": "{$inputs.accept}", + "Content-Type": "{$inputs.contentType}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.TrsPayerFspId}", + "FSPIOP-Destination": "{$inputs.TrsPayeeFspId}" + }, + "body": { + "quoteId": "{$function.generic.generateUUID}", + "transactionId": "{$inputs.transactionId}", + "payer": { + "partyIdInfo": { + "partyIdType": "{$inputs.TrsPayerIdType}", + "partyIdentifier": "{$inputs.TrsPayerIdValue}", + "fspId": "{$inputs.TrsPayerFspId}" + }, + "personalInfo": { + "complexName": { + "firstName": "{$inputs.payerFirstName}", + "lastName": "{$inputs.payerLastName}" + }, + "dateOfBirth": "{$inputs.payerDOB}" + } + }, + "payee": { + "partyIdInfo": { + "partyIdType": "{$inputs.TrsPayeeIdType}", + "partyIdentifier": "{$inputs.TrsPayeeIdValue}", + "fspId": "{$inputs.TrsPayeeFspId}" + } + }, + "amountType": "RECEIVE", + "amount": { + "amount": "{$inputs.TrsAmount}", + "currency": "{$inputs.TrsCurrency}" + }, + "transactionType": { + "scenario": "{$inputs.TrsScenario}", + "initiator": "{$inputs.TrsInitiator}", + "initiatorType": "{$inputs.TrsInitiatorType}" + }, + "note": "{$inputs.TrsNote}" + }, + "tests": { + "assertions": [] + }, + "params": { + "Type": "", + "ID": "" + }, + "url": "{$inputs.HOST_QUOTING_SERVICE}", + "ignoreCallbacks": false, + "delay": "500" + } + ] + } + ] +} \ No newline at end of file diff --git a/test/func/config/ttk-hub/spec_files/api_definitions/fspiop_1.1/api_spec.yaml b/test/func/config/ttk-hub/spec_files/api_definitions/fspiop_1.1/api_spec.yaml new file mode 100644 index 000000000..179fbbb94 --- /dev/null +++ b/test/func/config/ttk-hub/spec_files/api_definitions/fspiop_1.1/api_spec.yaml @@ -0,0 +1,3778 @@ +openapi: "3.0.2" +info: + version: "1.1" + title: Open API for FSP Interoperability (FSPIOP) + description: + Based on [API Definition updated on 2020-05-19 Version 1.1](https://github.com/mojaloop/mojaloop-specification/blob/master/documents/v1.1-document-set/API%20Definition_v1.1.pdf). + + + **Note:** The API supports a maximum size of 65536 bytes (64 Kilobytes) in the HTTP header. + license: + name: CC BY-ND 4.0 + url: https://github.com/mojaloop/mojaloop-specification/blob/master/LICENSE.md + contact: + name: "Sam Kummary" + url: https://github.com/mojaloop/mojaloop-specification/issues +servers: + - url: "{protocol}://hostname:/switch/" + variables: + protocol: + enum: + - http + - https + default: https + +paths: + #Participants + /participants/{Type}/{ID}: + parameters: + #Path + - $ref: "#/components/parameters/Type" + - $ref: "#/components/parameters/ID" + #Headers + - $ref: "#/components/parameters/Content-Type" + - $ref: "#/components/parameters/Date" + - $ref: "#/components/parameters/X-Forwarded-For" + - $ref: "#/components/parameters/FSPIOP-Source" + - $ref: "#/components/parameters/FSPIOP-Destination" + - $ref: "#/components/parameters/FSPIOP-Encryption" + - $ref: "#/components/parameters/FSPIOP-Signature" + - $ref: "#/components/parameters/FSPIOP-URI" + - $ref: "#/components/parameters/FSPIOP-HTTP-Method" + post: + description: The HTTP request `POST /participants/{Type}/{ID}` (or `POST /participants/{Type}/{ID}/{SubId}`) is used to create information in the server regarding the provided identity, defined by `{Type}`, `{ID}`, and optionally `{SubId}` (for example, `POST /participants/MSISDN/123456789` or `POST /participants/BUSINESS/shoecompany/employee1`). An ExtensionList element has been added to this reqeust in version v1.1 + summary: Create participant information + tags: + - participants + operationId: ParticipantsByIDAndType + parameters: + #Headers + - $ref: "#/components/parameters/Accept" + - $ref: "#/components/parameters/Content-Length" + requestBody: + description: Participant information to be created. + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/ParticipantsTypeIDSubIDPostRequest" + responses: + 202: + $ref: "#/components/responses/202" + 400: + $ref: "#/components/responses/400" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 404: + $ref: "#/components/responses/404" + 405: + $ref: "#/components/responses/405" + 406: + $ref: "#/components/responses/406" + 501: + $ref: "#/components/responses/501" + 503: + $ref: "#/components/responses/503" + get: + description: The HTTP request `GET /participants/{Type}/{ID}` (or `GET /participants/{Type}/{ID}/{SubId}`) is used to find out in which FSP the requested Party, defined by `{Type}`, `{ID}` and optionally `{SubId}`, is located (for example, `GET /participants/MSISDN/123456789`, or `GET /participants/BUSINESS/shoecompany/employee1`). This HTTP request should support a query string for filtering of currency. To use filtering of currency, the HTTP request `GET /participants/{Type}/{ID}?currency=XYZ` should be used, where `XYZ` is the requested currency. + summary: Look up participant information + tags: + - participants + operationId: ParticipantsByTypeAndID + parameters: + #Headers + - $ref: "#/components/parameters/Accept" + responses: + 202: + $ref: "#/components/responses/202" + 400: + $ref: "#/components/responses/400" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 404: + $ref: "#/components/responses/404" + 405: + $ref: "#/components/responses/405" + 406: + $ref: "#/components/responses/406" + 501: + $ref: "#/components/responses/501" + 503: + $ref: "#/components/responses/503" + put: + description: The callback `PUT /participants/{Type}/{ID}` (or `PUT /participants/{Type}/{ID}/{SubId}`) is used to inform the client of a successful result of the lookup, creation, or deletion of the FSP information related to the Party. If the FSP information is deleted, the fspId element should be empty; otherwise the element should include the FSP information for the Party. + summary: Return participant information + tags: + - participants + operationId: ParticipantsByTypeAndID3 + parameters: + #Headers + - $ref: "#/components/parameters/Content-Length" + requestBody: + description: Participant information returned. + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/ParticipantsTypeIDPutResponse" + responses: + 200: + $ref: "#/components/responses/200" + 400: + $ref: "#/components/responses/400" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 404: + $ref: "#/components/responses/404" + 405: + $ref: "#/components/responses/405" + 406: + $ref: "#/components/responses/406" + 501: + $ref: "#/components/responses/501" + 503: + $ref: "#/components/responses/503" + delete: + description: + The HTTP request `DELETE /participants/{Type}/{ID}` (or `DELETE /participants/{Type}/{ID}/{SubId}`) is used to delete information in the server regarding the provided identity, defined by `{Type}` and `{ID}`) (for example, `DELETE /participants/MSISDN/123456789`), and optionally `{SubId}`. This HTTP request should support a query string to delete FSP information regarding a specific currency only. To delete a specific currency only, the HTTP request `DELETE /participants/{Type}/{ID}?currency=XYZ` should be used, where `XYZ` is the requested currency. + + + **Note:** The Account Lookup System should verify that it is the Party’s current FSP that is deleting the FSP information. + summary: Delete participant information + tags: + - participants + operationId: ParticipantsByTypeAndID2 + parameters: + #Headers + - $ref: "#/components/parameters/Accept" + responses: + 202: + $ref: "#/components/responses/202" + 400: + $ref: "#/components/responses/400" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 404: + $ref: "#/components/responses/404" + 405: + $ref: "#/components/responses/405" + 406: + $ref: "#/components/responses/406" + 501: + $ref: "#/components/responses/501" + 503: + $ref: "#/components/responses/503" + /participants/{Type}/{ID}/error: + put: + description: If the server is unable to find, create or delete the associated FSP of the provided identity, or another processing error occurred, the error callback `PUT /participants/{Type}/{ID}/error` (or `PUT /participants/{Type}/{ID}/{SubId}/error`) is used. + summary: Return participant information error + tags: + - participants + operationId: ParticipantsErrorByTypeAndID + parameters: + #Path + - $ref: "#/components/parameters/Type" + - $ref: "#/components/parameters/ID" + #Headers + - $ref: "#/components/parameters/Content-Length" + - $ref: "#/components/parameters/Content-Type" + - $ref: "#/components/parameters/Date" + - $ref: "#/components/parameters/X-Forwarded-For" + - $ref: "#/components/parameters/FSPIOP-Source" + - $ref: "#/components/parameters/FSPIOP-Destination" + - $ref: "#/components/parameters/FSPIOP-Encryption" + - $ref: "#/components/parameters/FSPIOP-Signature" + - $ref: "#/components/parameters/FSPIOP-URI" + - $ref: "#/components/parameters/FSPIOP-HTTP-Method" + requestBody: + description: Details of the error returned. + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorInformationObject" + responses: + 200: + $ref: "#/components/responses/200" + 400: + $ref: "#/components/responses/400" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 404: + $ref: "#/components/responses/404" + 405: + $ref: "#/components/responses/405" + 406: + $ref: "#/components/responses/406" + 501: + $ref: "#/components/responses/501" + 503: + $ref: "#/components/responses/503" + /participants/{Type}/{ID}/{SubId}: + parameters: + #Path + - $ref: "#/components/parameters/Type" + - $ref: "#/components/parameters/ID" + - $ref: "#/components/parameters/SubId" + #Headers + - $ref: "#/components/parameters/Content-Type" + - $ref: "#/components/parameters/Date" + - $ref: "#/components/parameters/X-Forwarded-For" + - $ref: "#/components/parameters/FSPIOP-Source" + - $ref: "#/components/parameters/FSPIOP-Destination" + - $ref: "#/components/parameters/FSPIOP-Encryption" + - $ref: "#/components/parameters/FSPIOP-Signature" + - $ref: "#/components/parameters/FSPIOP-URI" + - $ref: "#/components/parameters/FSPIOP-HTTP-Method" + post: + description: The HTTP request `POST /participants/{Type}/{ID}` (or `POST /participants/{Type}/{ID}/{SubId}`) is used to create information in the server regarding the provided identity, defined by `{Type}`, `{ID}`, and optionally `{SubId}` (for example, `POST /participants/MSISDN/123456789` or `POST /participants/BUSINESS/shoecompany/employee1`). An ExtensionList element has been added to this reqeust in version v1.1 + summary: Create participant information + tags: + - participants + operationId: ParticipantsSubIdByTypeAndIDPost + parameters: + #Headers + - $ref: "#/components/parameters/Accept" + - $ref: "#/components/parameters/Content-Length" + requestBody: + description: Participant information to be created. + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/ParticipantsTypeIDSubIDPostRequest" + responses: + 202: + $ref: "#/components/responses/202" + 400: + $ref: "#/components/responses/400" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 404: + $ref: "#/components/responses/404" + 405: + $ref: "#/components/responses/405" + 406: + $ref: "#/components/responses/406" + 501: + $ref: "#/components/responses/501" + 503: + $ref: "#/components/responses/503" + get: + description: The HTTP request `GET /participants/{Type}/{ID}` (or `GET /participants/{Type}/{ID}/{SubId}`) is used to find out in which FSP the requested Party, defined by `{Type}`, `{ID}` and optionally `{SubId}`, is located (for example, `GET /participants/MSISDN/123456789`, or `GET /participants/BUSINESS/shoecompany/employee1`). This HTTP request should support a query string for filtering of currency. To use filtering of currency, the HTTP request `GET /participants/{Type}/{ID}?currency=XYZ` should be used, where `XYZ` is the requested currency. + summary: Look up participant information + tags: + - participants + operationId: ParticipantsSubIdByTypeAndID + parameters: + #Headers + - $ref: "#/components/parameters/Accept" + responses: + 202: + $ref: "#/components/responses/202" + 400: + $ref: "#/components/responses/400" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 404: + $ref: "#/components/responses/404" + 405: + $ref: "#/components/responses/405" + 406: + $ref: "#/components/responses/406" + 501: + $ref: "#/components/responses/501" + 503: + $ref: "#/components/responses/503" + put: + description: The callback `PUT /participants/{Type}/{ID}` (or `PUT /participants/{Type}/{ID}/{SubId}`) is used to inform the client of a successful result of the lookup, creation, or deletion of the FSP information related to the Party. If the FSP information is deleted, the fspId element should be empty; otherwise the element should include the FSP information for the Party. + summary: Return participant information + tags: + - participants + operationId: ParticipantsSubIdByTypeAndID3 + parameters: + #Headers + - $ref: "#/components/parameters/Content-Length" + requestBody: + description: Participant information returned. + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/ParticipantsTypeIDPutResponse" + responses: + 200: + $ref: "#/components/responses/200" + 400: + $ref: "#/components/responses/400" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 404: + $ref: "#/components/responses/404" + 405: + $ref: "#/components/responses/405" + 406: + $ref: "#/components/responses/406" + 501: + $ref: "#/components/responses/501" + 503: + $ref: "#/components/responses/503" + delete: + description: + The HTTP request `DELETE /participants/{Type}/{ID}` (or `DELETE /participants/{Type}/{ID}/{SubId}`) is used to delete information in the server regarding the provided identity, defined by `{Type}` and `{ID}`) (for example, `DELETE /participants/MSISDN/123456789`), and optionally `{SubId}`. This HTTP request should support a query string to delete FSP information regarding a specific currency only. To delete a specific currency only, the HTTP request `DELETE /participants/{Type}/{ID}?currency=XYZ` should be used, where `XYZ` is the requested currency. + + + **Note:** The Account Lookup System should verify that it is the Party’s current FSP that is deleting the FSP information. + summary: Delete participant information + tags: + - participants + operationId: ParticipantsSubIdByTypeAndID2 + parameters: + #Headers + - $ref: "#/components/parameters/Accept" + responses: + 202: + $ref: "#/components/responses/202" + 400: + $ref: "#/components/responses/400" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 404: + $ref: "#/components/responses/404" + 405: + $ref: "#/components/responses/405" + 406: + $ref: "#/components/responses/406" + 501: + $ref: "#/components/responses/501" + 503: + $ref: "#/components/responses/503" + /participants/{Type}/{ID}/{SubId}/error: + put: + description: If the server is unable to find, create or delete the associated FSP of the provided identity, or another processing error occurred, the error callback `PUT /participants/{Type}/{ID}/error` (or `PUT /participants/{Type}/{ID}/{SubId}/error`) is used. + summary: Return participant information error + tags: + - participants + operationId: ParticipantsSubIdErrorByTypeAndID + parameters: + #Path + - $ref: "#/components/parameters/Type" + - $ref: "#/components/parameters/ID" + - $ref: "#/components/parameters/SubId" + #Headers + - $ref: "#/components/parameters/Content-Length" + - $ref: "#/components/parameters/Content-Type" + - $ref: "#/components/parameters/Date" + - $ref: "#/components/parameters/X-Forwarded-For" + - $ref: "#/components/parameters/FSPIOP-Source" + - $ref: "#/components/parameters/FSPIOP-Destination" + - $ref: "#/components/parameters/FSPIOP-Encryption" + - $ref: "#/components/parameters/FSPIOP-Signature" + - $ref: "#/components/parameters/FSPIOP-URI" + - $ref: "#/components/parameters/FSPIOP-HTTP-Method" + requestBody: + description: Details of the error returned. + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorInformationObject" + responses: + 200: + $ref: "#/components/responses/200" + 400: + $ref: "#/components/responses/400" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 404: + $ref: "#/components/responses/404" + 405: + $ref: "#/components/responses/405" + 406: + $ref: "#/components/responses/406" + 501: + $ref: "#/components/responses/501" + 503: + $ref: "#/components/responses/503" + /participants: + post: + description: The HTTP request `POST /participants` is used to create information in the server regarding the provided list of identities. This request should be used for bulk creation of FSP information for more than one Party. The optional currency parameter should indicate that each provided Party supports the currency. + summary: Create bulk participant information + tags: + - participants + operationId: Participants1 + parameters: + #Headers + - $ref: "#/components/parameters/Accept" + - $ref: "#/components/parameters/Content-Length" + - $ref: "#/components/parameters/Content-Type" + - $ref: "#/components/parameters/Date" + - $ref: "#/components/parameters/X-Forwarded-For" + - $ref: "#/components/parameters/FSPIOP-Source" + - $ref: "#/components/parameters/FSPIOP-Destination" + - $ref: "#/components/parameters/FSPIOP-Encryption" + - $ref: "#/components/parameters/FSPIOP-Signature" + - $ref: "#/components/parameters/FSPIOP-URI" + - $ref: "#/components/parameters/FSPIOP-HTTP-Method" + requestBody: + description: Participant information to be created. + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/ParticipantsPostRequest" + responses: + 202: + $ref: "#/components/responses/202" + 400: + $ref: "#/components/responses/400" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 404: + $ref: "#/components/responses/404" + 405: + $ref: "#/components/responses/405" + 406: + $ref: "#/components/responses/406" + 501: + $ref: "#/components/responses/501" + 503: + $ref: "#/components/responses/503" + /participants/{ID}: + put: + description: The callback `PUT /participants/{ID}` is used to inform the client of the result of the creation of the provided list of identities. + summary: Return bulk participant information + tags: + - participants + operationId: putParticipantsByID + parameters: + #Path + - $ref: "#/components/parameters/ID" + #Headers + - $ref: "#/components/parameters/Content-Length" + - $ref: "#/components/parameters/Content-Type" + - $ref: "#/components/parameters/Date" + - $ref: "#/components/parameters/X-Forwarded-For" + - $ref: "#/components/parameters/FSPIOP-Source" + - $ref: "#/components/parameters/FSPIOP-Destination" + - $ref: "#/components/parameters/FSPIOP-Encryption" + - $ref: "#/components/parameters/FSPIOP-Signature" + - $ref: "#/components/parameters/FSPIOP-URI" + - $ref: "#/components/parameters/FSPIOP-HTTP-Method" + requestBody: + description: Participant information returned. + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/ParticipantsIDPutResponse" + responses: + 200: + $ref: "#/components/responses/200" + 400: + $ref: "#/components/responses/400" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 404: + $ref: "#/components/responses/404" + 405: + $ref: "#/components/responses/405" + 406: + $ref: "#/components/responses/406" + 501: + $ref: "#/components/responses/501" + 503: + $ref: "#/components/responses/503" + /participants/{ID}/error: + put: + description: If there is an error during FSP information creation in the server, the error callback `PUT /participants/{ID}/error` is used. The `{ID}` in the URI should contain the requestId that was used for the creation of the participant information. + summary: Return bulk participant information error + tags: + - participants + operationId: ParticipantsByIDAndError + parameters: + #Path + - $ref: "#/components/parameters/ID" + #Headers + - $ref: "#/components/parameters/Content-Length" + - $ref: "#/components/parameters/Content-Type" + - $ref: "#/components/parameters/Date" + - $ref: "#/components/parameters/X-Forwarded-For" + - $ref: "#/components/parameters/FSPIOP-Source" + - $ref: "#/components/parameters/FSPIOP-Destination" + - $ref: "#/components/parameters/FSPIOP-Encryption" + - $ref: "#/components/parameters/FSPIOP-Signature" + - $ref: "#/components/parameters/FSPIOP-URI" + - $ref: "#/components/parameters/FSPIOP-HTTP-Method" + requestBody: + description: Details of the error returned. + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorInformationObject" + responses: + 200: + $ref: "#/components/responses/200" + 400: + $ref: "#/components/responses/400" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 404: + $ref: "#/components/responses/404" + 405: + $ref: "#/components/responses/405" + 406: + $ref: "#/components/responses/406" + 501: + $ref: "#/components/responses/501" + 503: + $ref: "#/components/responses/503" + + #Parties + /parties/{Type}/{ID}: + parameters: + #Path + - $ref: "#/components/parameters/Type" + - $ref: "#/components/parameters/ID" + #Headers + - $ref: "#/components/parameters/Content-Type" + - $ref: "#/components/parameters/Date" + - $ref: "#/components/parameters/X-Forwarded-For" + - $ref: "#/components/parameters/FSPIOP-Source" + - $ref: "#/components/parameters/FSPIOP-Destination" + - $ref: "#/components/parameters/FSPIOP-Encryption" + - $ref: "#/components/parameters/FSPIOP-Signature" + - $ref: "#/components/parameters/FSPIOP-URI" + - $ref: "#/components/parameters/FSPIOP-HTTP-Method" + get: + description: The HTTP request `GET /parties/{Type}/{ID}` (or `GET /parties/{Type}/{ID}/{SubId}`) is used to look up information regarding the requested Party, defined by `{Type}`, `{ID}` and optionally `{SubId}` (for example, `GET /parties/MSISDN/123456789`, or `GET /parties/BUSINESS/shoecompany/employee1`). + summary: Look up party information + tags: + - parties + operationId: PartiesByTypeAndID + parameters: + #Headers + - $ref: "#/components/parameters/Accept" + responses: + 202: + $ref: "#/components/responses/202" + 400: + $ref: "#/components/responses/400" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 404: + $ref: "#/components/responses/404" + 405: + $ref: "#/components/responses/405" + 406: + $ref: "#/components/responses/406" + 501: + $ref: "#/components/responses/501" + 503: + $ref: "#/components/responses/503" + put: + description: The callback `PUT /parties/{Type}/{ID}` (or `PUT /parties/{Type}/{ID}/{SubId}`) is used to inform the client of a successful result of the Party information lookup. + summary: Return party information + tags: + - parties + operationId: PartiesByTypeAndID2 + parameters: + #Headers + - $ref: "#/components/parameters/Content-Length" + requestBody: + description: Party information returned. + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/PartiesTypeIDPutResponse" + responses: + 200: + $ref: "#/components/responses/200" + 400: + $ref: "#/components/responses/400" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 404: + $ref: "#/components/responses/404" + 405: + $ref: "#/components/responses/405" + 406: + $ref: "#/components/responses/406" + 501: + $ref: "#/components/responses/501" + 503: + $ref: "#/components/responses/503" + /parties/{Type}/{ID}/error: + put: + description: If the server is unable to find Party information of the provided identity, or another processing error occurred, the error callback `PUT /parties/{Type}/{ID}/error` (or `PUT /parties/{Type}/{ID}/{SubI}/error`) is used. + summary: Return party information error + tags: + - parties + operationId: PartiesErrorByTypeAndID + parameters: + #Path + - $ref: "#/components/parameters/Type" + - $ref: "#/components/parameters/ID" + #Headers + - $ref: "#/components/parameters/Content-Length" + - $ref: "#/components/parameters/Content-Type" + - $ref: "#/components/parameters/Date" + - $ref: "#/components/parameters/X-Forwarded-For" + - $ref: "#/components/parameters/FSPIOP-Source" + - $ref: "#/components/parameters/FSPIOP-Destination" + - $ref: "#/components/parameters/FSPIOP-Encryption" + - $ref: "#/components/parameters/FSPIOP-Signature" + - $ref: "#/components/parameters/FSPIOP-URI" + - $ref: "#/components/parameters/FSPIOP-HTTP-Method" + requestBody: + description: Details of the error returned. + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorInformationObject" + responses: + 200: + $ref: "#/components/responses/200" + 400: + $ref: "#/components/responses/400" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 404: + $ref: "#/components/responses/404" + 405: + $ref: "#/components/responses/405" + 406: + $ref: "#/components/responses/406" + 501: + $ref: "#/components/responses/501" + 503: + $ref: "#/components/responses/503" + /parties/{Type}/{ID}/{SubId}: + parameters: + #Path + - $ref: "#/components/parameters/Type" + - $ref: "#/components/parameters/ID" + - $ref: "#/components/parameters/SubId" + #Headers + - $ref: "#/components/parameters/Content-Type" + - $ref: "#/components/parameters/Date" + - $ref: "#/components/parameters/X-Forwarded-For" + - $ref: "#/components/parameters/FSPIOP-Source" + - $ref: "#/components/parameters/FSPIOP-Destination" + - $ref: "#/components/parameters/FSPIOP-Encryption" + - $ref: "#/components/parameters/FSPIOP-Signature" + - $ref: "#/components/parameters/FSPIOP-URI" + - $ref: "#/components/parameters/FSPIOP-HTTP-Method" + get: + description: The HTTP request `GET /parties/{Type}/{ID}` (or `GET /parties/{Type}/{ID}/{SubId}`) is used to look up information regarding the requested Party, defined by `{Type}`, `{ID}` and optionally `{SubId}` (for example, `GET /parties/MSISDN/123456789`, or `GET /parties/BUSINESS/shoecompany/employee1`). + summary: Look up party information + tags: + - parties + operationId: PartiesSubIdByTypeAndID + parameters: + #Headers + - $ref: "#/components/parameters/Accept" + responses: + 202: + $ref: "#/components/responses/202" + 400: + $ref: "#/components/responses/400" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 404: + $ref: "#/components/responses/404" + 405: + $ref: "#/components/responses/405" + 406: + $ref: "#/components/responses/406" + 501: + $ref: "#/components/responses/501" + 503: + $ref: "#/components/responses/503" + put: + description: The callback `PUT /parties/{Type}/{ID}` (or `PUT /parties/{Type}/{ID}/{SubId}`) is used to inform the client of a successful result of the Party information lookup. + summary: Return party information + tags: + - parties + operationId: PartiesSubIdByTypeAndIDPut + parameters: + #Headers + - $ref: "#/components/parameters/Content-Length" + requestBody: + description: Party information returned. + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/PartiesTypeIDPutResponse" + responses: + 200: + $ref: "#/components/responses/200" + 400: + $ref: "#/components/responses/400" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 404: + $ref: "#/components/responses/404" + 405: + $ref: "#/components/responses/405" + 406: + $ref: "#/components/responses/406" + 501: + $ref: "#/components/responses/501" + 503: + $ref: "#/components/responses/503" + /parties/{Type}/{ID}/{SubId}/error: + put: + description: If the server is unable to find Party information of the provided identity, or another processing error occurred, the error callback `PUT /parties/{Type}/{ID}/error` (or `PUT /parties/{Type}/{ID}/{SubId}/error`) is used. + summary: Return party information error + tags: + - parties + operationId: PartiesSubIdErrorByTypeAndID + parameters: + #Path + - $ref: "#/components/parameters/Type" + - $ref: "#/components/parameters/ID" + - $ref: "#/components/parameters/SubId" + #Headers + - $ref: "#/components/parameters/Content-Length" + - $ref: "#/components/parameters/Content-Type" + - $ref: "#/components/parameters/Date" + - $ref: "#/components/parameters/X-Forwarded-For" + - $ref: "#/components/parameters/FSPIOP-Source" + - $ref: "#/components/parameters/FSPIOP-Destination" + - $ref: "#/components/parameters/FSPIOP-Encryption" + - $ref: "#/components/parameters/FSPIOP-Signature" + - $ref: "#/components/parameters/FSPIOP-URI" + - $ref: "#/components/parameters/FSPIOP-HTTP-Method" + requestBody: + description: Details of the error returned. + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorInformationObject" + responses: + 200: + $ref: "#/components/responses/200" + 400: + $ref: "#/components/responses/400" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 404: + $ref: "#/components/responses/404" + 405: + $ref: "#/components/responses/405" + 406: + $ref: "#/components/responses/406" + 501: + $ref: "#/components/responses/501" + 503: + $ref: "#/components/responses/503" + + #Transaction requests + /transactionRequests: + post: + description: The HTTP request `POST /transactionRequests` is used to request the creation of a transaction request for the provided financial transaction in the server. + summary: Perform transaction request + tags: + - transactionRequests + operationId: TransactionRequests + parameters: + #Headers + - $ref: "#/components/parameters/Accept" + - $ref: "#/components/parameters/Content-Length" + - $ref: "#/components/parameters/Content-Type" + - $ref: "#/components/parameters/Date" + - $ref: "#/components/parameters/X-Forwarded-For" + - $ref: "#/components/parameters/FSPIOP-Source" + - $ref: "#/components/parameters/FSPIOP-Destination" + - $ref: "#/components/parameters/FSPIOP-Encryption" + - $ref: "#/components/parameters/FSPIOP-Signature" + - $ref: "#/components/parameters/FSPIOP-URI" + - $ref: "#/components/parameters/FSPIOP-HTTP-Method" + requestBody: + description: Transaction request to be created. + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/TransactionRequestsPostRequest" + responses: + 202: + $ref: "#/components/responses/202" + 400: + $ref: "#/components/responses/400" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 404: + $ref: "#/components/responses/404" + 405: + $ref: "#/components/responses/405" + 406: + $ref: "#/components/responses/406" + 501: + $ref: "#/components/responses/501" + 503: + $ref: "#/components/responses/503" + /transactionRequests/{ID}: + parameters: + #Path + - $ref: "#/components/parameters/ID" + #Headers + - $ref: "#/components/parameters/Content-Type" + - $ref: "#/components/parameters/Date" + - $ref: "#/components/parameters/X-Forwarded-For" + - $ref: "#/components/parameters/FSPIOP-Source" + - $ref: "#/components/parameters/FSPIOP-Destination" + - $ref: "#/components/parameters/FSPIOP-Encryption" + - $ref: "#/components/parameters/FSPIOP-Signature" + - $ref: "#/components/parameters/FSPIOP-URI" + - $ref: "#/components/parameters/FSPIOP-HTTP-Method" + get: + description: The HTTP request `GET /transactionRequests/{ID}` is used to get information regarding a transaction request created or requested earlier. The `{ID}` in the URI should contain the `transactionRequestId` that was used for the creation of the transaction request. + summary: Retrieve transaction request information + tags: + - transactionRequests + operationId: TransactionRequestsByID + parameters: + #Headers + - $ref: "#/components/parameters/Accept" + responses: + 202: + $ref: "#/components/responses/202" + 400: + $ref: "#/components/responses/400" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 404: + $ref: "#/components/responses/404" + 405: + $ref: "#/components/responses/405" + 406: + $ref: "#/components/responses/406" + 501: + $ref: "#/components/responses/501" + 503: + $ref: "#/components/responses/503" + put: + description: The callback `PUT /transactionRequests/{ID}` is used to inform the client of a requested or created transaction request. The `{ID}` in the URI should contain the `transactionRequestId` that was used for the creation of the transaction request, or the `{ID}` that was used in the `GET /transactionRequests/{ID}`. + summary: Return transaction request information + tags: + - transactionRequests + operationId: TransactionRequestsByIDPut + parameters: + #Headers + - $ref: "#/components/parameters/Content-Length" + requestBody: + description: Transaction request information returned. + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/TransactionRequestsIDPutResponse" + responses: + 200: + $ref: "#/components/responses/200" + 400: + $ref: "#/components/responses/400" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 404: + $ref: "#/components/responses/404" + 405: + $ref: "#/components/responses/405" + 406: + $ref: "#/components/responses/406" + 501: + $ref: "#/components/responses/501" + 503: + $ref: "#/components/responses/503" + /transactionRequests/{ID}/error: + put: + description: If the server is unable to find or create a transaction request, or another processing error occurs, the error callback `PUT /transactionRequests/{ID}/error` is used. The `{ID}` in the URI should contain the `transactionRequestId` that was used for the creation of the transaction request, or the `{ID}` that was used in the `GET /transactionRequests/{ID}`. + summary: Return transaction request information error + tags: + - transactionRequests + operationId: TransactionRequestsErrorByID + parameters: + #Path + - $ref: "#/components/parameters/ID" + #Headers + - $ref: "#/components/parameters/Content-Length" + - $ref: "#/components/parameters/Content-Type" + - $ref: "#/components/parameters/Date" + - $ref: "#/components/parameters/X-Forwarded-For" + - $ref: "#/components/parameters/FSPIOP-Source" + - $ref: "#/components/parameters/FSPIOP-Destination" + - $ref: "#/components/parameters/FSPIOP-Encryption" + - $ref: "#/components/parameters/FSPIOP-Signature" + - $ref: "#/components/parameters/FSPIOP-URI" + - $ref: "#/components/parameters/FSPIOP-HTTP-Method" + requestBody: + description: Details of the error returned. + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorInformationObject" + responses: + 200: + $ref: "#/components/responses/200" + 400: + $ref: "#/components/responses/400" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 404: + $ref: "#/components/responses/404" + 405: + $ref: "#/components/responses/405" + 406: + $ref: "#/components/responses/406" + 501: + $ref: "#/components/responses/501" + 503: + $ref: "#/components/responses/503" + + #Quotes + /quotes: + post: + description: The HTTP request `POST /quotes` is used to request the creation of a quote for the provided financial transaction in the server. + summary: Calculate quote + tags: + - quotes + operationId: Quotes + parameters: + #Headers + - $ref: "#/components/parameters/Accept" + - $ref: "#/components/parameters/Content-Length" + - $ref: "#/components/parameters/Content-Type" + - $ref: "#/components/parameters/Date" + - $ref: "#/components/parameters/X-Forwarded-For" + - $ref: "#/components/parameters/FSPIOP-Source" + - $ref: "#/components/parameters/FSPIOP-Destination" + - $ref: "#/components/parameters/FSPIOP-Encryption" + - $ref: "#/components/parameters/FSPIOP-Signature" + - $ref: "#/components/parameters/FSPIOP-URI" + - $ref: "#/components/parameters/FSPIOP-HTTP-Method" + requestBody: + description: Details of the quote to be created. + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/QuotesPostRequest" + responses: + 202: + $ref: "#/components/responses/202" + 400: + $ref: "#/components/responses/400" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 404: + $ref: "#/components/responses/404" + 405: + $ref: "#/components/responses/405" + 406: + $ref: "#/components/responses/406" + 501: + $ref: "#/components/responses/501" + 503: + $ref: "#/components/responses/503" + /quotes/{ID}: + parameters: + #Path + - $ref: "#/components/parameters/ID" + #Headers + - $ref: "#/components/parameters/Content-Type" + - $ref: "#/components/parameters/Date" + - $ref: "#/components/parameters/X-Forwarded-For" + - $ref: "#/components/parameters/FSPIOP-Source" + - $ref: "#/components/parameters/FSPIOP-Destination" + - $ref: "#/components/parameters/FSPIOP-Encryption" + - $ref: "#/components/parameters/FSPIOP-Signature" + - $ref: "#/components/parameters/FSPIOP-URI" + - $ref: "#/components/parameters/FSPIOP-HTTP-Method" + get: + description: The HTTP request `GET /quotes/{ID}` is used to get information regarding a quote created or requested earlier. The `{ID}` in the URI should contain the `quoteId` that was used for the creation of the quote. + summary: Retrieve quote information + tags: + - quotes + operationId: QuotesByID + parameters: + #Headers + - $ref: "#/components/parameters/Accept" + responses: + 202: + $ref: "#/components/responses/202" + 400: + $ref: "#/components/responses/400" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 404: + $ref: "#/components/responses/404" + 405: + $ref: "#/components/responses/405" + 406: + $ref: "#/components/responses/406" + 501: + $ref: "#/components/responses/501" + 503: + $ref: "#/components/responses/503" + put: + description: The callback `PUT /quotes/{ID}` is used to inform the client of a requested or created quote. The `{ID}` in the URI should contain the `quoteId` that was used for the creation of the quote, or the `{ID}` that was used in the `GET /quotes/{ID}` request. + summary: Return quote information + tags: + - quotes + operationId: QuotesByID1 + parameters: + #Headers + - $ref: "#/components/parameters/Content-Length" + requestBody: + description: Quote information returned. + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/QuotesIDPutResponse" + responses: + 200: + $ref: "#/components/responses/200" + 400: + $ref: "#/components/responses/400" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 404: + $ref: "#/components/responses/404" + 405: + $ref: "#/components/responses/405" + 406: + $ref: "#/components/responses/406" + 501: + $ref: "#/components/responses/501" + 503: + $ref: "#/components/responses/503" + /quotes/{ID}/error: + put: + description: If the server is unable to find or create a quote, or some other processing error occurs, the error callback `PUT /quotes/{ID}/error` is used. The `{ID}` in the URI should contain the `quoteId` that was used for the creation of the quote, or the `{ID}` that was used in the `GET /quotes/{ID}` request. + summary: Return quote information error + tags: + - quotes + operationId: QuotesByIDAndError + parameters: + #Path + - $ref: "#/components/parameters/ID" + #Headers + - $ref: "#/components/parameters/Content-Length" + - $ref: "#/components/parameters/Content-Type" + - $ref: "#/components/parameters/Date" + - $ref: "#/components/parameters/X-Forwarded-For" + - $ref: "#/components/parameters/FSPIOP-Source" + - $ref: "#/components/parameters/FSPIOP-Destination" + - $ref: "#/components/parameters/FSPIOP-Encryption" + - $ref: "#/components/parameters/FSPIOP-Signature" + - $ref: "#/components/parameters/FSPIOP-URI" + - $ref: "#/components/parameters/FSPIOP-HTTP-Method" + requestBody: + description: Details of the error returned. + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorInformationObject" + responses: + 200: + $ref: "#/components/responses/200" + 400: + $ref: "#/components/responses/400" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 404: + $ref: "#/components/responses/404" + 405: + $ref: "#/components/responses/405" + 406: + $ref: "#/components/responses/406" + 501: + $ref: "#/components/responses/501" + 503: + $ref: "#/components/responses/503" + + #Authorizations + /authorizations/{ID}: + parameters: + #Path + - $ref: "#/components/parameters/ID" + #Headers + - $ref: "#/components/parameters/Content-Type" + - $ref: "#/components/parameters/Date" + - $ref: "#/components/parameters/X-Forwarded-For" + - $ref: "#/components/parameters/FSPIOP-Source" + - $ref: "#/components/parameters/FSPIOP-Destination" + - $ref: "#/components/parameters/FSPIOP-Encryption" + - $ref: "#/components/parameters/FSPIOP-Signature" + - $ref: "#/components/parameters/FSPIOP-URI" + - $ref: "#/components/parameters/FSPIOP-HTTP-Method" + get: + description: + The HTTP request `GET /authorizations/{ID}` is used to request the Payer to enter the applicable credentials in the Payee FSP system. The `{ID}` in the URI should contain the `transactionRequestID`, received from the `POST /transactionRequests` service earlier in the process. This request requires a query string to be included in the URI, with the following key-value pairs*:* + + + - `authenticationType={Type}`, where `{Type}` value is a valid authentication type from the enumeration `AuthenticationType`. + + + - `retriesLeft=={NrOfRetries}`, where `{NrOfRetries}` is the number of retries left before the financial transaction is rejected. `{NrOfRetries}` must be expressed in the form of the data type `Integer`. `retriesLeft=1` means that this is the last retry before the financial transaction is rejected. + + + - `amount={Amount}`, where `{Amount}` is the transaction amount that will be withdrawn from the Payer’s account. `{Amount}` must be expressed in the form of the data type `Amount`. + + + - `currency={Currency}`, where `{Currency}` is the transaction currency for the amount that will be withdrawn from the Payer’s account. The `{Currency}` value must be expressed in the form of the enumeration `CurrencyCode`. + + + The following is an example URI containing all the required key-value pairs in the query string*:* + + + `GET /authorization/3d492671-b7af-4f3f-88de-76169b1bdf88?authenticationType=OTP&retriesLeft=2&amount=102¤cy=USD` + summary: Perform authorization + tags: + - authorizations + operationId: AuthorizationsByIDGet + parameters: + #Headers + - $ref: "#/components/parameters/Accept" + responses: + 202: + $ref: "#/components/responses/202" + 400: + $ref: "#/components/responses/400" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 404: + $ref: "#/components/responses/404" + 405: + $ref: "#/components/responses/405" + 406: + $ref: "#/components/responses/406" + 501: + $ref: "#/components/responses/501" + 503: + $ref: "#/components/responses/503" + put: + description: The callback `PUT /authorizations/{ID}` is used to inform the client of the result of a previously-requested authorization. The `{ID}` in the URI should contain the `{ID}` that was used in the `GET /authorizations/{ID}` request. + summary: Return authorization result + tags: + - authorizations + operationId: AuthorizationsByIDPut + parameters: + #Headers + - $ref: "#/components/parameters/Content-Length" + requestBody: + description: Authorization result returned. + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/AuthorizationsIDPutResponse" + responses: + 200: + $ref: "#/components/responses/200" + 400: + $ref: "#/components/responses/400" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 404: + $ref: "#/components/responses/404" + 405: + $ref: "#/components/responses/405" + 406: + $ref: "#/components/responses/406" + 501: + $ref: "#/components/responses/501" + 503: + $ref: "#/components/responses/503" + /authorizations/{ID}/error: + put: + description: If the server is unable to find the transaction request, or another processing error occurs, the error callback `PUT /authorizations/{ID}/error` is used. The `{ID}` in the URI should contain the `{ID}` that was used in the `GET /authorizations/{ID}`. + summary: Return authorization error + tags: + - authorizations + operationId: AuthorizationsByIDAndError + parameters: + #Path + - $ref: "#/components/parameters/ID" + #Headers + - $ref: "#/components/parameters/Content-Length" + - $ref: "#/components/parameters/Content-Type" + - $ref: "#/components/parameters/Date" + - $ref: "#/components/parameters/X-Forwarded-For" + - $ref: "#/components/parameters/FSPIOP-Source" + - $ref: "#/components/parameters/FSPIOP-Destination" + - $ref: "#/components/parameters/FSPIOP-Encryption" + - $ref: "#/components/parameters/FSPIOP-Signature" + - $ref: "#/components/parameters/FSPIOP-URI" + - $ref: "#/components/parameters/FSPIOP-HTTP-Method" + requestBody: + description: Details of the error returned. + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorInformationObject" + responses: + 200: + $ref: "#/components/responses/200" + 400: + $ref: "#/components/responses/400" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 404: + $ref: "#/components/responses/404" + 405: + $ref: "#/components/responses/405" + 406: + $ref: "#/components/responses/406" + 501: + $ref: "#/components/responses/501" + 503: + $ref: "#/components/responses/503" + + #Transfers + /transfers: + post: + description: The HTTP request `POST /transfers` is used to request the creation of a transfer for the next ledger, and a financial transaction for the Payee FSP. + summary: Perform transfer + tags: + - transfers + operationId: transfers + parameters: + #Headers + - $ref: "#/components/parameters/Accept" + - $ref: "#/components/parameters/Content-Length" + - $ref: "#/components/parameters/Content-Type" + - $ref: "#/components/parameters/Date" + - $ref: "#/components/parameters/X-Forwarded-For" + - $ref: "#/components/parameters/FSPIOP-Source" + - $ref: "#/components/parameters/FSPIOP-Destination" + - $ref: "#/components/parameters/FSPIOP-Encryption" + - $ref: "#/components/parameters/FSPIOP-Signature" + - $ref: "#/components/parameters/FSPIOP-URI" + - $ref: "#/components/parameters/FSPIOP-HTTP-Method" + requestBody: + description: Details of the transfer to be created. + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/TransfersPostRequest" + responses: + 202: + $ref: "#/components/responses/202" + 400: + $ref: "#/components/responses/400" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 404: + $ref: "#/components/responses/404" + 405: + $ref: "#/components/responses/405" + 406: + $ref: "#/components/responses/406" + 501: + $ref: "#/components/responses/501" + 503: + $ref: "#/components/responses/503" + /transfers/{ID}: + parameters: + #Path + - $ref: "#/components/parameters/ID" + #Headers + - $ref: "#/components/parameters/Content-Type" + - $ref: "#/components/parameters/Date" + - $ref: "#/components/parameters/X-Forwarded-For" + - $ref: "#/components/parameters/FSPIOP-Source" + - $ref: "#/components/parameters/FSPIOP-Destination" + - $ref: "#/components/parameters/FSPIOP-Encryption" + - $ref: "#/components/parameters/FSPIOP-Signature" + - $ref: "#/components/parameters/FSPIOP-URI" + - $ref: "#/components/parameters/FSPIOP-HTTP-Method" + get: + description: The HTTP request `GET /transfers/{ID}` is used to get information regarding a transfer created or requested earlier. The `{ID}` in the URI should contain the `transferId` that was used for the creation of the transfer. + summary: Retrieve transfer information + tags: + - transfers + operationId: TransfersByIDGet + parameters: + #Headers + - $ref: "#/components/parameters/Accept" + responses: + 202: + $ref: "#/components/responses/202" + 400: + $ref: "#/components/responses/400" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 404: + $ref: "#/components/responses/404" + 405: + $ref: "#/components/responses/405" + 406: + $ref: "#/components/responses/406" + 501: + $ref: "#/components/responses/501" + 503: + $ref: "#/components/responses/503" + patch: + description: The HTTP request PATCH /transfers/ is used by a Switch to update the state of a previously reserved transfer, if the Payee FSP has requested a commit notification when the Switch has completed processing of the transfer. The in the URI should contain the transferId that was used for the creation of the transfer. Please note that this request does not generate a callback. + summary: Return transfer information + tags: + - transfers + operationId: TransfersByIDPatch + parameters: + #Headers + - $ref: "#/components/parameters/Content-Length" + requestBody: + description: Transfer notification upon completion. + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/TransfersIDPatchResponse" + responses: + 200: + $ref: "#/components/responses/200" + 400: + $ref: "#/components/responses/400" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 404: + $ref: "#/components/responses/404" + 405: + $ref: "#/components/responses/405" + 406: + $ref: "#/components/responses/406" + 501: + $ref: "#/components/responses/501" + 503: + $ref: "#/components/responses/503" + put: + description: The callback `PUT /transfers/{ID}` is used to inform the client of a requested or created transfer. The `{ID}` in the URI should contain the `transferId` that was used for the creation of the transfer, or the `{ID}` that was used in the `GET /transfers/{ID}` request. + summary: Return transfer information + tags: + - transfers + operationId: TransfersByIDPut + parameters: + #Headers + - $ref: "#/components/parameters/Content-Length" + requestBody: + description: Transfer information returned. + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/TransfersIDPutResponse" + responses: + 200: + $ref: "#/components/responses/200" + 400: + $ref: "#/components/responses/400" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 404: + $ref: "#/components/responses/404" + 405: + $ref: "#/components/responses/405" + 406: + $ref: "#/components/responses/406" + 501: + $ref: "#/components/responses/501" + 503: + $ref: "#/components/responses/503" + /transfers/{ID}/error: + put: + description: If the server is unable to find or create a transfer, or another processing error occurs, the error callback `PUT /transfers/{ID}/error` is used. The `{ID}` in the URI should contain the `transferId` that was used for the creation of the transfer, or the `{ID}` that was used in the `GET /transfers/{ID}`. + summary: Return transfer information error + tags: + - transfers + operationId: TransfersByIDAndError + parameters: + #Path + - $ref: "#/components/parameters/ID" + #Headers + - $ref: "#/components/parameters/Content-Length" + - $ref: "#/components/parameters/Content-Type" + - $ref: "#/components/parameters/Date" + - $ref: "#/components/parameters/X-Forwarded-For" + - $ref: "#/components/parameters/FSPIOP-Source" + - $ref: "#/components/parameters/FSPIOP-Destination" + - $ref: "#/components/parameters/FSPIOP-Encryption" + - $ref: "#/components/parameters/FSPIOP-Signature" + - $ref: "#/components/parameters/FSPIOP-URI" + - $ref: "#/components/parameters/FSPIOP-HTTP-Method" + requestBody: + description: Details of the error returned. + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorInformationObject" + responses: + 200: + $ref: "#/components/responses/200" + 400: + $ref: "#/components/responses/400" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 404: + $ref: "#/components/responses/404" + 405: + $ref: "#/components/responses/405" + 406: + $ref: "#/components/responses/406" + 501: + $ref: "#/components/responses/501" + 503: + $ref: "#/components/responses/503" + + #Transactions + /transactions/{ID}: + parameters: + - $ref: "#/components/parameters/ID" + #Headers + - $ref: "#/components/parameters/Content-Type" + - $ref: "#/components/parameters/Date" + - $ref: "#/components/parameters/X-Forwarded-For" + - $ref: "#/components/parameters/FSPIOP-Source" + - $ref: "#/components/parameters/FSPIOP-Destination" + - $ref: "#/components/parameters/FSPIOP-Encryption" + - $ref: "#/components/parameters/FSPIOP-Signature" + - $ref: "#/components/parameters/FSPIOP-URI" + - $ref: "#/components/parameters/FSPIOP-HTTP-Method" + get: + description: The HTTP request `GET /transactions/{ID}` is used to get transaction information regarding a financial transaction created earlier. The `{ID}` in the URI should contain the `transactionId` that was used for the creation of the quote, as the transaction is created as part of another process (the transfer process). + summary: Retrieve transaction information + tags: + - transactions + operationId: TransactionsByID + parameters: + #Headers + - $ref: "#/components/parameters/Accept" + responses: + 202: + $ref: "#/components/responses/202" + 400: + $ref: "#/components/responses/400" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 404: + $ref: "#/components/responses/404" + 405: + $ref: "#/components/responses/405" + 406: + $ref: "#/components/responses/406" + 501: + $ref: "#/components/responses/501" + 503: + $ref: "#/components/responses/503" + put: + description: The callback `PUT /transactions/{ID}` is used to inform the client of a requested transaction. The `{ID}` in the URI should contain the `{ID}` that was used in the `GET /transactions/{ID}` request. + summary: Return transaction information + tags: + - transactions + operationId: TransactionsByID1 + parameters: + #Headers + - $ref: "#/components/parameters/Content-Length" + requestBody: + description: Transaction information returned. + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/TransactionsIDPutResponse" + responses: + 200: + $ref: "#/components/responses/200" + 400: + $ref: "#/components/responses/400" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 404: + $ref: "#/components/responses/404" + 405: + $ref: "#/components/responses/405" + 406: + $ref: "#/components/responses/406" + 501: + $ref: "#/components/responses/501" + 503: + $ref: "#/components/responses/503" + /transactions/{ID}/error: + put: + description: If the server is unable to find or create a transaction, or another processing error occurs, the error callback `PUT /transactions/{ID}/error` is used. The `{ID}` in the URI should contain the `{ID}` that was used in the `GET /transactions/{ID}` request. + summary: Return transaction information error + tags: + - transactions + operationId: TransactionsErrorByID + parameters: + #Path + - $ref: "#/components/parameters/ID" + #Headers + - $ref: "#/components/parameters/Content-Length" + - $ref: "#/components/parameters/Content-Type" + - $ref: "#/components/parameters/Date" + - $ref: "#/components/parameters/X-Forwarded-For" + - $ref: "#/components/parameters/FSPIOP-Source" + - $ref: "#/components/parameters/FSPIOP-Destination" + - $ref: "#/components/parameters/FSPIOP-Encryption" + - $ref: "#/components/parameters/FSPIOP-Signature" + - $ref: "#/components/parameters/FSPIOP-URI" + - $ref: "#/components/parameters/FSPIOP-HTTP-Method" + requestBody: + description: Details of the error returned. + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorInformationObject" + responses: + 200: + $ref: "#/components/responses/200" + 400: + $ref: "#/components/responses/400" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 404: + $ref: "#/components/responses/404" + 405: + $ref: "#/components/responses/405" + 406: + $ref: "#/components/responses/406" + 501: + $ref: "#/components/responses/501" + 503: + $ref: "#/components/responses/503" + + #Bulk Quotes + /bulkQuotes: + post: + description: The HTTP request `POST /bulkQuotes` is used to request the creation of a bulk quote for the provided financial transactions in the server. + summary: Calculate bulk quote + tags: + - bulkQuotes + operationId: BulkQuotes + parameters: + #Headers + - $ref: "#/components/parameters/Accept" + - $ref: "#/components/parameters/Content-Length" + - $ref: "#/components/parameters/Content-Type" + - $ref: "#/components/parameters/Date" + - $ref: "#/components/parameters/X-Forwarded-For" + - $ref: "#/components/parameters/FSPIOP-Source" + - $ref: "#/components/parameters/FSPIOP-Destination" + - $ref: "#/components/parameters/FSPIOP-Encryption" + - $ref: "#/components/parameters/FSPIOP-Signature" + - $ref: "#/components/parameters/FSPIOP-URI" + - $ref: "#/components/parameters/FSPIOP-HTTP-Method" + requestBody: + description: Details of the bulk quote to be created. + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/BulkQuotesPostRequest" + responses: + 202: + $ref: "#/components/responses/202" + 400: + $ref: "#/components/responses/400" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 404: + $ref: "#/components/responses/404" + 405: + $ref: "#/components/responses/405" + 406: + $ref: "#/components/responses/406" + 501: + $ref: "#/components/responses/501" + 503: + $ref: "#/components/responses/503" + /bulkQuotes/{ID}: + parameters: + #Path + - $ref: "#/components/parameters/ID" + #Headers + - $ref: "#/components/parameters/Content-Type" + - $ref: "#/components/parameters/Date" + - $ref: "#/components/parameters/X-Forwarded-For" + - $ref: "#/components/parameters/FSPIOP-Source" + - $ref: "#/components/parameters/FSPIOP-Destination" + - $ref: "#/components/parameters/FSPIOP-Encryption" + - $ref: "#/components/parameters/FSPIOP-Signature" + - $ref: "#/components/parameters/FSPIOP-URI" + - $ref: "#/components/parameters/FSPIOP-HTTP-Method" + get: + description: The HTTP request `GET /bulkQuotes/{ID}` is used to get information regarding a bulk quote created or requested earlier. The `{ID}` in the URI should contain the `bulkQuoteId` that was used for the creation of the bulk quote. + summary: Retrieve bulk quote information + tags: + - bulkQuotes + operationId: BulkQuotesByID + parameters: + #Headers + - $ref: "#/components/parameters/Accept" + responses: + 202: + $ref: "#/components/responses/202" + 400: + $ref: "#/components/responses/400" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 404: + $ref: "#/components/responses/404" + 405: + $ref: "#/components/responses/405" + 406: + $ref: "#/components/responses/406" + 501: + $ref: "#/components/responses/501" + 503: + $ref: "#/components/responses/503" + put: + description: The callback `PUT /bulkQuotes/{ID}` is used to inform the client of a requested or created bulk quote. The `{ID}` in the URI should contain the `bulkQuoteId` that was used for the creation of the bulk quote, or the `{ID}` that was used in the `GET /bulkQuotes/{ID}` request. + summary: Return bulk quote information + tags: + - bulkQuotes + operationId: BulkQuotesByID1 + parameters: + #Headers + - $ref: "#/components/parameters/Content-Length" + requestBody: + description: Bulk quote information returned. + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/BulkQuotesIDPutResponse" + responses: + 200: + $ref: "#/components/responses/200" + 400: + $ref: "#/components/responses/400" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 404: + $ref: "#/components/responses/404" + 405: + $ref: "#/components/responses/405" + 406: + $ref: "#/components/responses/406" + 501: + $ref: "#/components/responses/501" + 503: + $ref: "#/components/responses/503" + /bulkQuotes/{ID}/error: + put: + description: If the server is unable to find or create a bulk quote, or another processing error occurs, the error callback `PUT /bulkQuotes/{ID}/error` is used. The `{ID}` in the URI should contain the `bulkQuoteId` that was used for the creation of the bulk quote, or the `{ID}` that was used in the `GET /bulkQuotes/{ID}` request. + summary: Return bulk quote information error + tags: + - bulkQuotes + operationId: BulkQuotesErrorByID + parameters: + #Path + - $ref: "#/components/parameters/ID" + #Headers + - $ref: "#/components/parameters/Content-Length" + - $ref: "#/components/parameters/Content-Type" + - $ref: "#/components/parameters/Date" + - $ref: "#/components/parameters/X-Forwarded-For" + - $ref: "#/components/parameters/FSPIOP-Source" + - $ref: "#/components/parameters/FSPIOP-Destination" + - $ref: "#/components/parameters/FSPIOP-Encryption" + - $ref: "#/components/parameters/FSPIOP-Signature" + - $ref: "#/components/parameters/FSPIOP-URI" + - $ref: "#/components/parameters/FSPIOP-HTTP-Method" + requestBody: + description: Details of the error returned. + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorInformationObject" + responses: + 200: + $ref: "#/components/responses/200" + 400: + $ref: "#/components/responses/400" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 404: + $ref: "#/components/responses/404" + 405: + $ref: "#/components/responses/405" + 406: + $ref: "#/components/responses/406" + 501: + $ref: "#/components/responses/501" + 503: + $ref: "#/components/responses/503" + + #Bulk transfers + /bulkTransfers: + post: + description: The HTTP request `POST /bulkTransfers` is used to request the creation of a bulk transfer in the server. + summary: Perform bulk transfer + tags: + - bulkTransfers + operationId: BulkTransfers + parameters: + #Headers + - $ref: "#/components/parameters/Accept" + - $ref: "#/components/parameters/Content-Length" + - $ref: "#/components/parameters/Content-Type" + - $ref: "#/components/parameters/Date" + - $ref: "#/components/parameters/X-Forwarded-For" + - $ref: "#/components/parameters/FSPIOP-Source" + - $ref: "#/components/parameters/FSPIOP-Destination" + - $ref: "#/components/parameters/FSPIOP-Encryption" + - $ref: "#/components/parameters/FSPIOP-Signature" + - $ref: "#/components/parameters/FSPIOP-URI" + - $ref: "#/components/parameters/FSPIOP-HTTP-Method" + requestBody: + description: Details of the bulk transfer to be created. + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/BulkTransfersPostRequest" + responses: + 202: + $ref: "#/components/responses/202" + 400: + $ref: "#/components/responses/400" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 404: + $ref: "#/components/responses/404" + 405: + $ref: "#/components/responses/405" + 406: + $ref: "#/components/responses/406" + 501: + $ref: "#/components/responses/501" + 503: + $ref: "#/components/responses/503" + /bulkTransfers/{ID}: + parameters: + #Path + - $ref: "#/components/parameters/ID" + #Headers + - $ref: "#/components/parameters/Content-Type" + - $ref: "#/components/parameters/Date" + - $ref: "#/components/parameters/X-Forwarded-For" + - $ref: "#/components/parameters/FSPIOP-Source" + - $ref: "#/components/parameters/FSPIOP-Destination" + - $ref: "#/components/parameters/FSPIOP-Encryption" + - $ref: "#/components/parameters/FSPIOP-Signature" + - $ref: "#/components/parameters/FSPIOP-URI" + - $ref: "#/components/parameters/FSPIOP-HTTP-Method" + get: + description: The HTTP request `GET /bulkTransfers/{ID}` is used to get information regarding a bulk transfer created or requested earlier. The `{ID}` in the URI should contain the `bulkTransferId` that was used for the creation of the bulk transfer. + summary: Retrieve bulk transfer information + tags: + - bulkTransfers + operationId: BulkTransferByID + parameters: + #Headers + - $ref: "#/components/parameters/Accept" + responses: + 202: + $ref: "#/components/responses/202" + 400: + $ref: "#/components/responses/400" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 404: + $ref: "#/components/responses/404" + 405: + $ref: "#/components/responses/405" + 406: + $ref: "#/components/responses/406" + 501: + $ref: "#/components/responses/501" + 503: + $ref: "#/components/responses/503" + put: + description: The callback `PUT /bulkTransfers/{ID}` is used to inform the client of a requested or created bulk transfer. The `{ID}` in the URI should contain the `bulkTransferId` that was used for the creation of the bulk transfer (`POST /bulkTransfers`), or the `{ID}` that was used in the `GET /bulkTransfers/{ID}` request. + summary: Return bulk transfer information + tags: + - bulkTransfers + operationId: BulkTransfersByIDPut + parameters: + #Headers + - $ref: "#/components/parameters/Content-Length" + requestBody: + description: Bulk transfer information returned. + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/BulkTransfersIDPutResponse" + responses: + 200: + $ref: "#/components/responses/200" + 400: + $ref: "#/components/responses/400" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 404: + $ref: "#/components/responses/404" + 405: + $ref: "#/components/responses/405" + 406: + $ref: "#/components/responses/406" + 501: + $ref: "#/components/responses/501" + 503: + $ref: "#/components/responses/503" + /bulkTransfers/{ID}/error: + put: + description: If the server is unable to find or create a bulk transfer, or another processing error occurs, the error callback `PUT /bulkTransfers/{ID}/error` is used. The `{ID}` in the URI should contain the `bulkTransferId` that was used for the creation of the bulk transfer (`POST /bulkTransfers`), or the `{ID}` that was used in the `GET /bulkTransfers/{ID}` request. + summary: Return bulk transfer information error + tags: + - bulkTransfers + operationId: BulkTransfersErrorByID + parameters: + #Path + - $ref: "#/components/parameters/ID" + #Headers + - $ref: "#/components/parameters/Content-Length" + - $ref: "#/components/parameters/Content-Type" + - $ref: "#/components/parameters/Date" + - $ref: "#/components/parameters/X-Forwarded-For" + - $ref: "#/components/parameters/FSPIOP-Source" + - $ref: "#/components/parameters/FSPIOP-Destination" + - $ref: "#/components/parameters/FSPIOP-Encryption" + - $ref: "#/components/parameters/FSPIOP-Signature" + - $ref: "#/components/parameters/FSPIOP-URI" + - $ref: "#/components/parameters/FSPIOP-HTTP-Method" + requestBody: + description: Details of the error returned. + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorInformationObject" + responses: + 200: + $ref: "#/components/responses/200" + 400: + $ref: "#/components/responses/400" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 404: + $ref: "#/components/responses/404" + 405: + $ref: "#/components/responses/405" + 406: + $ref: "#/components/responses/406" + 501: + $ref: "#/components/responses/501" + 503: + $ref: "#/components/responses/503" + +components: + schemas: + #Element definitions + Amount: + title: Amount + type: string + pattern: ^([0]|([1-9][0-9]{0,17}))([.][0-9]{0,3}[1-9])?$ + description: The API data type Amount is a JSON String in a canonical format that is restricted by a regular expression for interoperability reasons. This pattern does not allow any trailing zeroes at all, but allows an amount without a minor currency unit. It also only allows four digits in the minor currency unit; a negative value is not allowed. Using more than 18 digits in the major currency unit is not allowed. + AmountType: + title: AmountType + type: string + enum: + - SEND + - RECEIVE + description: Below are the allowed values for the enumeration AmountType. + + - SEND - Amount the Payer would like to send, that is, the amount that should be withdrawn from the Payer account including any fees. + + - RECEIVE - Amount the Payer would like the Payee to receive, that is, the amount that should be sent to the receiver exclusive of any fees. + AuthenticationType: + title: AuthenticationType + type: string + enum: + - OTP + - QRCODE + description: + Below are the allowed values for the enumeration AuthenticationType. + + - OTP - One-time password generated by the Payer FSP. + + - QRCODE - QR code used as One Time Password. + AuthenticationValue: + title: AuthenticationValue + oneOf: + - $ref: "#/components/schemas/OtpValue" + - $ref: "#/components/schemas/QRCODE" + pattern: ^\d{3,10}$|^\S{1,64}$ + description: Contains the authentication value. The format depends on the authentication type used in the AuthenticationInfo complex type. + AuthorizationResponse: + title: AuthorizationResponse + type: string + enum: + - ENTERED + - REJECTED + - RESEND + description: Below are the allowed values for the enumeration. + + - ENTERED - Consumer entered the authentication value. + + - REJECTED - Consumer rejected the transaction. + + - RESEND - Consumer requested to resend the authentication value. + BalanceOfPayments: + title: BalanceOfPayments + type: string + pattern: ^[1-9]\d{2}$ + description: (BopCode) The API data type [BopCode](https://www.imf.org/external/np/sta/bopcode/) is a JSON String of 3 characters, consisting of digits only. Negative numbers are not allowed. A leading zero is not allowed. + BulkTransferState: + title: BulkTransactionState + type: string + enum: + - RECEIVED + - PENDING + - ACCEPTED + - PROCESSING + - COMPLETED + - REJECTED + description: Below are the allowed values for the enumeration. + + - RECEIVED - Payee FSP has received the bulk transfer from the Payer FSP. + + - PENDING - Payee FSP has validated the bulk transfer. + + - ACCEPTED - Payee FSP has accepted to process the bulk transfer. + + - PROCESSING - Payee FSP has started to transfer fund to the Payees. + + - COMPLETED - Payee FSP has completed transfer of funds to the Payees. + + - REJECTED - Payee FSP has rejected to process the bulk transfer. + Code: + title: Code + type: string + pattern: ^[0-9a-zA-Z]{4,32}$ + description: Any code/token returned by the Payee FSP (TokenCode Type). + CorrelationId: + title: CorrelationId + type: string + pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + description: Identifier that correlates all messages of the same sequence. The API data type UUID (Universally Unique Identifier) is a JSON String in canonical format, conforming to [RFC 4122](https://tools.ietf.org/html/rfc4122), that is restricted by a regular expression for interoperability reasons. A UUID is always 36 characters long, 32 hexadecimal symbols and 4 dashes (‘-‘). + Currency: + title: Currency + description: The currency codes defined in [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) as three-letter alphabetic codes are used as the standard naming representation for currencies. + type: string + minLength: 3 + maxLength: 3 + enum: + - AED + - AFN + - ALL + - AMD + - ANG + - AOA + - ARS + - AUD + - AWG + - AZN + - BAM + - BBD + - BDT + - BGN + - BHD + - BIF + - BMD + - BND + - BOB + - BRL + - BSD + - BTN + - BWP + - BYN + - BZD + - CAD + - CDF + - CHF + - CLP + - CNY + - COP + - CRC + - CUC + - CUP + - CVE + - CZK + - DJF + - DKK + - DOP + - DZD + - EGP + - ERN + - ETB + - EUR + - FJD + - FKP + - GBP + - GEL + - GGP + - GHS + - GIP + - GMD + - GNF + - GTQ + - GYD + - HKD + - HNL + - HRK + - HTG + - HUF + - IDR + - ILS + - IMP + - INR + - IQD + - IRR + - ISK + - JEP + - JMD + - JOD + - JPY + - KES + - KGS + - KHR + - KMF + - KPW + - KRW + - KWD + - KYD + - KZT + - LAK + - LBP + - LKR + - LRD + - LSL + - LYD + - MAD + - MDL + - MGA + - MKD + - MMK + - MNT + - MOP + - MRO + - MUR + - MVR + - MWK + - MXN + - MYR + - MZN + - NAD + - NGN + - NIO + - NOK + - NPR + - NZD + - OMR + - PAB + - PEN + - PGK + - PHP + - PKR + - PLN + - PYG + - QAR + - RON + - RSD + - RUB + - RWF + - SAR + - SBD + - SCR + - SDG + - SEK + - SGD + - SHP + - SLL + - SOS + - SPL + - SRD + - STD + - SVC + - SYP + - SZL + - THB + - TJS + - TMT + - TND + - TOP + - TRY + - TTD + - TVD + - TWD + - TZS + - UAH + - UGX + - USD + - UYU + - UZS + - VEF + - VND + - VUV + - WST + - XAF + - XCD + - XDR + - XOF + - XPF + - XTS + - XXX + - YER + - ZAR + - ZMW + - ZWD + DateOfBirth: + title: DateofBirth (type Date) + type: string + pattern: ^(?:[1-9]\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\d|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-02-29)$ + description: Date of Birth of the Party. + DateTime: + title: DateTime + type: string + pattern: ^(?:[1-9]\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\d|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-02-29)T(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:(\.\d{3}))(?:Z|[+-][01]\d:[0-5]\d)$ + description: + The API data type DateTime is a JSON String in a lexical format that is restricted by a regular expression for interoperability reasons. + The format is according to [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html), expressed in a combined date, time and time zone format. A more readable version of the format is yyyy-MM-ddTHH:mm:ss.SSS[-HH:MM]. Examples are "2016-05-24T08:38:08.699-04:00", "2016-05-24T08:38:08.699Z" (where Z indicates Zulu time zone, same as UTC). + ErrorCode: + title: ErrorCode + type: string + pattern: ^[1-9]\d{3}$ + description: The API data type ErrorCode is a JSON String of four characters, consisting of digits only. Negative numbers are not allowed. A leading zero is not allowed. Each error code in the API is a four-digit number, for example, 1234, where the first number (1 in the example) represents the high-level error category, the second number (2 in the example) represents the low-level error category, and the last two numbers (34 in the example) represent the specific error. + ErrorDescription: + title: ErrorDescription + type: string + minLength: 1 + maxLength: 128 + description: Error description string. + ExtensionKey: + title: ExtensionKey + type: string + minLength: 1 + maxLength: 32 + description: Extension key. + ExtensionValue: + title: ExtensionValue + type: string + minLength: 1 + maxLength: 128 + description: Extension value. + FirstName: + title: FirstName + type: string + minLength: 1 + maxLength: 128 + pattern: '^(?!\s*$)[\p{L}\p{gc=Mark}\p{digit}\p{gc=Connector_Punctuation}\p{Join_Control} .,''-]{1,128}$' + description: First name of the Party (Name Type). + FspId: + title: FspId + type: string + minLength: 1 + maxLength: 32 + description: FSP identifier. + IlpCondition: + title: IlpCondition + type: string + pattern: ^[A-Za-z0-9-_]{43}$ + maxLength: 48 + description: Condition that must be attached to the transfer by the Payer. + IlpFulfilment: + title: IlpFulfilment + type: string + pattern: ^[A-Za-z0-9-_]{43}$ + maxLength: 48 + description: Fulfilment that must be attached to the transfer by the Payee. + IlpPacket: + title: IlpPacket + type: string + pattern: ^[A-Za-z0-9-_]+[=]{0,2}$ + minLength: 1 + maxLength: 32768 + description: Information for recipient (transport layer information). + LastName: + title: LastName + type: string + minLength: 1 + maxLength: 128 + pattern: '^(?!\s*$)[\p{L}\p{gc=Mark}\p{digit}\p{gc=Connector_Punctuation}\p{Join_Control} .,''-]{1,128}$' + description: Last name of the Party (Name Type). + Latitude: + title: Latitude + type: string + pattern: ^(\+|-)?(?:90(?:(?:\.0{1,6})?)|(?:[0-9]|[1-8][0-9])(?:(?:\.[0-9]{1,6})?))$ + description: The API data type Latitude is a JSON String in a lexical format that is restricted by a regular expression for interoperability reasons. + Longitude: + title: Longitude + type: string + pattern: ^(\+|-)?(?:180(?:(?:\.0{1,6})?)|(?:[0-9]|[1-9][0-9]|1[0-7][0-9])(?:(?:\.[0-9]{1,6})?))$ + description: The API data type Longitude is a JSON String in a lexical format that is restricted by a regular expression for interoperability reasons. + MerchantClassificationCode: + title: MerchantClassificationCode + type: string + pattern: ^[\d]{1,4}$ + description: A limited set of pre-defined numbers. This list would be a limited set of numbers identifying a set of popular merchant types like School Fees, Pubs and Restaurants, Groceries, etc. + MiddleName: + title: MiddleName + type: string + minLength: 1 + maxLength: 128 + pattern: '^(?!\s*$)[\p{L}\p{gc=Mark}\p{digit}\p{gc=Connector_Punctuation}\p{Join_Control} .,''-]{1,128}$' + description: Middle name of the Party (Name Type). + Name: + title: Name + type: string + pattern: '^(?!\s*$)[\p{L}\p{gc=Mark}\p{digit}\p{gc=Connector_Punctuation}\p{Join_Control} .,''-]{1,128}$' + description: + The API data type Name is a JSON String, restricted by a regular expression to avoid characters which are generally not used in a name. + + + Regular Expression - The regular expression for restricting the Name type is '^(?!\s*$)[\p{L}\p{gc=Mark}\p{digit}\p{gc=Connector_Punctuation}\p{Join_Control} .,''-]{1,128}$'. The restriction does not allow a string consisting of whitespace only, all Unicode characters are allowed, as well as the period (.) (apostrophe (‘), dash (-), comma (,) and space characters ( ). + + + **Note:** In some programming languages, Unicode support must be specifically enabled. For example, if Java is used, the flag UNICODE_CHARACTER_CLASS must be enabled to allow Unicode characters. + Note: + title: Note + type: string + minLength: 1 + maxLength: 128 + description: Memo assigned to transaction. + OtpValue: + title: OtpValue + type: string + pattern: ^\d{3,10}$ + description: The API data type OtpValue is a JSON String of 3 to 10 characters, consisting of digits only. Negative numbers are not allowed. One or more leading zeros are allowed. + PartyIdentifier: + title: PartyIdentifier + type: string + minLength: 1 + maxLength: 128 + description: Identifier of the Party. + PartyIdType: + title: PartyIdType + type: string + enum: + - MSISDN + - EMAIL + - PERSONAL_ID + - BUSINESS + - DEVICE + - ACCOUNT_ID + - IBAN + - ALIAS + description: Below are the allowed values for the enumeration. + + - MSISDN - An MSISDN (Mobile Station International Subscriber Directory Number, that is, the phone number) is used as reference to a participant. The MSISDN identifier should be in international format according to the [ITU-T E.164 standard](https://www.itu.int/rec/T-REC-E.164/en). Optionally, the MSISDN may be prefixed by a single plus sign, indicating the international prefix. + + - EMAIL - An email is used as reference to a participant. The format of the email should be according to the informational [RFC 3696](https://tools.ietf.org/html/rfc3696). + + - PERSONAL_ID - A personal identifier is used as reference to a participant. Examples of personal identification are passport number, birth certificate number, and national registration number. The identifier number is added in the PartyIdentifier element. The personal identifier type is added in the PartySubIdOrType element. + + - BUSINESS - A specific Business (for example, an organization or a company) is used as reference to a participant. The BUSINESS identifier can be in any format. To make a transaction connected to a specific username or bill number in a Business, the PartySubIdOrType element should be used. + + - DEVICE - A specific device (for example, a POS or ATM) ID connected to a specific business or organization is used as reference to a Party. For referencing a specific device under a specific business or organization, use the PartySubIdOrType element. + + - ACCOUNT_ID - A bank account number or FSP account ID should be used as reference to a participant. The ACCOUNT_ID identifier can be in any format, as formats can greatly differ depending on country and FSP. + + - IBAN - A bank account number or FSP account ID is used as reference to a participant. The IBAN identifier can consist of up to 34 alphanumeric characters and should be entered without whitespace. + + - ALIAS An alias is used as reference to a participant. The alias should be created in the FSP as an alternative reference to an account owner. Another example of an alias is a username in the FSP system. The ALIAS identifier can be in any format. It is also possible to use the PartySubIdOrType element for identifying an account under an Alias defined by the PartyIdentifier. + PartyName: + title: PartyName + allOf: + - $ref: "#/components/schemas/Name" + - description: Name of the Party. Could be a real name or a nickname. + PartySubIdOrType: + title: PartySubIdOrType + description: Either a sub-identifier of a PartyIdentifier, or a sub-type of the PartyIdType, normally a PersonalIdentifierType. + oneOf: + - $ref: "#/components/schemas/PersonalIdentifierType" + - $ref: "#/components/schemas/PartyIdentifier" + PersonalIdentifierType: + title: PersonalIdentifierType + type: string + enum: + - PASSPORT + - NATIONAL_REGISTRATION + - DRIVING_LICENSE + - ALIEN_REGISTRATION + - NATIONAL_ID_CARD + - EMPLOYER_ID + - TAX_ID_NUMBER + - SENIOR_CITIZENS_CARD + - MARRIAGE_CERTIFICATE + - HEALTH_CARD + - VOTERS_ID + - UNITED_NATIONS + - OTHER_ID + description: Below are the allowed values for the enumeration. + + - PASSPORT - A passport number is used as reference to a Party. + + - NATIONAL_REGISTRATION - A national registration number is used as reference to a Party. + + - DRIVING_LICENSE - A driving license is used as reference to a Party. + + - ALIEN_REGISTRATION - An alien registration number is used as reference to a Party. + + - NATIONAL_ID_CARD - A national ID card number is used as reference to a Party. + + - EMPLOYER_ID - A tax identification number is used as reference to a Party. + + - TAX_ID_NUMBER - A tax identification number is used as reference to a Party. + + - SENIOR_CITIZENS_CARD - A senior citizens card number is used as reference to a Party. + + - MARRIAGE_CERTIFICATE - A marriage certificate number is used as reference to a Party. + + - HEALTH_CARD - A health card number is used as reference to a Party. + + - VOTERS_ID - A voter’s identification number is used as reference to a Party. + + - UNITED_NATIONS - An UN (United Nations) number is used as reference to a Party. + + - OTHER_ID - Any other type of identification type number is used as reference to a Party. + QRCODE: + title: QRCODE + type: string + minLength: 1 + maxLength: 64 + description: QR code used as a One Time Password. + RefundReason: + title: RefundReason + type: string + minLength: 1 + maxLength: 128 + description: Reason for the refund. + TransactionInitiator: + title: TransactionInitiator + type: string + enum: + - PAYER + - PAYEE + description: Below are the allowed values for the enumeration. + + - PAYER - Sender of funds is initiating the transaction. The account to send from is either owned by the Payer or is connected to the Payer in some way. + + - PAYEE - Recipient of the funds is initiating the transaction by sending a transaction request. The Payer must approve the transaction, either automatically by a pre-generated OTP or by pre-approval of the Payee, or by manually approving in his or her own Device. + TransactionInitiatorType: + title: TransactionInitiatorType + type: string + enum: + - CONSUMER + - AGENT + - BUSINESS + - DEVICE + description: Below are the allowed values for the enumeration. + + - CONSUMER - Consumer is the initiator of the transaction. + + - AGENT - Agent is the initiator of the transaction. + + - BUSINESS - Business is the initiator of the transaction. + + - DEVICE - Device is the initiator of the transaction. + TransactionRequestState: + title: TransactionRequestState + type: string + enum: + - RECEIVED + - PENDING + - ACCEPTED + - REJECTED + description: Below are the allowed values for the enumeration. + + - RECEIVED - Payer FSP has received the transaction from the Payee FSP. + + - PENDING - Payer FSP has sent the transaction request to the Payer. + + - ACCEPTED - Payer has approved the transaction. + + - REJECTED - Payer has rejected the transaction. + TransactionScenario: + title: TransactionScenario + type: string + enum: + - DEPOSIT + - WITHDRAWAL + - TRANSFER + - PAYMENT + - REFUND + description: Below are the allowed values for the enumeration. + + - DEPOSIT - Used for performing a Cash-In (deposit) transaction. In a normal scenario, electronic funds are transferred from a Business account to a Consumer account, and physical cash is given from the Consumer to the Business User. + + - WITHDRAWAL - Used for performing a Cash-Out (withdrawal) transaction. In a normal scenario, electronic funds are transferred from a Consumer’s account to a Business account, and physical cash is given from the Business User to the Consumer. + + - TRANSFER - Used for performing a P2P (Peer to Peer, or Consumer to Consumer) transaction. + + - PAYMENT - Usually used for performing a transaction from a Consumer to a Merchant or Organization, but could also be for a B2B (Business to Business) payment. The transaction could be online for a purchase in an Internet store, in a physical store where both the Consumer and Business User are present, a bill payment, a donation, and so on. + + - REFUND - Used for performing a refund of transaction. + TransactionState: + title: TransactionState + type: string + enum: + - RECEIVED + - PENDING + - COMPLETED + - REJECTED + description: Below are the allowed values for the enumeration. + + - RECEIVED - Payee FSP has received the transaction from the Payer FSP. + + - PENDING - Payee FSP has validated the transaction. + + - COMPLETED - Payee FSP has successfully performed the transaction. + + - REJECTED - Payee FSP has failed to perform the transaction. + TransactionSubScenario: + title: TransactionSubScenario + type: string + pattern: ^[A-Z_]{1,32}$ + description: Possible sub-scenario, defined locally within the scheme (UndefinedEnum Type). + TransferState: + title: TransferState + type: string + enum: + - RECEIVED + - RESERVED + - COMMITTED + - ABORTED + description: Below are the allowed values for the enumeration. + + - RECEIVED - Next ledger has received the transfer. + + - RESERVED - Next ledger has reserved the transfer. + + - COMMITTED - Next ledger has successfully performed the transfer. + + - ABORTED - Next ledger has aborted the transfer due to a rejection or failure to perform the transfer. + + #Complex Types + AuthenticationInfo: + title: AuthenticationInfo + type: object + description: Data model for the complex type AuthenticationInfo. + properties: + authentication: + allOf: + - $ref: "#/components/schemas/AuthenticationType" + - description: Type of authentication. + - example: OTP + authenticationValue: + allOf: + - $ref: "#/components/schemas/AuthenticationValue" + - description: Authentication value. + - example: 1234 + required: + - authentication + - authenticationValue + AuthorizationsIDPutResponse: + title: AuthorizationsIDPutResponse + type: object + description: The object sent in the PUT /authorizations/{ID} callback. + properties: + authenticationInfo: + allOf: + - $ref: "#/components/schemas/AuthenticationInfo" + - description: OTP or QR Code if entered, otherwise empty. + - example: OTP + responseType: + allOf: + - $ref: "#/components/schemas/AuthorizationResponse" + - description: Enum containing response information; if the customer entered the authentication value, rejected the transaction, or requested a resend of the authentication value. + - example: ENTERED + required: + - responseType + BulkQuotesIDPutResponse: + title: BulkQuotesIDPutResponse + type: object + description: The object sent in the PUT /bulkQuotes/{ID} callback. + properties: + individualQuoteResults: + type: array + maxItems: 1000 + items: + $ref: "#/components/schemas/IndividualQuoteResult" + description: Fees for each individual transaction, if any of them are charged per transaction. + expiration: + allOf: + - $ref: "#/components/schemas/DateTime" + - description: Date and time until when the quotation is valid and can be honored when used in the subsequent transaction request. + - example: "2016-05-24T08:38:08.699-04:00" + extensionList: + allOf: + - $ref: "#/components/schemas/ExtensionList" + - description: Optional extension, specific to deployment. + required: + - expiration + BulkQuotesPostRequest: + title: BulkQuotesPostRequest + type: object + description: The object sent in the POST /bulkQuotes request. + properties: + bulkQuoteId: + allOf: + - $ref: "#/components/schemas/CorrelationId" + - description: Common ID between the FSPs for the bulk quote object, decided by the Payer FSP. The ID should be reused for resends of the same bulk quote. A new ID should be generated for each new bulk quote. + - example: b51ec534-ee48-4575-b6a9-ead2955b8069 + payer: + allOf: + - $ref: "#/components/schemas/Party" + - description: Information about the Payer in the proposed financial transaction. + geoCode: + allOf: + - $ref: "#/components/schemas/GeoCode" + - description: Longitude and Latitude of the initiating Party. Can be used to detect fraud. + expiration: + allOf: + - $ref: "#/components/schemas/DateTime" + - description: Expiration is optional to let the Payee FSP know when a quote no longer needs to be returned. + - example: "2016-05-24T08:38:08.699-04:00" + individualQuotes: + type: array + minItems: 1 + maxItems: 1000 + items: + $ref: "#/components/schemas/IndividualQuote" + description: List of quotes elements. + extensionList: + allOf: + - $ref: "#/components/schemas/ExtensionList" + - description: Optional extension, specific to deployment. + required: + - bulkQuoteId + - payer + - individualQuotes + BulkTransfersIDPutResponse: + title: BulkTransfersIDPutResponse + type: object + description: The object sent in the PUT /bulkTransfers/{ID} callback. + properties: + completedTimestamp: + allOf: + - $ref: "#/components/schemas/DateTime" + - description: Time and date when the bulk transaction was completed. + - example: "2016-05-24T08:38:08.699-04:00" + individualTransferResults: + type: array + maxItems: 1000 + items: + $ref: "#/components/schemas/IndividualTransferResult" + description: List of IndividualTransferResult elements. + bulkTransferState: + allOf: + - $ref: "#/components/schemas/BulkTransferState" + - description: The state of the bulk transfer. + - example: RECEIVED + extensionList: + allOf: + - $ref: "#/components/schemas/ExtensionList" + - description: Optional extension, specific to deployment. + required: + - bulkTransferState + BulkTransfersPostRequest: + title: BulkTransfersPostRequest + type: object + description: The object sent in the POST /bulkTransfers request. + properties: + bulkTransferId: + allOf: + - $ref: "#/components/schemas/CorrelationId" + - description: Common ID between the FSPs and the optional Switch for the bulk transfer object, decided by the Payer FSP. The ID should be reused for resends of the same bulk transfer. A new ID should be generated for each new bulk transfer. + - example: b51ec534-ee48-4575-b6a9-ead2955b8069 + bulkQuoteId: + allOf: + - $ref: "#/components/schemas/CorrelationId" + - description: ID of the related bulk quote. + - example: b51ec534-ee48-4575-b6a9-ead2955b8069 + payerFsp: + allOf: + - $ref: "#/components/schemas/FspId" + - description: Payer FSP identifier. + - example: 5678 + payeeFsp: + allOf: + - $ref: "#/components/schemas/FspId" + - description: Payee FSP identifier. + - example: 1234 + individualTransfers: + type: array + minItems: 1 + maxItems: 1000 + items: + $ref: "#/components/schemas/IndividualTransfer" + description: List of IndividualTransfer elements. + expiration: + allOf: + - $ref: "#/components/schemas/DateTime" + - description: Expiration time of the transfers. + - example: "2016-05-24T08:38:08.699-04:00" + extensionList: + allOf: + - $ref: "#/components/schemas/ExtensionList" + - description: Optional extension, specific to deployment. + required: + - bulkTransferId + - bulkQuoteId + - payerFsp + - payeeFsp + - individualTransfers + - expiration + ErrorInformation: + title: ErrorInformation + type: object + description: Data model for the complex type ErrorInformation. + properties: + errorCode: + allOf: + - $ref: "#/components/schemas/ErrorCode" + - description: Specific error number. + - example: 5100 + errorDescription: + allOf: + - $ref: "#/components/schemas/ErrorDescription" + - description: Error description string. + - example: This is an error description. + extensionList: + $ref: "#/components/schemas/ExtensionList" + required: + - errorCode + - errorDescription + ErrorInformationObject: + title: ErrorInformationObject + type: object + description: Data model for the complex type object that contains ErrorInformation. + properties: + errorInformation: + $ref: "#/components/schemas/ErrorInformation" + required: + - errorInformation + ErrorInformationResponse: + title: ErrorInformationResponse + type: object + description: Data model for the complex type object that contains an optional element ErrorInformation used along with 4xx and 5xx responses. + properties: + errorInformation: + $ref: "#/components/schemas/ErrorInformation" + Extension: + title: Extension + type: object + description: Data model for the complex type Extension. + properties: + key: + allOf: + - $ref: "#/components/schemas/ExtensionKey" + - description: Extension key. + value: + allOf: + - $ref: "#/components/schemas/ExtensionValue" + - description: Extension value. + required: + - key + - value + ExtensionList: + title: ExtensionList + type: object + description: Data model for the complex type ExtensionList. An optional list of extensions, specific to deployment. + properties: + extension: + type: array + items: + $ref: "#/components/schemas/Extension" + minItems: 1 + maxItems: 16 + description: Number of Extension elements. + required: + - extension + GeoCode: + title: GeoCode + type: object + description: Data model for the complex type GeoCode. Indicates the geographic location from where the transaction was initiated. + properties: + latitude: + allOf: + - $ref: "#/components/schemas/Latitude" + - description: Latitude of the Party. + - example: "+45.4215" + longitude: + allOf: + - $ref: "#/components/schemas/Longitude" + - description: Longitude of the Party. + - example: "+75.6972" + required: + - latitude + - longitude + IndividualQuote: + title: IndividualQuote + type: object + description: Data model for the complex type IndividualQuote. + properties: + quoteId: + allOf: + - $ref: "#/components/schemas/CorrelationId" + - description: Identifies the quote message. + - example: b51ec534-ee48-4575-b6a9-ead2955b8069 + transactionId: + allOf: + - $ref: "#/components/schemas/CorrelationId" + - description: Identifies the transaction message. + - example: b51ec534-ee48-4575-b6a9-ead2955b8069 + payee: + allOf: + - $ref: "#/components/schemas/Party" + - description: Information about the Payee in the proposed financial transaction. + amountType: + allOf: + - $ref: "#/components/schemas/AmountType" + - description: SEND for sendAmount, RECEIVE for receiveAmount. + - example: RECEIVE + amount: + allOf: + - $ref: "#/components/schemas/Money" + - description: Depending on amountType + If SEND - The amount the Payer would like to send, that is, the amount that should be withdrawn from the Payer account including any fees. The amount is updated by each participating entity in the transaction. + If RECEIVE - The amount the Payee should receive, that is, the amount that should be sent to the receiver exclusive of any fees. The amount is not updated by any of the participating entities. + fees: + allOf: + - $ref: "#/components/schemas/Money" + - description: The fees in the transaction. + The fees element should be empty if fees should be non-disclosed. + The fees element should be non-empty if fees should be disclosed. + transactionType: + allOf: + - $ref: "#/components/schemas/TransactionType" + - description: Type of transaction that the quote is requested for. + note: + allOf: + - $ref: "#/components/schemas/Note" + - description: Memo that will be attached to the transaction. + - example: Note sent to Payee. + extensionList: + allOf: + - $ref: "#/components/schemas/ExtensionList" + - description: Optional extension, specific to deployment. + required: + - quoteId + - transactionId + - payee + - amountType + - amount + - transactionType + IndividualQuoteResult: + title: IndividualQuoteResult + type: object + description: Data model for the complex type IndividualQuoteResult. + properties: + quoteId: + allOf: + - $ref: "#/components/schemas/CorrelationId" + - description: Identifies the quote message. + - example: b51ec534-ee48-4575-b6a9-ead2955b8069 + payee: + allOf: + - $ref: "#/components/schemas/Party" + - description: Information about the Payee in the proposed financial transaction. + transferAmount: + allOf: + - $ref: "#/components/schemas/Money" + - description: The amount of money that the Payee FSP should receive. + payeeReceiveAmount: + allOf: + - $ref: "#/components/schemas/Money" + - description: The amount of Money that the Payee should receive in the end-to-end transaction. Optional as the Payee FSP might not want to disclose any optional Payee fees. + payeeFspFee: + allOf: + - $ref: "#/components/schemas/Money" + - description: Payee FSP’s part of the transaction fee. + payeeFspCommission: + allOf: + - $ref: "#/components/schemas/Money" + - description: Transaction commission from the Payee FSP. + ilpPacket: + allOf: + - $ref: "#/components/schemas/IlpPacket" + - description: The ILP Packet that must be attached to the transfer by the Payer. + - example: AYIBgQAAAAAAAASwNGxldmVsb25lLmRmc3AxLm1lci45T2RTOF81MDdqUUZERmZlakgyOVc4bXFmNEpLMHlGTFGCAUBQU0svMS4wCk5vbmNlOiB1SXlweUYzY3pYSXBFdzVVc05TYWh3CkVuY3J5cHRpb246IG5vbmUKUGF5bWVudC1JZDogMTMyMzZhM2ItOGZhOC00MTYzLTg0NDctNGMzZWQzZGE5OGE3CgpDb250ZW50LUxlbmd0aDogMTM1CkNvbnRlbnQtVHlwZTogYXBwbGljYXRpb24vanNvbgpTZW5kZXItSWRlbnRpZmllcjogOTI4MDYzOTEKCiJ7XCJmZWVcIjowLFwidHJhbnNmZXJDb2RlXCI6XCJpbnZvaWNlXCIsXCJkZWJpdE5hbWVcIjpcImFsaWNlIGNvb3BlclwiLFwiY3JlZGl0TmFtZVwiOlwibWVyIGNoYW50XCIsXCJkZWJpdElkZW50aWZpZXJcIjpcIjkyODA2MzkxXCJ9IgA + condition: + allOf: + - $ref: "#/components/schemas/IlpCondition" + - description: The condition that must be attached to the transfer by the Payer. + - example: f5sqb7tBTWPd5Y8BDFdMm9BJR_MNI4isf8p8n4D5pHA + errorInformation: + allOf: + - $ref: "#/components/schemas/ErrorInformation" + - description: Error code, category description. **Note:** receiveAmount, payeeFspFee, payeeFspCommission, expiration, ilpPacket, condition should not be set if errorInformation is set. + extensionList: + allOf: + - $ref: "#/components/schemas/ExtensionList" + - description: Optional extension, specific to deployment. + required: + - quoteId + IndividualTransfer: + title: IndividualTransfer + type: object + description: Data model for the complex type IndividualTransfer. + properties: + transferId: + allOf: + - $ref: "#/components/schemas/CorrelationId" + - description: Identifies messages related to the same /transfers sequence. + - example: b51ec534-ee48-4575-b6a9-ead2955b8069 + transferAmount: + allOf: + - $ref: "#/components/schemas/Money" + - description: Transaction amount to be sent. + ilpPacket: + allOf: + - $ref: "#/components/schemas/IlpPacket" + - description: ILP Packet containing the amount delivered to the Payee and the ILP Address of the Payee and any other end-to-end data. + - example: AYIBgQAAAAAAAASwNGxldmVsb25lLmRmc3AxLm1lci45T2RTOF81MDdqUUZERmZlakgyOVc4bXFmNEpLMHlGTFGCAUBQU0svMS4wCk5vbmNlOiB1SXlweUYzY3pYSXBFdzVVc05TYWh3CkVuY3J5cHRpb246IG5vbmUKUGF5bWVudC1JZDogMTMyMzZhM2ItOGZhOC00MTYzLTg0NDctNGMzZWQzZGE5OGE3CgpDb250ZW50LUxlbmd0aDogMTM1CkNvbnRlbnQtVHlwZTogYXBwbGljYXRpb24vanNvbgpTZW5kZXItSWRlbnRpZmllcjogOTI4MDYzOTEKCiJ7XCJmZWVcIjowLFwidHJhbnNmZXJDb2RlXCI6XCJpbnZvaWNlXCIsXCJkZWJpdE5hbWVcIjpcImFsaWNlIGNvb3BlclwiLFwiY3JlZGl0TmFtZVwiOlwibWVyIGNoYW50XCIsXCJkZWJpdElkZW50aWZpZXJcIjpcIjkyODA2MzkxXCJ9IgA + condition: + allOf: + - $ref: "#/components/schemas/IlpCondition" + - description: Condition that must be fulfilled to commit the transfer. + - example: f5sqb7tBTWPd5Y8BDFdMm9BJR_MNI4isf8p8n4D5pHA + extensionList: + allOf: + - $ref: "#/components/schemas/ExtensionList" + - description: Optional extension, specific to deployment. + required: + - transferId + - transferAmount + - ilpPacket + - condition + IndividualTransferResult: + title: IndividualTransferResult + type: object + description: Data model for the complex type IndividualTransferResult. + properties: + transferId: + allOf: + - $ref: "#/components/schemas/CorrelationId" + - description: Identifies messages related to the same /transfers sequence. + - example: b51ec534-ee48-4575-b6a9-ead2955b8069 + fulfilment: + allOf: + - $ref: "#/components/schemas/IlpFulfilment" + - description: Fulfilment of the condition specified with the transaction. **Note:** Either fulfilment or errorInformation should be set, not both. + - example: WLctttbu2HvTsa1XWvUoGRcQozHsqeu9Ahl2JW9Bsu8 + errorInformation: + allOf: + - $ref: "#/components/schemas/ErrorInformation" + - description: If transfer is REJECTED, error information may be provided. **Note:** Either fulfilment or errorInformation should be set, not both. + extensionList: + allOf: + - $ref: "#/components/schemas/ExtensionList" + - description: Optional extension, specific to deployment. + required: + - transferId + Money: + title: Money + type: object + description: Data model for the complex type Money. + properties: + currency: + allOf: + - $ref: "#/components/schemas/Currency" + - description: Currency of the amount. + - example: USD + amount: + allOf: + - $ref: "#/components/schemas/Amount" + - description: Amount of Money. + - example: "123.45" + required: + - currency + - amount + ParticipantsIDPutResponse: + title: ParticipantsIDPutResponse + type: object + description: The object sent in the PUT /participants/{ID} callback. + properties: + partyList: + type: array + items: + $ref: "#/components/schemas/PartyResult" + minItems: 1 + maxItems: 10000 + description: List of PartyResult elements that were either created or failed to be created. + currency: + allOf: + - $ref: "#/components/schemas/Currency" + - description: Indicate that the provided Currency was set to be supported by each successfully added PartyIdInfo. + - example: USD + required: + - partyList + ParticipantsPostRequest: + title: ParticipantsPostRequest + type: object + description: The object sent in the POST /participants request. + properties: + requestId: + allOf: + - $ref: "#/components/schemas/CorrelationId" + - description: The ID of the request, decided by the client. Used for identification of the callback from the server. + - example: b51ec534-ee48-4575-b6a9-ead2955b8069 + partyList: + type: array + items: + $ref: "#/components/schemas/PartyIdInfo" + minItems: 1 + maxItems: 10000 + description: List of PartyIdInfo elements that the client would like to update or create FSP information about. + currency: + allOf: + - $ref: "#/components/schemas/Currency" + - description: Indicate that the provided Currency is supported by each PartyIdInfo in the list. + - example: USD + required: + - requestId + - partyList + ParticipantsTypeIDPutResponse: + title: ParticipantsTypeIDPutResponse + type: object + description: The object sent in the PUT /participants/{Type}/{ID}/{SubId} and /participants/{Type}/{ID} callbacks. + properties: + fspId: + allOf: + - $ref: "#/components/schemas/FspId" + - description: FSP Identifier that the Party belongs to. + - example: 1234 + ParticipantsTypeIDSubIDPostRequest: + title: ParticipantsTypeIDSubIDPostRequest + type: object + description: The object sent in the POST /participants/{Type}/{ID}/{SubId} and /participants/{Type}/{ID} requests. An additional optional ExtensionList element has been added as part of v1.1 changes. + properties: + fspId: + allOf: + - $ref: "#/components/schemas/FspId" + - description: FSP Identifier that the Party belongs to. + - example: 1234 + currency: + allOf: + - $ref: "#/components/schemas/Currency" + - description: Indicate that the provided Currency is supported by the Party. + - example: USD + extensionList: + allOf: + - $ref: "#/components/schemas/ExtensionList" + - description: Optional extension, specific to deployment. + required: + - fspId + PartiesTypeIDPutResponse: + title: PartiesTypeIDPutResponse + type: object + description: The object sent in the PUT /parties/{Type}/{ID} callback. + properties: + party: + allOf: + - $ref: "#/components/schemas/Party" + - description: Information regarding the requested Party. + required: + - party + Party: + title: Party + type: object + description: Data model for the complex type Party. + properties: + partyIdInfo: + allOf: + - $ref: "#/components/schemas/PartyIdInfo" + - description: Party Id type, id, sub ID or type, and FSP Id. + merchantClassificationCode: + allOf: + - $ref: "#/components/schemas/MerchantClassificationCode" + - description: Used in the context of Payee Information, where the Payee happens to be a merchant accepting merchant payments. + - example: 4321 + name: + allOf: + - $ref: "#/components/schemas/PartyName" + - description: Display name of the Party, could be a real name or a nick name. + - example: Henrik Karlsson + personalInfo: + allOf: + - $ref: "#/components/schemas/PartyPersonalInfo" + - description: Personal information used to verify identity of Party such as first, middle, last name and date of birth. + required: + - partyIdInfo + PartyComplexName: + title: PartyComplexName + type: object + description: Data model for the complex type PartyComplexName. + properties: + firstName: + allOf: + - $ref: "#/components/schemas/FirstName" + - description: Party’s first name. + - example: Henrik + middleName: + allOf: + - $ref: "#/components/schemas/MiddleName" + - description: Party’s middle name. + - example: Johannes + lastName: + allOf: + - $ref: "#/components/schemas/LastName" + - description: Party’s last name. + - example: Karlsson + PartyIdInfo: + title: PartyIdInfo + type: object + description: Data model for the complex type PartyIdInfo. An ExtensionList element has been added to this reqeust in version v1.1 + properties: + partyIdType: + allOf: + - $ref: "#/components/schemas/PartyIdType" + - description: Type of the identifier. + - example: PERSONAL_ID + partyIdentifier: + allOf: + - $ref: "#/components/schemas/PartyIdentifier" + - description: An identifier for the Party. + - example: 16135551212 + partySubIdOrType: + allOf: + - $ref: "#/components/schemas/PartySubIdOrType" + - description: A sub-identifier or sub-type for the Party. + - example: DRIVING_LICENSE + fspId: + allOf: + - $ref: "#/components/schemas/FspId" + - description: FSP ID (if known). + - example: 1234 + extensionList: + allOf: + - $ref: "#/components/schemas/ExtensionList" + - description: Optional extension, specific to deployment. + required: + - partyIdType + - partyIdentifier + PartyPersonalInfo: + title: PartyPersonalInfo + type: object + description: Data model for the complex type PartyPersonalInfo. + properties: + complexName: + allOf: + - $ref: "#/components/schemas/PartyComplexName" + - description: First, middle and last name for the Party. + dateOfBirth: + allOf: + - $ref: "#/components/schemas/DateOfBirth" + - description: Date of birth for the Party. + - example: "1966-06-16" + PartyResult: + title: PartyResult + type: object + description: Data model for the complex type PartyResult. + properties: + partyId: + allOf: + - $ref: "#/components/schemas/PartyIdInfo" + - description: Party Id type, id, sub ID or type, and FSP Id. + errorInformation: + allOf: + - $ref: "#/components/schemas/ErrorInformation" + - description: If the Party failed to be added, error information should be provided. Otherwise, this parameter should be empty to indicate success. + required: + - partyId + QuotesIDPutResponse: + title: QuotesIDPutResponse + type: object + description: The object sent in the PUT /quotes/{ID} callback. + properties: + transferAmount: + allOf: + - $ref: "#/components/schemas/Money" + - description: The amount of money that the Payee FSP should receive. + payeeReceiveAmount: + allOf: + - $ref: "#/components/schemas/Money" + - description: The amount of Money that the Payee should receive in the end-to-end transaction. Optional as the Payee FSP might not want to disclose any optional Payee fees. + payeeFspFee: + allOf: + - $ref: "#/components/schemas/Money" + - description: Payee FSP’s part of the transaction fee. + payeeFspCommission: + allOf: + - $ref: "#/components/schemas/Money" + - description: Transaction commission from the Payee FSP. + expiration: + allOf: + - $ref: "#/components/schemas/DateTime" + - description: Date and time until when the quotation is valid and can be honored when used in the subsequent transaction. + - example: "2016-05-24T08:38:08.699-04:00" + geoCode: + allOf: + - $ref: "#/components/schemas/GeoCode" + - description: Longitude and Latitude of the Payee. Can be used to detect fraud. + ilpPacket: + allOf: + - $ref: "#/components/schemas/IlpPacket" + - description: The ILP Packet that must be attached to the transfer by the Payer. + - example: “AYIBgQAAAAAAAASwNGxldmVsb25lLmRmc3AxLm1lci45T2RTOF81MDdqUUZERmZlakgyOVc4bXFmNEpLMHlGTFGCAUBQU0svMS4wCk5vbmNlOiB1SXlweUYzY3pYSXBFdzVVc05TYWh3CkVuY3J5cHRpb246IG5vbmUKUGF5bWVudC1JZDogMTMyMzZhM2ItOGZhOC00MTYzLTg0NDctNGMzZWQzZGE5OGE3CgpDb250ZW50LUxlbmd0aDogMTM1CkNvbnRlbnQtVHlwZTogYXBwbGljYXRpb24vanNvbgpTZW5kZXItSWRlbnRpZmllcjogOTI4MDYzOTEKCiJ7XCJmZWVcIjowLFwidHJhbnNmZXJDb2RlXCI6XCJpbnZvaWNlXCIsXCJkZWJpdE5hbWVcIjpcImFsaWNlIGNvb3BlclwiLFwiY3JlZGl0TmFtZVwiOlwibWVyIGNoYW50XCIsXCJkZWJpdElkZW50aWZpZXJcIjpcIjkyODA2MzkxXCJ9IgA” + condition: + allOf: + - $ref: "#/components/schemas/IlpCondition" + - description: The condition that must be attached to the transfer by the Payer. + - example: f5sqb7tBTWPd5Y8BDFdMm9BJR_MNI4isf8p8n4D5pHA + extensionList: + allOf: + - $ref: "#/components/schemas/ExtensionList" + - description: Optional extension, specific to deployment. + required: + - transferAmount + - expiration + - ilpPacket + - condition + QuotesPostRequest: + title: QuotesPostRequest + type: object + description: The object sent in the POST /quotes request. + properties: + quoteId: + allOf: + - $ref: "#/components/schemas/CorrelationId" + - description: Common ID between the FSPs for the quote object, decided by the Payer FSP. The ID should be reused for resends of the same quote for a transaction. A new ID should be generated for each new quote for a transaction. + - example: b51ec534-ee48-4575-b6a9-ead2955b8069 + transactionId: + allOf: + - $ref: "#/components/schemas/CorrelationId" + - description: Common ID (decided by the Payer FSP) between the FSPs for the future transaction object. The actual transaction will be created as part of a successful transfer process. The ID should be reused for resends of the same quote for a transaction. A new ID should be generated for each new quote for a transaction. + - example: a8323bc6-c228-4df2-ae82-e5a997baf899 + transactionRequestId: + allOf: + - $ref: "#/components/schemas/CorrelationId" + - description: Identifies an optional previously-sent transaction request. + - example: a8323bc6-c228-4df2-ae82-e5a997baf890 + payee: + allOf: + - $ref: "#/components/schemas/Party" + - description: Information about the Payee in the proposed financial transaction. + payer: + allOf: + - $ref: "#/components/schemas/Party" + - description: Information about the Payer in the proposed financial transaction. + amountType: + allOf: + - $ref: "#/components/schemas/AmountType" + - description: SEND for send amount, RECEIVE for receive amount. + - example: SEND + amount: + allOf: + - $ref: "#/components/schemas/Money" + - description: Depending on amountType - + If SEND - The amount the Payer would like to send, that is, the amount that should be withdrawn from the Payer account including any fees. The amount is updated by each participating entity in the transaction. + If RECEIVE - The amount the Payee should receive, that is, the amount that should be sent to the receiver exclusive any fees. The amount is not updated by any of the participating entities. + fees: + allOf: + - $ref: "#/components/schemas/Money" + - description: The fees in the transaction. + The fees element should be empty if fees should be non-disclosed. + The fees element should be non-empty if fees should be disclosed. + transactionType: + allOf: + - $ref: "#/components/schemas/TransactionType" + - description: Type of transaction for which the quote is requested. + geoCode: + allOf: + - $ref: "#/components/schemas/GeoCode" + - description: Longitude and Latitude of the initiating Party. Can be used to detect fraud. + note: + allOf: + - $ref: "#/components/schemas/Note" + - description: A memo that will be attached to the transaction. + - example: Free-text memo. + expiration: + allOf: + - $ref: "#/components/schemas/DateTime" + - description: Expiration is optional. It can be set to get a quick failure in case the peer FSP takes too long to respond. Also, it may be beneficial for Consumer, Agent, and Merchant to know that their request has a time limit. + - example: "2016-05-24T08:38:08.699-04:00" + extensionList: + allOf: + - $ref: "#/components/schemas/ExtensionList" + - description: Optional extension, specific to deployment. + required: + - quoteId + - transactionId + - payee + - payer + - amountType + - amount + - transactionType + Refund: + title: Refund + type: object + description: Data model for the complex type Refund. + properties: + originalTransactionId: + allOf: + - $ref: "#/components/schemas/CorrelationId" + - description: Reference to the original transaction ID that is requested to be refunded. + - example: b51ec534-ee48-4575-b6a9-ead2955b8069 + refundReason: + allOf: + - $ref: "#/components/schemas/RefundReason" + - description: Free text indicating the reason for the refund. + - example: Free text indicating reason for the refund. + required: + - originalTransactionId + TransactionRequestsIDPutResponse: + title: TransactionRequestsIDPutResponse + type: object + description: The object sent in the PUT /transactionRequests/{ID} callback. + properties: + transactionId: + allOf: + - $ref: "#/components/schemas/CorrelationId" + - description: Identifies a related transaction (if a transaction has been created). + - example: b51ec534-ee48-4575-b6a9-ead2955b8069 + transactionRequestState: + allOf: + - $ref: "#/components/schemas/TransactionRequestState" + - description: State of the transaction request. + - example: RECEIVED + extensionList: + allOf: + - $ref: "#/components/schemas/ExtensionList" + - description: Optional extension, specific to deployment. + required: + - transactionRequestState + TransactionRequestsPostRequest: + title: TransactionRequestsPostRequest + type: object + description: The object sent in the POST /transactionRequests request. + properties: + transactionRequestId: + allOf: + - $ref: "#/components/schemas/CorrelationId" + - description: Common ID between the FSPs for the transaction request object, decided by the Payee FSP. The ID should be reused for resends of the same transaction request. A new ID should be generated for each new transaction request. + - example: b51ec534-ee48-4575-b6a9-ead2955b8069 + payee: + allOf: + - $ref: "#/components/schemas/Party" + - description: Information about the Payee in the proposed financial transaction. + payer: + allOf: + - $ref: "#/components/schemas/PartyIdInfo" + - description: Information about the Payer type, id, sub-type/id, FSP Id in the proposed financial transaction. + amount: + allOf: + - $ref: "#/components/schemas/Money" + - description: Requested amount to be transferred from the Payer to Payee. + transactionType: + allOf: + - $ref: "#/components/schemas/TransactionType" + - description: Type of transaction. + note: + allOf: + - $ref: "#/components/schemas/Note" + - description: Reason for the transaction request, intended to the Payer. + - example: Free-text memo. + geoCode: + allOf: + - $ref: "#/components/schemas/GeoCode" + - description: Longitude and Latitude of the initiating Party. Can be used to detect fraud. + authenticationType: + allOf: + - $ref: "#/components/schemas/AuthenticationType" + - description: OTP or QR Code, otherwise empty. + - example: OTP + expiration: + allOf: + - $ref: "#/components/schemas/DateTime" + - description: Can be set to get a quick failure in case the peer FSP takes too long to respond. Also, it may be beneficial for Consumer, Agent, Merchant to know that their request has a time limit. + - example: "2016-05-24T08:38:08.699-04:00" + extensionList: + allOf: + - $ref: "#/components/schemas/ExtensionList" + - description: Optional extension, specific to deployment. + required: + - transactionRequestId + - payee + - payer + - amount + - transactionType + TransactionsIDPutResponse: + title: TransactionsIDPutResponse + type: object + description: The object sent in the PUT /transactions/{ID} callback. + properties: + completedTimestamp: + allOf: + - $ref: "#/components/schemas/DateTime" + - description: Time and date when the transaction was completed. + - example: "2016-05-24T08:38:08.699-04:00" + transactionState: + allOf: + - $ref: "#/components/schemas/TransactionState" + - description: State of the transaction. + - example: RECEIVED + code: + allOf: + - $ref: "#/components/schemas/Code" + - description: Optional redemption information provided to Payer after transaction has been completed. + - example: Test-Code + extensionList: + allOf: + - $ref: "#/components/schemas/ExtensionList" + - description: Optional extension, specific to deployment. + required: + - transactionState + TransactionType: + title: TransactionType + type: object + description: Data model for the complex type TransactionType. + properties: + scenario: + allOf: + - $ref: "#/components/schemas/TransactionScenario" + - description: Deposit, withdrawal, refund, … + - example: DEPOSIT + subScenario: + allOf: + - $ref: "#/components/schemas/TransactionSubScenario" + - description: Possible sub-scenario, defined locally within the scheme. + - example: Locally defined sub-scenario. + initiator: + allOf: + - $ref: "#/components/schemas/TransactionInitiator" + - description: Who is initiating the transaction - Payer or Payee. + - example: PAYEE + initiatorType: + allOf: + - $ref: "#/components/schemas/TransactionInitiatorType" + - description: Consumer, agent, business, … + - example: CONSUMER + refundInfo: + allOf: + - $ref: "#/components/schemas/Refund" + - description: Extra information specific to a refund scenario. Should only be populated if scenario is REFUND. + balanceOfPayments: + allOf: + - $ref: "#/components/schemas/BalanceOfPayments" + - description: Balance of Payments code. + - example: 123 + required: + - scenario + - initiator + - initiatorType + TransfersIDPatchResponse: + title: TransfersIDPatchResponse + type: object + description: PATCH /transfers/{ID} object + properties: + completedTimestamp: + allOf: + - $ref: "#/components/schemas/DateTime" + - description: Time and date when the transaction was completed. + - example: "2020-05-19T08:38:08.699-04:00" + transferState: + allOf: + - $ref: "#/components/schemas/TransferState" + - description: State of the transfer. + - example: RESERVED + extensionList: + allOf: + - $ref: "#/components/schemas/ExtensionList" + - description: Optional extension, specific to deployment. + required: + - completedTimestamp + - transferState + TransfersIDPutResponse: + title: TransfersIDPutResponse + type: object + description: The object sent in the PUT /transfers/{ID} callback. + properties: + fulfilment: + allOf: + - $ref: "#/components/schemas/IlpFulfilment" + - description: Fulfilment of the condition specified with the transaction. Mandatory if transfer has completed successfully. + - example: WLctttbu2HvTsa1XWvUoGRcQozHsqeu9Ahl2JW9Bsu8 + completedTimestamp: + allOf: + - $ref: "#/components/schemas/DateTime" + - description: Time and date when the transaction was completed. + - example: "2016-05-24T08:38:08.699-04:00" + transferState: + allOf: + - $ref: "#/components/schemas/TransferState" + - description: State of the transfer. + - example: COMMITTED + extensionList: + allOf: + - $ref: "#/components/schemas/ExtensionList" + - description: Optional extension, specific to deployment. + required: + - transferState + TransfersPostRequest: + title: TransfersPostRequest + type: object + description: The object sent in the POST /transfers request. + properties: + transferId: + allOf: + - $ref: "#/components/schemas/CorrelationId" + - description: The common ID between the FSPs and the optional Switch for the transfer object, decided by the Payer FSP. The ID should be reused for resends of the same transfer. A new ID should be generated for each new transfer. + - example: b51ec534-ee48-4575-b6a9-ead2955b8069 + payeeFsp: + allOf: + - $ref: "#/components/schemas/FspId" + - description: Payee FSP in the proposed financial transaction. + - example: 1234 + payerFsp: + allOf: + - $ref: "#/components/schemas/FspId" + - description: Payer FSP in the proposed financial transaction. + - example: 5678 + amount: + allOf: + - $ref: "#/components/schemas/Money" + - description: The transfer amount to be sent. + ilpPacket: + allOf: + - $ref: "#/components/schemas/IlpPacket" + - description: The ILP Packet containing the amount delivered to the Payee and the ILP Address of the Payee and any other end-to-end data. + - example: AYIBgQAAAAAAAASwNGxldmVsb25lLmRmc3AxLm1lci45T2RTOF81MDdqUUZERmZlakgyOVc4bXFmNEpLMHlGTFGCAUBQU0svMS4wCk5vbmNlOiB1SXlweUYzY3pYSXBFdzVVc05TYWh3CkVuY3J5cHRpb246IG5vbmUKUGF5bWVudC1JZDogMTMyMzZhM2ItOGZhOC00MTYzLTg0NDctNGMzZWQzZGE5OGE3CgpDb250ZW50LUxlbmd0aDogMTM1CkNvbnRlbnQtVHlwZTogYXBwbGljYXRpb24vanNvbgpTZW5kZXItSWRlbnRpZmllcjogOTI4MDYzOTEKCiJ7XCJmZWVcIjowLFwidHJhbnNmZXJDb2RlXCI6XCJpbnZvaWNlXCIsXCJkZWJpdE5hbWVcIjpcImFsaWNlIGNvb3BlclwiLFwiY3JlZGl0TmFtZVwiOlwibWVyIGNoYW50XCIsXCJkZWJpdElkZW50aWZpZXJcIjpcIjkyODA2MzkxXCJ9IgA + condition: + allOf: + - $ref: "#/components/schemas/IlpCondition" + - description: The condition that must be fulfilled to commit the transfer. + - example: f5sqb7tBTWPd5Y8BDFdMm9BJR_MNI4isf8p8n4D5pHA + expiration: + allOf: + - $ref: "#/components/schemas/DateTime" + - description: Expiration can be set to get a quick failure expiration of the transfer. The transfer should be rolled back if no fulfilment is delivered before this time. + - example: "2016-05-24T08:38:08.699-04:00" + extensionList: + allOf: + - $ref: "#/components/schemas/ExtensionList" + - description: Optional extension, specific to deployment. + required: + - transferId + - payeeFsp + - payerFsp + - amount + - ilpPacket + - condition + - expiration + + responses: + "200": + description: OK + "202": + description: Accepted + "400": + description: Bad Request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorInformationResponse" + headers: + Content-Length: + $ref: "#/components/parameters/Content-Length" + Content-Type: + $ref: "#/components/parameters/Content-Type" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorInformationResponse" + headers: + Content-Length: + $ref: "#/components/parameters/Content-Length" + Content-Type: + $ref: "#/components/parameters/Content-Type" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorInformationResponse" + headers: + Content-Length: + $ref: "#/components/parameters/Content-Length" + Content-Type: + $ref: "#/components/parameters/Content-Type" + "404": + description: Not Found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorInformationResponse" + headers: + Content-Length: + $ref: "#/components/parameters/Content-Length" + Content-Type: + $ref: "#/components/parameters/Content-Type" + "405": + description: Method Not Allowed + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorInformationResponse" + headers: + Content-Length: + $ref: "#/components/parameters/Content-Length" + Content-Type: + $ref: "#/components/parameters/Content-Type" + "406": + description: Not Acceptable + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorInformationResponse" + headers: + Content-Length: + $ref: "#/components/parameters/Content-Length" + Content-Type: + $ref: "#/components/parameters/Content-Type" + "501": + description: Not Implemented + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorInformationResponse" + headers: + Content-Length: + $ref: "#/components/parameters/Content-Length" + Content-Type: + $ref: "#/components/parameters/Content-Type" + "503": + description: Service Unavailable + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorInformationResponse" + headers: + Content-Length: + $ref: "#/components/parameters/Content-Length" + Content-Type: + $ref: "#/components/parameters/Content-Type" + + parameters: + #Header parameters + Accept: + name: Accept + in: header + required: true + schema: + type: string + description: The `Accept` header field indicates the version of the API the client would like the server to use. + Content-Length: + name: Content-Length + in: header + required: false + schema: + type: integer + description: + The `Content-Length` header field indicates the anticipated size of the payload body. Only sent if there is a body. + + + **Note:** The API supports a maximum size of 5242880 bytes (5 Megabytes). + Content-Type: + name: Content-Type + in: header + schema: + type: string + required: true + description: The `Content-Type` header indicates the specific version of the API used to send the payload body. + Date: + name: Date + in: header + schema: + type: string + required: true + description: The `Date` header field indicates the date when the request was sent. + X-Forwarded-For: + name: X-Forwarded-For + in: header + schema: + type: string + required: false + description: + The `X-Forwarded-For` header field is an unofficially accepted standard used for informational purposes of the originating client IP address, as a request might pass multiple proxies, firewalls, and so on. Multiple `X-Forwarded-For` values should be expected and supported by implementers of the API. + + + **Note:** An alternative to `X-Forwarded-For` is defined in [RFC 7239](https://tools.ietf.org/html/rfc7239). However, to this point RFC 7239 is less-used and supported than `X-Forwarded-For`. + FSPIOP-Source: + name: FSPIOP-Source + in: header + schema: + type: string + required: true + description: The `FSPIOP-Source` header field is a non-HTTP standard field used by the API for identifying the sender of the HTTP request. The field should be set by the original sender of the request. Required for routing and signature verification (see header field `FSPIOP-Signature`). + FSPIOP-Destination: + name: FSPIOP-Destination + in: header + schema: + type: string + required: false + description: The `FSPIOP-Destination` header field is a non-HTTP standard field used by the API for HTTP header based routing of requests and responses to the destination. The field must be set by the original sender of the request if the destination is known (valid for all services except GET /parties) so that any entities between the client and the server do not need to parse the payload for routing purposes. If the destination is not known (valid for service GET /parties), the field should be left empty. + FSPIOP-Encryption: + name: FSPIOP-Encryption + in: header + schema: + type: string + required: false + description: The `FSPIOP-Encryption` header field is a non-HTTP standard field used by the API for applying end-to-end encryption of the request. + FSPIOP-Signature: + name: FSPIOP-Signature + in: header + schema: + type: string + required: false + description: The `FSPIOP-Signature` header field is a non-HTTP standard field used by the API for applying an end-to-end request signature. + FSPIOP-URI: + name: FSPIOP-URI + in: header + schema: + type: string + required: false + description: The `FSPIOP-URI` header field is a non-HTTP standard field used by the API for signature verification, should contain the service URI. Required if signature verification is used, for more information, see [the API Signature document](https://github.com/mojaloop/docs/tree/master/Specification%20Document%20Set). + FSPIOP-HTTP-Method: + name: FSPIOP-HTTP-Method + in: header + schema: + type: string + required: false + description: The `FSPIOP-HTTP-Method` header field is a non-HTTP standard field used by the API for signature verification, should contain the service HTTP method. Required if signature verification is used, for more information, see [the API Signature document](https://github.com/mojaloop/docs/tree/master/Specification%20Document%20Set). + #Path parameters + ID: + name: ID + in: path + required: true + schema: + type: string + description: The identifier value. + Type: + name: Type + in: path + required: true + schema: + type: string + description: The type of the party identifier. For example, `MSISDN`, `PERSONAL_ID`. + SubId: + name: SubId + in: path + required: true + schema: + type: string + description: A sub-identifier of the party identifier, or a sub-type of the party identifier's type. For example, `PASSPORT`, `DRIVING_LICENSE`. \ No newline at end of file diff --git a/test/func/config/ttk-hub/spec_files/api_definitions/fspiop_1.1/callback_map.json b/test/func/config/ttk-hub/spec_files/api_definitions/fspiop_1.1/callback_map.json new file mode 100644 index 000000000..8bd20d53c --- /dev/null +++ b/test/func/config/ttk-hub/spec_files/api_definitions/fspiop_1.1/callback_map.json @@ -0,0 +1,568 @@ +{ + "/transfers": { + "post": { + "fspid": "{$request.headers.fspiop-source}", + "successCallback": { + "method": "put", + "path": "/transfers/{ID}", + "pathPattern": "/transfers/{$request.body.transferId}", + "headerOverride": { + "FSPIOP-Source": "{$request.body.payeeFsp}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}", + "Content-Type": "{$session.negotiatedContentType}", + "Date": "{$request.headers.date}" + }, + "bodyOverride": { + "completedTimestamp": "{$function.generic.curDateISO}", + "transferState": "COMMITTED", + "extensionList": null + } + }, + "errorCallback": { + "method": "put", + "path": "/transfers/{ID}/error", + "pathPattern": "/transfers/{$request.body.transferId}/error", + "headerOverride": { + "FSPIOP-Source": "{$config.FSPID}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}", + "Content-Type": "{$session.negotiatedContentType}", + "Date": "{$request.headers.date}" + } + } + } + }, + "/transfers/{ID}": { + "get": { + "fspid": "{$request.headers.fspiop-source}", + "successCallback": { + "method": "put", + "path": "/transfers/{ID}", + "pathPattern": "/transfers/{$request.params.ID}", + "headerOverride": { + "FSPIOP-Source": "{$config.FSPID}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}", + "Content-Type": "{$session.negotiatedContentType}", + "Date": "{$request.headers.date}" + } + }, + "errorCallback": { + "method": "put", + "path": "/transfers/{ID}/error", + "pathPattern": "/transfers/{$request.params.ID}/error", + "headerOverride": { + "FSPIOP-Source": "{$config.FSPID}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}", + "Content-Type": "{$session.negotiatedContentType}", + "Date": "{$request.headers.date}" + } + } + } + }, + "/quotes": { + "post": { + "fspid": "{$request.headers.fspiop-source}", + "successCallback": { + "method": "put", + "path": "/quotes/{ID}", + "pathPattern": "/quotes/{$request.body.quoteId}", + "headerOverride": { + "FSPIOP-Source": "{$request.body.payee.partyIdInfo.fspId}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}", + "Content-Type": "{$session.negotiatedContentType}", + "Date": "{$request.headers.date}" + }, + "bodyOverride": { + "transferAmount": { + "currency": "{$request.body.amount.currency}", + "amount": "{$request.body.amount.amount}" + }, + "expiration": "2040-01-01T01:01:01.001Z", + "extensionList": null + } + }, + "errorCallback": { + "method": "put", + "path": "/quotes/{ID}/error", + "pathPattern": "/quotes/{$request.body.quoteId}/error", + "headerOverride": { + "FSPIOP-Source": "{$config.FSPID}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}", + "Content-Type": "{$session.negotiatedContentType}", + "Date": "{$request.headers.date}" + } + } + } + }, + "/quotes/{ID}": { + "get": { + "fspid": "{$request.headers.fspiop-source}", + "successCallback": { + "method": "put", + "path": "/quotes/{ID}", + "pathPattern": "/quotes/{$request.params.ID}", + "headerOverride": { + "FSPIOP-Source": "{$config.FSPID}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}", + "Content-Type": "{$session.negotiatedContentType}", + "Date": "{$request.headers.date}" + } + }, + "errorCallback": { + "method": "put", + "path": "/quotes/{ID}/error", + "pathPattern": "/quotes/{$request.params.ID}/error", + "headerOverride": { + "FSPIOP-Source": "{$config.FSPID}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}", + "Content-Type": "{$session.negotiatedContentType}", + "Date": "{$request.headers.date}" + } + } + } + }, + "/parties/{Type}/{ID}": { + "get": { + "fspid": "{$request.headers.fspiop-source}", + "successCallback": { + "method": "put", + "path": "/parties/{Type}/{ID}", + "pathPattern": "/parties/{$request.params.Type}/{$request.params.ID}", + "headerOverride": { + "FSPIOP-Source": "{$config.FSPID}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}", + "Content-Type": "{$session.negotiatedContentType}", + "Date": "{$request.headers.date}" + }, + "bodyOverride": { + "party": { + "partyIdInfo": { + "partyIdType": "{$request.params.Type}", + "partyIdentifier": "{$request.params.ID}", + "fspId": "{$config.FSPID}" + } + } + } + }, + "errorCallback": { + "method": "put", + "path": "/parties/{Type}/{ID}/error", + "pathPattern": "/parties/{$request.params.Type}/{$request.params.ID}/error", + "headerOverride": { + "FSPIOP-Source": "{$config.FSPID}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}", + "Content-Type": "{$session.negotiatedContentType}", + "Date": "{$request.headers.date}" + } + } + } + }, + "/parties/{Type}/{ID}/{SubId}": { + "get": { + "fspid": "{$request.headers.fspiop-source}", + "successCallback": { + "method": "put", + "path": "/parties/{Type}/{ID}/{SubId}", + "pathPattern": "/parties/{$request.params.Type}/{$request.params.ID}/{$request.params.SubId}", + "headerOverride": { + "FSPIOP-Source": "{$config.FSPID}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}", + "Content-Type": "{$session.negotiatedContentType}", + "Date": "{$request.headers.date}" + }, + "bodyOverride": { + "party": { + "partyIdInfo": { + "partyIdType": "{$request.params.Type}", + "partyIdentifier": "{$request.params.ID}", + "partySubIdOrType": null, + "fspId": "{$config.FSPID}" + } + } + } + }, + "errorCallback": { + "method": "put", + "path": "/parties/{Type}/{ID}/{SubId}/error", + "pathPattern": "/parties/{$request.params.Type}/{$request.params.ID}/{$request.params.SubId}/error", + "headerOverride": { + "FSPIOP-Source": "{$config.FSPID}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}", + "Content-Type": "{$session.negotiatedContentType}", + "Date": "{$request.headers.date}" + } + } + } + }, + "/transactionRequests": { + "post": { + "fspid": "{$request.headers.fspiop-source}", + "successCallback": { + "method": "put", + "path": "/transactionRequests/{ID}", + "pathPattern": "/transactionRequests/{$request.body.transactionRequestId}", + "headerOverride": { + "FSPIOP-Source": "{$config.FSPID}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}", + "Content-Type": "{$session.negotiatedContentType}", + "Date": "{$request.headers.date}" + } + }, + "errorCallback": { + "method": "put", + "path": "/transactionRequests/{ID}/error", + "pathPattern": "/transactionRequests/{$request.body.transactionRequestId}/error", + "headerOverride": { + "FSPIOP-Source": "{$config.FSPID}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}", + "Content-Type": "{$session.negotiatedContentType}", + "Date": "{$request.headers.date}" + } + } + } + }, + "/transactionRequests/{ID}": { + "get": { + "fspid": "{$request.headers.fspiop-source}", + "successCallback": { + "method": "put", + "path": "/transactionRequests/{ID}", + "pathPattern": "/transactionRequests/{$request.params.ID}", + "headerOverride": { + "FSPIOP-Source": "{$config.FSPID}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}", + "Content-Type": "{$session.negotiatedContentType}", + "Date": "{$request.headers.date}" + } + }, + "errorCallback": { + "method": "put", + "path": "/transactionRequests/{ID}/error", + "pathPattern": "/transactionRequests/{$request.params.ID}/error", + "headerOverride": { + "FSPIOP-Source": "{$config.FSPID}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}", + "Content-Type": "{$session.negotiatedContentType}", + "Date": "{$request.headers.date}" + } + } + } + }, + "/participants": { + "post": { + "fspid": "{$request.headers.fspiop-source}", + "successCallback": { + "method": "put", + "path": "/participants/{ID}", + "pathPattern": "/participants/{$request.body.partyList[0].partyIdentifier}", + "headerOverride": { + "FSPIOP-Source": "{$config.FSPID}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}", + "Content-Type": "{$session.negotiatedContentType}", + "Date": "{$request.headers.date}" + } + }, + "errorCallback": { + "method": "put", + "path": "/participants/{ID}/error", + "pathPattern": "/participants/{$request.body.partyList[0].partyIdentifier}/error", + "headerOverride": { + "FSPIOP-Source": "{$config.FSPID}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}", + "Content-Type": "{$session.negotiatedContentType}", + "Date": "{$request.headers.date}" + } + } + } + }, + "/participants/{Type}/{ID}": { + "get": { + "fspid": "{$request.headers.fspiop-source}", + "successCallback": { + "method": "put", + "path": "/participants/{Type}/{ID}", + "pathPattern": "/participants/{$request.params.Type}/{$request.params.ID}", + "headerOverride": { + "FSPIOP-Source": "{$config.FSPID}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}", + "Content-Type": "{$session.negotiatedContentType}", + "Date": "{$request.headers.date}" + } + }, + "errorCallback": { + "method": "put", + "path": "/participants/{Type}/{ID}/error", + "pathPattern": "/participants/{$request.params.Type}/{$request.params.ID}/error", + "headerOverride": { + "FSPIOP-Source": "{$config.FSPID}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}", + "Content-Type": "{$session.negotiatedContentType}", + "Date": "{$request.headers.date}" + } + } + }, + "post": { + "fspid": "{$request.headers.fspiop-source}", + "successCallback": { + "method": "put", + "path": "/participants/{Type}/{ID}", + "pathPattern": "/participants/{$request.params.Type}/{$request.params.ID}", + "headerOverride": { + "FSPIOP-Source": "{$config.FSPID}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}", + "Content-Type": "{$session.negotiatedContentType}", + "Date": "{$request.headers.date}" + } + }, + "errorCallback": { + "method": "put", + "path": "/participants/{Type}/{ID}/error", + "pathPattern": "/participants/{$request.params.Type}/{$request.params.ID}/error", + "headerOverride": { + "FSPIOP-Source": "{$config.FSPID}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}", + "Content-Type": "{$session.negotiatedContentType}", + "Date": "{$request.headers.date}" + } + } + }, + "delete": { + "fspid": "{$request.headers.fspiop-source}", + "successCallback": { + "method": "put", + "path": "/participants/{Type}/{ID}", + "pathPattern": "/participants/{$request.params.Type}/{$request.params.ID}", + "headerOverride": { + "FSPIOP-Source": "{$config.FSPID}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}", + "Content-Type": "{$session.negotiatedContentType}", + "Date": "{$request.headers.date}" + } + }, + "errorCallback": { + "method": "put", + "path": "/participants/{Type}/{ID}/error", + "pathPattern": "/participants/{$request.params.Type}/{$request.params.ID}/error", + "headerOverride": { + "FSPIOP-Source": "{$config.FSPID}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}", + "Content-Type": "{$session.negotiatedContentType}", + "Date": "{$request.headers.date}" + } + } + } + }, + "/participants/{Type}/{ID}/{SubId}": { + "get": { + "fspid": "{$request.headers.fspiop-source}", + "successCallback": { + "method": "put", + "path": "/participants/{Type}/{ID}/{SubId}", + "pathPattern": "/participants/{$request.params.Type}/{$request.params.ID}", + "headerOverride": { + "FSPIOP-Source": "{$config.FSPID}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}", + "Content-Type": "{$session.negotiatedContentType}", + "Date": "{$request.headers.date}" + } + }, + "errorCallback": { + "method": "put", + "path": "/participants/{Type}/{ID}/{SubId}/error", + "pathPattern": "/participants/{$request.params.Type}/{$request.params.ID}/error", + "headerOverride": { + "FSPIOP-Source": "{$config.FSPID}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}", + "Content-Type": "{$session.negotiatedContentType}", + "Date": "{$request.headers.date}" + } + } + }, + "post": { + "fspid": "{$request.headers.fspiop-source}", + "successCallback": { + "method": "put", + "path": "/participants/{Type}/{ID}/{SubId}", + "pathPattern": "/participants/{$request.params.Type}/{$request.params.ID}", + "headerOverride": { + "FSPIOP-Source": "{$config.FSPID}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}", + "Content-Type": "{$session.negotiatedContentType}", + "Date": "{$request.headers.date}" + } + }, + "errorCallback": { + "method": "put", + "path": "/participants/{Type}/{ID}/{SubId}/error", + "pathPattern": "/participants/{$request.params.Type}/{$request.params.ID}/error", + "headerOverride": { + "FSPIOP-Source": "{$config.FSPID}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}", + "Content-Type": "{$session.negotiatedContentType}", + "Date": "{$request.headers.date}" + } + } + } + }, + "/authorizations/{ID}": { + "get": { + "fspid": "{$request.headers.fspiop-source}", + "successCallback": { + "method": "put", + "path": "/authorizations/{ID}", + "pathPattern": "/authorizations/{$request.params.ID}", + "headerOverride": { + "FSPIOP-Source": "{$config.FSPID}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}", + "Content-Type": "{$session.negotiatedContentType}", + "Date": "{$request.headers.date}" + } + }, + "errorCallback": { + "method": "put", + "path": "/authorizations/{ID}/error", + "pathPattern": "/authorizations/{$request.params.ID}/error", + "headerOverride": { + "FSPIOP-Source": "{$config.FSPID}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}", + "Content-Type": "{$session.negotiatedContentType}", + "Date": "{$request.headers.date}" + } + } + } + }, + "/transactions/{ID}": { + "get": { + "fspid": "{$request.headers.fspiop-source}", + "successCallback": { + "method": "put", + "path": "/transactions/{ID}", + "pathPattern": "/transactions/{$request.params.ID}", + "headerOverride": { + "FSPIOP-Source": "{$config.FSPID}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}", + "Content-Type": "{$session.negotiatedContentType}", + "Date": "{$request.headers.date}" + } + }, + "errorCallback": { + "method": "put", + "path": "/transactions/{ID}/error", + "pathPattern": "/transactions/{$request.params.ID}/error", + "headerOverride": { + "FSPIOP-Source": "{$config.FSPID}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}", + "Content-Type": "{$session.negotiatedContentType}", + "Date": "{$request.headers.date}" + } + } + } + }, + "/bulkQuotes": { + "post": { + "fspid": "{$request.headers.fspiop-source}", + "successCallback": { + "method": "put", + "path": "/bulkQuotes/{ID}", + "pathPattern": "/bulkQuotes/{$request.body.bulkQuoteId}", + "headerOverride": { + "FSPIOP-Source": "{$config.FSPID}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}", + "Content-Type": "{$session.negotiatedContentType}", + "Date": "{$request.headers.date}" + } + }, + "errorCallback": { + "method": "put", + "path": "/bulkQuotes/{ID}/error", + "pathPattern": "/bulkQuotes/{$request.body.bulkQuoteId}/error", + "headerOverride": { + "FSPIOP-Source": "{$config.FSPID}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}", + "Content-Type": "{$session.negotiatedContentType}", + "Date": "{$request.headers.date}" + } + } + } + }, + "/bulkQuotes/{ID}": { + "get": { + "fspid": "{$request.headers.fspiop-source}", + "successCallback": { + "method": "put", + "path": "/bulkQuotes/{ID}", + "pathPattern": "/bulkQuotes/{$request.params.ID}", + "headerOverride": { + "FSPIOP-Source": "{$config.FSPID}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}", + "Content-Type": "{$session.negotiatedContentType}", + "Date": "{$request.headers.date}" + } + }, + "errorCallback": { + "method": "put", + "path": "/bulkQuotes/{ID}/error", + "pathPattern": "/bulkQuotes/{$request.params.ID}/error", + "headerOverride": { + "FSPIOP-Source": "{$config.FSPID}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}", + "Content-Type": "{$session.negotiatedContentType}", + "Date": "{$request.headers.date}" + } + } + } + }, + "/bulkTransfers": { + "post": { + "fspid": "{$request.headers.fspiop-source}", + "successCallback": { + "method": "put", + "path": "/bulkTransfers/{ID}", + "pathPattern": "/bulkTransfers/{$request.body.bulkTransferId}", + "headerOverride": { + "FSPIOP-Source": "{$config.FSPID}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}", + "Content-Type": "{$session.negotiatedContentType}", + "Date": "{$request.headers.date}" + } + }, + "errorCallback": { + "method": "put", + "path": "/bulkTransfers/{ID}/error", + "pathPattern": "/bulkTransfers/{$request.body.bulkTransferId}/error", + "headerOverride": { + "FSPIOP-Source": "{$config.FSPID}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}", + "Content-Type": "{$session.negotiatedContentType}", + "Date": "{$request.headers.date}" + } + } + } + }, + "/bulkTransfers/{ID}": { + "get": { + "fspid": "{$request.headers.fspiop-source}", + "successCallback": { + "method": "put", + "path": "/bulkTransfers/{ID}", + "pathPattern": "/bulkTransfers/{$request.params.ID}", + "headerOverride": { + "FSPIOP-Source": "{$config.FSPID}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}", + "Content-Type": "{$session.negotiatedContentType}", + "Date": "{$request.headers.date}" + } + }, + "errorCallback": { + "method": "put", + "path": "/bulkTransfers/{ID}/error", + "pathPattern": "/bulkTransfers/{$request.params.ID}/error", + "headerOverride": { + "FSPIOP-Source": "{$config.FSPID}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}", + "Content-Type": "{$session.negotiatedContentType}", + "Date": "{$request.headers.date}" + } + } + } + } +} \ No newline at end of file diff --git a/test/func/config/ttk-hub/spec_files/api_definitions/fspiop_1.1/mockRef.json b/test/func/config/ttk-hub/spec_files/api_definitions/fspiop_1.1/mockRef.json new file mode 100644 index 000000000..77f657ccc --- /dev/null +++ b/test/func/config/ttk-hub/spec_files/api_definitions/fspiop_1.1/mockRef.json @@ -0,0 +1,79 @@ +[ + { + "id": "party.personalInfo.complexName.firstName", + "pattern": "John|David|Michael|Chris|Mike|Mark|Paul|Daniel|James|Maria" + }, + { + "id": "party.personalInfo.complexName.middleName", + "pattern": "G|P|N|S" + }, + { + "id": "party.personalInfo.complexName.lastName", + "pattern": "Smith|Jones|Johnson|Lee|Brown|Williams|Rodriguez|Garcia|Gonzalez|Lopez" + }, + { + "id": "party.personalInfo.dateOfBirth", + "pattern": "^(19)\\d\\d[-](0[1-9]|1[012])[-](0[1-9]|[12][0-9]|2[0-8])$" + }, + { + "id": "transferId", + "faker": "internet.email" + }, + { + "id": "transferState", + "pattern": "COMMITTED|RESERVED|ABORTED|RECEIVED" + }, + { + "id": "fulfilment", + "pattern": "[A-Fa-f0-9]{64}" + }, + { + "id": "condition", + "pattern": "[A-Fa-f0-9]{64}" + }, + { + "id": "ilpPacket", + "pattern": "[A-Fa-f0-9]{256}" + }, + { + "id": "transferAmount.currency", + "pattern": "USD" + }, + { + "id": "transferAmount.amount", + "pattern": "123" + }, + { + "id": "payeeReceiveAmount.currency", + "pattern": "USD" + }, + { + "id": "payeeReceiveAmount.amount", + "pattern": "123" + }, + { + "id": "payeeFspFee.currency", + "pattern": "USD" + }, + { + "id": "payeeFspFee.amount", + "pattern": "2" + }, + { + "id": "payeeFspCommission.currency", + "pattern": "USD" + }, + { + "id": "payeeFspCommission.amount", + "pattern": "3" + }, + + { + "id": "errorInformation.errorCode", + "pattern": "600[1-9]" + }, + { + "id": "errorInformation.errorDescription", + "pattern": "This is a mock error description" + } +] \ No newline at end of file diff --git a/test/func/config/ttk-hub/spec_files/api_definitions/fspiop_1.1/trigger_templates/transaction_request_followup.json b/test/func/config/ttk-hub/spec_files/api_definitions/fspiop_1.1/trigger_templates/transaction_request_followup.json new file mode 100644 index 000000000..408cc6285 --- /dev/null +++ b/test/func/config/ttk-hub/spec_files/api_definitions/fspiop_1.1/trigger_templates/transaction_request_followup.json @@ -0,0 +1,125 @@ +{ + "name": "Transaction Request Service Followup", + "inputValues": { + "payerFirstName": "Vijay", + "payerLastName": "Kumar", + "payerDOB": "1984-01-01", + "accept": "application/vnd.interoperability.parties+json;version=1.0", + "contentType": "application/vnd.interoperability.parties+json;version=1.0", + "transactionId": "e8c4572c-0826-22f4-aa3e-f5bbe928afa6", + "TrsNote": "note", + "TrsCurrency": "USD", + "TrsAmount": "100", + "TrsPayerIdType": "MSISDN", + "TrsPayerIdValue": "44123456789", + "TrsPayerFspId": "testingtoolkitdfsp", + "TrsPayeeIdType": "MSISDN", + "TrsPayeeIdValue": "9876543210", + "TrsPayeeFspId": "userdfsp", + "TrsScenario": "DEPOSIT", + "TrsInitiator": "PAYEE", + "TrsInitiatorType": "CONSUMER" + }, + "test_cases": [ + { + "id": 1, + "name": "Transaction Request Followup", + "requests": [ + { + "id": 2, + "description": "Get quote", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "operationPath": "/quotes", + "method": "post", + "headers": { + "Accept": "{$inputs.accept}", + "Content-Type": "{$inputs.contentType}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.TrsPayerFspId}" + }, + "body": { + "quoteId": "{$function.generic.generateUUID}", + "transactionId": "{$inputs.transactionId}", + "payer": { + "partyIdInfo": { + "partyIdType": "{$inputs.TrsPayerIdType}", + "partyIdentifier": "{$inputs.TrsPayerIdValue}", + "fspId": "{$inputs.TrsPayerFspId}" + }, + "personalInfo": { + "complexName": { + "firstName": "{$inputs.payerFirstName}", + "lastName": "{$inputs.payerLastName}" + }, + "dateOfBirth": "{$inputs.payerDOB}" + } + }, + "payee": { + "partyIdInfo": { + "partyIdType": "{$inputs.TrsPayeeIdType}", + "partyIdentifier": "{$inputs.TrsPayeeIdValue}", + "fspId": "{$inputs.TrsPayeeFspId}" + } + }, + "amountType": "SEND", + "amount": { + "amount": "{$inputs.TrsAmount}", + "currency": "{$inputs.TrsCurrency}" + }, + "transactionType": { + "scenario": "{$inputs.TrsScenario}", + "initiator": "{$inputs.TrsInitiator}", + "initiatorType": "{$inputs.TrsInitiatorType}" + }, + "note": "{$inputs.TrsNote}" + }, + "tests": { + "assertions": [] + }, + "params": { + "Type": "", + "ID": "" + } + }, + { + "id": 3, + "description": "Send transfer", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "operationPath": "/transfers", + "method": "post", + "headers": { + "Accept": "{$inputs.accept}", + "Content-Type": "{$inputs.contentType}", + "Date": "{$function.generic.curDate}", + "FSPIOP-Source": "{$inputs.TrsPayerFspId}" + }, + "body": { + "transferId": "{$prev.2.request.body.transactionId}", + "payerFsp": "{$inputs.TrsPayerFspId}", + "payeeFsp": "{$inputs.TrsPayeeFspId}", + "amount": { + "amount": "{$inputs.TrsAmount}", + "currency": "{$inputs.TrsCurrency}" + }, + "expiration": "{$prev.2.callback.body.expiration}", + "ilpPacket": "{$prev.2.callback.body.ilpPacket}", + "condition": "{$prev.2.callback.body.condition}" + }, + "tests": { + "assertions": [] + } + } + ] + } + ] +} \ No newline at end of file diff --git a/test/func/config/ttk-hub/spec_files/api_definitions/fx-api_2.0/api_spec.yaml b/test/func/config/ttk-hub/spec_files/api_definitions/fx-api_2.0/api_spec.yaml new file mode 100644 index 000000000..3777845a3 --- /dev/null +++ b/test/func/config/ttk-hub/spec_files/api_definitions/fx-api_2.0/api_spec.yaml @@ -0,0 +1,1765 @@ +openapi: "3.0.2" +info: + version: "2.0" + title: Mojaloop API for Currency conversion + description: + Based on "Currency conversion support in Mojaloop" document version 2.0 updated on 2020-09-28. + + + **Note:** The API supports a maximum size of 65536 bytes (64 Kilobytes) in the HTTP header. + license: + name: CC BY-ND 4.0 + url: https://github.com/mojaloop/mojaloop-specification/blob/master/LICENSE.md + contact: + name: "SK or MR" + url: https://github.com/mojaloop/mojaloop-specification/issues +servers: + - url: "{protocol}://hostname:/switch/" + variables: + protocol: + enum: + - http + - https + default: https + +paths: + + #Parties + #This resource is part of the FSPIOP API but the /parties resource is listed here only to show the changes needed + /fxParties/{Type}/{ID}: + parameters: + #Path + - $ref: "#/components/parameters/Type" + - $ref: "#/components/parameters/ID" + #Headers + - $ref: "#/components/parameters/Content-Type" + - $ref: "#/components/parameters/Date" + - $ref: "#/components/parameters/X-Forwarded-For" + - $ref: "#/components/parameters/FSPIOP-Source" + - $ref: "#/components/parameters/FSPIOP-Destination" + - $ref: "#/components/parameters/FSPIOP-Encryption" + - $ref: "#/components/parameters/FSPIOP-Signature" + - $ref: "#/components/parameters/FSPIOP-URI" + - $ref: "#/components/parameters/FSPIOP-HTTP-Method" + get: + description: The HTTP request `GET /fxParties/{Type}/{ID}` (or `GET /fxParties/{Type}/{ID}/{SubId}`) is used to look up information regarding the requested Party, defined by `{Type}`, `{ID}` and optionally `{SubId}` (for example, `GET /fxParties/MSISDN/123456789`, or `GET /fxParties/BUSINESS/shoecompany/employee1`). + summary: Look up party information + tags: + - fxParties + operationId: FxPartiesByTypeAndID + parameters: + #Headers + - $ref: "#/components/parameters/Accept" + responses: + 202: + $ref: "#/components/responses/202" + 400: + $ref: "#/components/responses/400" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 404: + $ref: "#/components/responses/404" + 405: + $ref: "#/components/responses/405" + 406: + $ref: "#/components/responses/406" + 501: + $ref: "#/components/responses/501" + 503: + $ref: "#/components/responses/503" + put: + description: The callback `PUT /fxParties/{Type}/{ID}` (or `PUT /fxParties/{Type}/{ID}/{SubId}`) is used to inform the client of a successful result of the Party information lookup. + summary: Return party information + tags: + - fxParties + operationId: FxPartiesByTypeAndID2 + parameters: + #Headers + - $ref: "#/components/parameters/Content-Length" + requestBody: + description: Party information returned. + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/PartiesTypeIDPutResponse" + responses: + 200: + $ref: "#/components/responses/200" + 400: + $ref: "#/components/responses/400" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 404: + $ref: "#/components/responses/404" + 405: + $ref: "#/components/responses/405" + 406: + $ref: "#/components/responses/406" + 501: + $ref: "#/components/responses/501" + 503: + $ref: "#/components/responses/503" + /fxParties/{Type}/{ID}/error: + put: + description: If the server is unable to find Party information of the provided identity, or another processing error occurred, the error callback `PUT /fxParties/{Type}/{ID}/error` (or `PUT /fxParties/{Type}/{ID}/{SubI}/error`) is used. + summary: Return party information error + tags: + - fxParties + operationId: FxPartiesErrorByTypeAndID + parameters: + #Path + - $ref: "#/components/parameters/Type" + - $ref: "#/components/parameters/ID" + #Headers + - $ref: "#/components/parameters/Content-Length" + - $ref: "#/components/parameters/Content-Type" + - $ref: "#/components/parameters/Date" + - $ref: "#/components/parameters/X-Forwarded-For" + - $ref: "#/components/parameters/FSPIOP-Source" + - $ref: "#/components/parameters/FSPIOP-Destination" + - $ref: "#/components/parameters/FSPIOP-Encryption" + - $ref: "#/components/parameters/FSPIOP-Signature" + - $ref: "#/components/parameters/FSPIOP-URI" + - $ref: "#/components/parameters/FSPIOP-HTTP-Method" + requestBody: + description: Details of the error returned. + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorInformationObject" + responses: + 200: + $ref: "#/components/responses/200" + 400: + $ref: "#/components/responses/400" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 404: + $ref: "#/components/responses/404" + 405: + $ref: "#/components/responses/405" + 406: + $ref: "#/components/responses/406" + 501: + $ref: "#/components/responses/501" + 503: + $ref: "#/components/responses/503" + /fxParties/{Type}/{ID}/{SubId}: + parameters: + #Path + - $ref: "#/components/parameters/Type" + - $ref: "#/components/parameters/ID" + - $ref: "#/components/parameters/SubId" + #Headers + - $ref: "#/components/parameters/Content-Type" + - $ref: "#/components/parameters/Date" + - $ref: "#/components/parameters/X-Forwarded-For" + - $ref: "#/components/parameters/FSPIOP-Source" + - $ref: "#/components/parameters/FSPIOP-Destination" + - $ref: "#/components/parameters/FSPIOP-Encryption" + - $ref: "#/components/parameters/FSPIOP-Signature" + - $ref: "#/components/parameters/FSPIOP-URI" + - $ref: "#/components/parameters/FSPIOP-HTTP-Method" + get: + description: The HTTP request `GET /fxParties/{Type}/{ID}` (or `GET /fxParties/{Type}/{ID}/{SubId}`) is used to look up information regarding the requested Party, defined by `{Type}`, `{ID}` and optionally `{SubId}` (for example, `GET /fxParties/MSISDN/123456789`, or `GET /fxParties/BUSINESS/shoecompany/employee1`). + summary: Look up party information + tags: + - fxParties + operationId: FxPartiesSubIdByTypeAndID + parameters: + #Headers + - $ref: "#/components/parameters/Accept" + responses: + 202: + $ref: "#/components/responses/202" + 400: + $ref: "#/components/responses/400" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 404: + $ref: "#/components/responses/404" + 405: + $ref: "#/components/responses/405" + 406: + $ref: "#/components/responses/406" + 501: + $ref: "#/components/responses/501" + 503: + $ref: "#/components/responses/503" + put: + description: The callback `PUT /parties/{Type}/{ID}` (or `PUT /parties/{Type}/{ID}/{SubId}`) is used to inform the client of a successful result of the Party information lookup. + summary: Return party information + tags: + - fxParties + operationId: PartiesSubIdByTypeAndIDPut + parameters: + #Headers + - $ref: "#/components/parameters/Content-Length" + requestBody: + description: Party information returned. + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/PartiesTypeIDPutResponse" + responses: + 200: + $ref: "#/components/responses/200" + 400: + $ref: "#/components/responses/400" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 404: + $ref: "#/components/responses/404" + 405: + $ref: "#/components/responses/405" + 406: + $ref: "#/components/responses/406" + 501: + $ref: "#/components/responses/501" + 503: + $ref: "#/components/responses/503" + /fxParties/{Type}/{ID}/{SubId}/error: + put: + description: If the server is unable to find Party information of the provided identity, or another processing error occurred, the error callback `PUT /fxParties/{Type}/{ID}/error` (or `PUT /fxParties/{Type}/{ID}/{SubId}/error`) is used. + summary: Return party information error + tags: + - fxParties + operationId: FxPartiesSubIdErrorByTypeAndID + parameters: + #Path + - $ref: "#/components/parameters/Type" + - $ref: "#/components/parameters/ID" + - $ref: "#/components/parameters/SubId" + #Headers + - $ref: "#/components/parameters/Content-Length" + - $ref: "#/components/parameters/Content-Type" + - $ref: "#/components/parameters/Date" + - $ref: "#/components/parameters/X-Forwarded-For" + - $ref: "#/components/parameters/FSPIOP-Source" + - $ref: "#/components/parameters/FSPIOP-Destination" + - $ref: "#/components/parameters/FSPIOP-Encryption" + - $ref: "#/components/parameters/FSPIOP-Signature" + - $ref: "#/components/parameters/FSPIOP-URI" + - $ref: "#/components/parameters/FSPIOP-HTTP-Method" + requestBody: + description: Details of the error returned. + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorInformationObject" + responses: + 200: + $ref: "#/components/responses/200" + 400: + $ref: "#/components/responses/400" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 404: + $ref: "#/components/responses/404" + 405: + $ref: "#/components/responses/405" + 406: + $ref: "#/components/responses/406" + 501: + $ref: "#/components/responses/501" + 503: + $ref: "#/components/responses/503" + + #Services + /services/FXP: + get: + description: The HTTP request GET /services/FXP is used to request information about the participants in a scheme who offer currency conversion services. + summary: Perform services request + tags: + - servicesRequest + operationId: servicesRequest + parameters: + #Headers + - $ref: "#/components/parameters/Accept" + - $ref: "#/components/parameters/Content-Length" + - $ref: "#/components/parameters/Content-Type" + - $ref: "#/components/parameters/Date" + - $ref: "#/components/parameters/X-Forwarded-For" + - $ref: "#/components/parameters/FSPIOP-Source" + - $ref: "#/components/parameters/FSPIOP-Destination" + - $ref: "#/components/parameters/FSPIOP-Encryption" + - $ref: "#/components/parameters/FSPIOP-Signature" + - $ref: "#/components/parameters/FSPIOP-URI" + - $ref: "#/components/parameters/FSPIOP-HTTP-Method" + responses: + 202: + $ref: "#/components/responses/202" + 400: + $ref: "#/components/responses/400" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 404: + $ref: "#/components/responses/404" + 405: + $ref: "#/components/responses/405" + 406: + $ref: "#/components/responses/406" + 501: + $ref: "#/components/responses/501" + 503: + $ref: "#/components/responses/503" + put: + description: The callback PUT /services/FXP is used to inform the requester about up to 16 participants in a scheme who offer currency conversion services. If no participants offer these services, the return object will be blank. + summary: Return transaction request information + tags: + - servicesResponse + operationId: servicesPutResponse + parameters: + #Headers + - $ref: "#/components/parameters/Content-Length" + requestBody: + description: FXP Services information returned. + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/ServicesFXPPutResponse" + responses: + 200: + $ref: "#/components/responses/200" + 400: + $ref: "#/components/responses/400" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 404: + $ref: "#/components/responses/404" + 405: + $ref: "#/components/responses/405" + 406: + $ref: "#/components/responses/406" + 501: + $ref: "#/components/responses/501" + 503: + $ref: "#/components/responses/503" + /services/FXP/error: + put: + description: If the server is unable to find or create a services request, or another processing error occurs, the error callback `PUT /services/FXP/error` is used. + summary: Return services request information error + tags: + - servicesResponse + operationId: ServicesFXPRequestsError + parameters: + #Headers + - $ref: "#/components/parameters/Content-Length" + - $ref: "#/components/parameters/Content-Type" + - $ref: "#/components/parameters/Date" + - $ref: "#/components/parameters/X-Forwarded-For" + - $ref: "#/components/parameters/FSPIOP-Source" + - $ref: "#/components/parameters/FSPIOP-Destination" + - $ref: "#/components/parameters/FSPIOP-Encryption" + - $ref: "#/components/parameters/FSPIOP-Signature" + - $ref: "#/components/parameters/FSPIOP-URI" + - $ref: "#/components/parameters/FSPIOP-HTTP-Method" + requestBody: + description: Details of the error returned. + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorInformationObject" + responses: + 200: + $ref: "#/components/responses/200" + 400: + $ref: "#/components/responses/400" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 404: + $ref: "#/components/responses/404" + 405: + $ref: "#/components/responses/405" + 406: + $ref: "#/components/responses/406" + 501: + $ref: "#/components/responses/501" + 503: + $ref: "#/components/responses/503" + + #FxQuotes + /fxQuotes: + post: + description: The HTTP request POST /fxQuotes is used to ask an FXP to provide a quotation for a currency conversion. + summary: Calculate FX Quote + tags: + - fxQuotes + operationId: FxQuotes + parameters: + #Headers + - $ref: "#/components/parameters/Content-Type" + - $ref: "#/components/parameters/Date" + - $ref: "#/components/parameters/X-Forwarded-For" + - $ref: "#/components/parameters/FSPIOP-Source" + - $ref: "#/components/parameters/FSPIOP-Destination" + - $ref: "#/components/parameters/FSPIOP-Encryption" + - $ref: "#/components/parameters/FSPIOP-Signature" + - $ref: "#/components/parameters/FSPIOP-URI" + - $ref: "#/components/parameters/FSPIOP-HTTP-Method" + requestBody: + description: Details of the fx quote to be created. + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/FxQuotesPostRequest" + responses: + 202: + $ref: "#/components/responses/202" + 400: + $ref: "#/components/responses/400" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 404: + $ref: "#/components/responses/404" + 405: + $ref: "#/components/responses/405" + 406: + $ref: "#/components/responses/406" + 501: + $ref: "#/components/responses/501" + 503: + $ref: "#/components/responses/503" + /fxQuotes/{ID}: + parameters: + #Path + - $ref: "#/components/parameters/ID" + #Headers + - $ref: "#/components/parameters/Content-Type" + - $ref: "#/components/parameters/Date" + - $ref: "#/components/parameters/X-Forwarded-For" + - $ref: "#/components/parameters/FSPIOP-Source" + - $ref: "#/components/parameters/FSPIOP-Destination" + - $ref: "#/components/parameters/FSPIOP-Encryption" + - $ref: "#/components/parameters/FSPIOP-Signature" + - $ref: "#/components/parameters/FSPIOP-URI" + - $ref: "#/components/parameters/FSPIOP-HTTP-Method" + get: + description: The HTTP request GET /fxQuotes/{ID} is used to request information regarding a request for quotation for a currency conversion which the sender has previously issued. The {ID} in the URI should contain the conversionRequestId that was used to request the quotation. + summary: Retrieve quote information + tags: + - fxQuotes + operationId: FxQuotesByID + parameters: + #Headers + - $ref: "#/components/parameters/Accept" + responses: + 202: + $ref: "#/components/responses/202" + 400: + $ref: "#/components/responses/400" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 404: + $ref: "#/components/responses/404" + 405: + $ref: "#/components/responses/405" + 406: + $ref: "#/components/responses/406" + 501: + $ref: "#/components/responses/501" + 503: + $ref: "#/components/responses/503" + put: + description: The callback PUT /fxQuotes/{ID} is used to inform the requester about the outcome of a request for quotation for a currency conversion. The {ID} field in the URI should contain the conversionRequestId that was used when the quotation for the currency conversion was requested. + summary: Return fxQuote information + tags: + - fxQuotes + operationId: PutFxQuotesById + parameters: + #Headers + - $ref: "#/components/parameters/Content-Length" + requestBody: + description: FxQuote information returned. + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/FxQuotesIDPutResponse" + responses: + 200: + $ref: "#/components/responses/200" + 400: + $ref: "#/components/responses/400" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 404: + $ref: "#/components/responses/404" + 405: + $ref: "#/components/responses/405" + 406: + $ref: "#/components/responses/406" + 501: + $ref: "#/components/responses/501" + 503: + $ref: "#/components/responses/503" + /fxQuotes/{ID}/error: + put: + description: If the FXP is unable to find or create a currency conversion execution, or another processing error occurs, the error callback PUT /fxQuotes//error is used. The in the URI should contain the conversionRequestId that was used for the creation of the quotation request, or the that was used in the GET /fxQuotes/. + summary: Return fxQuote information error + tags: + - fxQuotes + operationId: FxQuotesByIDAndError + parameters: + #Path + - $ref: "#/components/parameters/ID" + #Headers + - $ref: "#/components/parameters/Content-Length" + - $ref: "#/components/parameters/Content-Type" + - $ref: "#/components/parameters/Date" + - $ref: "#/components/parameters/X-Forwarded-For" + - $ref: "#/components/parameters/FSPIOP-Source" + - $ref: "#/components/parameters/FSPIOP-Destination" + - $ref: "#/components/parameters/FSPIOP-Encryption" + - $ref: "#/components/parameters/FSPIOP-Signature" + - $ref: "#/components/parameters/FSPIOP-URI" + - $ref: "#/components/parameters/FSPIOP-HTTP-Method" + requestBody: + description: Details of the error returned. + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorInformationObject" + responses: + 200: + $ref: "#/components/responses/200" + 400: + $ref: "#/components/responses/400" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 404: + $ref: "#/components/responses/404" + 405: + $ref: "#/components/responses/405" + 406: + $ref: "#/components/responses/406" + 501: + $ref: "#/components/responses/501" + 503: + $ref: "#/components/responses/503" + + #FxTransfers + /fxTransfers: + post: + description: The HTTP request POST /fxTransfers is used to ask an FXP to confirm the execution of an agreed currency conversion. + summary: Perform fxTransfer + tags: + - fxTransfers + operationId: fxTransfers + parameters: + #Headers + - $ref: "#/components/parameters/Accept" + - $ref: "#/components/parameters/Content-Length" + - $ref: "#/components/parameters/Content-Type" + - $ref: "#/components/parameters/Date" + - $ref: "#/components/parameters/X-Forwarded-For" + - $ref: "#/components/parameters/FSPIOP-Source" + - $ref: "#/components/parameters/FSPIOP-Destination" + - $ref: "#/components/parameters/FSPIOP-Encryption" + - $ref: "#/components/parameters/FSPIOP-Signature" + - $ref: "#/components/parameters/FSPIOP-URI" + - $ref: "#/components/parameters/FSPIOP-HTTP-Method" + requestBody: + description: Details of the fxtransfer to be created. + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/FxTransfersPostRequest" + responses: + 202: + $ref: "#/components/responses/202" + 400: + $ref: "#/components/responses/400" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 404: + $ref: "#/components/responses/404" + 405: + $ref: "#/components/responses/405" + 406: + $ref: "#/components/responses/406" + 501: + $ref: "#/components/responses/501" + 503: + $ref: "#/components/responses/503" + /fxTransfers/{ID}: + parameters: + #Path + - $ref: "#/components/parameters/ID" + #Headers + - $ref: "#/components/parameters/Content-Type" + - $ref: "#/components/parameters/Date" + - $ref: "#/components/parameters/X-Forwarded-For" + - $ref: "#/components/parameters/FSPIOP-Source" + - $ref: "#/components/parameters/FSPIOP-Destination" + - $ref: "#/components/parameters/FSPIOP-Encryption" + - $ref: "#/components/parameters/FSPIOP-Signature" + - $ref: "#/components/parameters/FSPIOP-URI" + - $ref: "#/components/parameters/FSPIOP-HTTP-Method" + get: + description: The HTTP request GET /fxTransfers/{ID} is used to request information regarding a request for confirmation of a currency conversion which the sender has previously issued. The {{ID} in the URI should contain the commitRequestId that was used to request the confirmation. + summary: Callback to an fxtransfer request + tags: + - fxTransfers + operationId: FxTransfersByIDGet + parameters: + #Headers + - $ref: "#/components/parameters/Accept" + responses: + 202: + $ref: "#/components/responses/202" + 400: + $ref: "#/components/responses/400" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 404: + $ref: "#/components/responses/404" + 405: + $ref: "#/components/responses/405" + 406: + $ref: "#/components/responses/406" + 501: + $ref: "#/components/responses/501" + 503: + $ref: "#/components/responses/503" + patch: + description: The callback PATCH /fxTransfers/{ID} is used to inform the requester about the final determination by the switch of the transfer related to a request for execution of a currency conversion. The {ID} field in the URI should contain the commitRequestId that was used when the execution of the currency conversion was requested. + summary: FxTransfer notification + tags: + - fxTransfers + operationId: FxTransfersByIDPatch + parameters: + #Headers + - $ref: "#/components/parameters/Content-Length" + requestBody: + description: Transfer notification upon completion. + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/FxTransfersIDPatchResponse" + responses: + 200: + $ref: "#/components/responses/200" + 400: + $ref: "#/components/responses/400" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 404: + $ref: "#/components/responses/404" + 405: + $ref: "#/components/responses/405" + 406: + $ref: "#/components/responses/406" + 501: + $ref: "#/components/responses/501" + 503: + $ref: "#/components/responses/503" + put: + description: The callback PUT /fxTransfers/{ID} is used to inform the requester about the outcome of a request for execution of a currency conversion. The {ID} field in the URI should contain the commitRequestId that was used when the execution of the currency conversion was requested. + summary: Return fxtransfer information + tags: + - fxTransfers + operationId: FxTransfersByIDPut + parameters: + #Headers + - $ref: "#/components/parameters/Content-Length" + requestBody: + description: FxTransfer information returned. + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/FxTransfersIDPutResponse" + responses: + 200: + $ref: "#/components/responses/200" + 400: + $ref: "#/components/responses/400" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 404: + $ref: "#/components/responses/404" + 405: + $ref: "#/components/responses/405" + 406: + $ref: "#/components/responses/406" + 501: + $ref: "#/components/responses/501" + 503: + $ref: "#/components/responses/503" + /fxTransfers/{ID}/error: + put: + description: If the FXP is unable to find or create a currency conversion execution, or another processing error occurs, the error callback PUT /fxTransfers//error is used. The in the URI should contain the commitRequestId that was used for the creation of the execution request, or the that was used in the GET /fxTransfers/. + summary: Return fxtransfer information error + tags: + - fxTransfers + operationId: FxTransfersByIDAndError + parameters: + #Path + - $ref: "#/components/parameters/ID" + #Headers + - $ref: "#/components/parameters/Content-Length" + - $ref: "#/components/parameters/Content-Type" + - $ref: "#/components/parameters/Date" + - $ref: "#/components/parameters/X-Forwarded-For" + - $ref: "#/components/parameters/FSPIOP-Source" + - $ref: "#/components/parameters/FSPIOP-Destination" + - $ref: "#/components/parameters/FSPIOP-Encryption" + - $ref: "#/components/parameters/FSPIOP-Signature" + - $ref: "#/components/parameters/FSPIOP-URI" + - $ref: "#/components/parameters/FSPIOP-HTTP-Method" + requestBody: + description: Details of the error returned. + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorInformationObject" + responses: + 200: + $ref: "#/components/responses/200" + 400: + $ref: "#/components/responses/400" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 404: + $ref: "#/components/responses/404" + 405: + $ref: "#/components/responses/405" + 406: + $ref: "#/components/responses/406" + 501: + $ref: "#/components/responses/501" + 503: + $ref: "#/components/responses/503" + +components: + schemas: + #Element definitions + Amount: + title: Amount + type: string + pattern: ^([0]|([1-9][0-9]{0,17}))([.][0-9]{0,3}[1-9])?$ + description: The API data type Amount is a JSON String in a canonical format that is restricted by a regular expression for interoperability reasons. This pattern does not allow any trailing zeroes at all, but allows an amount without a minor currency unit. It also only allows four digits in the minor currency unit; a negative value is not allowed. Using more than 18 digits in the major currency unit is not allowed. + AmountType: + title: AmountType + type: string + enum: + - SEND + - RECEIVE + description: Below are the allowed values for the enumeration AmountType. + + - SEND - Amount the Payer would like to send, that is, the amount that should be withdrawn from the Payer account including any fees. + + - RECEIVE - Amount the Payer would like the Payee to receive, that is, the amount that should be sent to the receiver exclusive of any fees. + CorrelationId: + title: CorrelationId + type: string + pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + description: Identifier that correlates all messages of the same sequence. The API data type UUID (Universally Unique Identifier) is a JSON String in canonical format, conforming to [RFC 4122](https://tools.ietf.org/html/rfc4122), that is restricted by a regular expression for interoperability reasons. A UUID is always 36 characters long, 32 hexadecimal symbols and 4 dashes (‘-‘). + Currency: + title: Currency + description: The currency codes defined in [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) as three-letter alphabetic codes are used as the standard naming representation for currencies. + type: string + minLength: 3 + maxLength: 3 + enum: + - AED + - AFN + - ALL + - AMD + - ANG + - AOA + - ARS + - AUD + - AWG + - AZN + - BAM + - BBD + - BDT + - BGN + - BHD + - BIF + - BMD + - BND + - BOB + - BRL + - BSD + - BTN + - BWP + - BYN + - BZD + - CAD + - CDF + - CHF + - CLP + - CNY + - COP + - CRC + - CUC + - CUP + - CVE + - CZK + - DJF + - DKK + - DOP + - DZD + - EGP + - ERN + - ETB + - EUR + - FJD + - FKP + - GBP + - GEL + - GGP + - GHS + - GIP + - GMD + - GNF + - GTQ + - GYD + - HKD + - HNL + - HRK + - HTG + - HUF + - IDR + - ILS + - IMP + - INR + - IQD + - IRR + - ISK + - JEP + - JMD + - JOD + - JPY + - KES + - KGS + - KHR + - KMF + - KPW + - KRW + - KWD + - KYD + - KZT + - LAK + - LBP + - LKR + - LRD + - LSL + - LYD + - MAD + - MDL + - MGA + - MKD + - MMK + - MNT + - MOP + - MRO + - MUR + - MVR + - MWK + - MXN + - MYR + - MZN + - NAD + - NGN + - NIO + - NOK + - NPR + - NZD + - OMR + - PAB + - PEN + - PGK + - PHP + - PKR + - PLN + - PYG + - QAR + - RON + - RSD + - RUB + - RWF + - SAR + - SBD + - SCR + - SDG + - SEK + - SGD + - SHP + - SLL + - SOS + - SPL + - SRD + - STD + - SVC + - SYP + - SZL + - THB + - TJS + - TMT + - TND + - TOP + - TRY + - TTD + - TVD + - TWD + - TZS + - UAH + - UGX + - USD + - UYU + - UZS + - VEF + - VND + - VUV + - WST + - XAF + - XCD + - XDR + - XOF + - XPF + - XTS + - XXX + - YER + - ZAR + - ZMW + - ZWD + DateOfBirth: + title: DateofBirth (type Date) + type: string + pattern: ^(?:[1-9]\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\d|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-02-29)$ + description: Date of Birth of the Party. + DateTime: + title: DateTime + type: string + pattern: ^(?:[1-9]\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\d|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-02-29)T(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:(\.\d{3}))(?:Z|[+-][01]\d:[0-5]\d)$ + description: + The API data type DateTime is a JSON String in a lexical format that is restricted by a regular expression for interoperability reasons. + The format is according to [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html), expressed in a combined date, time and time zone format. A more readable version of the format is yyyy-MM-ddTHH:mm:ss.SSS[-HH:MM]. Examples are "2016-05-24T08:38:08.699-04:00", "2016-05-24T08:38:08.699Z" (where Z indicates Zulu time zone, same as UTC). + ErrorCode: + title: ErrorCode + type: string + pattern: ^[1-9]\d{3}$ + description: The API data type ErrorCode is a JSON String of four characters, consisting of digits only. Negative numbers are not allowed. A leading zero is not allowed. Each error code in the API is a four-digit number, for example, 1234, where the first number (1 in the example) represents the high-level error category, the second number (2 in the example) represents the low-level error category, and the last two numbers (34 in the example) represent the specific error. + ErrorDescription: + title: ErrorDescription + type: string + minLength: 1 + maxLength: 128 + description: Error description string. + ExtensionKey: + title: ExtensionKey + type: string + minLength: 1 + maxLength: 32 + description: Extension key. + ExtensionValue: + title: ExtensionValue + type: string + minLength: 1 + maxLength: 128 + description: Extension value. + FirstName: + title: FirstName + type: string + minLength: 1 + maxLength: 128 + pattern: ^(?!\s*$)[\w .,'-]{1,128}$ + description: First name of the Party (Name Type). + FspId: + title: FspId + type: string + minLength: 1 + maxLength: 32 + description: FSP identifier. + IlpCondition: + title: IlpCondition + type: string + pattern: ^[A-Za-z0-9-_]{43}$ + maxLength: 48 + description: Condition that must be attached to the transfer by the Payer. + IlpFulfilment: + title: IlpFulfilment + type: string + pattern: ^[A-Za-z0-9-_]{43}$ + maxLength: 48 + description: Fulfilment that must be attached to the transfer by the Payee. + LastName: + title: LastName + type: string + minLength: 1 + maxLength: 128 + pattern: ^(?!\s*$)[\w .,'-]{1,128}$ + description: Last name of the Party (Name Type). + MerchantClassificationCode: + title: MerchantClassificationCode + type: string + pattern: ^[\d]{1,4}$ + description: A limited set of pre-defined numbers. This list would be a limited set of numbers identifying a set of popular merchant types like School Fees, Pubs and Restaurants, Groceries, etc. + MiddleName: + title: MiddleName + type: string + minLength: 1 + maxLength: 128 + pattern: ^(?!\s*$)[\w .,'-]{1,128}$ + description: Middle name of the Party (Name Type). + PartyIdentifier: + title: PartyIdentifier + type: string + minLength: 1 + maxLength: 128 + description: Identifier of the Party. + PartyIdType: + title: PartyIdType + type: string + enum: + - MSISDN + - EMAIL + - PERSONAL_ID + - BUSINESS + - DEVICE + - ACCOUNT_ID + - IBAN + - ALIAS + description: Below are the allowed values for the enumeration. + + - MSISDN - An MSISDN (Mobile Station International Subscriber Directory Number, that is, the phone number) is used as reference to a participant. The MSISDN identifier should be in international format according to the [ITU-T E.164 standard](https://www.itu.int/rec/T-REC-E.164/en). Optionally, the MSISDN may be prefixed by a single plus sign, indicating the international prefix. + + - EMAIL - An email is used as reference to a participant. The format of the email should be according to the informational [RFC 3696](https://tools.ietf.org/html/rfc3696). + + - PERSONAL_ID - A personal identifier is used as reference to a participant. Examples of personal identification are passport number, birth certificate number, and national registration number. The identifier number is added in the PartyIdentifier element. The personal identifier type is added in the PartySubIdOrType element. + + - BUSINESS - A specific Business (for example, an organization or a company) is used as reference to a participant. The BUSINESS identifier can be in any format. To make a transaction connected to a specific username or bill number in a Business, the PartySubIdOrType element should be used. + + - DEVICE - A specific device (for example, a POS or ATM) ID connected to a specific business or organization is used as reference to a Party. For referencing a specific device under a specific business or organization, use the PartySubIdOrType element. + + - ACCOUNT_ID - A bank account number or FSP account ID should be used as reference to a participant. The ACCOUNT_ID identifier can be in any format, as formats can greatly differ depending on country and FSP. + + - IBAN - A bank account number or FSP account ID is used as reference to a participant. The IBAN identifier can consist of up to 34 alphanumeric characters and should be entered without whitespace. + + - ALIAS An alias is used as reference to a participant. The alias should be created in the FSP as an alternative reference to an account owner. Another example of an alias is a username in the FSP system. The ALIAS identifier can be in any format. It is also possible to use the PartySubIdOrType element for identifying an account under an Alias defined by the PartyIdentifier. + PartyName: + title: PartyName + type: string + minLength: 1 + maxLength: 128 + description: Name of the Party. Could be a real name or a nickname. + PartySubIdOrType: + title: PartySubIdOrType + oneOf: + - $ref: "#/components/schemas/PersonalIdentifierType" + - $ref: "#/components/schemas/PartyIdentifier" + PersonalIdentifierType: + title: PersonalIdentifierType + type: string + enum: + - PASSPORT + - NATIONAL_REGISTRATION + - DRIVING_LICENSE + - ALIEN_REGISTRATION + - NATIONAL_ID_CARD + - EMPLOYER_ID + - TAX_ID_NUMBER + - SENIOR_CITIZENS_CARD + - MARRIAGE_CERTIFICATE + - HEALTH_CARD + - VOTERS_ID + - UNITED_NATIONS + - OTHER_ID + description: Below are the allowed values for the enumeration. + + - PASSPORT - A passport number is used as reference to a Party. + + - NATIONAL_REGISTRATION - A national registration number is used as reference to a Party. + + - DRIVING_LICENSE - A driving license is used as reference to a Party. + + - ALIEN_REGISTRATION - An alien registration number is used as reference to a Party. + + - NATIONAL_ID_CARD - A national ID card number is used as reference to a Party. + + - EMPLOYER_ID - A tax identification number is used as reference to a Party. + + - TAX_ID_NUMBER - A tax identification number is used as reference to a Party. + + - SENIOR_CITIZENS_CARD - A senior citizens card number is used as reference to a Party. + + - MARRIAGE_CERTIFICATE - A marriage certificate number is used as reference to a Party. + + - HEALTH_CARD - A health card number is used as reference to a Party. + + - VOTERS_ID - A voter’s identification number is used as reference to a Party. + + - UNITED_NATIONS - An UN (United Nations) number is used as reference to a Party. + + - OTHER_ID - Any other type of identification type number is used as reference to a Party. + TransactionState: + title: TransactionState + type: string + enum: + - RECEIVED + - PENDING + - COMPLETED + - REJECTED + description: Below are the allowed values for the enumeration. + + - RECEIVED - Payee FSP has received the transaction from the Payer FSP. + + - PENDING - Payee FSP has validated the transaction. + + - COMPLETED - Payee FSP has successfully performed the transaction. + + - REJECTED - Payee FSP has failed to perform the transaction. + + #Complex Types + Charge: + title: Charge + type: object + description: An FXP will be able to specify a charge which it proposes to levy on the currency conversion operation using a Charge object. + properties: + chargeType: + type: string + minLength: 1 + maxLength: 32 + description: A description of the charge which is being levied. + sourceAmount: + allOf: + - $ref: "#/components/schemas/Amount" + - description: The amount of the charge which is being levied, expressed in the source currency. + - example: "1310.5" + targetAmount: + allOf: + - $ref: "#/components/schemas/Amount" + - description: The amount of the charge which is being levied, expressed in the target currency. + - example: "1310.5" + required: + - chargeType + Conversion: + title: Conversion + type: object + description: A DFSP will be able to request a currency conversion, and an FX provider will be able to describe its involvement in a proposed transfer, using a Conversion object. + properties: + conversionId: + allOf: + - $ref: "#/components/schemas/CorrelationId" + - description: An end-to-end identifier for the conversion request. + - example: b51ec534-ee48-4575-b6a9-ead2955b8069 + fxpId: + allOf: + - $ref: "#/components/schemas/FspId" + - description: The ID of the FXP performing the conversion. + - example: 1234 + amountType: + allOf: + - $ref: "#/components/schemas/AmountType" + - description: This is the AmountType for the base transaction - + If SEND - then any charges levied by the FXP as part of the transaction will be deducted by the FXP from the amount shown for the target party in the conversion. + If RECEIVE - then any charges levied by the FXP as part of the transaction will be added by the FXP to the amount shown for the source party in the conversion. + source: + allOf: + - $ref: "#/components/schemas/FxParticipant" + - description: The source currency party + target: + allOf: + - $ref: "#/components/schemas/FxParticipant" + - description: The target currency party + validity: + allOf: + - $ref: "#/components/schemas/DateTime" + - description: The end of the period for which the currency conversion is required to remain valid. + - example: "2021-09-28T08:38:08.699-04:00" + charges: + type: array + items: + $ref: "#/components/schemas/Charge" + minItems: 1 + maxItems: 16 + description: One or more charges which the FXP intends to levy as part of the currency conversion, or which the payee DFSP intends to add to the amount transferred. + extensionList: + $ref: "#/components/schemas/ExtensionList" + required: + - conversionId + - fxpId + - amountType + - source + - target + - validity + ErrorInformation: + title: ErrorInformation + type: object + description: Data model for the complex type ErrorInformation. + properties: + errorCode: + $ref: "#/components/schemas/ErrorCode" + errorDescription: + $ref: "#/components/schemas/ErrorDescription" + extensionList: + $ref: "#/components/schemas/ExtensionList" + required: + - errorCode + - errorDescription + ErrorInformationObject: + title: ErrorInformationObject + type: object + description: Data model for the complex type object that contains ErrorInformation. + properties: + errorInformation: + $ref: "#/components/schemas/ErrorInformation" + required: + - errorInformation + ErrorInformationResponse: + title: ErrorInformationResponse + type: object + description: Data model for the complex type object that contains an optional element ErrorInformation used along with 4xx and 5xx responses. + properties: + errorInformation: + $ref: "#/components/schemas/ErrorInformation" + Extension: + title: Extension + type: object + description: Data model for the complex type Extension. + properties: + key: + $ref: "#/components/schemas/ExtensionKey" + value: + $ref: "#/components/schemas/ExtensionValue" + required: + - key + - value + ExtensionList: + title: ExtensionList + type: object + description: Data model for the complex type ExtensionList. An optional list of extensions, specific to deployment. + properties: + extension: + type: array + items: + $ref: "#/components/schemas/Extension" + minItems: 1 + maxItems: 16 + description: Number of Extension elements. + required: + - extension + FxMoney: + title: FxMoney + type: object + description: Data model for the complex type FxMoney; This is based on the type Money but allows the amount to be optional to support FX quotations. + properties: + currency: + $ref: "#/components/schemas/Currency" + amount: + $ref: "#/components/schemas/Amount" + required: + - currency + FxParticipant: + title: FxParticipant + type: object + description: Data model for the complex type FxMoney; allows the amount to be optional to support quotations + properties: + fspId: + $ref: "#/components/schemas/FspId" + principalAmount: + allOf: + - $ref: "#/components/schemas/FxMoney" + - description: The amount that the party will send or receive. + required: + - fspId + PartiesTypeIDPutResponse: + title: PartiesTypeIDPutResponse + type: object + description: The object sent in the PUT /parties/{Type}/{ID} callback. + properties: + party: + allOf: + - $ref: "#/components/schemas/Party" + - description: Information regarding the requested Party. + required: + - party + Party: + title: Party + type: object + description: Data model for the complex type Party. + properties: + partyIdInfo: + allOf: + - $ref: "#/components/schemas/PartyIdInfo" + - description: Party Id type, id, sub ID or type, and FSP Id. + merchantClassificationCode: + allOf: + - $ref: "#/components/schemas/MerchantClassificationCode" + - description: Used in the context of Payee Information, where the Payee happens to be a merchant accepting merchant payments. + - example: 4321 + name: + allOf: + - $ref: "#/components/schemas/PartyName" + - description: Display name of the Party, could be a real name or a nick name. + - example: Henrik Karlsson + personalInfo: + allOf: + - $ref: "#/components/schemas/PartyPersonalInfo" + - description: Personal information used to verify identity of Party such as first, middle, last name and date of birth. + receiveCurrency: + type: array + items: + $ref: "#/components/schemas/Currency" + minItems: 0 + maxItems: 16 + description: Up to 16 currencies in which the party can receive funds. + required: + - partyIdInfo + PartyComplexName: + title: PartyComplexName + type: object + description: Data model for the complex type PartyComplexName. + properties: + firstName: + allOf: + - $ref: "#/components/schemas/FirstName" + - description: Party’s first name. + - example: Henrik + middleName: + allOf: + - $ref: "#/components/schemas/MiddleName" + - description: Party’s middle name. + - example: Johannes + lastName: + allOf: + - $ref: "#/components/schemas/LastName" + - description: Party’s last name. + - example: Karlsson + PartyIdInfo: + title: PartyIdInfo + type: object + description: Data model for the complex type PartyIdInfo. An ExtensionList element has been added to this reqeust in version v1.1 + properties: + partyIdType: + allOf: + - $ref: "#/components/schemas/PartyIdType" + - description: Type of the identifier. + - example: PERSONAL_ID + partyIdentifier: + allOf: + - $ref: "#/components/schemas/PartyIdentifier" + - description: An identifier for the Party. + - example: 16135551212 + partySubIdOrType: + allOf: + - $ref: "#/components/schemas/PartySubIdOrType" + - description: A sub-identifier or sub-type for the Party. + - example: DRIVING_LICENSE + fspId: + allOf: + - $ref: "#/components/schemas/FspId" + - description: FSP ID (if known). + - example: 1234 + extensionList: + $ref: "#/components/schemas/ExtensionList" + required: + - partyIdType + - partyIdentifier + PartyPersonalInfo: + title: PartyPersonalInfo + type: object + description: Data model for the complex type PartyPersonalInfo. + properties: + complexName: + allOf: + - $ref: "#/components/schemas/PartyComplexName" + - description: First, middle and last name for the Party. + dateOfBirth: + allOf: + - $ref: "#/components/schemas/DateOfBirth" + - description: Date of birth for the Party. + - example: "1966-06-16" + FxQuotesIDPutResponse: + title: FxQuotesIDPutResponse + type: object + description: The object sent in the PUT /fxQuotes/{ID} callback. + properties: + agreedConversion: + allOf: + - $ref: "#/components/schemas/SignedConversion" + - description: The amount of money that the Payee FSP should receivThe signed version of the terms under which the FXP will undertake the currency conversion proposed by the requester. + required: + - agreedConversion + FxQuotesPostRequest: + title: FxQuotesPostRequest + type: object + description: The object sent in the POST /fxQuotes request. + properties: + fxQuoteId: + allOf: + - $ref: "#/components/schemas/CorrelationId" + - description: An end-to-end identifier for the FxQuote request. + - example: b51ec534-ee48-4575-b6a9-ead2955b8069 + conversion: + allOf: + - $ref: "#/components/schemas/Conversion" + - description: The terms of the currency conversion for which a quotation is sought. + required: + - fxQuoteId + - conversion + ServicesFXPPutResponse: + title: ServicesFXPPutResponse + type: object + description: The object sent in the PUT /services/FXP callback. + properties: + fxpProviders: + type: array + items: + $ref: "#/components/schemas/FspId" + minItems: 0 + maxItems: 16 + description: The FSP Id(s) of the participant(s) who offer currency conversion services. + required: + - fxpProviders + SignedConversion: + title: SignedConversion + type: object + description: The SignedConversion object contains information about a currency conversion which has been agreed by the FXP. + properties: + conversionRequestId: + allOf: + - $ref: "#/components/schemas/CorrelationId" + - description: An end-to-end identifier for the signed conversion. + - example: b51ec534-ee48-4575-b6a9-ead2955b8069 + conversionTerms: + allOf: + - $ref: "#/components/schemas/Conversion" + - description: The content of the conversion to which the FXP has agreed. + expiration: + allOf: + - $ref: "#/components/schemas/DateTime" + - description: The date and time at which the conversion offer will expire (as specified in Section 7.2.14 of the FSPIOP API definition v1.1). + - example: "2021-09-28T08:38:08.699-04:00" + condition: + allOf: + - $ref: "#/components/schemas/IlpCondition" + - description: The condition attached to the agreed conversion. + - example: f5sqb7tBTWPd5Y8BDFdMm9BJR_MNI4isf8p8n4D5pHA. + required: + - conversionRequestId + - conversionTerms + - expiration + FxTransfersIDPatchResponse: + title: FxTransfersIDPatchResponse + type: object + description: PATCH /fxTransfers/{ID} object + properties: + completedTimestamp: + allOf: + - $ref: "#/components/schemas/DateTime" + - description: Time and date when the conversion was executed. + - example: "2020-05-19T08:38:08.699-04:00" + fulfilment: + allOf: + - $ref: "#/components/schemas/IlpFulfilment" + - description: The fulfilment of the condition specified for the currency conversion. Mandatory if the conversion has been executed successfully. + - example: WLctttbu2HvTsa1XWvUoGRcQozHsqeu9Ahl2JW9Bsu8 + conversionState: + allOf: + - $ref: "#/components/schemas/TransactionState" + - description: The current status of the conversion request. + extensionList: + $ref: "#/components/schemas/ExtensionList" + required: + - conversionState + FxTransfersIDPutResponse: + title: FxTransfersIDPutResponse + type: object + description: The object sent in the PUT /fxTransfers/{ID} callback. + properties: + completedTimestamp: + allOf: + - $ref: "#/components/schemas/DateTime" + - description: Time and date when the conversion was executed. + - example: "2020-05-19T08:38:08.699-04:00" + fulfilment: + allOf: + - $ref: "#/components/schemas/IlpFulfilment" + - description: The fulfilment of the condition specified for the currency conversion. Mandatory if the conversion has been executed successfully. + - example: WLctttbu2HvTsa1XWvUoGRcQozHsqeu9Ahl2JW9Bsu8 + conversionState: + allOf: + - $ref: "#/components/schemas/TransactionState" + - description: The current status of the conversion request. + extensionList: + $ref: "#/components/schemas/ExtensionList" + required: + - conversionState + FxTransfersPostRequest: + title: FxTransfersPostRequest + type: object + description: The object sent in the POST /fxTransfers request. + properties: + commitRequestId: + allOf: + - $ref: "#/components/schemas/CorrelationId" + - description: An end-to-end identifier for the confirmation request. + - example: b51ec534-ee48-4575-b6a9-ead2955b8069 + relatedTransferId: + allOf: + - $ref: "#/components/schemas/CorrelationId" + - description: The transfer ID of the transfer to which this currency conversion relates, if the conversion is part of a transfer. If the conversion is a currency purchase, this field should be omitted. + - example: b51ec534-ee48-4575-b6a9-ead2955b8069 + conversion: + allOf: + - $ref: "#/components/schemas/SignedConversion" + - description: The agreed currency conversion for which confirmation is sought. + required: + - commitRequestId + - conversion + + responses: + "200": + description: OK + "202": + description: Accepted + "400": + description: Bad Request + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorInformationResponse" + headers: + Content-Length: + $ref: "#/components/parameters/Content-Length" + Content-Type: + $ref: "#/components/parameters/Content-Type" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorInformationResponse" + headers: + Content-Length: + $ref: "#/components/parameters/Content-Length" + Content-Type: + $ref: "#/components/parameters/Content-Type" + "403": + description: Forbidden + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorInformationResponse" + headers: + Content-Length: + $ref: "#/components/parameters/Content-Length" + Content-Type: + $ref: "#/components/parameters/Content-Type" + "404": + description: Not Found + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorInformationResponse" + headers: + Content-Length: + $ref: "#/components/parameters/Content-Length" + Content-Type: + $ref: "#/components/parameters/Content-Type" + "405": + description: Method Not Allowed + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorInformationResponse" + headers: + Content-Length: + $ref: "#/components/parameters/Content-Length" + Content-Type: + $ref: "#/components/parameters/Content-Type" + "406": + description: Not Acceptable + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorInformationResponse" + headers: + Content-Length: + $ref: "#/components/parameters/Content-Length" + Content-Type: + $ref: "#/components/parameters/Content-Type" + "501": + description: Not Implemented + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorInformationResponse" + headers: + Content-Length: + $ref: "#/components/parameters/Content-Length" + Content-Type: + $ref: "#/components/parameters/Content-Type" + "503": + description: Service Unavailable + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorInformationResponse" + headers: + Content-Length: + $ref: "#/components/parameters/Content-Length" + Content-Type: + $ref: "#/components/parameters/Content-Type" + + parameters: + #Header parameters + Accept: + name: Accept + in: header + required: true + schema: + type: string + description: The `Accept` header field indicates the version of the API the client would like the server to use. + Content-Length: + name: Content-Length + in: header + required: false + schema: + type: integer + description: + The `Content-Length` header field indicates the anticipated size of the payload body. Only sent if there is a body. + + + **Note:** The API supports a maximum size of 5242880 bytes (5 Megabytes). + Content-Type: + name: Content-Type + in: header + schema: + type: string + required: true + description: The `Content-Type` header indicates the specific version of the API used to send the payload body. + Date: + name: Date + in: header + schema: + type: string + required: true + description: The `Date` header field indicates the date when the request was sent. + X-Forwarded-For: + name: X-Forwarded-For + in: header + schema: + type: string + required: false + description: + The `X-Forwarded-For` header field is an unofficially accepted standard used for informational purposes of the originating client IP address, as a request might pass multiple proxies, firewalls, and so on. Multiple `X-Forwarded-For` values should be expected and supported by implementers of the API. + + + **Note:** An alternative to `X-Forwarded-For` is defined in [RFC 7239](https://tools.ietf.org/html/rfc7239). However, to this point RFC 7239 is less-used and supported than `X-Forwarded-For`. + FSPIOP-Source: + name: FSPIOP-Source + in: header + schema: + type: string + required: true + description: The `FSPIOP-Source` header field is a non-HTTP standard field used by the API for identifying the sender of the HTTP request. The field should be set by the original sender of the request. Required for routing and signature verification (see header field `FSPIOP-Signature`). + FSPIOP-Destination: + name: FSPIOP-Destination + in: header + schema: + type: string + required: false + description: The `FSPIOP-Destination` header field is a non-HTTP standard field used by the API for HTTP header based routing of requests and responses to the destination. The field must be set by the original sender of the request if the destination is known (valid for all services except GET /parties) so that any entities between the client and the server do not need to parse the payload for routing purposes. If the destination is not known (valid for service GET /parties), the field should be left empty. + FSPIOP-Encryption: + name: FSPIOP-Encryption + in: header + schema: + type: string + required: false + description: The `FSPIOP-Encryption` header field is a non-HTTP standard field used by the API for applying end-to-end encryption of the request. + FSPIOP-Signature: + name: FSPIOP-Signature + in: header + schema: + type: string + required: false + description: The `FSPIOP-Signature` header field is a non-HTTP standard field used by the API for applying an end-to-end request signature. + FSPIOP-URI: + name: FSPIOP-URI + in: header + schema: + type: string + required: false + description: The `FSPIOP-URI` header field is a non-HTTP standard field used by the API for signature verification, should contain the service URI. Required if signature verification is used, for more information, see [the API Signature document](https://github.com/mojaloop/docs/tree/master/Specification%20Document%20Set). + FSPIOP-HTTP-Method: + name: FSPIOP-HTTP-Method + in: header + schema: + type: string + required: false + description: The `FSPIOP-HTTP-Method` header field is a non-HTTP standard field used by the API for signature verification, should contain the service HTTP method. Required if signature verification is used, for more information, see [the API Signature document](https://github.com/mojaloop/docs/tree/master/Specification%20Document%20Set). + #Path parameters + ID: + name: ID + in: path + required: true + schema: + type: string + description: The identifier value. + Type: + name: Type + in: path + required: true + schema: + type: string + description: The type of the party identifier. For example, `MSISDN`, `PERSONAL_ID`. + SubId: + name: SubId + in: path + required: true + schema: + type: string + description: A sub-identifier of the party identifier, or a sub-type of the party identifier's type. For example, `PASSPORT`, `DRIVING_LICENSE`. \ No newline at end of file diff --git a/test/func/config/ttk-hub/spec_files/api_definitions/fx-api_2.0/callback_map.json b/test/func/config/ttk-hub/spec_files/api_definitions/fx-api_2.0/callback_map.json new file mode 100644 index 000000000..113a2e6c6 --- /dev/null +++ b/test/func/config/ttk-hub/spec_files/api_definitions/fx-api_2.0/callback_map.json @@ -0,0 +1,188 @@ +{ + "/fxTransfers": { + "post": { + "fspid": "{$request.headers.fspiop-source}", + "successCallback": { + "method": "put", + "path": "/fxTransfers/{ID}", + "pathPattern": "/fxTransfers/{$request.body.commitRequestId}", + "headerOverride": { + "FSPIOP-Source": "{$config.FSPID}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}", + "Content-Type": "{$request.headers.content-type}", + "Date": "{$request.headers.date}" + }, + "bodyOverride": { + "completedTimestamp": "{$function.generic.curDateISO}", + "conversionState": "COMPLETED", + "extensionList": null + } + }, + "errorCallback": { + "method": "put", + "path": "/transfers/{ID}/error", + "pathPattern": "/transfers/{$request.body.commitRequestId}/error", + "headerOverride": { + "FSPIOP-Source": "{$config.FSPID}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}", + "Content-Type": "{$request.headers.content-type}", + "Date": "{$request.headers.date}" + } + } + } + }, + "/fxTransfers/{ID}": { + "get": { + "fspid": "{$request.headers.fspiop-source}", + "successCallback": { + "method": "put", + "path": "/fxTransfers/{ID}", + "pathPattern": "/fxTransfers/{$request.params.ID}", + "headerOverride": { + "FSPIOP-Source": "{$config.FSPID}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}", + "Content-Type": "{$request.headers.content-type}", + "Date": "{$request.headers.date}" + } + }, + "errorCallback": { + "method": "put", + "path": "/fxTransfers/{ID}/error", + "pathPattern": "/fxTransfers/{$request.params.ID}/error", + "headerOverride": { + "FSPIOP-Source": "{$config.FSPID}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}", + "Content-Type": "{$request.headers.content-type}", + "Date": "{$request.headers.date}" + } + } + } + }, + "/fxQuotes": { + "post": { + "fspid": "{$request.headers.fspiop-source}", + "successCallback": { + "method": "put", + "path": "/fxQuotes/{ID}", + "pathPattern": "/fxQuotes/{$request.body.fxQuoteId}", + "headerOverride": { + "FSPIOP-Source": "{$config.FSPID}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}", + "Content-Type": "{$request.headers.content-type}", + "Date": "{$request.headers.date}" + } + }, + "errorCallback": { + "method": "put", + "path": "/fxQuotes/{ID}/error", + "pathPattern": "/fxQuotes/{$request.body.fxQuoteId}/error", + "headerOverride": { + "FSPIOP-Source": "{$config.FSPID}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}", + "Content-Type": "{$request.headers.content-type}", + "Date": "{$request.headers.date}" + } + } + } + }, + "/fxQuotes/{ID}": { + "get": { + "fspid": "{$request.headers.fspiop-source}", + "successCallback": { + "method": "put", + "path": "/fxQuotes/{ID}", + "pathPattern": "/fxQuotes/{$request.params.ID}", + "headerOverride": { + "FSPIOP-Source": "{$config.FSPID}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}", + "Content-Type": "{$request.headers.content-type}", + "Date": "{$request.headers.date}" + } + }, + "errorCallback": { + "method": "put", + "path": "/fxQuotes/{ID}/error", + "pathPattern": "/fxQuotes/{$request.params.ID}/error", + "headerOverride": { + "FSPIOP-Source": "{$config.FSPID}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}", + "Content-Type": "{$request.headers.content-type}", + "Date": "{$request.headers.date}" + } + } + } + }, + "/fxParties/{Type}/{ID}": { + "get": { + "fspid": "{$request.headers.fspiop-source}", + "successCallback": { + "method": "put", + "path": "/fxParties/{Type}/{ID}", + "pathPattern": "/fxParties/{$request.params.Type}/{$request.params.ID}", + "headerOverride": { + "FSPIOP-Source": "{$config.FSPID}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}", + "Content-Type": "{$request.headers.content-type}", + "Date": "{$request.headers.date}" + }, + "bodyOverride": { + "party": { + "partyIdInfo": { + "partyIdType": "{$request.params.Type}", + "partyIdentifier": "{$request.params.ID}", + "fspId": "{$config.FSPID}" + } + } + } + }, + "errorCallback": { + "method": "put", + "path": "/fxParties/{Type}/{ID}/error", + "pathPattern": "/fxParties/{$request.params.Type}/{$request.params.ID}/error", + "headerOverride": { + "FSPIOP-Source": "{$config.FSPID}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}", + "Content-Type": "{$request.headers.content-type}", + "Date": "{$request.headers.date}" + } + } + } + }, + "/fxParties/{Type}/{ID}/{SubId}": { + "get": { + "fspid": "{$request.headers.fspiop-source}", + "successCallback": { + "method": "put", + "path": "/fxParties/{Type}/{ID}/{SubId}", + "pathPattern": "/fxParties/{$request.params.Type}/{$request.params.ID}/{$request.params.SubId}", + "headerOverride": { + "FSPIOP-Source": "{$config.FSPID}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}", + "Content-Type": "{$request.headers.content-type}", + "Date": "{$request.headers.date}" + }, + "bodyOverride": { + "party": { + "partyIdInfo": { + "partyIdType": "{$request.params.Type}", + "partyIdentifier": "{$request.params.ID}", + "partySubIdOrType": null, + "fspId": "{$config.FSPID}" + } + } + } + }, + "errorCallback": { + "method": "put", + "path": "/fxParties/{Type}/{ID}/{SubId}/error", + "pathPattern": "/fxParties/{$request.params.Type}/{$request.params.ID}/{$request.params.SubId}/error", + "headerOverride": { + "FSPIOP-Source": "{$config.FSPID}", + "FSPIOP-Destination": "{$request.headers.fspiop-source}", + "Content-Type": "{$request.headers.content-type}", + "Date": "{$request.headers.date}" + } + } + } + } +} \ No newline at end of file diff --git a/test/func/config/ttk-hub/spec_files/api_definitions/fx-api_2.0/mockRef.json b/test/func/config/ttk-hub/spec_files/api_definitions/fx-api_2.0/mockRef.json new file mode 100644 index 000000000..3ecd1f214 --- /dev/null +++ b/test/func/config/ttk-hub/spec_files/api_definitions/fx-api_2.0/mockRef.json @@ -0,0 +1,83 @@ +[ + { + "id": "party.personalInfo.complexName.firstName", + "pattern": "John|David|Michael|Chris|Mike|Mark|Paul|Daniel|James|Maria" + }, + { + "id": "party.personalInfo.complexName.middleName", + "pattern": "G|P|N|S" + }, + { + "id": "party.personalInfo.complexName.lastName", + "pattern": "Smith|Jones|Johnson|Lee|Brown|Williams|Rodriguez|Garcia|Gonzalez|Lopez" + }, + { + "id": "party.personalInfo.dateOfBirth", + "pattern": "^(19)\\d\\d[-](0[1-9]|1[012])[-](0[1-9]|[12][0-9]|2[0-8])$" + }, + { + "id": "transferId", + "faker": "internet.email" + }, + { + "id": "transferState", + "pattern": "COMMITTED|RESERVED|ABORTED|RECEIVED" + }, + { + "id": "conversionState", + "pattern": "RECEIVED|PENDING|COMPLETED|REJECTED" + }, + { + "id": "fulfilment", + "pattern": "[A-Fa-f0-9]{64}" + }, + { + "id": "condition", + "pattern": "[A-Fa-f0-9]{64}" + }, + { + "id": "ilpPacket", + "pattern": "[A-Fa-f0-9]{256}" + }, + { + "id": "transferAmount.currency", + "pattern": "USD" + }, + { + "id": "transferAmount.amount", + "pattern": "123" + }, + { + "id": "payeeReceiveAmount.currency", + "pattern": "USD" + }, + { + "id": "payeeReceiveAmount.amount", + "pattern": "123" + }, + { + "id": "payeeFspFee.currency", + "pattern": "USD" + }, + { + "id": "payeeFspFee.amount", + "pattern": "2" + }, + { + "id": "payeeFspCommission.currency", + "pattern": "USD" + }, + { + "id": "payeeFspCommission.amount", + "pattern": "3" + }, + + { + "id": "errorInformation.errorCode", + "pattern": "600[1-9]" + }, + { + "id": "errorInformation.errorDescription", + "pattern": "This is a mock error description" + } +] \ No newline at end of file diff --git a/test/func/config/ttk-hub/spec_files/api_definitions/mojaloop_sdk_outbound_scheme_adapter_1.0/api_spec.yaml b/test/func/config/ttk-hub/spec_files/api_definitions/mojaloop_sdk_outbound_scheme_adapter_1.0/api_spec.yaml new file mode 100644 index 000000000..63b6243c2 --- /dev/null +++ b/test/func/config/ttk-hub/spec_files/api_definitions/mojaloop_sdk_outbound_scheme_adapter_1.0/api_spec.yaml @@ -0,0 +1,2603 @@ +openapi: 3.0.1 +info: + title: Mojaloop SDK Outbound Scheme Adapter API + description: > + Specification for the Mojaloop SDK Scheme Adapter Outbound Transfers API + + + This API can be used by DFSP backends to simplify the process of sending + funds to other parties within a Mojaloop scheme. + + + Please see other documentation on + https://github.com/mojaloop/sdk-scheme-adapter for more information. + + + **Note on terminology:** The term "Switch" is equal to the term "Hub", and + the term "FSP" is equal to the term "DFSP". + license: + name: 'Apache License Version 2.0, January 2004' + url: 'http://www.apache.org/licenses/' + version: 1.0.0 +paths: + /: + get: + summary: Health check endpoint + description: >- + This endpoint allows a user of the SDK scheme adapter to check the + outbound transfers service is listening. + tags: + - Health + responses: + '200': + description: >- + Returns empty body if the scheme adapter outbound transfers service + is running. + /transfers: + post: + summary: Sends money from one account to another + description: > + The HTTP request `POST /transfers` is used to request the movement of + funds from payer DFSP to payee DFSP. + + The underlying Mojaloop API has three stages for money transfer: + + 1. Party lookup. This facilitates a check by the sending party that the destination party is correct before proceeding with a money movement. + 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. + 3. Transfer. The enactment of the previously agreed "contract" + + This method has several modes of operation. + + - If the configuration variables `AUTO_ACCEPT_PARTIES` is set to + `"false"` this method will terminate when the payee party has been + resolved and return the payee party details. + 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. + The scheme adapter will then proceed with quotation stage... + + - If the configuration variable `AUTO_ACCEPT_QUOTES` is set to `"false"` + this method will terminate and return the quotation when it has been + received from the payee DFSP. + 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. + The scheme adapter will then proceed with the transfer state. + + If the configuration variables `AUTO_ACCEPT_PARTIES` and + `AUTO_ACCEPT_QUOTES` are both set to `"true"` this method will block + until all three transfer stages are complete. Upon completion it will + return the entire set of transfer details received during the operation. + + + Combinations of settings for `AUTO_ACCEPT...` configuration variables + allow the scheme adapter user to decide which mode of operation best + suits their use cases. i.e. the scheme adapter can be configured to + "break" the three stage transfer at these points in order to execute + backend logic such as party verification, quoted fees assessments etc... + tags: + - Transfers + requestBody: + description: Transfer request body + content: + application/json: + schema: + $ref: '#/components/schemas/transferRequest' + required: true + responses: + '200': + $ref: '#/components/responses/transferSuccess' + '400': + $ref: '#/components/responses/transferBadRequest' + '500': + $ref: '#/components/responses/transferServerError' + '504': + $ref: '#/components/responses/transferTimeout' + '/transfers/{transferId}': + put: + summary: >- + Continues a transfer that has paused at the quote stage in order to + accept or reject payee party and/or quote + description: > + The HTTP request `PUT /transfers/{transferId}` is used to continue a + transfer initiated via the `POST /transfers` method that has halted + after party lookup and/or quotation stage. + + + The request body should contain either the "acceptParty" or + "acceptQuote" property set to `true` as required to continue the + transfer. + + + See the description of the `POST /transfers` HTTP method for more + information on modes of transfer. + tags: + - Transfers + requestBody: + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/transferContinuationAcceptParty' + - $ref: '#/components/schemas/transferContinuationAcceptQuote' + parameters: + - $ref: '#/components/parameters/transferId' + responses: + '200': + $ref: '#/components/responses/transferSuccess' + '500': + $ref: '#/components/responses/transferServerError' + '504': + $ref: '#/components/responses/transferTimeout' + get: + summary: Retrieves information for a specific transfer + description: >- + The HTTP request `GET /transfers/{transferId}` is used to get + information regarding a transfer created or requested earlier. The + `{transferId}` in the URI should contain the `transferId` that was used + for the creation of the transfer. + tags: + - Transfers + parameters: + - $ref: '#/components/parameters/transferId' + responses: + '200': + description: Transfer information successfully retrieved + content: + application/json: + schema: + $ref: '#/components/schemas/transferStatusResponse' + '500': + description: An error occurred processing the transfer + content: + application/json: + schema: + $ref: '#/components/schemas/errorResponse' + /bulkTransfers: + post: + summary: Sends money from one account to multiple accounts + description: > + The HTTP request `POST /bulkTransfers` is used to request the movement + of funds from payer DFSP to payees' DFSP. + tags: + - BulkTransfers + requestBody: + description: Bulk transfer request body + content: + application/json: + schema: + $ref: '#/components/schemas/bulkTransferRequest' + required: true + responses: + '200': + $ref: '#/components/responses/bulkTransferSuccess' + '400': + $ref: '#/components/responses/bulkTransferBadRequest' + '500': + $ref: '#/components/responses/bulkTransferServerError' + '504': + $ref: '#/components/responses/bulkTransferTimeout' + '/bulkTransfers/{bulkTransferId}': + get: + summary: Retrieves information for a specific bulk transfer + description: >- + The HTTP request `GET /bulkTransfers/{bulktTransferId}` is used to get + information regarding a bulk transfer created or requested earlier. The + `{bulkTransferId}` in the URI should contain the `bulkTransferId` that + was used for the creation of the bulk transfer. + tags: + - BulkTransfers + parameters: + - $ref: '#/components/parameters/bulkTransferId' + responses: + '200': + description: Bulk transfer information successfully retrieved + content: + application/json: + schema: + $ref: '#/components/schemas/bulkTransferStatusResponse' + '500': + description: An error occurred processing the bulk transfer + content: + application/json: + schema: + $ref: '#/components/schemas/errorResponse' + /bulkQuotes: + post: + summary: Request bulk quotes for the provided financial transactions + description: > + The HTTP request `POST /bulkQuotes` is used to request a bulk quote to + fascilitate funds transfer from payer DFSP to payees' DFSP. + tags: + - BulkQuotes + requestBody: + description: Bulk quote request body + content: + application/json: + schema: + $ref: '#/components/schemas/bulkQuoteRequest' + required: true + responses: + '200': + $ref: '#/components/responses/bulkQuoteSuccess' + '400': + $ref: '#/components/responses/bulkQuoteBadRequest' + '500': + $ref: '#/components/responses/bulkQuoteServerError' + '504': + $ref: '#/components/responses/bulkQuoteTimeout' + '/bulkQuotes/{bulkQuoteId}': + get: + summary: Retrieves information for a specific bulk quote + description: >- + The HTTP request `GET /bulkQuotes/{bulktQuoteId}` is used to get + information regarding a bulk quote created or requested earlier. The + `{bulkQuoteId}` in the URI should contain the `bulkQuoteId` that was + used for the creation of the bulk quote. + tags: + - BulkQuotes + parameters: + - $ref: '#/components/parameters/bulkQuoteId' + responses: + '200': + description: Bulk quote information successfully retrieved + content: + application/json: + schema: + $ref: '#/components/schemas/bulkQuoteStatusResponse' + '500': + description: An error occurred processing the bulk quote + content: + application/json: + schema: + $ref: '#/components/schemas/errorResponse' + /requestToPay: + post: + summary: Receiver requesting funds from Sender + description: > + The HTTP request `POST /requestToPay` is used to support Pull Funds + pattern where in a receiver can request for funds from the Sender. + + The underlying API has two stages: + + 1. Party lookup. This facilitates a check by the sending party that the destination party is correct before proceeding with a money movement. + 2. Transaction Request. This request enables a Payee to request Payer to send electronic funds to the Payee. + tags: + - RequestToPay + requestBody: + description: RequestToPay request body + content: + application/json: + schema: + $ref: '#/components/schemas/requestToPayRequest' + required: true + responses: + '200': + $ref: '#/components/responses/requestToPaySuccess' + /requestToPayTransfer: + post: + summary: >- + Used to trigger funds from customer fsp account to merchant fsp account. + This is a follow-up request to requestToPay. + description: > + The HTTP request `POST /requestToPayTransfer` is used to request the + movement of funds from payer DFSP to payee DFSP. + + The underlying Mojaloop API has three stages for money transfer: + + 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. + 2. Authorization. This facilitates getting OTP from payee DFSP. + 3. Transfer. The enactment of the previously agreed "contract" + + This method has several modes of operation. + + - If the configuration variable `AUTO_ACCEPT_QUOTES` is set to `"false"` + this method will terminate and return the quotation when it has been + received from the payee DFSP. + 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. + The scheme adapter will then proceed with the transfer state. + + - If the configuration variable `AUTO_ACCEPT_OTP` is set to `"false"` + this method will terminate and return the otp when it has been received + from the payee DFSP. + 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. + The scheme adapter will then proceed with the transfer state. + + If the configuration variables `AUTO_ACCEPT_PARTIES` and + `AUTO_ACCEPT_QUOTES` are both set to `"true"` this method will block + until all three transfer stages are complete. Upon completion it will + return the entire set of transfer details received during the operation. + + + Combinations of settings for `AUTO_ACCEPT...` configuration variables + allow the scheme adapter user to decide which mode of operation best + suits their use cases. i.e. the scheme adapter can be configured to + "break" the three stage transfer at these points in order to execute + backend logic such as party verification, quoted fees assessments etc... + tags: + - RequestToPayTransfer + requestBody: + description: Request To Pay Transfer request body + content: + application/json: + schema: + $ref: '#/components/schemas/requestToPayTransferRequest' + required: true + responses: + '200': + $ref: '#/components/responses/requestToPayTransferSuccess' + '400': + $ref: '#/components/responses/requestToPayTransferBadRequest' + '500': + $ref: '#/components/responses/transferServerError' + '504': + $ref: '#/components/responses/transferTimeout' + '/requestToPayTransfer/{requestToPayTransactionId}': + put: + summary: >- + Continues a transfer that has paused at the otp stage in order to accept + or reject quote + description: > + The HTTP request `PUT /transfers/{transferId}` is used to continue a + transfer initiated via the `POST /transfers` method that has halted + after party lookup and/or quotation stage. + + + The request body should contain either the "acceptOTP" or "acceptQuote" + property set to `true` as required to continue the transfer. + + + See the description of the `POST /requestToPayTransfer` HTTP method for + more information on modes of transfer. + tags: + - RequestToPayTransferID + requestBody: + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/transferContinuationAcceptQuote' + - $ref: '#/components/schemas/transferContinuationAcceptOTP' + parameters: + - $ref: '#/components/parameters/requestToPayTransactionId' + responses: + '200': + $ref: '#/components/responses/transferSuccess' + '500': + $ref: '#/components/responses/transferServerError' + '504': + $ref: '#/components/responses/transferTimeout' + /accounts: + post: + summary: Create accounts on the Account Lookup Service + description: >- + The HTTP request `POST /accounts` is used to create account information + on the Account Lookup Service (ALS) regarding the provided list of + identities. + + + Caller DFSP is used as the account source FSP information + tags: + - Accounts + requestBody: + description: Identities list request body + content: + application/json: + schema: + $ref: '#/components/schemas/accountsRequest' + required: true + responses: + '200': + $ref: '#/components/responses/accountsCreationCompleted' + '400': + $ref: '#/components/responses/accountsCreationError' + '500': + $ref: '#/components/responses/accountsCreationError' + '504': + $ref: '#/components/responses/accountsCreationTimeout' + '/parties/{Type}/{ID}': + parameters: + - $ref: '#/components/parameters/Type' + - $ref: '#/components/parameters/ID' + get: + description: >- + The HTTP request GET /parties// (or GET /parties///) is used to lookup + information regarding the requested Party, defined by , and optionally + (for example, GET /parties/MSISDN/123456789, or GET + /parties/BUSINESS/shoecompany/employee1). + summary: PartiesByTypeAndID + tags: + - parties + operationId: PartiesByTypeAndID + responses: + '200': + $ref: '#/components/responses/partiesByIdSuccess' + '404': + $ref: '#/components/responses/partiesByIdError404' + '/parties/{Type}/{ID}/{SubId}': + parameters: + - $ref: '#/components/parameters/Type' + - $ref: '#/components/parameters/ID' + - $ref: '#/components/parameters/SubId' + get: + description: >- + The HTTP request GET /parties// (or GET /parties///) is used to lookup + information regarding the requested Party, defined by , and optionally + (for example, GET /parties/MSISDN/123456789, or GET + /parties/BUSINESS/shoecompany/employee1). + summary: PartiesSubIdByTypeAndID + tags: + - parties + operationId: PartiesSubIdByTypeAndID + responses: + '200': + $ref: '#/components/responses/partiesByIdSuccess' + '404': + $ref: '#/components/responses/partiesByIdError404' + /quotes: + post: + summary: Quotes endpoint + description: is used to request quotes from other DFSP + tags: + - quotes + operationId: QuotesPost + requestBody: + description: Quotes request payload + content: + application/json: + schema: + $ref: '#/components/schemas/quotesPostRequest' + required: true + responses: + '200': + $ref: '#/components/responses/quotesPostSuccess' + '500': + $ref: '#/components/responses/quotesServerError' + /simpleTransfers: + post: + summary: Simple Transfers endpoint + description: is used to request a transfer + tags: + - transfers + operationId: SimpleTransfersPost + requestBody: + description: Simple Transfer request payload + content: + application/json: + schema: + $ref: '#/components/schemas/simpleTransfersPostRequest' + required: true + responses: + '200': + $ref: '#/components/responses/simpleTransfersPostSuccess' + '500': + $ref: '#/components/responses/simpleTransfersServerError' + /authorizations: + post: + description: >- + The HTTP request `POST /authorizations` is used to request the Payer to + enter the applicable credentials in the PISP system. + summary: Authorizations endpoint + operationId: AuthorizationsPost + tags: + - authorizations + requestBody: + description: Perform authorization + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/authorizationsPostRequest' + responses: + '200': + $ref: '#/components/responses/authorizationPostSuccess' + '500': + $ref: '#/components/responses/authorizationsServerError' +components: + schemas: + TransactionInitiatorType: + title: TransactionInitiatorType + type: string + enum: + - CONSUMER + - AGENT + - BUSINESS + - DEVICE + description: |- + Below are the allowed values for the enumeration. + - CONSUMER - Consumer is the initiator of the transaction. + - AGENT - Agent is the initiator of the transaction. + - BUSINESS - Business is the initiator of the transaction. + - DEVICE - Device is the initiator of the transaction. + PartyIdType: + title: PartyIdType + type: string + enum: + - MSISDN + - EMAIL + - PERSONAL_ID + - BUSINESS + - DEVICE + - ACCOUNT_ID + - IBAN + - ALIAS + - CONSENT + - THIRD_PARTY_LINK + description: > + This is a variant based on FSPIOP `PartyIdType` specification. + + Main difference being the CONSENT and THIRD_PARTY_LINK enums. + + + Below are the allowed values for the enumeration. + + - MSISDN - An MSISDN (Mobile Station International Subscriber Directory + + Number, that is, the phone number) is used as reference to a + participant. + + The MSISDN identifier should be in international format according to the + + [ITU-T E.164 standard](https://www.itu.int/rec/T-REC-E.164/en). + + Optionally, the MSISDN may be prefixed by a single plus sign, indicating + the + + international prefix. + + - EMAIL - An email is used as reference to a + + participant. The format of the email should be according to the + informational + + [RFC 3696](https://tools.ietf.org/html/rfc3696). + + - PERSONAL_ID - A personal identifier is used as reference to a + participant. + + Examples of personal identification are passport number, birth + certificate + + number, and national registration number. The identifier number is added + in + + the PartyIdentifier element. The personal identifier type is added in + the + + PartySubIdOrType element. + + - BUSINESS - A specific Business (for example, an organization or a + company) + + is used as reference to a participant. The BUSINESS identifier can be in + any + + format. To make a transaction connected to a specific username or bill + number + + in a Business, the PartySubIdOrType element should be used. + + - DEVICE - A specific device (for example, a POS or ATM) ID connected to + a + + specific business or organization is used as reference to a Party. + + For referencing a specific device under a specific business or + organization, + + use the PartySubIdOrType element. + + - ACCOUNT_ID - A bank account number or FSP account ID should be used as + + reference to a participant. The ACCOUNT_ID identifier can be in any + format, + + as formats can greatly differ depending on country and FSP. + + - IBAN - A bank account number or FSP account ID is used as reference to + a + + participant. The IBAN identifier can consist of up to 34 alphanumeric + + characters and should be entered without whitespace. + + - ALIAS An alias is used as reference to a participant. The alias should + be + + created in the FSP as an alternative reference to an account owner. + + Another example of an alias is a username in the FSP system. + + The ALIAS identifier can be in any format. It is also possible to use + the + + PartySubIdOrType element for identifying an account under an Alias + defined + + by the PartyIdentifier. + + - CONSENT - TBD + + - THIRD_PARTY_LINK - TBD + example: PERSONAL_ID + PartyIdentifier: + title: PartyIdentifier + type: string + minLength: 1 + maxLength: 128 + description: Identifier of the Party. + PartySubIdOrType: + title: PartySubIdOrType + type: string + minLength: 1 + maxLength: 128 + description: >- + Either a sub-identifier of a PartyIdentifier, or a sub-type of the + PartyIdType, normally a PersonalIdentifierType. + Name: + title: Name + type: string + pattern: '^(?!\s*$)[\w .,''-]{1,128}$' + description: >- + The API data type Name is a JSON String, restricted by a regular + expression to avoid characters which are generally not used in a name. + + + Regular Expression - The regular expression for restricting the Name + type is "^(?!\s*$)[\w .,'-]{1,128}$". The restriction does not allow a + string consisting of whitespace only, all Unicode characters are + allowed, as well as the period (.) (apostrophe (‘), dash (-), comma (,) + and space characters ( ). + + + **Note:** In some programming languages, Unicode support must be + specifically enabled. For example, if Java is used, the flag + UNICODE_CHARACTER_CLASS must be enabled to allow Unicode characters. + FirstName: + title: FirstName + type: string + minLength: 1 + maxLength: 128 + pattern: '^(?!\s*$)[\w .,''-]{1,128}$' + description: First name of the Party (Name Type). + MiddleName: + title: MiddleName + type: string + minLength: 1 + maxLength: 128 + pattern: '^(?!\s*$)[\w .,''-]{1,128}$' + description: Middle name of the Party (Name Type). + LastName: + title: LastName + type: string + minLength: 1 + maxLength: 128 + pattern: '^(?!\s*$)[\w .,''-]{1,128}$' + description: Last name of the Party (Name Type). + DateOfBirth: + title: DateofBirth (type Date) + type: string + pattern: >- + ^(?:[1-9]\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\d|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-02-29)$ + description: Date of Birth of the Party. + MerchantClassificationCode: + title: MerchantClassificationCode + type: string + pattern: '^[\d]{1,4}$' + description: >- + A limited set of pre-defined numbers. This list would be a limited set + of numbers identifying a set of popular merchant types like School Fees, + Pubs and Restaurants, Groceries, etc. + FspId: + title: FspId + type: string + minLength: 1 + maxLength: 32 + description: FSP identifier. + ExtensionKey: + title: ExtensionKey + type: string + minLength: 1 + maxLength: 32 + description: Extension key. + ExtensionValue: + title: ExtensionValue + type: string + minLength: 1 + maxLength: 128 + description: Extension value. + Extension: + title: Extension + type: object + description: Data model for the complex type Extension. + properties: + key: + $ref: '#/components/schemas/ExtensionKey' + value: + $ref: '#/components/schemas/ExtensionValue' + required: + - key + - value + extensionListEmptiable: + type: array + items: + $ref: '#/components/schemas/Extension' + minItems: 0 + maxItems: 16 + transferParty: + type: object + required: + - idType + - idValue + properties: + type: + $ref: '#/components/schemas/TransactionInitiatorType' + idType: + $ref: '#/components/schemas/PartyIdType' + idValue: + $ref: '#/components/schemas/PartyIdentifier' + idSubValue: + $ref: '#/components/schemas/PartySubIdOrType' + displayName: + $ref: '#/components/schemas/Name' + firstName: + $ref: '#/components/schemas/FirstName' + middleName: + $ref: '#/components/schemas/MiddleName' + lastName: + $ref: '#/components/schemas/LastName' + dateOfBirth: + $ref: '#/components/schemas/DateOfBirth' + merchantClassificationCode: + $ref: '#/components/schemas/MerchantClassificationCode' + fspId: + $ref: '#/components/schemas/FspId' + extensionList: + $ref: '#/components/schemas/extensionListEmptiable' + AmountType: + title: AmountType + type: string + enum: + - SEND + - RECEIVE + description: >- + Below are the allowed values for the enumeration AmountType. + + - SEND - Amount the Payer would like to send, that is, the amount that + should be withdrawn from the Payer account including any fees. + + - RECEIVE - Amount the Payer would like the Payee to receive, that is, + the amount that should be sent to the receiver exclusive of any fees. + Currency: + title: Currency + description: >- + The currency codes defined in [ISO + 4217](https://www.iso.org/iso-4217-currency-codes.html) as three-letter + alphabetic codes are used as the standard naming representation for + currencies. + type: string + minLength: 3 + maxLength: 3 + enum: + - AED + - AFN + - ALL + - AMD + - ANG + - AOA + - ARS + - AUD + - AWG + - AZN + - BAM + - BBD + - BDT + - BGN + - BHD + - BIF + - BMD + - BND + - BOB + - BRL + - BSD + - BTN + - BWP + - BYN + - BZD + - CAD + - CDF + - CHF + - CLP + - CNY + - COP + - CRC + - CUC + - CUP + - CVE + - CZK + - DJF + - DKK + - DOP + - DZD + - EGP + - ERN + - ETB + - EUR + - FJD + - FKP + - GBP + - GEL + - GGP + - GHS + - GIP + - GMD + - GNF + - GTQ + - GYD + - HKD + - HNL + - HRK + - HTG + - HUF + - IDR + - ILS + - IMP + - INR + - IQD + - IRR + - ISK + - JEP + - JMD + - JOD + - JPY + - KES + - KGS + - KHR + - KMF + - KPW + - KRW + - KWD + - KYD + - KZT + - LAK + - LBP + - LKR + - LRD + - LSL + - LYD + - MAD + - MDL + - MGA + - MKD + - MMK + - MNT + - MOP + - MRO + - MUR + - MVR + - MWK + - MXN + - MYR + - MZN + - NAD + - NGN + - NIO + - NOK + - NPR + - NZD + - OMR + - PAB + - PEN + - PGK + - PHP + - PKR + - PLN + - PYG + - QAR + - RON + - RSD + - RUB + - RWF + - SAR + - SBD + - SCR + - SDG + - SEK + - SGD + - SHP + - SLL + - SOS + - SPL + - SRD + - STD + - SVC + - SYP + - SZL + - THB + - TJS + - TMT + - TND + - TOP + - TRY + - TTD + - TVD + - TWD + - TZS + - UAH + - UGX + - USD + - UYU + - UZS + - VEF + - VND + - VUV + - WST + - XAF + - XCD + - XDR + - XOF + - XPF + - XTS + - XXX + - YER + - ZAR + - ZMW + - ZWD + Amount: + title: Amount + type: string + pattern: '^([0]|([1-9][0-9]{0,17}))([.][0-9]{0,3}[1-9])?$' + description: >- + The API data type Amount is a JSON String in a canonical format that is + restricted by a regular expression for interoperability reasons. This + pattern does not allow any trailing zeroes at all, but allows an amount + without a minor currency unit. It also only allows four digits in the + minor currency unit; a negative value is not allowed. Using more than 18 + digits in the major currency unit is not allowed. + transactionType: + type: string + enum: + - TRANSFER + description: Type of transaction. + Note: + title: Note + type: string + minLength: 1 + maxLength: 128 + description: Memo assigned to transaction. + transferRequest: + type: object + required: + - homeTransactionId + - from + - to + - amountType + - currency + - amount + - transactionType + properties: + homeTransactionId: + type: string + description: >- + Transaction ID from the DFSP backend, used to reconcile transactions + between the Switch and DFSP backend systems. + from: + $ref: '#/components/schemas/transferParty' + to: + $ref: '#/components/schemas/transferParty' + amountType: + $ref: '#/components/schemas/AmountType' + currency: + $ref: '#/components/schemas/Currency' + amount: + $ref: '#/components/schemas/Amount' + transactionType: + $ref: '#/components/schemas/transactionType' + note: + $ref: '#/components/schemas/Note' + quoteRequestExtensions: + $ref: '#/components/schemas/extensionListEmptiable' + transferRequestExtensions: + $ref: '#/components/schemas/extensionListEmptiable' + CorrelationId: + title: CorrelationId + type: string + pattern: >- + ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + description: >- + Identifier that correlates all messages of the same sequence. The API + data type UUID (Universally Unique Identifier) is a JSON String in + canonical format, conforming to [RFC + 4122](https://tools.ietf.org/html/rfc4122), that is restricted by a + regular expression for interoperability reasons. A UUID is always 36 + characters long, 32 hexadecimal symbols and 4 dashes (‘-‘). + transferStatus: + type: string + enum: + - ERROR_OCCURRED + - WAITING_FOR_PARTY_ACCEPTANCE + - WAITING_FOR_QUOTE_ACCEPTANCE + - COMPLETED + Money: + title: Money + type: object + description: Data model for the complex type Money. + properties: + currency: + $ref: '#/components/schemas/Currency' + amount: + $ref: '#/components/schemas/Amount' + required: + - currency + - amount + DateTime: + title: DateTime + type: string + pattern: >- + ^(?:[1-9]\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\d|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-02-29)T(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:(\.\d{3}))(?:Z|[+-][01]\d:[0-5]\d)$ + description: >- + The API data type DateTime is a JSON String in a lexical format that is + restricted by a regular expression for interoperability reasons. The + format is according to [ISO + 8601](https://www.iso.org/iso-8601-date-and-time-format.html), expressed + in a combined date, time and time zone format. A more readable version + of the format is yyyy-MM-ddTHH:mm:ss.SSS[-HH:MM]. Examples are + "2016-05-24T08:38:08.699-04:00", "2016-05-24T08:38:08.699Z" (where Z + indicates Zulu time zone, same as UTC). + Latitude: + title: Latitude + type: string + pattern: >- + ^(\+|-)?(?:90(?:(?:\.0{1,6})?)|(?:[0-9]|[1-8][0-9])(?:(?:\.[0-9]{1,6})?))$ + description: >- + The API data type Latitude is a JSON String in a lexical format that is + restricted by a regular expression for interoperability reasons. + Longitude: + title: Longitude + type: string + pattern: >- + ^(\+|-)?(?:180(?:(?:\.0{1,6})?)|(?:[0-9]|[1-9][0-9]|1[0-7][0-9])(?:(?:\.[0-9]{1,6})?))$ + description: >- + The API data type Longitude is a JSON String in a lexical format that is + restricted by a regular expression for interoperability reasons. + GeoCode: + title: GeoCode + type: object + description: >- + Data model for the complex type GeoCode. Indicates the geographic + location from where the transaction was initiated. + properties: + latitude: + $ref: '#/components/schemas/Latitude' + longitude: + $ref: '#/components/schemas/Longitude' + required: + - latitude + - longitude + IlpPacket: + title: IlpPacket + type: string + pattern: '^[A-Za-z0-9-_]+[=]{0,2}$' + minLength: 1 + maxLength: 32768 + description: Information for recipient (transport layer information). + IlpCondition: + title: IlpCondition + type: string + pattern: '^[A-Za-z0-9-_]{43}$' + maxLength: 48 + description: Condition that must be attached to the transfer by the Payer. + ExtensionList: + title: ExtensionList + type: object + description: >- + Data model for the complex type ExtensionList. An optional list of + extensions, specific to deployment. + properties: + extension: + type: array + items: + $ref: '#/components/schemas/Extension' + minItems: 1 + maxItems: 16 + description: Number of Extension elements. + required: + - extension + QuotesIDPutResponse: + title: QuotesIDPutResponse + type: object + description: 'The object sent in the PUT /quotes/{ID} callback.' + properties: + transferAmount: + $ref: '#/components/schemas/Money' + payeeReceiveAmount: + $ref: '#/components/schemas/Money' + payeeFspFee: + $ref: '#/components/schemas/Money' + payeeFspCommission: + $ref: '#/components/schemas/Money' + expiration: + $ref: '#/components/schemas/DateTime' + geoCode: + $ref: '#/components/schemas/GeoCode' + ilpPacket: + $ref: '#/components/schemas/IlpPacket' + condition: + $ref: '#/components/schemas/IlpCondition' + extensionList: + $ref: '#/components/schemas/ExtensionList' + required: + - transferAmount + - expiration + - ilpPacket + - condition + IlpFulfilment: + title: IlpFulfilment + type: string + pattern: '^[A-Za-z0-9-_]{43}$' + maxLength: 48 + description: Fulfilment that must be attached to the transfer by the Payee. + TransferState: + title: TransferState + type: string + enum: + - RECEIVED + - RESERVED + - COMMITTED + - ABORTED + description: >- + Below are the allowed values for the enumeration. + + - RECEIVED - Next ledger has received the transfer. + + - RESERVED - Next ledger has reserved the transfer. + + - COMMITTED - Next ledger has successfully performed the transfer. + + - ABORTED - Next ledger has aborted the transfer due to a rejection or + failure to perform the transfer. + TransfersIDPutResponse: + title: TransfersIDPutResponse + type: object + description: 'The object sent in the PUT /transfers/{ID} callback.' + properties: + fulfilment: + $ref: '#/components/schemas/IlpFulfilment' + completedTimestamp: + $ref: '#/components/schemas/DateTime' + transferState: + $ref: '#/components/schemas/TransferState' + extensionList: + $ref: '#/components/schemas/ExtensionList' + required: + - transferState + ErrorCode: + title: ErrorCode + type: string + pattern: '^[1-9]\d{3}$' + description: >- + The API data type ErrorCode is a JSON String of four characters, + consisting of digits only. Negative numbers are not allowed. A leading + zero is not allowed. Each error code in the API is a four-digit number, + for example, 1234, where the first number (1 in the example) represents + the high-level error category, the second number (2 in the example) + represents the low-level error category, and the last two numbers (34 in + the example) represent the specific error. + ErrorDescription: + title: ErrorDescription + type: string + minLength: 1 + maxLength: 128 + description: Error description string. + ErrorInformation: + title: ErrorInformation + type: object + description: Data model for the complex type ErrorInformation. + properties: + errorCode: + $ref: '#/components/schemas/ErrorCode' + errorDescription: + $ref: '#/components/schemas/ErrorDescription' + extensionList: + $ref: '#/components/schemas/ExtensionList' + required: + - errorCode + - errorDescription + mojaloopError: + type: object + properties: + errorInformation: + $ref: '#/components/schemas/ErrorInformation' + transferError: + type: object + description: >- + This object represents a Mojaloop API error received at any time during + the transfer process + properties: + httpStatusCode: + type: integer + description: >- + The HTTP status code returned to the caller. This is the same as the + actual HTTP status code returned with the response. + mojaloopError: + $ref: '#/components/schemas/mojaloopError' + transferResponse: + type: object + required: + - homeTransactionId + - from + - to + - amountType + - currency + - amount + - transactionType + properties: + transferId: + $ref: '#/components/schemas/CorrelationId' + homeTransactionId: + type: string + description: >- + Transaction ID from the DFSP backend, used to reconcile transactions + between the Switch and DFSP backend systems. + from: + $ref: '#/components/schemas/transferParty' + to: + $ref: '#/components/schemas/transferParty' + amountType: + $ref: '#/components/schemas/AmountType' + currency: + $ref: '#/components/schemas/Currency' + amount: + $ref: '#/components/schemas/Amount' + transactionType: + $ref: '#/components/schemas/transactionType' + note: + $ref: '#/components/schemas/Note' + currentState: + $ref: '#/components/schemas/transferStatus' + quoteId: + $ref: '#/components/schemas/CorrelationId' + quoteResponse: + $ref: '#/components/schemas/QuotesIDPutResponse' + quoteResponseSource: + type: string + description: > + FSPID of the entity that supplied the quote response. This may not + be the same as the FSPID of the entity which owns the end user + account in the case of a FOREX transfer. i.e. it may be a FOREX + gateway. + fulfil: + $ref: '#/components/schemas/TransfersIDPutResponse' + lastError: + $ref: '#/components/schemas/transferError' + errorResponse: + type: object + properties: + statusCode: + type: string + description: Error code as string. + message: + type: string + description: Error message text. + errorTransferResponse: + allOf: + - $ref: '#/components/schemas/errorResponse' + - type: object + required: + - transferState + properties: + transferState: + $ref: '#/components/schemas/transferResponse' + transferStatusResponse: + type: object + required: + - transferId + - currentState + - fulfil + properties: + transferId: + $ref: '#/components/schemas/CorrelationId' + currentState: + $ref: '#/components/schemas/transferStatus' + fulfil: + $ref: '#/components/schemas/TransfersIDPutResponse' + transferContinuationAcceptParty: + type: object + required: + - acceptParty + properties: + acceptParty: + type: boolean + enum: + - true + transferContinuationAcceptQuote: + type: object + required: + - acceptQuote + properties: + acceptQuote: + type: boolean + enum: + - true + - false + individualTransfer: + title: IndividualTransfer + type: object + description: Data model for the complex type 'individualTransfer'. + properties: + transferId: + $ref: '#/components/schemas/CorrelationId' + to: + $ref: '#/components/schemas/transferParty' + amountType: + $ref: '#/components/schemas/AmountType' + currency: + $ref: '#/components/schemas/Currency' + amount: + $ref: '#/components/schemas/Amount' + transactionType: + $ref: '#/components/schemas/transactionType' + note: + $ref: '#/components/schemas/Note' + extensions: + $ref: '#/components/schemas/ExtensionList' + required: + - transferId + - to + - amountType + - currency + - transactionType + bulkTransferRequest: + type: object + required: + - homeTransactionId + - from + - individualTransfers + properties: + homeTransactionId: + type: string + description: >- + Transaction ID from the DFSP backend, used to reconcile transactions + between the Switch and DFSP backend systems. + bulkTransferId: + $ref: '#/components/schemas/CorrelationId' + from: + $ref: '#/components/schemas/transferParty' + individualTransfers: + description: List of individual transfers in a bulk transfer. + type: array + minItems: 1 + maxItems: 1000 + items: + $ref: '#/components/schemas/individualTransfer' + extensions: + $ref: '#/components/schemas/ExtensionList' + individualTransferResult: + type: object + properties: + transferId: + $ref: '#/components/schemas/CorrelationId' + to: + $ref: '#/components/schemas/transferParty' + amountType: + $ref: '#/components/schemas/AmountType' + currency: + $ref: '#/components/schemas/Currency' + amount: + $ref: '#/components/schemas/Amount' + transactionType: + $ref: '#/components/schemas/transactionType' + note: + $ref: '#/components/schemas/Note' + quoteId: + $ref: '#/components/schemas/CorrelationId' + quoteResponse: + $ref: '#/components/schemas/QuotesIDPutResponse' + quoteResponseSource: + type: string + description: > + FSPID of the entity that supplied the quote response. This may not + be the same as the FSPID of the entity which owns the end user + account in the case of a FOREX transfer. i.e. it may be a FOREX + gateway. + fulfil: + $ref: '#/components/schemas/TransfersIDPutResponse' + lastError: + $ref: '#/components/schemas/transferError' + bulkTransferResponse: + type: object + required: + - from + - individualTransferResults + properties: + transferId: + $ref: '#/components/schemas/CorrelationId' + from: + $ref: '#/components/schemas/transferParty' + individualTransferResults: + type: array + maxItems: 1000 + items: + $ref: '#/components/schemas/individualTransferResult' + description: List of individual transfer result in a bulk transfer response. + bulkTransferErrorResponse: + allOf: + - $ref: '#/components/schemas/errorResponse' + - type: object + required: + - bulkTansferState + properties: + bulkTransferState: + $ref: '#/components/schemas/bulkTransferResponse' + bulkTransferStatus: + type: string + enum: + - ERROR_OCCURRED + - COMPLETED + individualTransferFulfilment: + type: object + description: >- + A Mojaloop API transfer fulfilment for individual transfers in a bulk + transfer + properties: + fulfilment: + $ref: '#/components/schemas/IlpFulfilment' + extensionList: + $ref: '#/components/schemas/ExtensionList' + bulkTransferStatusResponse: + type: object + required: + - bulkTransferId + - currentState + - fulfils + properties: + bulkTransferId: + $ref: '#/components/schemas/CorrelationId' + currentState: + $ref: '#/components/schemas/bulkTransferStatus' + fulfils: + type: array + minItems: 1 + maxItems: 1000 + items: + $ref: '#/components/schemas/individualTransferFulfilment' + individualQuote: + title: IndividualQuote + type: object + description: Data model for the complex type 'individualQuote'. + properties: + quoteId: + $ref: '#/components/schemas/CorrelationId' + to: + $ref: '#/components/schemas/transferParty' + amountType: + $ref: '#/components/schemas/AmountType' + currency: + $ref: '#/components/schemas/Currency' + amount: + $ref: '#/components/schemas/Amount' + transactionType: + $ref: '#/components/schemas/transactionType' + note: + $ref: '#/components/schemas/Note' + extensions: + $ref: '#/components/schemas/ExtensionList' + required: + - quoteId + - to + - amountType + - currency + - transactionType + bulkQuoteRequest: + type: object + required: + - homeTransactionId + - from + - individualQuotes + properties: + homeTransactionId: + type: string + description: >- + Transaction ID from the DFSP backend, used to reconcile transactions + between the Switch and DFSP backend systems. + bulkQuoteId: + $ref: '#/components/schemas/CorrelationId' + from: + $ref: '#/components/schemas/transferParty' + individualQuotes: + description: List of individual quotes in a bulk quote. + type: array + minItems: 1 + maxItems: 1000 + items: + $ref: '#/components/schemas/individualQuote' + extensions: + $ref: '#/components/schemas/ExtensionList' + quoteError: + type: object + description: >- + This object represents a Mojaloop API error received at any time during + the quote process + properties: + httpStatusCode: + type: integer + description: >- + The HTTP status code returned to the caller. This is the same as the + actual HTTP status code returned with the response. + mojaloopError: + $ref: '#/components/schemas/mojaloopError' + individualQuoteResult: + type: object + properties: + quoteId: + $ref: '#/components/schemas/CorrelationId' + to: + $ref: '#/components/schemas/transferParty' + amountType: + $ref: '#/components/schemas/AmountType' + currency: + $ref: '#/components/schemas/Currency' + amount: + $ref: '#/components/schemas/Amount' + transactionType: + $ref: '#/components/schemas/transactionType' + note: + $ref: '#/components/schemas/Note' + lastError: + $ref: '#/components/schemas/quoteError' + bulkQuoteResponse: + type: object + required: + - from + - individualQuoteResults + properties: + quoteId: + $ref: '#/components/schemas/CorrelationId' + homeTransactionId: + type: string + description: >- + Transaction ID from the DFSP backend, used to reconcile transactions + between the Switch and DFSP backend systems. + from: + $ref: '#/components/schemas/transferParty' + individualQuoteResults: + type: array + maxItems: 1000 + items: + $ref: '#/components/schemas/individualQuoteResult' + description: List of individualQuoteResults in a bulk transfer response. + bulkQuoteErrorResponse: + allOf: + - $ref: '#/components/schemas/errorResponse' + - type: object + required: + - bulkTansferState + properties: + bulkQuoteState: + $ref: '#/components/schemas/bulkQuoteResponse' + bulkQuoteStatus: + type: string + enum: + - ERROR_OCCURRED + - COMPLETED + bulkQuoteStatusResponse: + type: object + required: + - bulkQuoteId + - currentState + - individualQuotes + properties: + bulkQuoteId: + $ref: '#/components/schemas/CorrelationId' + currentState: + $ref: '#/components/schemas/bulkQuoteStatus' + individualQuotes: + type: array + minItems: 1 + maxItems: 1000 + items: + $ref: '#/components/schemas/individualQuote' + TransactionScenario: + title: TransactionScenario + type: string + enum: + - DEPOSIT + - WITHDRAWAL + - TRANSFER + - PAYMENT + - REFUND + description: >- + Below are the allowed values for the enumeration. + + - DEPOSIT - Used for performing a Cash-In (deposit) transaction. In a + normal scenario, electronic funds are transferred from a Business + account to a Consumer account, and physical cash is given from the + Consumer to the Business User. + + - WITHDRAWAL - Used for performing a Cash-Out (withdrawal) transaction. + In a normal scenario, electronic funds are transferred from a Consumer’s + account to a Business account, and physical cash is given from the + Business User to the Consumer. + + - TRANSFER - Used for performing a P2P (Peer to Peer, or Consumer to + Consumer) transaction. + + - PAYMENT - Usually used for performing a transaction from a Consumer to + a Merchant or Organization, but could also be for a B2B (Business to + Business) payment. The transaction could be online for a purchase in an + Internet store, in a physical store where both the Consumer and Business + User are present, a bill payment, a donation, and so on. + + - REFUND - Used for performing a refund of transaction. + TransactionSubScenario: + title: TransactionSubScenario + type: string + pattern: '^[A-Z_]{1,32}$' + description: >- + Possible sub-scenario, defined locally within the scheme (UndefinedEnum + Type). + TransactionInitiator: + title: TransactionInitiator + type: string + enum: + - PAYER + - PAYEE + description: >- + Below are the allowed values for the enumeration. + + - PAYER - Sender of funds is initiating the transaction. The account to + send from is either owned by the Payer or is connected to the Payer in + some way. + + - PAYEE - Recipient of the funds is initiating the transaction by + sending a transaction request. The Payer must approve the transaction, + either automatically by a pre-generated OTP or by pre-approval of the + Payee, or by manually approving in his or her own Device. + RefundReason: + title: RefundReason + type: string + minLength: 1 + maxLength: 128 + description: Reason for the refund. + Refund: + title: Refund + type: object + description: Data model for the complex type Refund. + properties: + originalTransactionId: + $ref: '#/components/schemas/CorrelationId' + refundReason: + $ref: '#/components/schemas/RefundReason' + required: + - originalTransactionId + BalanceOfPayments: + title: BalanceOfPayments + type: string + pattern: '^[1-9]\d{2}$' + description: >- + (BopCode) The API data type + [BopCode](https://www.imf.org/external/np/sta/bopcode/) is a JSON String + of 3 characters, consisting of digits only. Negative numbers are not + allowed. A leading zero is not allowed. + TransactionType: + title: TransactionType + type: object + description: Data model for the complex type TransactionType. + properties: + scenario: + $ref: '#/components/schemas/TransactionScenario' + subScenario: + $ref: '#/components/schemas/TransactionSubScenario' + initiator: + $ref: '#/components/schemas/TransactionInitiator' + initiatorType: + $ref: '#/components/schemas/TransactionInitiatorType' + refundInfo: + $ref: '#/components/schemas/Refund' + balanceOfPayments: + $ref: '#/components/schemas/BalanceOfPayments' + required: + - scenario + - initiator + - initiatorType + requestToPayRequest: + type: object + required: + - homeTransactionId + - from + - to + - amountType + - currency + - amount + - scenario + - initiator + - initiatorType + properties: + homeTransactionId: + type: string + description: >- + Transaction ID from the DFSP backend, used to reconcile transactions + between the Switch and DFSP backend systems. + from: + $ref: '#/components/schemas/transferParty' + to: + $ref: '#/components/schemas/transferParty' + amountType: + $ref: '#/components/schemas/AmountType' + currency: + $ref: '#/components/schemas/Currency' + amount: + $ref: '#/components/schemas/Amount' + scenario: + $ref: '#/components/schemas/TransactionType' + initiator: + $ref: '#/components/schemas/TransactionInitiator' + initiatorType: + $ref: '#/components/schemas/TransactionInitiatorType' + AuthenticationType: + title: AuthenticationType + type: string + enum: + - OTP + - QRCODE + - U2F + description: |- + Below are the allowed values for the enumeration AuthenticationType. + - OTP - One-time password generated by the Payer FSP. + - QRCODE - QR code used as One Time Password. + - U2F - U2F is a new addition isolated to Thirdparty stream. + TransactionRequestState: + title: TransactionRequestState + type: string + enum: + - RECEIVED + - PENDING + - ACCEPTED + - REJECTED + description: |- + Below are the allowed values for the enumeration. + - RECEIVED - Payer FSP has received the transaction from the Payee FSP. + - PENDING - Payer FSP has sent the transaction request to the Payer. + - ACCEPTED - Payer has approved the transaction. + - REJECTED - Payer has rejected the transaction. + requestToPayResponse: + type: object + required: + - transactionRequestId + - from + - to + - amountType + - currency + - amount + - transactionType + - requestToPayState + properties: + transactionRequestId: + $ref: '#/components/schemas/CorrelationId' + from: + $ref: '#/components/schemas/transferParty' + to: + $ref: '#/components/schemas/transferParty' + amountType: + $ref: '#/components/schemas/AmountType' + currency: + $ref: '#/components/schemas/Currency' + amount: + $ref: '#/components/schemas/Amount' + scenario: + $ref: '#/components/schemas/TransactionType' + initiator: + $ref: '#/components/schemas/TransactionInitiator' + initiatorType: + $ref: '#/components/schemas/TransactionInitiatorType' + authenticationType: + $ref: '#/components/schemas/AuthenticationType' + requestToPayState: + $ref: '#/components/schemas/TransactionRequestState' + requestToPayTransferRequest: + type: object + required: + - requestToPayTransactionId + - from + - to + - amountType + - currency + - amount + - scenario + - initiator + - initiatorType + properties: + requestToPayTransactionId: + type: string + description: >- + Transaction ID from the DFSP backend, used to reconcile transactions + between the Switch and DFSP backend systems. + from: + $ref: '#/components/schemas/transferParty' + to: + $ref: '#/components/schemas/transferParty' + amountType: + $ref: '#/components/schemas/AmountType' + currency: + $ref: '#/components/schemas/Currency' + amount: + $ref: '#/components/schemas/Amount' + scenario: + $ref: '#/components/schemas/TransactionType' + initiator: + $ref: '#/components/schemas/TransactionInitiator' + initiatorType: + $ref: '#/components/schemas/TransactionInitiatorType' + note: + $ref: '#/components/schemas/Note' + requestToPayTransferResponse: + type: object + required: + - requestToPayTransactionId + - from + - to + - amountType + - currency + - amount + - transactionType + properties: + transferId: + $ref: '#/components/schemas/CorrelationId' + requestToPayTransactionId: + type: string + description: >- + Transaction ID from the DFSP backend, used to reconcile transactions + between the Switch and DFSP backend systems. + from: + $ref: '#/components/schemas/transferParty' + to: + $ref: '#/components/schemas/transferParty' + amountType: + $ref: '#/components/schemas/AmountType' + currency: + $ref: '#/components/schemas/Currency' + amount: + $ref: '#/components/schemas/Amount' + transactionType: + $ref: '#/components/schemas/transactionType' + note: + $ref: '#/components/schemas/Note' + currentState: + $ref: '#/components/schemas/transferStatus' + quoteId: + $ref: '#/components/schemas/CorrelationId' + quoteResponse: + $ref: '#/components/schemas/QuotesIDPutResponse' + quoteResponseSource: + type: string + description: > + FSPID of the entity that supplied the quote response. This may not + be the same as the FSPID of the entity which owns the end user + account in the case of a FOREX transfer. i.e. it may be a FOREX + gateway. + fulfil: + $ref: '#/components/schemas/TransfersIDPutResponse' + lastError: + $ref: '#/components/schemas/transferError' + transferContinuationAcceptOTP: + type: object + required: + - acceptOTP + properties: + acceptOTP: + type: boolean + enum: + - true + - false + accountsRequest: + type: array + items: + type: object + required: + - idType + - idValue + - currency + properties: + idType: + $ref: '#/components/schemas/PartyIdType' + idValue: + $ref: '#/components/schemas/PartyIdentifier' + idSubValue: + $ref: '#/components/schemas/PartySubIdOrType' + currency: + $ref: '#/components/schemas/Currency' + accountCreationStatus: + type: array + items: + type: object + required: + - idType + - idValue + properties: + idType: + $ref: '#/components/schemas/PartyIdType' + idValue: + $ref: '#/components/schemas/PartyIdentifier' + idSubValue: + $ref: '#/components/schemas/PartySubIdOrType' + error: + $ref: '#/components/schemas/errorResponse' + accountsCreationState: + type: string + enum: + - ERROR_OCCURRED + - COMPLETED + accountsResponse: + type: object + required: + - accounts + properties: + modelId: + $ref: '#/components/schemas/CorrelationId' + accounts: + $ref: '#/components/schemas/accountsRequest' + response: + $ref: '#/components/schemas/accountCreationStatus' + currentState: + $ref: '#/components/schemas/accountsCreationState' + lastError: + $ref: '#/components/schemas/transferError' + errorAccountsResponse: + allOf: + - $ref: '#/components/schemas/errorResponse' + - type: object + required: + - executionState + properties: + executionState: + $ref: '#/components/schemas/accountsResponse' + AccountAddress: + title: AccountAddress + type: string + description: > + A long-lived unique account identifier provided by the DFSP. This MUST + NOT + + be Bank Account Number or anything that may expose a User's private bank + + account information. + pattern: '^([0-9A-Za-z_~\-\.]+[0-9A-Za-z_~\-])$' + minLength: 1 + maxLength: 1023 + Account: + title: Account + type: object + description: Data model for the complex type Account. + properties: + address: + $ref: '#/components/schemas/AccountAddress' + currency: + $ref: '#/components/schemas/Currency' + description: + $ref: '#/components/schemas/Name' + required: + - currency + AccountList: + title: AccountList + type: object + description: Data model for the complex type AccountList. + properties: + account: + type: array + items: + $ref: '#/components/schemas/Account' + minItems: 1 + maxItems: 32 + description: Accounts associated with the Party. + required: + - account + PartyIdInfo: + title: PartyIdInfo + type: object + description: Data model for the complex type PartyIdInfo. + properties: + partyIdType: + $ref: '#/components/schemas/PartyIdType' + partyIdentifier: + $ref: '#/components/schemas/PartyIdentifier' + partySubIdOrType: + $ref: '#/components/schemas/PartySubIdOrType' + fspId: + $ref: '#/components/schemas/FspId' + extensionList: + $ref: '#/components/schemas/ExtensionList' + required: + - partyIdType + - partyIdentifier + PartyName: + title: PartyName + type: string + minLength: 1 + maxLength: 128 + description: Name of the Party. Could be a real name or a nickname. + PartyComplexName: + title: PartyComplexName + type: object + description: Data model for the complex type PartyComplexName. + properties: + firstName: + $ref: '#/components/schemas/FirstName' + middleName: + $ref: '#/components/schemas/MiddleName' + lastName: + $ref: '#/components/schemas/LastName' + PartyPersonalInfo: + title: PartyPersonalInfo + type: object + description: Data model for the complex type PartyPersonalInfo. + properties: + complexName: + $ref: '#/components/schemas/PartyComplexName' + dateOfBirth: + $ref: '#/components/schemas/DateOfBirth' + Party: + title: Party + type: object + description: Data model for the complex type Party. + properties: + accounts: + $ref: '#/components/schemas/AccountList' + partyIdInfo: + $ref: '#/components/schemas/PartyIdInfo' + merchantClassificationCode: + $ref: '#/components/schemas/MerchantClassificationCode' + name: + $ref: '#/components/schemas/PartyName' + personalInfo: + $ref: '#/components/schemas/PartyPersonalInfo' + required: + - partyIdInfo + async2SyncCurrentState: + type: string + enum: + - WAITING_FOR_ACTION + - COMPLETED + - ERROR_OCCURRED + partiesByIdResponse: + title: partiesByIdResponse + type: object + description: 'GET /parties/{Type}/{ID} response object' + properties: + party: + $ref: '#/components/schemas/Party' + currentState: + $ref: '#/components/schemas/async2SyncCurrentState' + required: + - party + - currentState + QuotesPostRequest: + title: QuotesPostRequest + type: object + description: The object sent in the POST /quotes request. + properties: + quoteId: + $ref: '#/components/schemas/CorrelationId' + transactionId: + $ref: '#/components/schemas/CorrelationId' + transactionRequestId: + $ref: '#/components/schemas/CorrelationId' + payee: + $ref: '#/components/schemas/Party' + payer: + $ref: '#/components/schemas/Party' + amountType: + $ref: '#/components/schemas/AmountType' + amount: + $ref: '#/components/schemas/Money' + fees: + $ref: '#/components/schemas/Money' + transactionType: + $ref: '#/components/schemas/TransactionType' + geoCode: + $ref: '#/components/schemas/GeoCode' + note: + $ref: '#/components/schemas/Note' + expiration: + $ref: '#/components/schemas/DateTime' + extensionList: + $ref: '#/components/schemas/ExtensionList' + required: + - quoteId + - transactionId + - payee + - payer + - amountType + - amount + - transactionType + quotesPostRequest: + title: QuotesPostRequest + type: object + properties: + fspId: + $ref: '#/components/schemas/FspId' + quotesPostRequest: + $ref: '#/components/schemas/QuotesPostRequest' + required: + - fspId + - quotesPostRequest + quotesPostResponse: + title: QuotesPostResponse + type: object + properties: + quotes: + title: QuotesIDPutResponse + type: object + description: 'The object sent in the PUT /quotes/{ID} callback.' + properties: + transferAmount: + $ref: '#/components/schemas/Money' + payeeReceiveAmount: + $ref: '#/components/schemas/Money' + payeeFspFee: + $ref: '#/components/schemas/Money' + payeeFspCommission: + $ref: '#/components/schemas/Money' + expiration: + type: string + description: >- + Date and time until when the quotation is valid and can be + honored when used in the subsequent transaction. + example: '2016-05-24T08:38:08.699-04:00' + geoCode: + $ref: '#/components/schemas/GeoCode' + ilpPacket: + $ref: '#/components/schemas/IlpPacket' + condition: + $ref: '#/components/schemas/IlpCondition' + extensionList: + $ref: '#/components/schemas/ExtensionList' + required: + - transferAmount + - expiration + - ilpPacket + - condition + currentState: + $ref: '#/components/schemas/async2SyncCurrentState' + required: + - quotes + - currentState + errorQuotesResponse: + allOf: + - $ref: '#/components/schemas/errorResponse' + - type: object + TransfersPostRequest: + title: TransfersPostRequest + type: object + description: The object sent in the POST /transfers request. + properties: + transferId: + $ref: '#/components/schemas/CorrelationId' + payeeFsp: + $ref: '#/components/schemas/FspId' + payerFsp: + $ref: '#/components/schemas/FspId' + amount: + $ref: '#/components/schemas/Money' + ilpPacket: + $ref: '#/components/schemas/IlpPacket' + condition: + $ref: '#/components/schemas/IlpCondition' + expiration: + $ref: '#/components/schemas/DateTime' + extensionList: + $ref: '#/components/schemas/ExtensionList' + required: + - transferId + - payeeFsp + - payerFsp + - amount + - ilpPacket + - condition + - expiration + simpleTransfersPostRequest: + title: SimpleTransfersPostRequest + type: object + properties: + fspId: + $ref: '#/components/schemas/FspId' + transfersPostRequest: + $ref: '#/components/schemas/TransfersPostRequest' + required: + - fspId + - transfersPostRequest + simpleTransfersPostResponse: + title: SimpleTransfersPostResponse + type: object + properties: + transfer: + $ref: '#/components/schemas/TransfersIDPutResponse' + currentState: + $ref: '#/components/schemas/async2SyncCurrentState' + required: + - transfer + - currentState + errorSimpleTransfersResponse: + allOf: + - $ref: '#/components/schemas/errorResponse' + - type: object + AuthorizationChannelType: + title: AuthorizationChannelType + type: string + enum: + - OTP + - QRCODE + - U2F + description: > + Below are the allowed values for the enumeration + AuthorizationChannelType. + + - OTP - One-time password generated by the Payer FSP. + + - QRCODE - QR code used as One Time Password. + + - U2F - U2F is a new addition isolated to Thirdparty stream. + + + This is based on FSPIOP `AuthenticationType` with U2F added. + example: U2F + Integer: + title: Integer + type: string + pattern: '^[1-9]\d*$' + description: >- + The API data type Integer is a JSON String consisting of digits only. + Negative numbers and leading zeroes are not allowed. The data type is + always limited to a specific number of digits. + AuthorizationsPostRequest: + title: AuthorizationsPostRequest + description: POST /authorizations request object. + type: object + properties: + authenticationType: + $ref: '#/components/schemas/AuthorizationChannelType' + retriesLeft: + $ref: '#/components/schemas/Integer' + amount: + $ref: '#/components/schemas/Money' + transactionId: + $ref: '#/components/schemas/CorrelationId' + transactionRequestId: + $ref: '#/components/schemas/CorrelationId' + quote: + $ref: '#/components/schemas/QuotesIDPutResponse' + required: + - authenticationType + - retriesLeft + - amount + - transactionId + - transactionRequestId + - quote + additionalProperties: false + authorizationsPostRequest: + title: AuthorizationsPostRequest + description: POST /authorizations Request object + type: object + properties: + fspId: + $ref: '#/components/schemas/FspId' + authorizationsPostRequest: + $ref: '#/components/schemas/AuthorizationsPostRequest' + required: + - fspId + - authorizationsPostRequest + OtpValue: + title: OtpValue + type: string + pattern: '^\d{3,10}$' + description: >- + The API data type OtpValue is a JSON String of 3 to 10 characters, + consisting of digits only. Negative numbers are not allowed. One or more + leading zeros are allowed. + QRCODE: + title: QRCODE + type: string + minLength: 1 + maxLength: 64 + description: QR code used as a One Time Password. + U2FPIN: + title: U2FPIN + type: string + pattern: '^\S{1,64}$' + minLength: 1 + maxLength: 64 + description: > + U2F challenge-response, where payer FSP verifies if the response + provided by end-user device matches the previously registered key. + U2FPinValue: + title: U2FPinValue + type: object + description: > + U2F challenge-response, where payer FSP verifies if the response + provided by end-user device matches the previously registered key. + properties: + pinValue: + allOf: + - $ref: '#/components/schemas/U2FPIN' + description: U2F challenge-response. + counter: + allOf: + - $ref: '#/components/schemas/Integer' + description: >- + Sequential counter used for cloning detection. Present only for U2F + authentication. + required: + - pinValue + - counter + AuthenticationValue: + title: AuthenticationValue + anyOf: + - $ref: '#/components/schemas/OtpValue' + - $ref: '#/components/schemas/QRCODE' + - $ref: '#/components/schemas/U2FPinValue' + pattern: '^\d{3,10}$|^\S{1,64}$' + description: >- + Contains the authentication value. The format depends on the + authentication type used in the AuthenticationInfo complex type. + AuthenticationInfo: + title: AuthenticationInfo + type: object + description: Data model for the complex type AuthenticationInfo. + properties: + authentication: + $ref: '#/components/schemas/AuthenticationType' + authenticationValue: + $ref: '#/components/schemas/AuthenticationValue' + required: + - authentication + - authenticationValue + AuthorizationResponseType: + title: AuthorizationResponseType + description: | + Enum containing response information; if the customer entered the + authentication value, rejected the transaction, or requested a + resend of the authentication value. + type: string + enum: + - ENTERED + - REJECTED + - RESEND + authorizationsPostResponse: + title: AuthorizationsPostResponse + description: POST /authorizations response object + type: object + properties: + authorizations: + type: object + properties: + authenticationInfo: + $ref: '#/components/schemas/AuthenticationInfo' + responseType: + $ref: '#/components/schemas/AuthorizationResponseType' + required: + - responseType + currentState: + $ref: '#/components/schemas/async2SyncCurrentState' + required: + - authorizations + - currentState + additionalProperties: false + errorAuthorizationsResponse: + allOf: + - $ref: '#/components/schemas/errorResponse' + - type: object + responses: + transferSuccess: + description: Transfer completed successfully + content: + application/json: + schema: + $ref: '#/components/schemas/transferResponse' + transferBadRequest: + description: 'Malformed or missing required body, headers or parameters' + content: + application/json: + schema: + $ref: '#/components/schemas/errorTransferResponse' + transferServerError: + description: An error occurred processing the transfer + content: + application/json: + schema: + $ref: '#/components/schemas/errorTransferResponse' + transferTimeout: + description: Timeout occurred processing the transfer + content: + application/json: + schema: + $ref: '#/components/schemas/errorTransferResponse' + bulkTransferSuccess: + description: Bulk transfer completed successfully + content: + application/json: + schema: + $ref: '#/components/schemas/bulkTransferResponse' + bulkTransferBadRequest: + description: 'Malformed or missing required body, headers or parameters' + content: + application/json: + schema: + $ref: '#/components/schemas/bulkTransferErrorResponse' + bulkTransferServerError: + description: An error occurred processing the bulk transfer + content: + application/json: + schema: + $ref: '#/components/schemas/bulkTransferErrorResponse' + bulkTransferTimeout: + description: Timeout occurred processing the bulk transfer + content: + application/json: + schema: + $ref: '#/components/schemas/bulkTransferErrorResponse' + bulkQuoteSuccess: + description: Bulk quote completed successfully + content: + application/json: + schema: + $ref: '#/components/schemas/bulkQuoteResponse' + bulkQuoteBadRequest: + description: 'Malformed or missing required body, headers or parameters' + content: + application/json: + schema: + $ref: '#/components/schemas/bulkQuoteErrorResponse' + bulkQuoteServerError: + description: An error occurred processing the bulk quote + content: + application/json: + schema: + $ref: '#/components/schemas/bulkQuoteErrorResponse' + bulkQuoteTimeout: + description: Timeout occurred processing the bulk quote + content: + application/json: + schema: + $ref: '#/components/schemas/bulkQuoteErrorResponse' + requestToPaySuccess: + description: Request to Pay completed successfully + content: + application/json: + schema: + $ref: '#/components/schemas/requestToPayResponse' + requestToPayTransferSuccess: + description: Transfer completed successfully + content: + application/json: + schema: + $ref: '#/components/schemas/requestToPayTransferResponse' + requestToPayTransferBadRequest: + description: 'Malformed or missing required body, headers or parameters' + content: + application/json: + schema: + $ref: '#/components/schemas/errorTransferResponse' + accountsCreationCompleted: + description: Accounts creation completed + content: + application/json: + schema: + $ref: '#/components/schemas/accountsResponse' + accountsCreationError: + description: An error occurred creating accounts + content: + application/json: + schema: + $ref: '#/components/schemas/errorAccountsResponse' + accountsCreationTimeout: + description: Timeout occurred creating accounts + content: + application/json: + schema: + $ref: '#/components/schemas/errorAccountsResponse' + partiesByIdSuccess: + description: PartiesByIdSuccess + content: + application/json: + schema: + $ref: '#/components/schemas/partiesByIdResponse' + partiesByIdError404: + description: PartiesByIdError404 + content: + application/json: + schema: + type: object + properties: + errorInformation: + $ref: '#/components/schemas/ErrorInformation' + quotesPostSuccess: + description: sync response from POST /quotes + content: + application/json: + schema: + $ref: '#/components/schemas/quotesPostResponse' + quotesServerError: + description: An error occurred processing the quotes request + content: + application/json: + schema: + $ref: '#/components/schemas/errorQuotesResponse' + simpleTransfersPostSuccess: + description: sync response from POST /simpleTransfers + content: + application/json: + schema: + $ref: '#/components/schemas/simpleTransfersPostResponse' + simpleTransfersServerError: + description: An error occurred processing the simple transfers request + content: + application/json: + schema: + $ref: '#/components/schemas/errorSimpleTransfersResponse' + authorizationPostSuccess: + description: Sync response from POST /authorizations + content: + application/json: + schema: + $ref: '#/components/schemas/authorizationsPostResponse' + authorizationsServerError: + description: An error occurred processing the authorizations request + content: + application/json: + schema: + $ref: '#/components/schemas/errorAuthorizationsResponse' + parameters: + transferId: + name: transferId + in: path + required: true + schema: + $ref: '#/components/schemas/CorrelationId' + description: >- + Identifier of the transfer to continue as returned in the response to a + `POST /transfers` request. + bulkTransferId: + name: bulkTransferId + in: path + required: true + schema: + $ref: '#/components/schemas/CorrelationId' + description: >- + Identifier of the bulk transfer to continue as returned in the response + to a `POST /bulkTransfers` request. + bulkQuoteId: + name: bulkQuoteId + in: path + required: true + schema: + $ref: '#/components/schemas/CorrelationId' + description: >- + Identifier of the bulk transfer to continue as returned in the response + to a `POST /bulkTransfers` request. + requestToPayTransactionId: + name: requestToPayTransactionId + in: path + required: true + schema: + $ref: '#/components/schemas/CorrelationId' + description: >- + Identifier of the merchant request to pay transfer to continue as + returned in the response to a `POST /requestToPayTransfer` request. + Type: + name: Type + in: path + required: true + schema: + type: string + description: 'The type of the party identifier. For example, `MSISDN`, `PERSONAL_ID`.' + ID: + name: ID + in: path + required: true + schema: + type: string + description: The identifier value. + SubId: + name: SubId + in: path + required: true + schema: + type: string + description: >- + A sub-identifier of the party identifier, or a sub-type of the party + identifier's type. For example, `PASSPORT`, `DRIVING_LICENSE`. diff --git a/test/func/config/ml-testing-toolkit/spec_files/api_definitions/mojaloop_sdk_outbound_scheme_adapter_1.0/mockRef.json b/test/func/config/ttk-hub/spec_files/api_definitions/mojaloop_sdk_outbound_scheme_adapter_1.0/mockRef.json similarity index 100% rename from test/func/config/ml-testing-toolkit/spec_files/api_definitions/mojaloop_sdk_outbound_scheme_adapter_1.0/mockRef.json rename to test/func/config/ttk-hub/spec_files/api_definitions/mojaloop_sdk_outbound_scheme_adapter_1.0/mockRef.json diff --git a/test/func/config/ml-testing-toolkit/spec_files/api_definitions/mojaloop_sdk_outbound_scheme_adapter_1.0/response_map.json b/test/func/config/ttk-hub/spec_files/api_definitions/mojaloop_sdk_outbound_scheme_adapter_1.0/response_map.json similarity index 100% rename from test/func/config/ml-testing-toolkit/spec_files/api_definitions/mojaloop_sdk_outbound_scheme_adapter_1.0/response_map.json rename to test/func/config/ttk-hub/spec_files/api_definitions/mojaloop_sdk_outbound_scheme_adapter_1.0/response_map.json diff --git a/test/func/config/ttk-hub/spec_files/api_definitions/mojaloop_simulator_0.1/api_spec.yaml b/test/func/config/ttk-hub/spec_files/api_definitions/mojaloop_simulator_0.1/api_spec.yaml new file mode 100644 index 000000000..c09ef749f --- /dev/null +++ b/test/func/config/ttk-hub/spec_files/api_definitions/mojaloop_simulator_0.1/api_spec.yaml @@ -0,0 +1,225 @@ +openapi: 3.0.0 +info: + version: '0.1' + title: Mojaloop simulator Test API + description: Control the simulator + license: + name: UNLICENSED +paths: + /scenarios: + post: + description: Send test scenarios + requestBody: + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Scenario' + responses: + '200': + description: The test was successful + '400': + description: Test file is has errors + '500': + description: An error occured processing the request + /repository/parties: + post: + description: Create a party + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Party' + responses: + '204': + description: The party was created + '400': + description: The request was malformed + '500': + description: An error occured processing the request + get: + description: Get an existing party + responses: + '200': + description: Party data is returned + /repository/parties/{idType}/{idValue}: + put: + description: Modifies a party + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Party' + responses: + '204': + description: Party was created + '400': + description: The request was malformed + '500': + description: An error occured processing the request + parameters: + - name: idType + in: path + required: true + schema: + $ref: '#/components/schemas/idType' + - name: idValue + in: path + required: true + schema: + $ref: '#/components/schemas/idValue' + get: + description: Get an existing party + responses: + '200': + description: Party data is returned + delete: + description: Deletes a party + responses: + '204': + description: The party was created + '500': + description: An error occured processing the request + parameters: + - name: idType + in: path + required: true + schema: + $ref: '#/components/schemas/idType' + - name: idValue + in: path + required: true + schema: + $ref: '#/components/schemas/idValue' + +components: + schemas: + Scenario: + title: Scenario + type: object + description: An outbound transfer, bulk transfer or bulk quote scenario + required: + - name + - operation + - body + properties: + name: + type: string + operation: + $ref: '#/components/schemas/ScenarioOperation' + body: + type: object + description: >- + This object should be either a POST /transfers, PUT /transfers, POST /bulkTransfers or POST /bulkQuotes + request body as per the SDK outbound API specification + params: + $ref: '#/components/schemas/ScenarioOperationParameters' + ScenarioOperation: + title: Scenario Operation + type: string + description: The operation to perform as part of a scenario + enum: + - postTransfers + - putTransfers + - postBulkTransfers + - postBulkQuotes + ScenarioOperationParameters: + description: Parameters to pass into the scenario operation + type: object + oneOf: + - properties: + transferId: + type: string + description: >- + Transfer ID e.g. in the case of putTransfers operation this is the + ID of the transfer to complete + required: + - transferId + - properties: + bulkTransferId: + type: string + description: Bulk transfer ID + required: + - bulkTransferId + - properties: + bulkQuoteId: + type: string + description: Bulk quote ID + required: + - bulkQuoteId + Party: + title: Party + type: object + description: A party + required: + - displayName + - firstName + - middleName + - lastName + - dateOfBirth + - idType + - idValue + properties: + displayName: + type: string + firstName: + type: string + middleName: + type: string + lastName: + type: string + dateOfBirth: + type: string + idType: + type: string + enum: + - MSISDN + - EMAIL + - PERSONAL_ID + - BUSINESS + - DEVICE + - ACCOUNT_ID + - IBAN + - ALIAS + idValue: + type: string + minLength: 1 + maxLength: 128 + extensionList: + $ref: '#/components/schemas/ExtensionList' + Extension: + type: object + required: + - key + - value + properties: + key: + type: string + description: Extension key. + value: + type: string + description: Extension value. + title: Extension + description: Data model for the complex type Extension + ExtensionList: + type: array + items: + $ref: '#/components/schemas/Extension' + title: ExtensionList + description: Data model for the complex type ExtensionList + idType: + type: string + enum: + - MSISDN + - EMAIL + - PERSONAL_ID + - BUSINESS + - DEVICE + - ACCOUNT_ID + - IBAN + - ALIAS + idValue: + type: string + minLength: 1 + maxLength: 128 diff --git a/test/func/config/ttk-hub/spec_files/api_definitions/mojaloop_simulator_sim_1.4/api_spec.yaml b/test/func/config/ttk-hub/spec_files/api_definitions/mojaloop_simulator_sim_1.4/api_spec.yaml new file mode 100644 index 000000000..b214065b3 --- /dev/null +++ b/test/func/config/ttk-hub/spec_files/api_definitions/mojaloop_simulator_sim_1.4/api_spec.yaml @@ -0,0 +1,1087 @@ +openapi: 3.0.1 +info: + title: Mojaloop SDK Inbound Scheme Adapter API + description: Mojaloop SDK Inbound Scheme Adapter API - To be implemented by DFSP backend + license: + name: Open API for FSP Interoperability (FSPIOP) + url: http://www.majaloop.io + version: 1.0.0 + +paths: + /: + get: + summary: Health check endpoint. + operationId: healthCheck + responses: + 200: + description: Returns empty body if the service is running. + /participants/{idType}/{idValue}: + get: + summary: Asks for the FSPID of the scheme participant that can handle transfers for the specified identifier type and value + tags: + - Participants + operationId: ParticipantsGetByTypeAndID + parameters: + - name: idType + in: path + required: true + schema: + $ref: '#/components/schemas/idType' + - name: idValue + in: path + required: true + schema: + $ref: '#/components/schemas/idValue' + responses: + 200: + description: Response containing details of the requested party + content: + application/json: + schema: + $ref: '#/components/schemas/participantsResponse' + 404: + description: The party specified by the provided identifier type and value is not known to the server + 400: + description: Malformed or missing required headers or parameters + content: + application/json: + schema: + $ref: '#/components/schemas/errorResponse' + 500: + description: An error occured processing the request + content: + application/json: + schema: + $ref: '#/components/schemas/errorResponse' + + /participants/{idType}/{idValue}/{subIdValue}: + get: + summary: Asks for the FSPID of the scheme participant that can handle transfers for the specified identifier type, value and subId value + tags: + - Participants + operationId: ParticipantsGetByTypeIDAndSubId + parameters: + - name: idType + in: path + required: true + schema: + $ref: '#/components/schemas/idType' + - name: idValue + in: path + required: true + schema: + $ref: '#/components/schemas/idValue' + - name: subIdValue + in: path + required: true + schema: + $ref: '#/components/schemas/subIdValue' + responses: + 200: + description: Response containing details of the requested party + content: + application/json: + schema: + $ref: '#/components/schemas/participantsResponse' + 404: + description: The party specified by the provided identifier type and value/subId is not known to the server + 400: + description: Malformed or missing required headers or parameters + content: + application/json: + schema: + $ref: '#/components/schemas/errorResponse' + 500: + description: An error occured processing the request + content: + application/json: + schema: + $ref: '#/components/schemas/errorResponse' + + /parties/{idType}/{idValue}: + get: + summary: Requests information relating to a transfer party identified by the specified identifier type and value + tags: + - Parties + operationId: PartiesGetByTypeAndID + parameters: + - name: idType + in: path + required: true + schema: + $ref: '#/components/schemas/idType' + - name: idValue + in: path + required: true + schema: + $ref: '#/components/schemas/idValue' + responses: + 200: + description: Response containing details of the requested party + content: + application/json: + schema: + $ref: '#/components/schemas/transferParty' + 404: + description: The party specified by the provided identifier type and value is not known to the server + 400: + description: Malformed or missing required headers or parameters + content: + application/json: + schema: + $ref: '#/components/schemas/errorResponse' + 500: + description: An error occured processing the request + content: + application/json: + schema: + $ref: '#/components/schemas/errorResponse' + + /parties/{idType}/{idValue}/{subIdValue}: + get: + summary: Requests information relating to a transfer party identified by the specified identifier type, value and subId value + tags: + - Parties + operationId: PartiesGetByTypeIdAndSubId + parameters: + - name: idType + in: path + required: true + schema: + $ref: '#/components/schemas/idType' + - name: idValue + in: path + required: true + schema: + $ref: '#/components/schemas/idValue' + - name: subIdValue + in: path + required: true + schema: + $ref: '#/components/schemas/subIdValue' + responses: + 200: + description: Response containing details of the requested party + content: + application/json: + schema: + $ref: '#/components/schemas/transferParty' + 404: + description: The party specified by the provided identifier type and value is not known to the server + 400: + description: Malformed or missing required headers or parameters + content: + application/json: + schema: + $ref: '#/components/schemas/errorResponse' + 500: + description: An error occured processing the request + content: + application/json: + schema: + $ref: '#/components/schemas/errorResponse' + + /quoterequests: + post: + summary: Requests a quote for the specified transfer + tags: + - Quotes + operationId: QuoteRequest + requestBody: + description: Request for a transfer quotation + content: + application/json: + schema: + $ref: '#/components/schemas/quoteRequest' + responses: + 200: + description: A response to the transfer quotation request + content: + application/json: + schema: + $ref: '#/components/schemas/quoteResponse' + 400: + description: Malformed or missing required headers or parameters + content: + application/json: + schema: + $ref: '#/components/schemas/errorResponse' + 500: + description: An error occured processing the request + content: + application/json: + schema: + $ref: '#/components/schemas/errorResponse' + + /transactionrequests: + post: + summary: transaction request that supports pull based transfers + tags: + - TransactionRequest + operationId: TransactionRequest + requestBody: + description: Request for Transaction Request + content: + application/json: + schema: + $ref: '#/components/schemas/transactionRequest' + responses: + 200: + description: A response to the transfer transaction request + content: + application/json: + schema: + $ref: '#/components/schemas/transactionRequestResponse' + 400: + description: Malformed or missing required headers or parameters + content: + application/json: + schema: + $ref: '#/components/schemas/errorResponse' + 500: + description: An error occured processing the request + content: + application/json: + schema: + $ref: '#/components/schemas/errorResponse' + + /transfers: + post: + summary: Transfers funds from an external account to an internal account + tags: + - Transfers + operationId: TransfersPost + requestBody: + description: An incoming transfer request + content: + application/json: + schema: + $ref: '#/components/schemas/transferRequest' + responses: + 200: + description: The transfer was accepted + content: + application/json: + schema: + $ref: '#/components/schemas/transferResponse' + 400: + description: Malformed or missing required headers or parameters + content: + application/json: + schema: + $ref: '#/components/schemas/errorResponse' + 500: + description: An error occured processing the request + content: + application/json: + schema: + $ref: '#/components/schemas/errorResponse' + + /transfers/{transferId}: + put: + summary: Receive notification for a specific transfer + description: The HTTP request `PUT /transfers/{transferId}` is used to receive notification for transfer being fulfiled when the FSP is a Payee + parameters: + - name: transferId + in: path + required: true + schema: + $ref: '#/components/schemas/idValue' + tags: + - Transfers + operationId: TransfersPut + requestBody: + description: An incoming notification for fulfiled transfer + content: + application/json: + schema: + $ref: '#/components/schemas/fulfilNotification' + responses: + 200: + description: The notification was accepted + 500: + description: An error occured processing the request + content: + application/json: + schema: + $ref: '#/components/schemas/errorResponse' + + + /otp/{requestToPayId}: + get: + summary: Requests OTP + tags: + - OTP + operationId: OtpGet + parameters: + - name: requestToPayId + in: path + required: true + schema: + $ref: '#/components/schemas/idValue' + responses: + 200: + description: Response containing details of the OTP + content: + application/json: + schema: + $ref: '#/components/schemas/otpDetails' + 404: + description: The party specified by the provided identifier type and value is not known to the server + 400: + description: Malformed or missing required headers or parameters + content: + application/json: + schema: + $ref: '#/components/schemas/errorResponse' + 500: + description: An error occured processing the request + content: + application/json: + schema: + $ref: '#/components/schemas/errorResponse' + + /bulkQuotes: + post: + summary: Requests a bulk quote + tags: + - BulkQuotes + operationId: BulkQuotesPost + requestBody: + description: Incoming request for a bulk quotation + content: + application/json: + schema: + $ref: '#/components/schemas/bulkQuoteRequest' + responses: + 200: + description: A response to the bulk quote request + content: + application/json: + schema: + $ref: '#/components/schemas/bulkQuoteResponse' + 400: + description: Malformed or missing required headers or parameters + content: + application/json: + schema: + $ref: '#/components/schemas/errorResponse' + 500: + description: An error occured processing the request + content: + application/json: + schema: + $ref: '#/components/schemas/errorResponse' + + /bulkQuotes/{idValue}: + get: + summary: Requests information relating to a bulk quote identified by the specified identifier value + tags: + - BulkQuotes + operationId: BulkQuotesGet + parameters: + - name: idValue + in: path + required: true + schema: + $ref: '#/components/schemas/idValue' + responses: + 200: + description: Response containing details of the requested bulk quote + content: + application/json: + schema: + $ref: '#/components/schemas/bulkQuoteResponse' + 404: + description: The bulk quote specified by the provided identifier value is not known to the server + 400: + description: Malformed or missing required headers or parameters + content: + application/json: + schema: + $ref: '#/components/schemas/errorResponse' + 500: + description: An error occured processing the request + content: + application/json: + schema: + $ref: '#/components/schemas/errorResponse' + + /bulkTransfers: + post: + summary: Execute bulk transfer of funds from an external account to internal accounts + tags: + - BulkTransfers + operationId: BulkTransfersPost + requestBody: + description: An incoming bulk transfer request + content: + application/json: + schema: + $ref: '#/components/schemas/bulkTransferRequest' + responses: + 200: + description: The bulk transfer was accepted + content: + application/json: + schema: + $ref: '#/components/schemas/bulkTransferResponse' + 400: + description: Malformed or missing required headers or parameters + content: + application/json: + schema: + $ref: '#/components/schemas/errorResponse' + 500: + description: An error occured processing the request + content: + application/json: + schema: + $ref: '#/components/schemas/errorResponse' + + /bulkTransfers/{idValue}: + get: + summary: Requests information relating to a bulk transfer identified by the specified identifier value + tags: + - BulkTransfers + operationId: BulkTransfersGet + parameters: + - name: idValue + in: path + required: true + schema: + $ref: '#/components/schemas/idValue' + responses: + 200: + description: Response containing details of the requested bulk transfer + content: + application/json: + schema: + $ref: '#/components/schemas/bulkTransferResponse' + 404: + description: The bulk transfer specified by the provided identifier value is not known to the server + 400: + description: Malformed or missing required headers or parameters + content: + application/json: + schema: + $ref: '#/components/schemas/errorResponse' + 500: + description: An error occured processing the request + content: + application/json: + schema: + $ref: '#/components/schemas/errorResponse' + +components: + schemas: + quoteRequest: + type: object + description: A request for a quote for transfer from the DFSP backend + required: + - quoteId + - transactionId + - to + - from + - amountType + - amount + - currency + - transactionType + - initiator + - initiatorType + properties: + quoteId: + $ref: '#/components/schemas/quoteId' + transactionId: + $ref: '#/components/schemas/transactionId' + to: + $ref: '#/components/schemas/transferParty' + from: + $ref: '#/components/schemas/transferParty' + amountType: + $ref: '#/components/schemas/amountType' + amount: + $ref: '#/components/schemas/money' + currency: + $ref: '#/components/schemas/currency' + feesAmount: + $ref: '#/components/schemas/money' + feesCurrency: + $ref: '#/components/schemas/currency' + transactionType: + $ref: '#/components/schemas/transactionType' + initiator: + $ref: '#/components/schemas/initiator' + initiatorType: + $ref: '#/components/schemas/initiatorType' + geoCode: + $ref: '#/components/schemas/geoCode' + note: + type: string + minLength: 1 + maxLength: 128 + description: An optional note associated with the requested transfer + expiration: + $ref: '#/components/schemas/timestamp' + + transactionRequest: + type: object + description: A request for a pull based transfer + required: + - transactionRequestId + - to + - from + - amount + - currency + - transactionType + - initiator + - initiatorType + properties: + transactionRequestId: + $ref: '#/components/schemas/transactionRequestId' + to: + $ref: '#/components/schemas/transferParty' + from: + $ref: '#/components/schemas/transferParty' + amount: + $ref: '#/components/schemas/money' + currency: + $ref: '#/components/schemas/currency' + transactionType: + $ref: '#/components/schemas/transactionType' + initiator: + $ref: '#/components/schemas/initiator' + initiatorType: + $ref: '#/components/schemas/initiatorType' + geoCode: + $ref: '#/components/schemas/geoCode' + note: + type: string + minLength: 1 + maxLength: 128 + description: An optional note associated with the requested transfer + expiration: + $ref: '#/components/schemas/timestamp' + + timestamp: + type: string + description: An ISO-8601 formatted timestamp + pattern: ^(?:[1-9]\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\d|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-02-29)T(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:(\.\d{3}))(?:Z|[+-][01]\d:[0-5]\d)$ + + dateOfBirth: + type: string + description: Date of birth in the form YYYY-MM-DD + pattern: ^(?:[1-9]\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\d|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-02-29)$ + + initiator: + type: string + enum: + - PAYER + - PAYEE + + initiatorType: + type: string + enum: + - CONSUMER + - AGENT + - BUSINESS + - DEVICE + + quoteResponse: + type: object + description: A response to a request for a quote + required: + - quoteId + - transactionId + - transferAmount + - transferAmountCurrency + properties: + quoteId: + $ref: '#/components/schemas/quoteId' + transactionId: + $ref: '#/components/schemas/transactionId' + transferAmount: + $ref: '#/components/schemas/money' + transferAmountCurrency: + $ref: '#/components/schemas/currency' + payeeReceiveAmount: + $ref: '#/components/schemas/money' + payeeReceiveAmountCurrency: + $ref: '#/components/schemas/currency' + payeeFspFeeAmount: + $ref: '#/components/schemas/money' + payeeFspFeeAmountCurrency: + $ref: '#/components/schemas/currency' + payeeFspCommissionAmount: + $ref: '#/components/schemas/money' + payeeFspCommissionAmountCurrency: + $ref: '#/components/schemas/currency' + expiration: + $ref: '#/components/schemas/timestamp' + geoCode: + $ref: '#/components/schemas/geoCode' + extensionList: + $ref: '#/components/schemas/extensionList' + + transactionRequestResponse: + type: object + description: A response to a request for a quote + required: + - transactionId + - transactionRequestState + properties: + transactionId: + $ref: '#/components/schemas/transactionId' + transferAmount: + $ref: '#/components/schemas/transactionRequestState' + + participantsResponse: + type: object + properties: + fspId: + $ref: '#/components/schemas/fspId' + + fspId: + type: string + minLength: 1 + maxLength: 32 + + payerType: + type: string + enum: + - CONSUMER + - AGENT + - BUSINESS + - DEVICE + + amountType: + type: string + enum: + - SEND + - RECEIVE + + transactionType: + type: string + enum: + - TRANSFER + - DEPOSIT + - PAYMENT + + transactionRequestState: + type: string + enum: + - RECEIVED + - PENDING + - ACCEPTED + - REJECTED + + transferRequest: + type: object + required: + - transferId + - currency + - amount + properties: + transferId: + $ref: '#/components/schemas/transferId' + quote: + $ref: '#/components/schemas/quoteResponse' + from: + $ref: '#/components/schemas/transferParty' + to: + $ref: '#/components/schemas/transferParty' + amountType: + $ref: '#/components/schemas/amountType' + currency: + $ref: '#/components/schemas/currency' + amount: + $ref: '#/components/schemas/money' + transactionType: + $ref: '#/components/schemas/transactionType' + note: + maxLength: 128 + type: string + + otpDetails: + type: object + required: + - otpValue + properties: + otpValue: + type: string + description: OTP value + + idType: + type: string + enum: + - MSISDN + - ACCOUNT_NO + - EMAIL + - PERSONAL_ID + - BUSINESS + - DEVICE + - ACCOUNT_ID + - IBAN + - ALIAS + + idValue: + type: string + minLength: 1 + maxLength: 128 + + subIdValue: + type: string + minLength: 1 + maxLength: 128 + + money: + pattern: ^([0]|([1-9][0-9]{0,17}))([.][0-9]{0,3}[1-9])?$ + type: string + + transferResponse: + type: object + required: + - homeTransactionId + properties: + homeTransactionId: + type: string + description: Transaction ID from the DFSP backend, used to reconcile transactions between the switch and DFSP backend systems + + currency: + maxLength: 3 + minLength: 3 + type: string + + transferId: + pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + type: string + description: A Mojaloop API transfer identifier (UUID) + + quoteId: + pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + type: string + description: A Mojaloop API quote identifier (UUID) + + transactionRequestId: + pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + type: string + description: A Mojaloop API transaction request identifier (UUID) + + transactionId: + pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + type: string + description: ID of the transaction, the ID is decided by the Payer FSP during the creation of the quote + + transferParty: + type: object + required: + - idType + - idValue + properties: + type: + $ref: '#/components/schemas/payerType' + idType: + $ref: '#/components/schemas/idType' + idValue: + type: string + description: The identifier string used to identify the sender + subIdValue: + type: string + description: The sub identifier string used to identify the sender + displayName: + type: string + description: Display name of the sender if known + firstName: + type: string + description: Party first name + middleName: + type: string + description: Party moddle name + lastName: + type: string + description: Party last name + dateOfBirth: + $ref: '#/components/schemas/dateOfBirth' + merchantClassificationCode: + type: string + description: Up to 4 digits specifying the senders merchant classification, if known and applicable + + bulkQuoteRequest: + type: object + description: A request for a bulk quote + required: + - bulkQuoteId + - from + - individualQuotes + properties: + bulkQuoteId: + $ref: '#/components/schemas/bulkQuoteId' + from: + $ref: '#/components/schemas/transferParty' + geoCode: + $ref: '#/components/schemas/geoCode' + expiration: + $ref: '#/components/schemas/timestamp' + individualQuotes: + type: array + minItems: 1 + maxItems: 1000 + items: + $ref: '#/components/schemas/IndividualQuote' + + bulkQuoteResponse: + type: object + description: A response to a request for a bulk quote + required: + - bulkQuoteId + - individualQuoteResults + properties: + bulkQuoteId: + $ref: '#/components/schemas/bulkQuoteId' + expiration: + $ref: '#/components/schemas/timestamp' + individualQuoteResults: + type: array + minItems: 1 + maxItems: 1000 + items: + $ref: '#/components/schemas/IndividualQuoteResult' + description: Fees for each individual transaction, if any of them are charged per + transaction. + + IndividualQuote: + type: object + description: Data model for individual quote in a bulk quote request + required: + - quoteId + - transactionId + - to + - amountType + - amount + - currency + - transactionType + - initiator + - initiatorType + properties: + quoteId: + $ref: '#/components/schemas/quoteId' + transactionId: + $ref: '#/components/schemas/transactionId' + to: + $ref: '#/components/schemas/transferParty' + amountType: + $ref: '#/components/schemas/amountType' + amount: + $ref: '#/components/schemas/money' + currency: + $ref: '#/components/schemas/currency' + feesAmount: + $ref: '#/components/schemas/money' + feesCurrency: + $ref: '#/components/schemas/currency' + transactionType: + $ref: '#/components/schemas/transactionType' + initiator: + $ref: '#/components/schemas/initiator' + initiatorType: + $ref: '#/components/schemas/initiatorType' + note: + type: string + minLength: 1 + maxLength: 128 + description: An optional note associated with the quote + + IndividualQuoteResult: + type: object + description: Data model for individual quote in a bulk quote response + properties: + quoteId: + $ref: '#/components/schemas/quoteId' + transferAmount: + $ref: '#/components/schemas/money' + transferAmountCurrency: + $ref: '#/components/schemas/currency' + payeeReceiveAmount: + $ref: '#/components/schemas/money' + payeeReceiveAmountCurrency: + $ref: '#/components/schemas/currency' + payeeFspFeeAmount: + $ref: '#/components/schemas/money' + payeeFspFeeAmountCurrency: + $ref: '#/components/schemas/currency' + payeeFspCommissionAmount: + $ref: '#/components/schemas/money' + payeeFspCommissionAmountCurrency: + $ref: '#/components/schemas/currency' + + bulkQuoteId: + pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + type: string + description: A Mojaloop API bulk quote identifier (UUID) + + bulkTransferRequest: + type: object + required: + - bulkTransferId + - individualTransfers + properties: + bulkTransferId: + $ref: '#/components/schemas/bulkTransferId' + bulkQuote: + $ref: '#/components/schemas/bulkQuoteResponse' + from: + $ref: '#/components/schemas/transferParty' + individualTransfers: + type: array + minItems: 1 + maxItems: 1000 + items: + $ref: '#/components/schemas/IndividualTransfer' + + IndividualTransfer: + type: object + description: Data model for individual transfer in a bulk transfer request + required: + - transferId + - amount + - currency + properties: + transferId: + $ref: '#/components/schemas/transferId' + to: + $ref: '#/components/schemas/transferParty' + amountType: + $ref: '#/components/schemas/amountType' + amount: + $ref: '#/components/schemas/money' + currency: + $ref: '#/components/schemas/currency' + feesAmount: + $ref: '#/components/schemas/money' + feesCurrency: + $ref: '#/components/schemas/currency' + transactionType: + $ref: '#/components/schemas/transactionType' + initiator: + $ref: '#/components/schemas/initiator' + initiatorType: + $ref: '#/components/schemas/initiatorType' + note: + type: string + minLength: 1 + maxLength: 128 + description: An optional note associated with the quote + + IndividualTransferResult: + type: object + description: Data model for individual transfer in a bulk transfer response + required: + - transferId + properties: + transferId: + $ref: '#/components/schemas/transferId' + extensionList: + $ref: '#/components/schemas/extensionList' + + bulkTransferResponse: + type: object + required: + - homeTransactionId + properties: + bulkTransferId: + $ref: '#/components/schemas/bulkTransferId' + homeTransactionId: + type: string + description: Transaction ID from the DFSP backend, used to reconcile transactions between the switch and DFSP backend systems + individualTransferResults: + type: array + minItems: 1 + maxItems: 1000 + items: + $ref: '#/components/schemas/IndividualTransferResult' + + bulkTransferId: + pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + type: string + description: A Mojaloop API transfer identifier (UUID) + + geoCode: + type: object + description: Indicates the geographic location from where the transaction was initiated. + properties: + latitude: + $ref: '#/components/schemas/latitude' + longitude: + $ref: '#/components/schemas/longitude' + required: + - latitude + - longitude + + latitude: + type: string + pattern: ^(\+|-)?(?:90(?:(?:\.0{1,6})?)|(?:[0-9]|[1-8][0-9])(?:(?:\.[0-9]{1,6})?))$ + description: The API data type Latitude is a JSON String in a lexical format that is restricted by a regular expression for interoperability reasons. + + longitude: + type: string + pattern: ^(\+|-)?(?:180(?:(?:\.0{1,6})?)|(?:[0-9]|[1-9][0-9]|1[0-7][0-9])(?:(?:\.[0-9]{1,6})?))$ + description: The API data type Longitude is a JSON String in a lexical format that is restricted by a regular expression for interoperability reasons. + + errorResponse: + type: object + properties: + statusCode: + type: string + description: Error code as string + message: + type: string + description: Error message text + + extensionList: + type: array + items: + $ref: '#/components/schemas/extensionItem' + minItems: 0 + maxItems: 16 + + extensionItem: + type: object + properties: + key: + type: string + minLength: 1 + maxLength: 32 + value: + type: string + minLength: 1 + maxLength: 128 + + transferState: + type: string + enum: + - RECEIVED + - RESERVED + - COMMITTED + - ABORTED + description: > + Below are the allowed values for the enumeration + - RECEIVED DFSP has received the transfer. + - RESERVED DFSP has reserved the transfer. + - COMMITTED DFSP has successfully performed the transfer. + - ABORTED DFSP has aborted the transfer due a rejection or failure to perform the transfer. + + fulfilNotification: + title: TransfersIDPatchResponse + type: object + description: PUT /transfers/{transferId} object + properties: + completedTimestamp: + $ref: '#/components/schemas/timestamp' + transferState: + $ref: '#/components/schemas/transferState' + extensionList: + $ref: '#/components/schemas/extensionList' + required: + - completedTimestamp + - transferState + diff --git a/test/func/config/ml-testing-toolkit/spec_files/api_definitions/mojaloop_simulator_sim_1.4/mockRef.json b/test/func/config/ttk-hub/spec_files/api_definitions/mojaloop_simulator_sim_1.4/mockRef.json similarity index 100% rename from test/func/config/ml-testing-toolkit/spec_files/api_definitions/mojaloop_simulator_sim_1.4/mockRef.json rename to test/func/config/ttk-hub/spec_files/api_definitions/mojaloop_simulator_sim_1.4/mockRef.json diff --git a/test/func/config/ttk-hub/spec_files/api_definitions/mojaloop_simulator_sim_1.4/response_map.json b/test/func/config/ttk-hub/spec_files/api_definitions/mojaloop_simulator_sim_1.4/response_map.json new file mode 100644 index 000000000..4a22ca3ca --- /dev/null +++ b/test/func/config/ttk-hub/spec_files/api_definitions/mojaloop_simulator_sim_1.4/response_map.json @@ -0,0 +1,55 @@ +{ + "/parties/{idType}/{idValue}": { + "get": { + "response": { + "bodyOverride": { + "idType": "{$request.params.idType}", + "idValue": "{$request.params.idValue}", + "merchantClassificationCode": null + } + } + } + }, + "/quoterequests": { + "post": { + "response": { + "bodyOverride": { + "quoteId": "{$request.body.quoteId}", + "transactionId": "{$request.body.transactionId}", + "transferAmount": "{$request.body.amount}", + "transferAmountCurrency": "{$request.body.currency}", + "expiration": "{$request.body.expiration}", + "geoCode": null, + "extensionList": null + } + } + } + }, + "/transfers": { + "post": { + "response": { + "bodyOverride": { + "homeTransactionId": "{$request.body.transferId}" + } + } + } + }, + "/bulkQuotes": { + "post": { + "response": { + "bodyOverride": { + "bulkQuoteId": "{$request.body.bulkQuoteId}" + } + } + } + }, + "/bulkTransfers": { + "post": { + "response": { + "bodyOverride": { + "bulkTransferId": "{$request.body.bulkTransferId}" + } + } + } + } +} \ No newline at end of file diff --git a/test/func/config/ttk-hub/spec_files/api_definitions/payment_manager_1.4/api_spec.yaml b/test/func/config/ttk-hub/spec_files/api_definitions/payment_manager_1.4/api_spec.yaml new file mode 100644 index 000000000..c8a19e496 --- /dev/null +++ b/test/func/config/ttk-hub/spec_files/api_definitions/payment_manager_1.4/api_spec.yaml @@ -0,0 +1,1389 @@ +openapi: 3.0.1 +info: + title: Payment Manager for Mojaloop API + description: > + Specification for the Payment Manager for Mojaloop API + This API can be used by DFSP backends to simplify the process of sending and receiving funds within a Mojaloop scheme. + **Note on terminology:** The term "Switch" is equal to the term "Hub", and the term "FSP" is equal to the term "DFSP". + license: + name: Apache License Version 2.0, January 2004 + url: http://www.apache.org/licenses/ + version: 1.4.0 + + +paths: + #Outbound API (Payer DFSP → Payment Manager → Mojaloop Switch) + /health: + get: + description: > + The HTTP request `GET /health` is used to check if the application is up and running. + operationId: getHealth + tags: + - health + responses: + 200: + description: OK + content: + application/json: + schema: + type: string + /sendmoney: + post: + summary: Sends money from one account to another + operationId: postSendMoney + description: > + The HTTP request `POST /sendmoney` is used by the Payer DFSP to request the movement of funds from the Payer DFSP to the Payee DFSP. + The underlying Mojaloop API has three stages for money transfer: + 1. Party lookup (discovery phase). This facilitates a check by the sending party that the destination party is correct before proceeding with a money movement. + 2. Quotation (agreement phase). This facilitates the exchange of fee information and the construction of a cryptographic "contract" between the Payee and Payer DFSPs before funds are transferred. + 3. Transfer (transfer phase). The enactment of the previously agreed "contract". + This method has several modes of operation. + - If the configuration variable `AUTO_ACCEPT_PARTY` is set to `"false"`, this method will terminate when the Payee party has been resolved and Payee party details have been returned. + If the Payer wishes to proceed with the transfer, then a subsequent `PUT /sendmoney/{transferId}` request (accepting the Payee party) is required to continue the operation. + The Payment Manager will then proceed to the quotation stage. + - If the configuration variable `AUTO_ACCEPT_QUOTES` is set to `"false"`, this method will terminate and return the quotation when it has been received from the Payee DFSP. + If the Payee wishes to proceed with the transfer, then a subsequent `PUT /sendmoney/{transferId}` request (accepting the quote) is required to continue the operation. + The Payment Manager will then proceed to the transfer state. + If the configuration variables `AUTO_ACCEPT_PARTY` and `AUTO_ACCEPT_QUOTES` are both set to `"true"`, this method will block until all three transfer stages are complete. + Upon completion, it will return the entire set of transfer details received during the operation. + Combinations of settings for `AUTO_ACCEPT...` configuration variables allow the Payment Manager user to decide which mode of operation best suits their use cases. i.e., the Payment Manager can be configured to "break" the three-stage transfer at these points in order to execute backend logic such as party verification, quoted fees assessments, etc. + tags: + - sendmoney + requestBody: + description: Transfer request body + content: + application/json: + schema: + $ref: '#/components/schemas/transferRequest' + required: true + responses: + 200: + $ref: '#/components/responses/transferSuccess' + 400: + $ref: '#/components/responses/transferBadRequest' + 500: + $ref: '#/components/responses/transferServerError' + 504: + $ref: '#/components/responses/transferTimeout' + + /sendmoney/{transferId}: + put: + summary: Continues a transfer that has paused at the party lookup and/or quote stage in order to accept or reject Payee party and/or quote + operationId: putSendMoneyByTransferId + description: > + The HTTP request `PUT /sendmoney/{transferId}` is used by the Payer DFSP to continue a transfer initiated via the `POST /sendmoney` method that has halted after party lookup and/or quotation stage. + The request body should contain either the "acceptParty" or "acceptQuote" property set to `true` as required to continue the transfer. + See the description of the `POST /sendmoney` HTTP method for more information on modes of transfer. + tags: + - sendmoney + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/transferContinuationAccept' +# oneOf: +# - $ref: '#/components/schemas/transferContinuationAcceptParty' +# - $ref: '#/components/schemas/transferContinuationAcceptQuote' + parameters: + - $ref: '#/components/parameters/transferId' + responses: + 200: + $ref: '#/components/responses/transferSuccess' + 500: + $ref: '#/components/responses/transferServerError' + 504: + $ref: '#/components/responses/transferTimeout' + + #Inbound API (Mojaloop Switch → Payment Manager → Payee DFSP) + /parties/{idType}/{idValue}: + get: + summary: Requests information relating to a transfer party identified by the specified identifier type and value + operationId: getPartiesByIdTypeIdValue + description: The HTTP request `GET /parties/{idType}/{idValue}` is sent to the Payee DFSP, and it is used to look up information regarding the requested transfer party, identified by `{idType}` and `{idValue}`. + tags: + - parties + parameters: + - $ref: '#/components/parameters/idType' + - $ref: '#/components/parameters/idValue' + responses: + 200: + description: Response containing details of the requested party + content: + application/json: + schema: + $ref: '#/components/schemas/transferPartyInbound' + 400: + $ref: '#/components/responses/400' + 404: + $ref: '#/components/responses/404' + 500: + $ref: '#/components/responses/500' + + /quoterequests: + post: + summary: Requests a quote for the specified transfer + operationId: postQuoteRequests + description: The HTTP request `POST /quoterequests` is sent to the Payee DFSP, and it is used to request the creation of a quote for the provided financial transaction. + tags: + - quoterequests + requestBody: + description: Request for a transfer quotation + content: + application/json: + schema: + $ref: '#/components/schemas/quoteRequest' + responses: + 200: + description: A response to the transfer quotation request + content: + application/json: + schema: + $ref: '#/components/schemas/quoteResponse' + 400: + $ref: '#/components/responses/400' + 500: + $ref: '#/components/responses/500' + + /transfers: + post: + summary: Transfers funds from an external account to an internal account + operationId: postTransfers + description: The HTTP request `POST /transfers` is sent to the Payee DFSP, and it is used to request the creation of a transfer for the transfer party. + tags: + - transfers + requestBody: + description: An incoming transfer request + content: + application/json: + schema: + $ref: '#/components/schemas/transferRequestInbound' + responses: + 200: + description: The transfer was accepted + content: + application/json: + schema: + $ref: '#/components/schemas/transferResponseInbound' + 400: + $ref: '#/components/responses/400' + 500: + $ref: '#/components/responses/500' + + /transfers/{transferId}: + put: + summary: Provides a notification about the success/failure of a specific transfer + operationId: putTransfersByTransferId + description: The HTTP request `PUT /transfers/{transferId}` is sent to the Payee DFSP, and it is used to notify the Payee DFSP about the final state of a transfer, to indicate whether the transfer has been committed or aborted in the Switch. + tags: + - transfers + parameters: + - $ref: '#/components/parameters/transferId' + requestBody: + description: An incoming notification for a fulfilled transfer + content: + application/json: + schema: + $ref: '#/components/schemas/fulfilNotification' + responses: + 200: + description: The notification was accepted + content: + application/json: + schema: + $ref: '#/components/schemas/transferResponseInbound' + 500: + $ref: '#/components/responses/500' + + +components: + schemas: + + amountType: + type: string + enum: + - SEND + - RECEIVE + description: SEND for send amount. RECEIVE for receive amount. + + currency: + maxLength: 3 + minLength: 3 + type: string + enum: + - AED + - AFN + - ALL + - AMD + - ANG + - AOA + - ARS + - AUD + - AWG + - AZN + - BAM + - BBD + - BDT + - BGN + - BHD + - BIF + - BMD + - BND + - BOB + - BRL + - BSD + - BTN + - BWP + - BYN + - BZD + - CAD + - CDF + - CHF + - CLP + - CNY + - COP + - CRC + - CUC + - CUP + - CVE + - CZK + - DJF + - DKK + - DOP + - DZD + - EGP + - ERN + - ETB + - EUR + - FJD + - FKP + - GBP + - GEL + - GGP + - GHS + - GIP + - GMD + - GNF + - GTQ + - GYD + - HKD + - HNL + - HRK + - HTG + - HUF + - IDR + - ILS + - IMP + - INR + - IQD + - IRR + - ISK + - JEP + - JMD + - JOD + - JPY + - KES + - KGS + - KHR + - KMF + - KPW + - KRW + - KWD + - KYD + - KZT + - LAK + - LBP + - LKR + - LRD + - LSL + - LYD + - MAD + - MDL + - MGA + - MKD + - MMK + - MNT + - MOP + - MRO + - MUR + - MVR + - MWK + - MXN + - MYR + - MZN + - NAD + - NGN + - NIO + - NOK + - NPR + - NZD + - OMR + - PAB + - PEN + - PGK + - PHP + - PKR + - PLN + - PYG + - QAR + - RON + - RSD + - RUB + - RWF + - SAR + - SBD + - SCR + - SDG + - SEK + - SGD + - SHP + - SLL + - SOS + - SPL + - SRD + - STD + - SVC + - SYP + - SZL + - THB + - TJS + - TMT + - TND + - TOP + - TRY + - TTD + - TVD + - TWD + - TZS + - UAH + - UGX + - USD + - UYU + - UZS + - VEF + - VND + - VUV + - WST + - XAF + - XCD + - XDR + - XOF + - XPF + - XTS + - XXX + - YER + - ZAR + - ZMW + - ZWD + + dateShort: + type: string + pattern: ^(?:[1-9]\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\d|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-02-29)$ + description: Date in the form YYYY-MM-DD. + + errorCode: + title: ErrorCode + type: string + pattern: '^[1-9]\d{3}$' + description: > + The API data type errorCode is a JSON String of four characters, + consisting of digits only. Negative numbers are not allowed. A leading + zero is not allowed. Each error code in the API is a four-digit number, + for example, 1234, where the first number (1 in the example) represents + the high-level error category, the second number (2 in the example) + represents the low-level error category, and the last two numbers (34 in + the example) represents the specific error. + + errorDescription: + title: ErrorDescription + type: string + minLength: 1 + maxLength: 128 + description: Error description string. + + errorInformation: + title: ErrorInformation + type: object + description: A Mojaloop API error information construct. + properties: + errorCode: + $ref: '#/components/schemas/errorCode' + errorDescription: + $ref: '#/components/schemas/errorDescription' + extensionList: + $ref: '#/components/schemas/extensionListComplex' + required: + - errorCode + - errorDescription + + errorResponse: + type: object + properties: + statusCode: + type: string + pattern: ^[1-9]\d{2,3}$ + description: Error code as string. + message: + type: string + maxLength: 4096 + description: Error message text. + + errorTransferResponse: + allOf: + - $ref: '#/components/schemas/errorResponse' + - type: object + required: + - transferState + properties: + transferState: + $ref: '#/components/schemas/transferResponse' + + extensionItem: + type: object + properties: + key: + type: string + minLength: 1 + maxLength: 32 + value: + type: string + minLength: 1 + maxLength: 128 + + extensionList: + type: array + items: + $ref: '#/components/schemas/extensionItem' + minItems: 0 + maxItems: 16 + + extensionListComplex: + type: object + description: Data model for the complex type ExtensionList + properties: + extension: + type: array + items: + $ref: '#/components/schemas/extensionItem' + minItems: 1 + maxItems: 16 + description: Number of Extension elements + required: + - extension + + fspId: + type: string + minLength: 1 + maxLength: 32 + description: FSP with which the party is associated. + + fulfilNotification: + title: TransfersIDPatchResponse + type: object + description: PUT /transfers/{transferId} object + properties: + transferId: + $ref: '#/components/schemas/transferId' + direction: + type: string + enum: + - INBOUND + quoteRequest: + type: object + properties: + headers: + type: object + body: + $ref: '#/components/schemas/mojaloopQuoteRequestObject' + quoteResponse: + type: object + properties: + headers: + type: object + body: + type: string +# $ref: '#/components/schemas/mojaloopQuoteResponseObject' +# type: object + prepare: + type: object + properties: + body: + type: object + properties: + transferId: + $ref: '#/components/schemas/transferId' + payeeFsp: + $ref: '#/components/schemas/fspId' + payerFsp: + $ref: '#/components/schemas/fspId' + amount: + $ref: '#/components/schemas/mojaloopMoney' + ilpPacket: + $ref: '#/components/schemas/ilpPacket' + condition: + $ref: '#/components/schemas/ilpCondition' + expiration: + $ref: '#/components/schemas/timestamp' + extensionList: + $ref: '#/components/schemas/extensionList' + required: + - amount + headers: + type: object + fulfil: + type: object + properties: + headers: + type: object + body: + type: string +# type: object +# properties: +# completedTimestamp: +# $ref: '#/components/schemas/timestamp' +# transferState: +# $ref: '#/components/schemas/mojaloopTransferState' +# fulfilment: +# $ref: '#/components/schemas/ilpFulfilment' +# extensionList: +# $ref: '#/components/schemas/extensionList' + quote: + type: object + properties: + request: + $ref: '#/components/schemas/mojaloopQuoteRequestObject' + internalRequest: + $ref: '#/components/schemas/quoteRequest' + response: + $ref: '#/components/schemas/quoteResponse' + mojaloopResponse: + $ref: '#/components/schemas/mojaloopQuoteResponseObject' + fulfilment: + $ref: '#/components/schemas/ilpFulfilment' + currentState: + $ref: '#/components/schemas/transferStatus' + lastError: + $ref: '#/components/schemas/transferError' + initiatedTimestamp: + $ref: '#/components/schemas/timestamp' + finalNotification: + type: object + properties: + completedTimestamp: + $ref: '#/components/schemas/timestamp' + transferState: + $ref: '#/components/schemas/transferState' + extensionList: + $ref: '#/components/schemas/extensionList' + required: + - completedTimestamp + - transferState + + geoCode: + type: object + description: > + Data model for the Mojaloop API complex type GeoCode. Indicates a geographic location + properties: + latitude: + $ref: '#/components/schemas/latitude' + longitude: + $ref: '#/components/schemas/longitude' + required: + - latitude + - longitude + + homeTransactionId: + type: string + maxLength: 255 + description: Transaction ID from the DFSP backend, used to reconcile transactions between the Switch and DFSP backend systems. + + idType: + type: string + enum: + - MSISDN + - ACCOUNT_ID + description: Below are the allowed values for the enumeration. + + - MSISDN - An MSISDN (Mobile Station International Subscriber Directory Number, that is, the phone number) is used as reference to a participant. The MSISDN identifier should be in international format according to the [ITU-T E.164 standard](https://www.itu.int/rec/T-REC-E.164/en). Optionally, the MSISDN may be prefixed by a single plus sign, indicating the international prefix. + - ACCOUNT_ID - A bank account number or FSP account ID should be used as reference to a participant. The ACCOUNT_ID identifier can be in any format, as formats can greatly differ depending on country and FSP. + + idValue: + type: string + pattern: '^[A-Za-z0-9]{4,125}$' + minLength: 4 + maxLength: 125 + description: Identifier of the party. + + ilpCondition: + type: string + pattern: '^[A-Za-z0-9-_]{43}$' + maxLength: 48 + description: Condition that must be attached to the transfer by the Payer. + + ilpFulfilment: + type: string + pattern: '^[A-Za-z0-9-_]{43}$' + maxLength: 48 + description: Fulfilment that must be attached to the transfer by the Payee. + + ilpPacket: + type: string + pattern: '^[A-Za-z0-9-_]+[=]{0,2}$' + minLength: 1 + maxLength: 32768 + description: Information for recipient (transport layer information). + + initiator: + type: string + enum: + - PAYER + - PAYEE + description: Specifies if the initiator of the transfer is the Payer or Payee. + + initiatorType: + type: string + enum: + - CONSUMER + - AGENT + - BUSINESS + - DEVICE + description: > + Below are the allowed values for the enumeration + - CONSUMER Consumer is the initiator of the transaction. Example - peer-to-peer transfer or loan repayment from wallet. + - AGENT Agent is the initiator of the transaction. Example - loan repayment via an agent. + - BUSINESS Business is the initiator of the transaction. Example - loan disbursement. + - DEVICE Device is the initiator of the transaction. Example - merchant-initiated merchant payment authorized on POS. + + latitude: + type: string + pattern: >- + ^(\+|-)?(?:90(?:(?:\.0{1,6})?)|(?:[0-9]|[1-8][0-9])(?:(?:\.[0-9]{1,6})?))$ + description: > + The API data type Latitude is a JSON String in a lexical format that is + restricted by a regular expression for interoperability reasons. + + longitude: + type: string + pattern: >- + ^(\+|-)?(?:180(?:(?:\.0{1,6})?)|(?:[0-9]|[1-9][0-9]|1[0-7][0-9])(?:(?:\.[0-9]{1,6})?))$ + description: >- + The API data type Longitude is a JSON String in a lexical format that is + restricted by a regular expression for interoperability reasons. + + merchantClassificationCode: + type: string + pattern: ^[\d]{1,4}$ + description: Up to 4 digits specifying the sender's merchant classification, if known and applicable. + + mojaloopError: + type: object + properties: + errorInformation: + $ref: '#/components/schemas/errorInformation' + + mojaloopIdentifier: + pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + type: string + description: A Mojaloop API identifier (UUID). + + mojaloopMoney: + title: Money + type: object + description: Data model for the Mojaloop API complex type Money. + properties: + currency: + $ref: '#/components/schemas/currency' + amount: + $ref: '#/components/schemas/money' + required: + - currency + - amount + + mojaloopQuoteRequestObject: + type: object + properties: + quoteId: + $ref: '#/components/schemas/quoteId' + transactionId: + $ref: '#/components/schemas/transactionId' + amountType: + $ref: '#/components/schemas/amountType' + amount: + $ref: '#/components/schemas/mojaloopMoney' + fees: + $ref: '#/components/schemas/mojaloopMoney' + expiration: + $ref: '#/components/schemas/timestamp' + payer: + $ref: '#/components/schemas/Party' + payee: + $ref: '#/components/schemas/Party' + transactionType: + $ref: '#/components/schemas/mojaloopTransactionType' + note: + type: string + minLength: 1 + maxLength: 128 + description: An optional note associated with the requested transfer. + extensionList: + $ref: '#/components/schemas/extensionList' + required: + - quoteId + - transactionId + - amountType + - amount + - payee + - payer + - transactionType + + mojaloopQuoteResponseObject: + type: object + properties: + transferAmount: + $ref: '#/components/schemas/mojaloopMoney' + expiration: + $ref: '#/components/schemas/timestamp' + ilpPacket: + $ref: '#/components/schemas/ilpPacket' + condition: + $ref: '#/components/schemas/ilpCondition' + payeeReceiveAmount: + $ref: '#/components/schemas/mojaloopMoney' + payeeFspFee: + $ref: '#/components/schemas/mojaloopMoney' + payeeFspCommission: + $ref: '#/components/schemas/mojaloopMoney' + geoCode: + $ref: '#/components/schemas/geoCode' + extensionList: + $ref: '#/components/schemas/extensionList' + required: + - transferAmount + - expiration + - ilpPacket + - condition + + mojaloopTransactionType: + title: mojaloopTransactionType + type: object + description: Data model for the complex type mojaloopTransactionType. + properties: + scenario: + $ref: '#/components/schemas/TransactionScenario' + subScenario: + type: string + pattern: ^[A-Z_]{1,32}$ + description: Possible sub-scenario, defined locally within the scheme (UndefinedEnum Type). + initiator: + $ref: '#/components/schemas/initiator' + initiatorType: + $ref: '#/components/schemas/initiatorType' + required: + - scenario + - initiator + - initiatorType + + mojaloopTransferState: + type: string + enum: + - RECEIVED + - RESERVED + - COMMITTED + - ABORTED + description: > + Below are the allowed values for the enumeration + - RECEIVED The Switch has received the transfer. + - RESERVED The Switch has reserved the transfer. + - COMMITTED The Switch has successfully performed the transfer. + - ABORTED The Switch has aborted the transfer due a rejection or failure to perform the transfer. + + money: + pattern: ^([0]|([1-9][0-9]{0,17}))([.][0-9]{0,3}[1-9])?$ + type: string + + Party: + title: Party + type: object + description: Data model for the complex type Party. + properties: + partyIdInfo: + $ref: '#/components/schemas/PartyIdInfo' + merchantClassificationCode: + $ref: '#/components/schemas/merchantClassificationCode' + name: + $ref: '#/components/schemas/partyName' + personalInfo: + $ref: '#/components/schemas/PartyPersonalInfo' + required: + - partyIdInfo + + PartyComplexName: + title: PartyComplexName + type: object + description: Data model for the complex type PartyComplexName. + properties: + firstName: + $ref: '#/components/schemas/partyName' + middleName: + $ref: '#/components/schemas/partyName' + lastName: + $ref: '#/components/schemas/partyName' + + PartyIdInfo: + title: PartyIdInfo + type: object + description: Data model for the complex type PartyIdInfo. + properties: + partyIdType: + $ref: '#/components/schemas/idType' + partyIdentifier: + type: string + minLength: 1 + maxLength: 128 + description: An identifier for the Party. + partySubIdOrType: + type: string + minLength: 1 + maxLength: 128 + description: A sub-identifier or sub-type for the Party. + fspId: + $ref: '#/components/schemas/fspId' + extensionList: + $ref: '#/components/schemas/extensionList' + required: + - partyIdType + - partyIdentifier + + partyName: + type: string + minLength: 1 + maxLength: 128 + + PartyPersonalInfo: + title: PartyPersonalInfo + type: object + description: Data model for the complex type PartyPersonalInfo. + properties: + complexName: + $ref: '#/components/schemas/PartyComplexName' + dateOfBirth: + $ref: '#/components/schemas/dateShort' + + payerType: + type: string + enum: + - CONSUMER + - AGENT + - BUSINESS + - DEVICE + description: > + Below are the allowed values for the enumeration + - CONSUMER Consumer is the initiator of the transaction. Example - peer-to-peer transfer or loan repayment from wallet. + - AGENT Agent is the initiator of the transaction. Example - loan repayment via an agent. + - BUSINESS Business is the initiator of the transaction. Example - loan disbursement. + - DEVICE Device is the initiator of the transaction. Example - merchant-initiated merchant payment authorized on POS. + + quote: + type: object + description: Mojaloop API response to a quote request + properties: + transferAmount: + $ref: '#/components/schemas/mojaloopMoney' + payeeReceiveAmount: + $ref: '#/components/schemas/mojaloopMoney' + payeeFspFee: + $ref: '#/components/schemas/mojaloopMoney' + payeeFspCommission: + $ref: '#/components/schemas/mojaloopMoney' + expiration: + $ref: '#/components/schemas/timestamp' + geoCode: + $ref: '#/components/schemas/geoCode' + ilpPacket: + $ref: '#/components/schemas/ilpPacket' + condition: + $ref: '#/components/schemas/ilpCondition' + extensionList: + $ref: '#/components/schemas/extensionListComplex' + required: + - transferAmount + - expiration + - ilpPacket + - condition + + quoteId: + pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + type: string + description: A Mojaloop API quote identifier (UUID). + + quoteRequest: + type: object + description: A request for a quote for transfer from the DFSP backend. + required: + - quoteId + - transactionId + - to + - from + - amountType + - amount + - currency + - transactionType + - initiator + - initiatorType + properties: + quoteId: + $ref: '#/components/schemas/quoteId' + transactionId: + $ref: '#/components/schemas/transactionId' + to: + $ref: '#/components/schemas/transferPartyInbound' + from: + $ref: '#/components/schemas/transferPartyInbound' + amountType: + $ref: '#/components/schemas/amountType' + amount: + $ref: '#/components/schemas/money' + currency: + $ref: '#/components/schemas/currency' + feesAmount: + $ref: '#/components/schemas/money' + feesCurrency: + $ref: '#/components/schemas/currency' + transactionType: + $ref: '#/components/schemas/transactionType' + initiator: + $ref: '#/components/schemas/initiator' + initiatorType: + $ref: '#/components/schemas/initiatorType' + geoCode: + $ref: '#/components/schemas/geoCode' + note: + type: string + minLength: 1 + maxLength: 128 + description: An optional note associated with the requested transfer. + expiration: + $ref: '#/components/schemas/timestamp' + + quoteResponse: + type: object + description: A response to a request for a quote. + required: + - quoteId + - transactionId + - transferAmount + - transferAmountCurrency + properties: + quoteId: + $ref: '#/components/schemas/quoteId' + transactionId: + $ref: '#/components/schemas/transactionId' + transferAmount: + $ref: '#/components/schemas/money' + transferAmountCurrency: + $ref: '#/components/schemas/currency' + payeeReceiveAmount: + $ref: '#/components/schemas/money' + payeeReceiveAmountCurrency: + $ref: '#/components/schemas/currency' + payeeFspFeeAmount: + $ref: '#/components/schemas/money' + payeeFspFeeAmountCurrency: + $ref: '#/components/schemas/currency' + payeeFspCommissionAmount: + $ref: '#/components/schemas/money' + payeeFspCommissionAmountCurrency: + $ref: '#/components/schemas/currency' + expiration: + $ref: '#/components/schemas/timestamp' + geoCode: + $ref: '#/components/schemas/geoCode' + extensionList: + $ref: '#/components/schemas/extensionList' + + timestamp: + type: string + pattern: ^(?:[1-9]\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\d|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-02-29)T(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:(\.\d{3}))(?:Z|[+-][01]\d:[0-5]\d)$ + description: An ISO-8601 formatted timestamp. + + transactionId: + pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + type: string + description: ID of the transaction, the ID is decided by the Payer FSP during the creation of the quote. + + TransactionScenario: + title: TransactionScenario + type: string + enum: + - DEPOSIT + - WITHDRAWAL + - TRANSFER + - PAYMENT + - REFUND + description: Below are the allowed values for the enumeration. + + - DEPOSIT - Used for performing a Cash-In (deposit) transaction. In a normal scenario, electronic funds are transferred from a Business account to a Consumer account, and physical cash is given from the Consumer to the Business User. + - WITHDRAWAL - Used for performing a Cash-Out (withdrawal) transaction. In a normal scenario, electronic funds are transferred from a Consumer’s account to a Business account, and physical cash is given from the Business User to the Consumer. + - TRANSFER - Used for performing a P2P (Peer to Peer, or Consumer to Consumer) transaction. + - PAYMENT - Usually used for performing a transaction from a Consumer to a Merchant or Organization, but could also be for a B2B (Business to Business) payment. The transaction could be online for a purchase in an Internet store, in a physical store where both the Consumer and Business User are present, a bill payment, a donation, and so on. + - REFUND - Used for performing a refund of transaction. + + transactionType: + type: string + enum: + - LOAN_REPAYMENT + - SAVINGS_DEPOSIT + - TRANSFER + description: Type of transaction. Below are the allowed values for the enumeration. + + - LOAN_REPAYMENT - Used in the loan repayment use case when the loan repayment goes to a loan account. + - SAVINGS_DEPOSIT - Used in the loan repayment use case when the loan repayment goes to a savings account. + - TRANSFER - Used in the loan disbursement use case. + + # transferContinuationAcceptParty: + # type: object + # required: + # - acceptParty + # properties: + # acceptParty: + # type: boolean + # enum: + # - true + # - false + # amount: + # $ref: '#/components/schemas/money' + # to: + # $ref: '#/components/schemas/transferParty' + + # transferContinuationAcceptQuote: + # type: object + # required: + # - acceptQuote + # properties: + # acceptQuote: + # type: boolean + # enum: + # - true + # - false + # amount: + # $ref: '#/components/schemas/money' + # to: + # $ref: '#/components/schemas/transferParty' + + transferContinuationAccept: + type: object + properties: + acceptQuote: + type: boolean + enum: + - true + - false + acceptParty: + type: boolean + enum: + - true + - false + amount: + $ref: '#/components/schemas/money' + to: + $ref: '#/components/schemas/transferParty' + + transferError: + type: object + description: This object represents a Mojaloop API error received at any time during the transfer process + properties: + httpStatusCode: + type: integer + description: The HTTP status code returned to the caller. This is the same as the actual HTTP status code returned with the response. + mojaloopError: + $ref: '#/components/schemas/mojaloopError' + + transferFulfilment: + type: object + description: A Mojaloop API transfer fulfilment + properties: + fulfilment: + $ref: '#/components/schemas/ilpFulfilment' + completedTimestamp: + $ref: '#/components/schemas/timestamp' + transferState: + $ref: '#/components/schemas/mojaloopTransferState' + extensionList: + $ref: '#/components/schemas/extensionListComplex' + required: + - transferState + + transferId: + pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + type: string + description: A Mojaloop API transfer identifier (UUID). + + transferParty: + type: object + required: + - idType + - idValue + properties: + type: + $ref: '#/components/schemas/payerType' + idType: + $ref: '#/components/schemas/idType' + idValue: + $ref: '#/components/schemas/idValue' + displayName: + $ref: '#/components/schemas/partyName' + firstName: + $ref: '#/components/schemas/partyName' + middleName: + $ref: '#/components/schemas/partyName' + lastName: + $ref: '#/components/schemas/partyName' + dateOfBirth: + $ref: '#/components/schemas/dateShort' + merchantClassificationCode: + $ref: '#/components/schemas/merchantClassificationCode' + fspId: + $ref: '#/components/schemas/fspId' + extensionList: + $ref: '#/components/schemas/extensionList' + + transferPartyInbound: + type: object + required: + - idType + - idValue + properties: + type: + $ref: '#/components/schemas/payerType' + idType: + $ref: '#/components/schemas/idType' + idValue: + type: string + description: The identifier string used to identify the sender. + displayName: + $ref: '#/components/schemas/partyName' + firstName: + $ref: '#/components/schemas/partyName' + middleName: + $ref: '#/components/schemas/partyName' + lastName: + $ref: '#/components/schemas/partyName' + dateOfBirth: + $ref: '#/components/schemas/dateShort' + merchantClassificationCode: + $ref: '#/components/schemas/merchantClassificationCode' + fspId: + $ref: '#/components/schemas/fspId' + extensionList: + $ref: '#/components/schemas/extensionList' + + transferRequest: + type: object + required: + - homeTransactionId + - from + - to + - amountType + - currency + - amount + - transactionType + properties: + homeTransactionId: + $ref: '#/components/schemas/homeTransactionId' + from: + $ref: '#/components/schemas/transferParty' + to: + $ref: '#/components/schemas/transferParty' + amountType: + $ref: '#/components/schemas/amountType' + currency: + $ref: '#/components/schemas/currency' + amount: + $ref: '#/components/schemas/money' + transactionType: + $ref: '#/components/schemas/transactionType' + note: + maxLength: 128 + type: string + quoteRequestExtensions: + $ref: '#/components/schemas/extensionList' + transferRequestExtensions: + $ref: '#/components/schemas/extensionList' + + transferRequestInbound: + type: object + required: + - transferId + - quote + - from + - to + - amountType + - currency + - amount + - transactionType + properties: + transferId: + $ref: '#/components/schemas/transferId' + quote: + $ref: '#/components/schemas/quoteResponse' + from: + $ref: '#/components/schemas/transferPartyInbound' + to: + $ref: '#/components/schemas/transferPartyInbound' + amountType: + $ref: '#/components/schemas/amountType' + currency: + $ref: '#/components/schemas/currency' + amount: + $ref: '#/components/schemas/money' + transactionType: + $ref: '#/components/schemas/transactionType' + note: + maxLength: 128 + type: string + + transferResponse: + type: object + required: + - homeTransactionId + - from + - to + - amountType + - currency + - amount + - transactionType + properties: + transferId: + $ref: '#/components/schemas/mojaloopIdentifier' + homeTransactionId: + $ref: '#/components/schemas/homeTransactionId' + from: + $ref: '#/components/schemas/transferParty' + to: + $ref: '#/components/schemas/transferParty' + amountType: + $ref: '#/components/schemas/amountType' + currency: + $ref: '#/components/schemas/currency' + amount: + $ref: '#/components/schemas/money' + transactionType: + $ref: '#/components/schemas/transactionType' + note: + maxLength: 128 + type: string + currentState: + $ref: '#/components/schemas/transferStatus' + quoteId: + $ref: '#/components/schemas/mojaloopIdentifier' + quoteResponse: + $ref: '#/components/schemas/quote' + quoteResponseSource: + $ref: '#/components/schemas/fspId' + fulfil: + $ref: '#/components/schemas/transferFulfilment' + lastError: + $ref: '#/components/schemas/transferError' + + transferResponseInbound: + type: object + #required: + #- homeTransactionId + properties: + homeTransactionId: + $ref: '#/components/schemas/homeTransactionId' + + transferState: + type: string + enum: + - COMMITTED + - ABORTED + description: > + Below are the allowed values for the enumeration + - COMMITTED The transfer has been committed in the Switch. The Payee DFSP responds to the `COMMITTED` state with an HTTP 200 message, and then marks the transfer as completed. in its internal records. + - ABORTED The transfer has been aborted in the Switch. The Payee DFSP responds to the `ABORTED` state with an HTTP 200 message, and then aborts the transfer in its internal records. + + transferStatus: + type: string + enum: + - ERROR_OCCURRED + - WAITING_FOR_PARTY_ACCEPTANCE + - WAITING_FOR_QUOTE_ACCEPTANCE + - COMPLETED + description: > + Below are the allowed values for the enumeration + - ERROR_OCCURRED An error has occurred during the transfer process. + - WAITING_FOR_PARTY_ACCEPTANCE `AUTO_ACCEPT_PARTY` is set to "false" and party information has been returned, waiting to be accepted by the Payer DFSP using a `PUT /sendmoney/{transferId}` request. + - WAITING_FOR_QUOTE_ACCEPTANCE `AUTO_ACCEPT_QUOTE` is set to "false" and quote information has been returned, waiting to be accepted by the Payer DFSP using a `PUT /sendmoney/{transferId}` request. + - COMPLETED The transfer has completed successfully. + + responses: + '400': + description: Malformed or missing required headers or parameters + content: + application/json: + schema: + $ref: '#/components/schemas/errorResponse' + '404': + description: The party specified by the provided identifier type and value is not known to the server + '500': + description: An error occurred processing the request + content: + application/json: + schema: + $ref: '#/components/schemas/errorResponse' + transferSuccess: + description: Transfer completed successfully + content: + application/json: + schema: + $ref: '#/components/schemas/transferResponse' + transferBadRequest: + description: Malformed or missing required body, headers or parameters + content: + application/json: + schema: + $ref: '#/components/schemas/errorTransferResponse' + transferServerError: + description: An error occurred processing the transfer + content: + application/json: + schema: + $ref: '#/components/schemas/errorTransferResponse' + transferTimeout: + description: Timeout occurred processing the transfer + content: + application/json: + schema: + $ref: '#/components/schemas/errorTransferResponse' + + parameters: + idType: + name: idType + in: path + required: true + schema: + type: string + enum: + - MSISDN + - ACCOUNT_ID + description: Below are the allowed values for the enumeration. + - MSISDN - An MSISDN (Mobile Station International Subscriber Directory Number, that is, the phone number) is used as reference to a participant. The MSISDN identifier should be in international format according to the [ITU-T E.164 standard](https://www.itu.int/rec/T-REC-E.164/en). Optionally, the MSISDN may be prefixed by a single plus sign, indicating the international prefix. + - ACCOUNT_ID - A bank account number or FSP account ID should be used as reference to a participant. The ACCOUNT_ID identifier can be in any format, as formats can greatly differ depending on country and FSP. + + idValue: + name: idValue + in: path + required: true + schema: + type: string + minLength: 1 + maxLength: 128 + description: Identifier of the party. + transferId: + name: transferId + in: path + required: true + schema: + pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + type: string + description: Transfer identifier. \ No newline at end of file diff --git a/test/func/config/ttk-hub/spec_files/api_definitions/settlements_1.0/api_spec.yaml b/test/func/config/ttk-hub/spec_files/api_definitions/settlements_1.0/api_spec.yaml new file mode 100644 index 000000000..3c55eaff2 --- /dev/null +++ b/test/func/config/ttk-hub/spec_files/api_definitions/settlements_1.0/api_spec.yaml @@ -0,0 +1,983 @@ +openapi: 3.0.1 +info: + title: MOJALOOP Central Settlements + description: Mojaloop API for Settlements. + version: 1.1.0 +servers: +- url: /v1 +paths: + /health: + get: + tags: + - getHealth + summary: getHealth + description: Gets the health of the service and sub-services (i.e. database). + operationId: getHealth + responses: + 200: + description: A valid and health service. + content: {} + 502: + description: API is live, but error connecting to required sub-service. + content: {} + deprecated: false + /settlementWindows/{id}: + get: + tags: + - getSettlementWindowById + summary: getSettlementWindowById + description: Returns a Settlement Window by id. + operationId: getSettlementWindowById + parameters: + - name: id + in: path + description: | + A valid settlement window id to be supplied in the query. + required: true + schema: + type: integer + responses: + 200: + description: A settlement window's data returned. + content: + application/json: + schema: + $ref: '#/components/schemas/SettlementWindow' + 400: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + 401: + description: Authorisation information is missing or invalid. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + 404: + description: No data found. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + 415: + description: Unsupported Media Type + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + default: + description: Unexpected error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + deprecated: false + post: + tags: + - closeSettlementWindow + summary: closeSettlementWindow + description: If the settlementWindow is open, it can be closed and a new window + is created. If it is already closed, return an error message. Returns the + new settlement window. + operationId: closeSettlementWindow + parameters: + - name: id + in: path + required: true + schema: + type: integer + requestBody: + description: A JSON object containing settlement window closure info. + content: + application/json: + schema: + $ref: '#/components/schemas/SettlementWindowClosurePayload' + required: true + responses: + 200: + description: Settlement window closed and new window opened. + content: + application/json: + schema: + $ref: '#/components/schemas/SettlementWindow' + 400: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + 401: + description: Authorisation information is missing or invalid. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + 404: + description: No data found. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + 415: + description: Unsupported Media Type. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + default: + description: Unexpected error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + deprecated: false + x-codegen-request-body-name: payload + /settlementWindows: + get: + tags: + - getSettlementWindowsByParams + summary: getSettlementWindowsByParams + description: Returns Settlement Windows as per parameter(s). + operationId: getSettlementWindowsByParams + parameters: + - name: participantId + in: query + description: | + A valid participant Id to filter on. + schema: + type: integer + - name: state + in: query + description: | + A settlement window state to filter on. + schema: + type: string + enum: + - OPEN + - CLOSED + - PENDING_SETTLEMENT + - SETTLED + - ABORTED + - name: fromDateTime + in: query + description: | + The start date for query (relates to central-ledger.settlementWindow.createdDate). Can be used together with `toDateTime'. eg 2017-07-20T17:32:28Z + schema: + type: string + format: date-time + - name: toDateTime + in: query + description: | + The end date for query (relates to central-ledger.settlementWindow.createdDate). Can be used together with `fromDateTime'. eg 2017-07-21T17:32:28Z + schema: + type: string + format: date-time + responses: + 200: + description: Settlement window(s) returned by the filtering parameters. + content: + application/json: + schema: + $ref: '#/components/schemas/SettlementWindows' + 400: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + 401: + description: Authorisation information is missing or invalid. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + 404: + description: No data found. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + 415: + description: Unsupported Media Type. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + default: + description: Unexpected error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + deprecated: false + /settlements: + get: + tags: + - getSettlementsByParams + summary: getSettlementsByParams + description: Returns Settlements as per parameter(s). + operationId: getSettlementsByParams + parameters: + - name: currency + in: query + description: | + A valid currency to filter on. + schema: + type: string + - name: participantId + in: query + description: | + A valid participant Id to filter on. + schema: + type: integer + - name: settlementWindowId + in: query + description: | + A valid Settlement Window Id to filter on. + schema: + type: number + - name: accountId + in: query + description: | + A valid Account Id to filter on. + schema: + type: number + - name: state + in: query + description: "A settlement state to filter on. \n" + schema: + type: string + enum: + - PENDING_SETTLEMENT + - PS_TRANSFERS_RECORDED + - PS_TRANSFERS_RESERVED + - PS_TRANSFERS_COMMITTED + - SETTLING + - SETTLED + - ABORTED + - name: fromDateTime + in: query + description: | + The start date for query (relates to central-ledger.settlement.createdDate). Can be used together with `toDateTime'. eg 2017-07-20T17:32:28Z + schema: + type: string + format: date-time + - name: toDateTime + in: query + description: | + The end date for query (relates to central-ledger.settlement.createdDate). Can be used together with `fromDateTime'. eg 2017-07-21T17:32:28Z + schema: + type: string + format: date-time + - name: fromSettlementWindowDateTime + in: query + description: | + The start date for query (relates to central-ledger.settlementWindow.createdDate). Can be used together with `toDateTime'. eg 2017-07-20T17:32:28Z + schema: + type: string + format: date-time + - name: toSettlementWindowDateTime + in: query + description: | + The end date for query (relates to central-ledger.settlementWindow.createdDate). Can be used together with `fromDateTime'. eg 2017-07-21T17:32:28Z + schema: + type: string + format: date-time + responses: + 200: + description: Settlement window(s) returned by the filtering parameters. + content: + application/json: + schema: + $ref: '#/components/schemas/Settlements' + 400: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + 401: + description: Authorisation information is missing or invalid. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + 404: + description: No data found. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + 415: + description: Unsupported Media Type. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + default: + description: Unexpected error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + deprecated: false + post: + tags: + - createSettlement + summary: createSettlement + description: Trigger the creation of a settlement, that does the calculation + of the net settlement position per participant and marks all transfers in + the affected windows as PENDING_SETTLEMENT. Returned dataset is the net settlement + report for the settlementWindow + operationId: createSettlement + requestBody: + description: A JSON object containing settlement windows to be included. + content: + application/json: + schema: + $ref: '#/components/schemas/SettlementEventPayload' + required: true + responses: + 200: + description: Created settlement with all windows and accounts. + content: + application/json: + schema: + $ref: '#/components/schemas/Settlement' + 400: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + 401: + description: Authorisation information is missing or invalid. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + 404: + description: No data found. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + 415: + description: Unsupported Media Type. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + default: + description: Unexpected error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + deprecated: false + x-codegen-request-body-name: payload + /settlements/{id}: + get: + tags: + - getSettlementById + summary: getSettlementById + description: Returns Settlement(s) as per parameters/filter criteria. + operationId: getSettlementById + parameters: + - name: id + in: path + description: | + A valid Settlement Id. + required: true + schema: + type: integer + responses: + 200: + description: Settlement successfully returned by the filtering/Query parameters. + content: + application/json: + schema: + $ref: '#/components/schemas/Settlement' + 400: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + 401: + description: Authorisation information is missing or invalid. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + 404: + description: No data found. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + 415: + description: Unsupported Media Type. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + default: + description: Unexpected error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + deprecated: false + put: + tags: + - updateSettlementById + summary: updateSettlementById + description: Acknowledgement of settlement by updating with Settlement Id. + operationId: updateSettlementById + parameters: + - name: id + in: path + description: A valid Settlement Id. + required: true + schema: + type: integer + requestBody: + description: A JSON object containing settlement update info. + content: + application/json: + schema: + $ref: '#/components/schemas/SettlementUpdateBySettlementIdPayload' + required: true + responses: + 200: + description: Settlements updated. + content: + application/json: + schema: + $ref: '#/components/schemas/Settlement' + 400: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + 401: + description: Authorisation information is missing or invalid. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + 404: + description: No data found. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + 415: + description: Unsupported Media Type. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + default: + description: Unexpected error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + deprecated: false + x-codegen-request-body-name: payload + /settlements/{settlementId}/participants/{participantId}: + get: + tags: + - getSettlementBySettlementParticipant + summary: getSettlementBySettlementParticipant + description: Returns Settlement(s) as per filter criteria. + operationId: getSettlementBySettlementParticipant + parameters: + - name: settlementId + in: path + description: | + A valid Settlement Id. + required: true + schema: + type: integer + - name: participantId + in: path + description: | + A valid Participant Id. + required: true + schema: + type: integer + responses: + 200: + description: Settlement, settlement windows and settlement accounts returned + by the filtering parameters. + content: + application/json: + schema: + $ref: '#/components/schemas/Settlement' + 400: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + 401: + description: Authorisation information is missing or invalid. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + 404: + description: No data found. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + 415: + description: Unsupported Media Type. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + default: + description: Unexpected error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + deprecated: false + put: + tags: + - updateSettlementBySettlementParticipant + summary: updateSettlementBySettlementParticipant + description: Acknowledgement of settlement by updating with Settlements Id and + Participant Id. + operationId: updateSettlementBySettlementParticipant + parameters: + - name: settlementId + in: path + description: A valid Settlement Id. + required: true + schema: + type: integer + - name: participantId + in: path + description: A valid Participant Id. + required: true + schema: + type: integer + requestBody: + description: A JSON object containing settlement update info. + content: + application/json: + schema: + $ref: '#/components/schemas/SettlementUpdateBySettlementParticipantPayload' + required: true + responses: + 200: + description: Settlements updated. + content: + application/json: + schema: + $ref: '#/components/schemas/Settlement' + 400: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + 401: + description: Authorisation information is missing or invalid. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + 404: + description: No data found. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + 415: + description: Unsupported Media Type. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + default: + description: Unexpected error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + deprecated: false + x-codegen-request-body-name: payload + /settlements/{settlementId}/participants/{participantId}/accounts/{accountId}: + get: + tags: + - getSettlementBySettlementParticipantAccount + summary: getSettlementBySettlementParticipantAccount + description: Returns Settlement(s) as per filter criteria. + operationId: getSettlementBySettlementParticipantAccount + parameters: + - name: settlementId + in: path + description: | + A valid Settlement Id. + required: true + schema: + type: integer + - name: participantId + in: path + description: | + A valid Participant Id. + required: true + schema: + type: integer + - name: accountId + in: path + description: "A valid Account Id. \n" + required: true + schema: + type: integer + responses: + 200: + description: Settlement, settlement windows and settlement accounts returned + by the filtering parameters. + content: + application/json: + schema: + $ref: '#/components/schemas/Settlement' + 400: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + 401: + description: Authorisation information is missing or invalid. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + 404: + description: No data found. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + 415: + description: Unsupported Media Type. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + default: + description: Unexpected error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + deprecated: false + put: + tags: + - updateSettlementBySettlementParticipantAccount + summary: updateSettlementBySettlementParticipantAccount + description: Acknowledgement of settlement by updating the reason and state + by Settlements Id, Participant Id and accounts Id. + operationId: updateSettlementBySettlementParticipantAccount + parameters: + - name: settlementId + in: path + description: A valid Settlement Id. + required: true + schema: + type: integer + - name: participantId + in: path + description: A valid Participant Id. + required: true + schema: + type: integer + - name: accountId + in: path + description: A valid Account Id. + required: true + schema: + type: integer + requestBody: + description: A JSON object containing settlement update info. + content: + application/json: + schema: + $ref: '#/components/schemas/SettlementUpdateBySettlementParticipantAccount' + required: true + responses: + 200: + description: Settlements updated. + content: + application/json: + schema: + $ref: '#/components/schemas/Settlement' + 400: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + 401: + description: Authorisation information is missing or invalid. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + 404: + description: No data found. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + 415: + description: Unsupported Media Type. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + default: + description: Unexpected error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + deprecated: false + x-codegen-request-body-name: payload +components: + schemas: + Account: + type: object + properties: + id: + type: string + description: Account Id + reason: + type: string + description: TBD + state: + type: string + example: PENDING_SETTLEMENT + netSettlementAmount: + $ref: '#/components/schemas/netSettlementAmount' + SettlementUpdateBySettlementIdPayload: + type: object + properties: + state: + type: string + enum: + - ABORTED + - INVALID + reason: + type: string + externalReference: + type: string + participants: + type: array + items: + $ref: '#/components/schemas/SettlementUpdateBySettlementIDOuterPayload' + SettlementUpdateBySettlementIDOuterPayload: + type: object + properties: + id: + type: integer + description: Participant Id + accounts: + type: array + items: + $ref: '#/components/schemas/SettlementUpdateBySettlementIdInnerPayload' + SettlementUpdateBySettlementIdInnerPayload: + type: object + properties: + id: + type: integer + description: Participant Currency Id + reason: + type: string + example: reason + state: + type: string + example: SETTLED + enum: + - PENDING_SETTLEMENT + - PS_TRANSFERS_RECORDED + - PS_TRANSFERS_RESERVED + - PS_TRANSFERS_COMMITTED + - SETTLED + externalReference: + type: string + example: external-reference-abc123 + SettlementUpdateBySettlementParticipantPayload: + type: object + properties: + accounts: + type: array + items: + $ref: '#/components/schemas/SettlementUpdateBySettlementIdInnerPayload' + Accounts: + type: object + properties: + id: + type: integer + description: Participant Currency Id + reason: + type: string + description: TBD + state: + type: string + example: PENDING_SETTLEMENT + netSettlementAmount: + $ref: '#/components/schemas/netSettlementAmount' + SettlementWindowClosurePayload: + required: + - reason + - state + type: object + properties: + state: + type: string + example: CLOSED + enum: + - CLOSED + reason: + type: string + example: string + SettlementUpdateBySettlementParticipantAccount: + required: + - reason + - state + type: object + properties: + state: + type: string + example: SETTLED + enum: + - PENDING_SETTLEMENT + - PS_TRANSFERS_RECORDED + - PS_TRANSFERS_RESERVED + - PS_TRANSFERS_COMMITTED + - SETTLED + reason: + type: string + example: string + externalReference: + type: string + example: external-reference-abc123 + SettlementEventPayload: + required: + - reason + - settlementWindows + type: object + properties: + reason: + type: string + settlementWindows: + minItems: 1 + uniqueItems: true + type: array + items: + $ref: '#/components/schemas/SettlementWindowId' + SettlementWindowId: + required: + - id + type: object + properties: + id: + type: integer + SettlementWindow: + required: + - createdDate + - id + - state + type: object + properties: + id: + type: integer + reason: + type: string + state: + type: string + createdDate: + type: string + changedDate: + type: string + SettlementWindows: + type: array + items: + $ref: '#/components/schemas/SettlementWindow' + netSettlementAmount: + type: object + properties: + amount: + type: number + currency: + type: string + Participant: + type: object + properties: + id: + type: integer + accounts: + type: array + items: + $ref: '#/components/schemas/Accounts' + Settlements: + type: array + items: + $ref: '#/components/schemas/Settlement' + Settlement: + type: object + properties: + id: + type: integer + state: + type: string + settlementWindows: + type: array + items: + $ref: '#/components/schemas/SettlementWindows' + participants: + type: array + items: + $ref: '#/components/schemas/Participant' + Error: + required: + - errorInformation + type: object + properties: + errorInformation: + type: object + properties: + errorCode: + type: integer + errorDescription: + type: string + extensionList: + type: object + properties: + extension: + type: array + items: + $ref: '#/components/schemas/Extension' + Extension: + required: + - key + - value + type: object + properties: + key: + type: string + value: + type: string diff --git a/test/func/config/ttk-hub/spec_files/api_definitions/settlements_1.0/mockRef.json b/test/func/config/ttk-hub/spec_files/api_definitions/settlements_1.0/mockRef.json new file mode 100644 index 000000000..9baecf5df --- /dev/null +++ b/test/func/config/ttk-hub/spec_files/api_definitions/settlements_1.0/mockRef.json @@ -0,0 +1,38 @@ +[ + { + "id": "changedDate", + "pattern": "^(19)\\d\\d[-](0[1-9]|1[012])[-](0[1-9]|[12][0-9]|2[0-8])$" + }, + { + "id": "createdDate", + "pattern": "^(19)\\d\\d[-](0[1-9]|1[012])[-](0[1-9]|[12][0-9]|2[0-8])$" + }, + { + "id": "state", + "pattern": "OPEN|CLOSED" + }, + { + "id": "settlementWindows.items.items.createdDate", + "pattern": "^(19)\\d\\d[-](0[1-9]|1[012])[-](0[1-9]|[12][0-9]|2[0-8])$" + }, + { + "id": "settlementWindows.items.items.changedDate", + "pattern": "^(19)\\d\\d[-](0[1-9]|1[012])[-](0[1-9]|[12][0-9]|2[0-8])$" + }, + { + "id": "settlementWindows.items.items.state", + "pattern": "OPEN|CLOSED" + }, + { + "id": "participants.items.accounts.items.state", + "pattern": "OPEN|CLOSED" + }, + { + "id": "participants.items.accounts.items.netSettlementAmount.amount", + "pattern": "123" + }, + { + "id": "participants.items.accounts.items.netSettlementAmount.currency", + "pattern": "USD" + } +] \ No newline at end of file diff --git a/test/func/config/ttk-hub/spec_files/api_definitions/settlements_1.0/response_map.json b/test/func/config/ttk-hub/spec_files/api_definitions/settlements_1.0/response_map.json new file mode 100644 index 000000000..017282b2e --- /dev/null +++ b/test/func/config/ttk-hub/spec_files/api_definitions/settlements_1.0/response_map.json @@ -0,0 +1,34 @@ +{ + "/settlementWindows/{id}": { + "post": { + "response": { + "bodyOverride": { + "id": "{$request.params.id}", + "reason": "{$request.body.reason}" + } + } + } + }, + "/settlementWindows": { + "get": { + "response": {} + } + }, + "/settlements": { + "post": { + "response": { + "bodyOverride": { + } + } + } + }, + "/settlements/{id}": { + "get": { + "response": { + "bodyOverride": { + "id": "{$request.params.id}" + } + } + } + } +} \ No newline at end of file diff --git a/test/func/config/ttk-hub/spec_files/api_definitions/settlements_2.0/api_spec.yaml b/test/func/config/ttk-hub/spec_files/api_definitions/settlements_2.0/api_spec.yaml new file mode 100644 index 000000000..ea13a87eb --- /dev/null +++ b/test/func/config/ttk-hub/spec_files/api_definitions/settlements_2.0/api_spec.yaml @@ -0,0 +1,1001 @@ +openapi: 3.0.1 +info: + title: MOJALOOP Central Settlements + description: Mojaloop API for Settlements. + version: "2.0" +servers: +- url: /v2 +paths: + /health: + get: + tags: + - getHealth + summary: getHealth + description: Gets the health of the service and sub-services (i.e. database). + operationId: getHealth + responses: + 200: + description: A valid and health service. + content: {} + 502: + description: API is live, but error connecting to required sub-service. + content: {} + deprecated: false + /settlementWindows/{id}: + get: + tags: + - getSettlementWindowById + summary: getSettlementWindowById + description: Returns a Settlement Window by id. + operationId: getSettlementWindowById + parameters: + - name: id + in: path + description: | + A valid settlement window id to be supplied in the query. + required: true + schema: + type: integer + responses: + 200: + description: A settlement window's data returned. + content: + application/json: + schema: + $ref: '#/components/schemas/SettlementWindow' + 400: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + 401: + description: Authorisation information is missing or invalid. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + 404: + description: No data found. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + 415: + description: Unsupported Media Type + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + default: + description: Unexpected error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + deprecated: false + post: + tags: + - closeSettlementWindow + summary: closeSettlementWindow + description: Closes requested window and opens a new one. + operationId: closeSettlementWindow + parameters: + - name: id + in: path + required: true + schema: + type: integer + requestBody: + description: A JSON object containing settlement window closure info. + content: + application/json: + schema: + $ref: '#/components/schemas/SettlementWindowClosurePayload' + required: true + responses: + 200: + description: Settlement window closed and new window opened. + content: + application/json: + schema: + $ref: '#/components/schemas/SettlementWindow' + 400: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + 401: + description: Authorisation information is missing or invalid. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + 404: + description: No data found. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + 415: + description: Unsupported Media Type. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + default: + description: Unexpected error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + deprecated: false + x-codegen-request-body-name: payload + /settlementWindows: + get: + tags: + - getSettlementWindowsByParams + summary: getSettlementWindowsByParams + description: Returns Settlement Windows as per parameter(s). + operationId: getSettlementWindowsByParams + parameters: + - name: participantId + in: query + description: | + A valid participant Id to filter on. + schema: + type: integer + - name: state + in: query + description: | + A settlement window state to filter on. + schema: + type: string + enum: + - OPEN + - CLOSED + - PENDING_SETTLEMENT + - SETTLED + - ABORTED + - name: fromDateTime + in: query + description: | + The start date for query (relates to central-ledger.settlementWindow.createdDate). Can be used together with `toDateTime'. eg 2017-07-20T17:32:28Z + schema: + type: string + format: date-time + - name: toDateTime + in: query + description: | + The end date for query (relates to central-ledger.settlementWindow.createdDate). Can be used together with `fromDateTime'. eg 2017-07-21T17:32:28Z + schema: + type: string + format: date-time + - name: currency + in: query + description: | + A valid currency to filter on. + schema: + type: string + responses: + 200: + description: Settlement window(s) returned by the filtering parameters. + content: + application/json: + schema: + $ref: '#/components/schemas/SettlementWindows' + 400: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + 401: + description: Authorisation information is missing or invalid. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + 404: + description: No data found. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + 415: + description: Unsupported Media Type. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + default: + description: Unexpected error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + deprecated: false + /settlements: + get: + tags: + - getSettlementsByParams + summary: getSettlementsByParams + description: Returns Settlements as per parameter(s). + operationId: getSettlementsByParams + parameters: + - name: currency + in: query + description: | + A valid currency to filter on. + schema: + type: string + - name: participantId + in: query + description: | + A valid participant Id to filter on. + schema: + type: integer + - name: settlementWindowId + in: query + description: | + A valid Settlement Window Id to filter on. + schema: + type: number + - name: accountId + in: query + description: | + A valid Account Id to filter on. + schema: + type: number + - name: state + in: query + description: "A settlement state to filter on. \n" + schema: + type: string + enum: + - PENDING_SETTLEMENT + - PS_TRANSFERS_RECORDED + - PS_TRANSFERS_RESERVED + - PS_TRANSFERS_COMMITTED + - SETTLING + - SETTLED + - ABORTED + - name: fromDateTime + in: query + description: | + The start date for query (relates to central-ledger.settlement.createdDate). Can be used together with `toDateTime'. eg 2017-07-20T17:32:28Z + schema: + type: string + format: date-time + - name: toDateTime + in: query + description: | + The end date for query (relates to central-ledger.settlement.createdDate). Can be used together with `fromDateTime'. eg 2017-07-21T17:32:28Z + schema: + type: string + format: date-time + - name: fromSettlementWindowDateTime + in: query + description: | + The start date for query (relates to central-ledger.settlementWindow.createdDate). Can be used together with `toDateTime'. eg 2017-07-20T17:32:28Z + schema: + type: string + format: date-time + - name: toSettlementWindowDateTime + in: query + description: | + The end date for query (relates to central-ledger.settlementWindow.createdDate). Can be used together with `fromDateTime'. eg 2017-07-21T17:32:28Z + schema: + type: string + format: date-time + responses: + 200: + description: Settlement window(s) returned by the filtering parameters. + content: + application/json: + schema: + $ref: '#/components/schemas/Settlements' + 400: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + 401: + description: Authorisation information is missing or invalid. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + 404: + description: No data found. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + 415: + description: Unsupported Media Type. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + default: + description: Unexpected error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + deprecated: false + post: + tags: + - createSettlement + summary: createSettlement + description: Triggers settlement creation. Returns settlement report. + operationId: createSettlement + requestBody: + description: A JSON object containing settlement windows to be included. + content: + application/json: + schema: + $ref: '#/components/schemas/SettlementEventPayload' + required: true + responses: + 200: + description: Created settlement with all windows and accounts. + content: + application/json: + schema: + $ref: '#/components/schemas/Settlement' + 400: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + 401: + description: Authorisation information is missing or invalid. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + 404: + description: No data found. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + 415: + description: Unsupported Media Type. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + default: + description: Unexpected error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + deprecated: false + x-codegen-request-body-name: payload + /settlements/{id}: + get: + tags: + - getSettlementById + summary: getSettlementById + description: Returns Settlement(s) as per parameters/filter criteria. + operationId: getSettlementById + parameters: + - name: id + in: path + description: | + A valid Settlement Id. + required: true + schema: + type: integer + responses: + 200: + description: Settlement successfully returned by the filtering/Query parameters. + content: + application/json: + schema: + $ref: '#/components/schemas/Settlement' + 400: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + 401: + description: Authorisation information is missing or invalid. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + 404: + description: No data found. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + 415: + description: Unsupported Media Type. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + default: + description: Unexpected error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + deprecated: false + put: + tags: + - updateSettlementById + summary: updateSettlementById + description: Acknowledgement of settlement by updating with Settlement Id. + operationId: updateSettlementById + parameters: + - name: id + in: path + description: A valid Settlement Id. + required: true + schema: + type: integer + requestBody: + description: A JSON object containing settlement update info. + content: + application/json: + schema: + $ref: '#/components/schemas/SettlementUpdateBySettlementIdPayload' + required: true + responses: + 200: + description: Settlements updated. + content: + application/json: + schema: + $ref: '#/components/schemas/Settlement' + 400: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + 401: + description: Authorisation information is missing or invalid. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + 404: + description: No data found. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + 415: + description: Unsupported Media Type. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + default: + description: Unexpected error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + deprecated: false + x-codegen-request-body-name: payload + /settlements/{sid}/participants/{pid}: + get: + tags: + - getSettlementBySettlementParticipant + summary: getSettlementBySettlementParticipant + description: Returns Settlement(s) as per filter criteria. + operationId: getSettlementBySettlementParticipant + parameters: + - name: sid + in: path + description: | + A valid Settlement Id. + required: true + schema: + type: integer + - name: pid + in: path + description: | + A valid Participant Id. + required: true + schema: + type: integer + responses: + 200: + description: Settlement, settlement windows and settlement accounts returned + by the filtering parameters. + content: + application/json: + schema: + $ref: '#/components/schemas/Settlement' + 400: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + 401: + description: Authorisation information is missing or invalid. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + 404: + description: No data found. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + 415: + description: Unsupported Media Type. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + default: + description: Unexpected error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + deprecated: false + put: + tags: + - updateSettlementBySettlementParticipant + summary: updateSettlementBySettlementParticipant + description: Acknowledgement of settlement by updating the reason and state + by SP. + operationId: updateSettlementBySettlementParticipant + parameters: + - name: sid + in: path + description: A valid Settlement Id. + required: true + schema: + type: integer + - name: pid + in: path + description: A valid Participant Id. + required: true + schema: + type: integer + requestBody: + description: A JSON object containing settlement update info. + content: + application/json: + schema: + $ref: '#/components/schemas/SettlementUpdateBySettlementParticipantPayload' + required: true + responses: + 200: + description: Settlements updated. + content: + application/json: + schema: + $ref: '#/components/schemas/Settlement' + 400: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + 401: + description: Authorisation information is missing or invalid. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + 404: + description: No data found. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + 415: + description: Unsupported Media Type. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + default: + description: Unexpected error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + deprecated: false + x-codegen-request-body-name: payload + /settlements/{sid}/participants/{pid}/accounts/{aid}: + get: + tags: + - getSettlementBySettlementParticipantAccount + summary: getSettlementBySettlementParticipantAccount + description: Returns Settlement(s) as per filter criteria. + operationId: getSettlementBySettlementParticipantAccount + parameters: + - name: sid + in: path + description: | + A valid Settlement Id. + required: true + schema: + type: integer + - name: pid + in: path + description: | + A valid Participant Id. + required: true + schema: + type: integer + - name: aid + in: path + description: | + A valid Account Id. + required: true + schema: + type: integer + responses: + 200: + description: Settlement, settlement windows and settlement accounts returned + by the filtering parameters. + content: + application/json: + schema: + $ref: '#/components/schemas/Settlement' + 400: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + 401: + description: Authorisation information is missing or invalid. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + 404: + description: No data found. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + 415: + description: Unsupported Media Type. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + default: + description: Unexpected error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + deprecated: false + put: + tags: + - updateSettlementBySettlementParticipantAccount + summary: updateSettlementBySettlementParticipantAccount + description: Acknowledgement of settlement by updating the reason and state + by SPA. + operationId: updateSettlementBySettlementParticipantAccount + parameters: + - name: sid + in: path + description: A valid Settlement Id. + required: true + schema: + type: integer + - name: pid + in: path + description: A valid Participant Id. + required: true + schema: + type: integer + - name: aid + in: path + description: A valid Account Id. + required: true + schema: + type: integer + requestBody: + description: A JSON object containing settlement update info. + content: + application/json: + schema: + $ref: '#/components/schemas/SettlementUpdateBySettlementParticipantAccount' + required: true + responses: + 200: + description: Settlements updated. + content: + application/json: + schema: + $ref: '#/components/schemas/Settlement' + 400: + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + 401: + description: Authorisation information is missing or invalid. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + 404: + description: No data found. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + 415: + description: Unsupported Media Type. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + default: + description: Unexpected error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + deprecated: false + x-codegen-request-body-name: payload +components: + schemas: + SettlementUpdateBySettlementIdPayload: + type: object + properties: + state: + type: string + enum: + - ABORTED + - INVALID + reason: + type: string + externalReference: + type: string + participants: + type: array + items: + $ref: '#/components/schemas/SettlementUpdateBySettlementIDOuterPayload' + SettlementUpdateBySettlementIDOuterPayload: + type: object + properties: + id: + type: integer + description: Participant Id + accounts: + type: array + items: + $ref: '#/components/schemas/SettlementUpdateBySettlementIdInnerPayload' + SettlementUpdateBySettlementIdInnerPayload: + type: object + properties: + id: + type: integer + description: Participant Currency Id + reason: + type: string + example: reason + state: + type: string + example: SETTLED + enum: + - PENDING_SETTLEMENT + - PS_TRANSFERS_RECORDED + - PS_TRANSFERS_RESERVED + - PS_TRANSFERS_COMMITTED + - SETTLED + externalReference: + type: string + example: external-reference-abc123 + SettlementUpdateBySettlementParticipantPayload: + type: object + properties: + accounts: + type: array + items: + $ref: '#/components/schemas/SettlementUpdateBySettlementIdInnerPayload' + Accounts: + type: object + properties: + id: + type: integer + description: Participant Currency Id + reason: + type: string + description: TBD + state: + type: string + example: PENDING_SETTLEMENT + netSettlementAmount: + $ref: '#/components/schemas/netSettlementAmount' + SettlementWindowClosurePayload: + required: + - reason + - state + type: object + properties: + state: + type: string + example: CLOSED + enum: + - CLOSED + reason: + type: string + example: string + SettlementUpdateBySettlementParticipantAccount: + required: + - reason + - state + type: object + properties: + state: + type: string + example: SETTLED + enum: + - PENDING_SETTLEMENT + - PS_TRANSFERS_RECORDED + - PS_TRANSFERS_RESERVED + - PS_TRANSFERS_COMMITTED + - SETTLED + reason: + type: string + example: string + externalReference: + type: string + example: external-reference-abc123 + SettlementEventPayload: + required: + - reason + - settlementModel + - settlementWindows + type: object + properties: + settlementModel: + type: string + reason: + type: string + settlementWindows: + minItems: 1 + uniqueItems: true + type: array + items: + $ref: '#/components/schemas/SettlementWindowId' + SettlementWindowId: + required: + - id + type: object + properties: + id: + type: integer + SettlementWindow: + required: + - createdDate + - id + - state + type: object + properties: + id: + type: integer + reason: + type: string + state: + type: string + createdDate: + type: string + changedDate: + type: string + content: + type: array + items: + $ref: '#/components/schemas/SettlementWindowContent' + SettlementWindowContent: + required: + - createdDate + - currencyId + - id + - ledgerAccountType + - state + type: object + properties: + id: + type: integer + state: + type: string + ledgerAccountType: + type: string + currencyId: + type: string + createdDate: + type: string + changedDate: + type: string + settlementId: + type: integer + SettlementWindows: + type: array + items: + $ref: '#/components/schemas/SettlementWindow' + netSettlementAmount: + type: object + properties: + amount: + type: number + currency: + type: string + Participant: + type: object + properties: + id: + type: integer + accounts: + type: array + items: + $ref: '#/components/schemas/Accounts' + Settlements: + type: array + items: + $ref: '#/components/schemas/Settlement' + Settlement: + type: object + properties: + id: + type: integer + state: + type: string + settlementWindows: + type: array + items: + $ref: '#/components/schemas/SettlementWindows' + participants: + type: array + items: + $ref: '#/components/schemas/Participant' + Error: + required: + - errorInformation + type: object + properties: + errorInformation: + type: object + properties: + errorCode: + type: integer + errorDescription: + type: string + extensionList: + type: object + properties: + extension: + type: array + items: + $ref: '#/components/schemas/Extension' + Extension: + required: + - key + - value + type: object + properties: + key: + type: string + value: + type: string diff --git a/test/func/config/ttk-hub/spec_files/api_definitions/settlements_2.0/mockRef.json b/test/func/config/ttk-hub/spec_files/api_definitions/settlements_2.0/mockRef.json new file mode 100644 index 000000000..9baecf5df --- /dev/null +++ b/test/func/config/ttk-hub/spec_files/api_definitions/settlements_2.0/mockRef.json @@ -0,0 +1,38 @@ +[ + { + "id": "changedDate", + "pattern": "^(19)\\d\\d[-](0[1-9]|1[012])[-](0[1-9]|[12][0-9]|2[0-8])$" + }, + { + "id": "createdDate", + "pattern": "^(19)\\d\\d[-](0[1-9]|1[012])[-](0[1-9]|[12][0-9]|2[0-8])$" + }, + { + "id": "state", + "pattern": "OPEN|CLOSED" + }, + { + "id": "settlementWindows.items.items.createdDate", + "pattern": "^(19)\\d\\d[-](0[1-9]|1[012])[-](0[1-9]|[12][0-9]|2[0-8])$" + }, + { + "id": "settlementWindows.items.items.changedDate", + "pattern": "^(19)\\d\\d[-](0[1-9]|1[012])[-](0[1-9]|[12][0-9]|2[0-8])$" + }, + { + "id": "settlementWindows.items.items.state", + "pattern": "OPEN|CLOSED" + }, + { + "id": "participants.items.accounts.items.state", + "pattern": "OPEN|CLOSED" + }, + { + "id": "participants.items.accounts.items.netSettlementAmount.amount", + "pattern": "123" + }, + { + "id": "participants.items.accounts.items.netSettlementAmount.currency", + "pattern": "USD" + } +] \ No newline at end of file diff --git a/test/func/config/ttk-hub/spec_files/api_definitions/settlements_2.0/response_map.json b/test/func/config/ttk-hub/spec_files/api_definitions/settlements_2.0/response_map.json new file mode 100644 index 000000000..017282b2e --- /dev/null +++ b/test/func/config/ttk-hub/spec_files/api_definitions/settlements_2.0/response_map.json @@ -0,0 +1,34 @@ +{ + "/settlementWindows/{id}": { + "post": { + "response": { + "bodyOverride": { + "id": "{$request.params.id}", + "reason": "{$request.body.reason}" + } + } + } + }, + "/settlementWindows": { + "get": { + "response": {} + } + }, + "/settlements": { + "post": { + "response": { + "bodyOverride": { + } + } + } + }, + "/settlements/{id}": { + "get": { + "response": { + "bodyOverride": { + "id": "{$request.params.id}" + } + } + } + } +} \ No newline at end of file diff --git a/test/func/config/ttk-hub/spec_files/api_definitions/thirdparty_sdk_outbound_0.1/api_spec.yaml b/test/func/config/ttk-hub/spec_files/api_definitions/thirdparty_sdk_outbound_0.1/api_spec.yaml new file mode 100644 index 000000000..2870562cf --- /dev/null +++ b/test/func/config/ttk-hub/spec_files/api_definitions/thirdparty_sdk_outbound_0.1/api_spec.yaml @@ -0,0 +1,2141 @@ +openapi: 3.0.1 +info: + title: Mojaloop Thirdparty Outbound SDK + description: > + Specification for the Thirdparty Outbound SDK API. + + This API is a synchronous API which makes integrating with the Mojaloop 3rd + Party API easier. + + Please see other documentation on + https://github.com/mojaloop/thirdparty-sdk for more information. + license: + name: Apache 2.0 + version: 0.1.0 +servers: + - url: 'http://sandbox.mojaloop.io/switch-ttk-backend' + description: The mock 3p-scheme-adapter server running in the Mojaloop Sandbox + - url: 'http://localhost:15000' + description: A locally running TTK instance +paths: + /health: + get: + tags: + - health + responses: + '200': + $ref: '#/components/responses/200' + '400': + $ref: '#/components/responses/400' + '401': + $ref: '#/components/responses/401' + '403': + $ref: '#/components/responses/403' + '404': + $ref: '#/components/responses/404' + '405': + $ref: '#/components/responses/405' + '406': + $ref: '#/components/responses/406' + '501': + $ref: '#/components/responses/501' + '503': + $ref: '#/components/responses/503' + operationId: HealthGet + summary: Health check endpoint + description: >- + The HTTP request GET /health is used to return the current status of the + API. + /metrics: + get: + tags: + - health + responses: + '200': + $ref: '#/components/responses/200' + '400': + $ref: '#/components/responses/400' + '401': + $ref: '#/components/responses/401' + '403': + $ref: '#/components/responses/403' + '404': + $ref: '#/components/responses/404' + '405': + $ref: '#/components/responses/405' + '406': + $ref: '#/components/responses/406' + '501': + $ref: '#/components/responses/501' + '503': + $ref: '#/components/responses/503' + operationId: MetricsGet + summary: Prometheus metrics endpoint + description: The HTTP request GET /metrics is used to return metrics for the API. + /thirdpartyTransaction/partyLookup: + post: + operationId: ThirdpartyTransactionPartyLookup + summary: Thirdparty transaction party lookup. + description: > + The HTTP request `POST /thirdpartyTransaction/partyLookup` is used to + lookup information regarding the requested Party, defined by `Type`, + `ID` and optionally `SubId`. + tags: + - thirdpartyRequests + requestBody: + description: Thirdparty transaction party lookup body. + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/ThirdpartyTransactionPartyLookupRequest' + example: + transactionRequestId: b51ec534-ee48-4575-b6a9-ead2955b8069 + payee: + partyIdType: MSISDN + partyIdentifier: '16135551212' + responses: + '200': + $ref: '#/components/responses/ThirdpartyTransactionPartyLookupResponse' + default: + $ref: '#/components/responses/400' + '/thirdpartyTransaction/{ID}/initiate': + post: + operationId: ThirdpartyTransactionIDInitiate + summary: Initiates a third party transaction. + description: > + The HTTP request `POST /thirdpartyTransaction/{ID}/initiate` is sent to + the Switch to initiate a third party request transaction. + tags: + - thirdpartyRequests + parameters: + - $ref: '#/components/parameters/ID' + requestBody: + description: Thirdparty transaction initiate request body. + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/ThirdpartyTransactionIDInitiateRequest' + example: + payee: + name: Bob bobbington + partyIdInfo: + fspId: dfspb + partyIdType: MSISDN + partyIdentifier: '16135551212' + payer: + partyIdType: THIRD_PARTY_LINK + partyIdentifier: '16135551212' + fspId: dfspa + amountType: RECEIVE + amount: + currency: USD + amount: '123.47' + transactionType: + scenario: DEPOSIT + initiator: PAYER + initiatorType: CONSUMER + expiration: '2021-05-24T08:38:08.699-04:00' + responses: + '200': + $ref: '#/components/responses/ThirdpartyTransactionIDInitiateResponse' + default: + $ref: '#/components/responses/400' + '/thirdpartyTransaction/{ID}/approve': + post: + operationId: ThirdpartyTransactionIDApprove + summary: Approve a third party transaction. + description: > + The HTTP request `POST /thirdpartyTransaction/{ID}/approve` is used to + approve a third party transaction . + tags: + - thirdpartyRequests + parameters: + - $ref: '#/components/parameters/ID' + requestBody: + description: >- + Thirdparty transaction approve request body contains Authorization + details + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/ThirdpartyTransactionIDApproveRequest' + example: + authorizationResponse: + authenticationInfo: + authentication: U2F + authenticationValue: + pinValue: xxxxxxxxxxx + counter: '1' + responseType: ENTERED + responses: + '200': + $ref: '#/components/responses/ThirdpartyTransactionIDApproveResponse' + default: + $ref: '#/components/responses/400' + /linking/providers: + get: + operationId: GetLinkingProviders + summary: GetLinkingProviders + description: > + The HTTP request `GET /linking/providers` is used to retrieve a list of + thirdparty enabled DFSP identifiers. + tags: + - linking + responses: + '200': + $ref: '#/components/responses/LinkingProvidersResponse' + default: + $ref: '#/components/responses/400' + '/linking/accounts/{fspId}/{userId}': + get: + operationId: GetLinkingAccountsByUserId + summary: GetLinkingAccountsByUserId + description: > + The HTTP request `GET /linking/accounts/{fspId}/{userId}` is used to + retrieve the list of potential accounts available for linking. + tags: + - linking + parameters: + - name: fspId + in: path + required: true + schema: + $ref: '#/components/schemas/FspId' + - name: userId + in: path + required: true + schema: + $ref: '#/components/schemas/AccountId' + responses: + '200': + $ref: '#/components/responses/AccountsByUserIdResponse' + default: + $ref: '#/components/responses/400' + /linking/request-consent: + post: + operationId: PostLinkingRequestConsent + summary: PostLinkingRequestConsent + description: > + The HTTP request `POST /linking/request-consent` is used to by a PISP to + ask + + a specific DFSP to start the process of establishing consent between + three parties. + + + - The PISP + + - The DFSP + + - A user presumed to be a customer of 'The DFSP' + tags: + - linking + requestBody: + description: Consent requests validate request details + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/LinkingRequestConsentPostRequest' + example: + consentRequestId: f6ab43b0-71cc-49f9-b763-2ac3f05ac8c1 + toParticipantId: dfspa + accounts: + - accountNickname: SpeXXXXXXXXnt + id: dfspa.username.5678 + currency: USD + actions: + - accounts.transfer + userId: username1234 + callbackUri: 'pisp-app://callback' + responses: + '200': + $ref: '#/components/responses/LinkingRequestConsentResponse' + default: + $ref: '#/components/responses/400' + '/linking/request-consent/{ID}/authenticate': + patch: + operationId: PatchLinkingRequestConsentIDAuthenticate + summary: 'Outbound PATCH /linking/request-consent/{ID}/authenticate endpoint' + description: > + Used in the authentication phase of account linking. + + Used by the PISP to pass an Auth token on behalf of the user to the DFSP + to establish a chain of trust. + tags: + - linking + parameters: + - name: ID + in: path + required: true + schema: + $ref: '#/components/schemas/CorrelationId' + requestBody: + description: Linking request consent authenticate request details + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/LinkingRequestConsentIDAuthenticateRequest' + example: + authToken: '123456' + responses: + '200': + $ref: '#/components/responses/LinkingRequestConsentIDAuthenticateResponse' + default: + $ref: '#/components/responses/400' + '/linking/request-consent/{ID}/pass-credential': + post: + operationId: PostLinkingRequestConsentIDPassCredential + summary: 'Outbound POST /linking/request-consent/{ID}/pass-credential endpoint' + description: > + Used in the credential registration phase of account linking. + + Used by the PISP to pass an credential on behalf of the user to the + DFSP. + tags: + - linking + parameters: + - name: ID + in: path + required: true + schema: + $ref: '#/components/schemas/CorrelationId' + requestBody: + description: Linking request consent pass credential request details + required: true + content: + application/json: + schema: + $ref: >- + #/components/schemas/LinkingRequestConsentIDPassCredentialRequest + example: + credential: + credentialType: FIDO + status: PENDING + payload: + id: >- + HskU2gw4np09IUtYNHnxMM696jJHqvccUdBmd0xP6XEWwH0xLei1PUzDJCM19SZ3A2Ex0fNLw0nc2hrIlFnAtw + rawId: >- + HskU2gw4np09IUtYNHnxMM696jJHqvccUdBmd0xP6XEWwH0xLei1PUzDJCM19SZ3A2Ex0fNLw0nc2hrIlFnAtw== + response: + clientDataJSON: >- + eyJ0eXBlIjoid2ViYXV0aG4uY3JlYXRlIiwiY2hhbGxlbmdlIjoiWXpSaFpHRmlZak16WlRrek1EWmlNRE00TURnNE1UTXlZV1ptWTJSbE5UVTJZelV3WkRneVpqWXdNMlkwTnpjeE1XRTVOVEV3WW1ZelltVmxaalprTmciLCJvcmlnaW4iOiJodHRwOi8vbG9jYWxob3N0OjQyMTgxIiwiY3Jvc3NPcmlnaW4iOmZhbHNlfQ== + attestationObject: >- + o2NmbXRmcGFja2VkZ2F0dFN0bXSjY2FsZyZjc2lnWEcwRQIhAN2JDPPTse/45EHSqSpEJiiok5sns+HqdJch3+gsL09VAiAh7W7ZhQC8gMIkgwcA+S4rQkaHoHnP9AkkohaKCuuA62N4NWOBWQLBMIICvTCCAaWgAwIBAgIECwXNUzANBgkqhkiG9w0BAQsFADAuMSwwKgYDVQQDEyNZdWJpY28gVTJGIFJvb3QgQ0EgU2VyaWFsIDQ1NzIwMDYzMTAgFw0xNDA4MDEwMDAwMDBaGA8yMDUwMDkwNDAwMDAwMFowbjELMAkGA1UEBhMCU0UxEjAQBgNVBAoMCVl1YmljbyBBQjEiMCAGA1UECwwZQXV0aGVudGljYXRvciBBdHRlc3RhdGlvbjEnMCUGA1UEAwweWXViaWNvIFUyRiBFRSBTZXJpYWwgMTg0OTI5NjE5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEIRpvsbWJJcsKwRhffCrjqLSIEBR5sR7/9VXgfZdRvSsXaiUt7lns44WZIFuz6ii/j9f8fadcBUJyrkhY5ZH8WqNsMGowIgYJKwYBBAGCxAoCBBUxLjMuNi4xLjQuMS40MTQ4Mi4xLjEwEwYLKwYBBAGC5RwCAQEEBAMCBDAwIQYLKwYBBAGC5RwBAQQEEgQQFJogIY72QTOWuIH41bfx9TAMBgNVHRMBAf8EAjAAMA0GCSqGSIb3DQEBCwUAA4IBAQA+/qPfPSrgclePfgTQ3VpLaNsBr+hjLhi04LhzQxiRGWwYS+vB1TOiPXeLsQQIwbmqQU51doVbCTaXGLNIr1zvbLAwhnLWH7i9m4ahCqaCzowtTvCQ7VBUGP5T1M4eYnoo83IDCVjQj/pZG8QYgOGOigztGoWAf5CWcUF6C0UyFbONwUcqJEl2QLToa/7E8VRjm4W46IAUljYkODVZASv8h3wLROx9p5TSBlSymtwdulxQe/DKbfNSvM3edA0up+EIJKLOOU+QTR2ZQV46fEW1/ih6m8vcaY6L3NW0eYpc7TXeijUJAgoUtya/vzmnRAecuY9bncoJt8PrvL2ir2kDaGF1dGhEYXRhWMRJlg3liA6MaHQ0Fw9kdmBbj+SuuaKGMseZXPO6gx2XY0EAAAAEFJogIY72QTOWuIH41bfx9QBAHskU2gw4np09IUtYNHnxMM696jJHqvccUdBmd0xP6XEWwH0xLei1PUzDJCM19SZ3A2Ex0fNLw0nc2hrIlFnAt6UBAgMmIAEhWCBYz+SV6fSy7ZjFzdj+SWxaMbfaw4ZT+wYgClN3v93kVSJYIGSzY41DNLrh1jXp4J53qCnq4+b9HYXud/0UEsZquDeV + type: public-key + responses: + '200': + $ref: '#/components/responses/LinkingRequestConsentIDPassCredentialResponse' + default: + $ref: '#/components/responses/400' +components: + responses: + '200': + description: OK + '400': + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorInformationResponse' + headers: + Content-Length: + $ref: '#/components/headers/Content-Length' + Content-Type: + $ref: '#/components/headers/Content-Type' + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorInformationResponse' + headers: + Content-Length: + $ref: '#/components/headers/Content-Length' + Content-Type: + $ref: '#/components/headers/Content-Type' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorInformationResponse' + headers: + Content-Length: + $ref: '#/components/headers/Content-Length' + Content-Type: + $ref: '#/components/headers/Content-Type' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorInformationResponse' + headers: + Content-Length: + $ref: '#/components/headers/Content-Length' + Content-Type: + $ref: '#/components/headers/Content-Type' + '405': + description: Method Not Allowed + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorInformationResponse' + headers: + Content-Length: + $ref: '#/components/headers/Content-Length' + Content-Type: + $ref: '#/components/headers/Content-Type' + '406': + description: Not Acceptable + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorInformationResponse' + headers: + Content-Length: + $ref: '#/components/headers/Content-Length' + Content-Type: + $ref: '#/components/headers/Content-Type' + '501': + description: Not Implemented + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorInformationResponse' + headers: + Content-Length: + $ref: '#/components/headers/Content-Length' + Content-Type: + $ref: '#/components/headers/Content-Type' + '503': + description: Service Unavailable + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorInformationResponse' + headers: + Content-Length: + $ref: '#/components/headers/Content-Length' + Content-Type: + $ref: '#/components/headers/Content-Type' + ThirdpartyTransactionPartyLookupResponse: + description: ThirdpartyTransaction partyLookup response + content: + application/json: + schema: + $ref: '#/components/schemas/ThirdpartyTransactionPartyLookupResponse' + example: + currentState: partyLookupSuccess + party: + partyIdInfo: + partyIdType: MSISDN + partyIdentifier: '16135551212' + fspId: dfspb + name: Bob bobbington + ThirdpartyTransactionIDInitiateResponse: + description: ThirdpartyTransactionIDInitiate response + content: + application/json: + schema: + $ref: '#/components/schemas/ThirdpartyTransactionIDInitiateResponse' + example: + currentState: authorizationReceived + authorization: + authenticationType: U2F + retriesLeft: '1' + amount: + currency: USD + amount: '10.00' + transactionId: 1234-1234-1234-1234 + transactionRequestId: 1234-1234-1234-1234 + quote: + transferAmount: + currency: USD + amount: '10.00' + expiration: '2022-01-01T08:38:08.699-04:00' + ilpPacket: >- + AYIBgQAAAAAAAASwNGxldmVsb25lLmRmc3AxLm1lci45T2RTOF81MDdqUUZERmZlakgyOVc4bXFmNEpLMHlGTFGCAUBQU0svMS4wCk5vbmNlOiB1SXlweUYzY3pYSXBFdzVVc05TYWh3CkVuY3J5cHRpb246IG5vbmUKUGF5bWVudC1JZDogMTMyMzZhM2ItOGZhOC00MTYzLTg0NDctNGMzZWQzZGE5OGE3CgpDb250ZW50LUxlbmd0aDogMTM1CkNvbnRlbnQtVHlwZTogYXBwbGljYXRpb24vanNvbgpTZW5kZXItSWRlbnRpZmllcjogOTI4MDYzOTEKCiJ7XCJmZWVcIjowLFwidHJhbnNmZXJDb2RlXCI6XCJpbnZvaWNlXCIsXCJkZWJpdE5hbWVcIjpcImFsaWNlIGNvb3BlclwiLFwiY3JlZGl0TmFtZVwiOlwibWVyIGNoYW50XCIsXCJkZWJpdElkZW50aWZpZXJcIjpcIjkyODA2MzkxXCJ9IgA + condition: f5sqb7tBTWPd5Y8BDFdMm9BJR_MNI4isf8p8n4D5pH + ThirdpartyTransactionIDApproveResponse: + description: ThirdpartyTransactionIDApproveResponse + content: + application/json: + schema: + $ref: '#/components/schemas/ThirdpartyTransactionIDApproveResponse' + example: + transactionStatus: + transactionId: 8f6b2a9c-df32-4248-b115-799beada85ec + transactionRequestState: ACCEPTED + currentState: transactionStatusReceived + LinkingProvidersResponse: + description: | + Response body of GET /linking/providers + content: + application/json: + schema: + $ref: '#/components/schemas/LinkingProvidersResponse' + example: + providers: + - dfspa + - dfspb + currentState: providersLookupSuccess + AccountsByUserIdResponse: + description: > + response body of GET /accounts/{ID} + + derived from UpdateAccountsByUserId by Inbound Service via Pub/Sub + channel + content: + application/json: + schema: + $ref: '#/components/schemas/AccountsIDPutResponse' + example: + - accountNickname: dfspa.user.nickname1 + id: dfspa.username.1234 + currency: ZAR + - accountNickname: dfspa.user.nickname2 + id: dfspa.username.5678 + currency: USD + LinkingRequestConsentResponse: + description: | + Response body of POST /linking/request-consent. + content: + application/json: + schema: + $ref: '#/components/schemas/LinkingRequestConsentResponse' + example: + channelResponse: + consentRequestId: f6ab43b0-71cc-49f9-b763-2ac3f05ac8c1 + scopes: + - accountId: dfspa.username.1234 + actions: + - accounts.getBalance + - accounts.transfer + - accountId: dfspa.username.5678 + actions: + - accounts.getBalance + - accounts.transfer + authChannels: + - OTP + callbackUri: 'pisp-app://callback...' + currentState: OTPAuthenticationChannelResponseReceived + LinkingRequestConsentIDAuthenticateResponse: + description: Linking request consent authenticate response + content: + application/json: + schema: + $ref: '#/components/schemas/LinkingRequestConsentIDAuthenticateResponse' + example: + consent: + consentId: 76059a0a-684f-4002-a880-b01159afe119 + consentRequestId: f6ab43b0-71cc-49f9-b763-2ac3f05ac8c1 + scopes: + - accountId: dfspa.username.5678 + actions: + - accounts.transfer + challenge: c4adabb33e9306b038088132affcde556c50d82f603f47711a9510bf3beef6d6 + currentState: consentReceivedAwaitingCredential + LinkingRequestConsentIDPassCredentialResponse: + description: Linking request consent pass credential response + content: + application/json: + schema: + $ref: '#/components/schemas/LinkingRequestConsentIDPassCredentialResponse' + example: + credential: + status: VERIFIED + currentState: accountsLinked + headers: + Content-Length: + required: false + schema: + type: integer + description: >- + The `Content-Length` header field indicates the anticipated size of the + payload body. Only sent if there is a body. + + + **Note:** The API supports a maximum size of 5242880 bytes (5 + Megabytes). + Content-Type: + schema: + type: string + required: true + description: >- + The `Content-Type` header indicates the specific version of the API used + to send the payload body. + schemas: + ErrorCode: + title: ErrorCode + type: string + pattern: '^[1-9]\d{3}$' + description: >- + The API data type ErrorCode is a JSON String of four characters, + consisting of digits only. Negative numbers are not allowed. A leading + zero is not allowed. Each error code in the API is a four-digit number, + for example, 1234, where the first number (1 in the example) represents + the high-level error category, the second number (2 in the example) + represents the low-level error category, and the last two numbers (34 in + the example) represent the specific error. + example: '5100' + ErrorDescription: + title: ErrorDescription + type: string + minLength: 1 + maxLength: 128 + description: Error description string. + ExtensionKey: + title: ExtensionKey + type: string + minLength: 1 + maxLength: 32 + description: Extension key. + ExtensionValue: + title: ExtensionValue + type: string + minLength: 1 + maxLength: 128 + description: Extension value. + Extension: + title: Extension + type: object + description: Data model for the complex type Extension. + properties: + key: + $ref: '#/components/schemas/ExtensionKey' + value: + $ref: '#/components/schemas/ExtensionValue' + required: + - key + - value + ExtensionList: + title: ExtensionList + type: object + description: >- + Data model for the complex type ExtensionList. An optional list of + extensions, specific to deployment. + properties: + extension: + type: array + items: + $ref: '#/components/schemas/Extension' + minItems: 1 + maxItems: 16 + description: Number of Extension elements. + required: + - extension + ErrorInformation: + title: ErrorInformation + type: object + description: Data model for the complex type ErrorInformation. + properties: + errorCode: + $ref: '#/components/schemas/ErrorCode' + errorDescription: + $ref: '#/components/schemas/ErrorDescription' + extensionList: + $ref: '#/components/schemas/ExtensionList' + required: + - errorCode + - errorDescription + ErrorInformationResponse: + title: ErrorInformationResponse + type: object + description: >- + Data model for the complex type object that contains an optional element + ErrorInformation used along with 4xx and 5xx responses. + properties: + errorInformation: + $ref: '#/components/schemas/ErrorInformation' + PartyIdType: + title: PartyIdType + type: string + enum: + - MSISDN + - EMAIL + - PERSONAL_ID + - BUSINESS + - DEVICE + - ACCOUNT_ID + - IBAN + - ALIAS + - CONSENT + - THIRD_PARTY_LINK + description: > + This is a variant based on FSPIOP `PartyIdType` specification. + + Main difference being the CONSENT and THIRD_PARTY_LINK enums. + + + Below are the allowed values for the enumeration. + + - MSISDN - An MSISDN (Mobile Station International Subscriber Directory + + Number, that is, the phone number) is used as reference to a + participant. + + The MSISDN identifier should be in international format according to the + + [ITU-T E.164 standard](https://www.itu.int/rec/T-REC-E.164/en). + + Optionally, the MSISDN may be prefixed by a single plus sign, indicating + the + + international prefix. + + - EMAIL - An email is used as reference to a + + participant. The format of the email should be according to the + informational + + [RFC 3696](https://tools.ietf.org/html/rfc3696). + + - PERSONAL_ID - A personal identifier is used as reference to a + participant. + + Examples of personal identification are passport number, birth + certificate + + number, and national registration number. The identifier number is added + in + + the PartyIdentifier element. The personal identifier type is added in + the + + PartySubIdOrType element. + + - BUSINESS - A specific Business (for example, an organization or a + company) + + is used as reference to a participant. The BUSINESS identifier can be in + any + + format. To make a transaction connected to a specific username or bill + number + + in a Business, the PartySubIdOrType element should be used. + + - DEVICE - A specific device (for example, a POS or ATM) ID connected to + a + + specific business or organization is used as reference to a Party. + + For referencing a specific device under a specific business or + organization, + + use the PartySubIdOrType element. + + - ACCOUNT_ID - A bank account number or FSP account ID should be used as + + reference to a participant. The ACCOUNT_ID identifier can be in any + format, + + as formats can greatly differ depending on country and FSP. + + - IBAN - A bank account number or FSP account ID is used as reference to + a + + participant. The IBAN identifier can consist of up to 34 alphanumeric + + characters and should be entered without whitespace. + + - ALIAS An alias is used as reference to a participant. The alias should + be + + created in the FSP as an alternative reference to an account owner. + + Another example of an alias is a username in the FSP system. + + The ALIAS identifier can be in any format. It is also possible to use + the + + PartySubIdOrType element for identifying an account under an Alias + defined + + by the PartyIdentifier. + + - CONSENT - TBD + + - THIRD_PARTY_LINK - TBD + example: PERSONAL_ID + PartyIdentifier: + title: PartyIdentifier + type: string + minLength: 1 + maxLength: 128 + description: Identifier of the Party. + example: '16135551212' + PartySubIdOrType: + title: PartySubIdOrType + type: string + minLength: 1 + maxLength: 128 + description: >- + Either a sub-identifier of a PartyIdentifier, or a sub-type of the + PartyIdType, normally a PersonalIdentifierType. + FspId: + title: FspId + type: string + minLength: 1 + maxLength: 32 + description: FSP identifier. + PartyIdInfo: + title: PartyIdInfo + type: object + description: Data model for the complex type PartyIdInfo. + properties: + partyIdType: + $ref: '#/components/schemas/PartyIdType' + partyIdentifier: + $ref: '#/components/schemas/PartyIdentifier' + partySubIdOrType: + $ref: '#/components/schemas/PartySubIdOrType' + fspId: + $ref: '#/components/schemas/FspId' + extensionList: + $ref: '#/components/schemas/ExtensionList' + required: + - partyIdType + - partyIdentifier + CorrelationId: + title: CorrelationId + type: string + pattern: >- + ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + description: >- + Identifier that correlates all messages of the same sequence. The API + data type UUID (Universally Unique Identifier) is a JSON String in + canonical format, conforming to [RFC + 4122](https://tools.ietf.org/html/rfc4122), that is restricted by a + regular expression for interoperability reasons. A UUID is always 36 + characters long, 32 hexadecimal symbols and 4 dashes (‘-‘). + example: b51ec534-ee48-4575-b6a9-ead2955b8069 + ThirdpartyTransactionPartyLookupRequest: + type: object + description: ThirdpartyTransaction partyLookup request + properties: + payee: + $ref: '#/components/schemas/PartyIdInfo' + transactionRequestId: + $ref: '#/components/schemas/CorrelationId' + required: + - payee + - transactionRequestId + ThirdpartyTransactionPartyLookupState: + title: ThirdpartyTransactionPartyLookupState + description: state of thirdparty transaction partyLookup phase + type: string + enum: + - start + - partyLookupSuccess + - partyLookupFailure + - errored + ThirdpartyTransactionPartyLookupResponseError: + title: ThirdpartyTransactionPartyLookupResponseError + type: object + properties: + currentState: + $ref: '#/components/schemas/ThirdpartyTransactionPartyLookupState' + errorInformation: + $ref: '#/components/schemas/ErrorInformation' + required: + - errorInformation + - currentState + MerchantClassificationCode: + title: MerchantClassificationCode + type: string + pattern: '^[\d]{1,4}$' + description: >- + A limited set of pre-defined numbers. This list would be a limited set + of numbers identifying a set of popular merchant types like School Fees, + Pubs and Restaurants, Groceries, etc. + PartyName: + title: PartyName + type: string + minLength: 1 + maxLength: 128 + description: Name of the Party. Could be a real name or a nickname. + FirstName: + title: FirstName + type: string + minLength: 1 + maxLength: 128 + pattern: >- + ^(?!\s*$)[\p{L}\p{gc=Mark}\p{digit}\p{gc=Connector_Punctuation}\p{Join_Control} + .,''-]{1,128}$ + description: First name of the Party (Name Type). + example: Henrik + MiddleName: + title: MiddleName + type: string + minLength: 1 + maxLength: 128 + pattern: >- + ^(?!\s*$)[\p{L}\p{gc=Mark}\p{digit}\p{gc=Connector_Punctuation}\p{Join_Control} + .,''-]{1,128}$ + description: Middle name of the Party (Name Type). + example: Johannes + LastName: + title: LastName + type: string + minLength: 1 + maxLength: 128 + pattern: >- + ^(?!\s*$)[\p{L}\p{gc=Mark}\p{digit}\p{gc=Connector_Punctuation}\p{Join_Control} + .,''-]{1,128}$ + description: Last name of the Party (Name Type). + example: Karlsson + PartyComplexName: + title: PartyComplexName + type: object + description: Data model for the complex type PartyComplexName. + properties: + firstName: + $ref: '#/components/schemas/FirstName' + middleName: + $ref: '#/components/schemas/MiddleName' + lastName: + $ref: '#/components/schemas/LastName' + DateOfBirth: + title: DateofBirth (type Date) + type: string + pattern: >- + ^(?:[1-9]\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\d|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-02-29)$ + description: Date of Birth of the Party. + example: '1966-06-16' + PartyPersonalInfo: + title: PartyPersonalInfo + type: object + description: Data model for the complex type PartyPersonalInfo. + properties: + complexName: + $ref: '#/components/schemas/PartyComplexName' + dateOfBirth: + $ref: '#/components/schemas/DateOfBirth' + ThirdpartyTransactionPartyLookupResponseSuccess: + title: ThirdpartyTransactionPartyLookupResponseSuccess + type: object + properties: + currentState: + $ref: '#/components/schemas/ThirdpartyTransactionPartyLookupState' + party: + type: object + properties: + partyIdInfo: + $ref: '#/components/schemas/PartyIdInfo' + merchantClassificationCode: + $ref: '#/components/schemas/MerchantClassificationCode' + name: + $ref: '#/components/schemas/PartyName' + personalInfo: + $ref: '#/components/schemas/PartyPersonalInfo' + required: + - party + - currentState + ThirdpartyTransactionPartyLookupResponse: + oneOf: + - $ref: '#/components/schemas/ThirdpartyTransactionPartyLookupResponseError' + - $ref: '#/components/schemas/ThirdpartyTransactionPartyLookupResponseSuccess' + Party: + title: Party + type: object + description: Data model for the complex type Party. + properties: + partyIdInfo: + $ref: '#/components/schemas/PartyIdInfo' + merchantClassificationCode: + $ref: '#/components/schemas/MerchantClassificationCode' + name: + $ref: '#/components/schemas/PartyName' + personalInfo: + $ref: '#/components/schemas/PartyPersonalInfo' + required: + - partyIdInfo + PartyIdTypeTPLink: + title: PartyIdTypeTPLink + type: string + enum: + - THIRD_PARTY_LINK + description: > + This is a variant based on FSPIOP `PartyIdType` specification. + + This validation interface should be use by `POST + /thirdpartyRequests/transactions` + + - THIRD_PARTY_LINK - is the DFSP's internal reference which allows DFSP + to find out the corresponding consent + example: PERSONAL_ID + PartyIdInfoTPLink: + title: PartyIdInfo + type: object + description: Data model for the complex type PartyIdInfo. + properties: + partyIdType: + $ref: '#/components/schemas/PartyIdTypeTPLink' + partyIdentifier: + $ref: '#/components/schemas/PartyIdentifier' + partySubIdOrType: + $ref: '#/components/schemas/PartySubIdOrType' + fspId: + $ref: '#/components/schemas/FspId' + extensionList: + $ref: '#/components/schemas/ExtensionList' + required: + - partyIdType + - partyIdentifier + AmountType: + title: AmountType + type: string + enum: + - SEND + - RECEIVE + description: >- + Below are the allowed values for the enumeration AmountType. + + - SEND - Amount the Payer would like to send, that is, the amount that + should be withdrawn from the Payer account including any fees. + + - RECEIVE - Amount the Payer would like the Payee to receive, that is, + the amount that should be sent to the receiver exclusive of any fees. + example: RECEIVE + Currency: + title: Currency + description: >- + The currency codes defined in [ISO + 4217](https://www.iso.org/iso-4217-currency-codes.html) as three-letter + alphabetic codes are used as the standard naming representation for + currencies. + type: string + minLength: 3 + maxLength: 3 + enum: + - AED + - AFN + - ALL + - AMD + - ANG + - AOA + - ARS + - AUD + - AWG + - AZN + - BAM + - BBD + - BDT + - BGN + - BHD + - BIF + - BMD + - BND + - BOB + - BRL + - BSD + - BTN + - BWP + - BYN + - BZD + - CAD + - CDF + - CHF + - CLP + - CNY + - COP + - CRC + - CUC + - CUP + - CVE + - CZK + - DJF + - DKK + - DOP + - DZD + - EGP + - ERN + - ETB + - EUR + - FJD + - FKP + - GBP + - GEL + - GGP + - GHS + - GIP + - GMD + - GNF + - GTQ + - GYD + - HKD + - HNL + - HRK + - HTG + - HUF + - IDR + - ILS + - IMP + - INR + - IQD + - IRR + - ISK + - JEP + - JMD + - JOD + - JPY + - KES + - KGS + - KHR + - KMF + - KPW + - KRW + - KWD + - KYD + - KZT + - LAK + - LBP + - LKR + - LRD + - LSL + - LYD + - MAD + - MDL + - MGA + - MKD + - MMK + - MNT + - MOP + - MRO + - MUR + - MVR + - MWK + - MXN + - MYR + - MZN + - NAD + - NGN + - NIO + - NOK + - NPR + - NZD + - OMR + - PAB + - PEN + - PGK + - PHP + - PKR + - PLN + - PYG + - QAR + - RON + - RSD + - RUB + - RWF + - SAR + - SBD + - SCR + - SDG + - SEK + - SGD + - SHP + - SLL + - SOS + - SPL + - SRD + - STD + - SVC + - SYP + - SZL + - THB + - TJS + - TMT + - TND + - TOP + - TRY + - TTD + - TVD + - TWD + - TZS + - UAH + - UGX + - USD + - UYU + - UZS + - VEF + - VND + - VUV + - WST + - XAF + - XCD + - XDR + - XOF + - XPF + - XTS + - XXX + - YER + - ZAR + - ZMW + - ZWD + Amount: + title: Amount + type: string + pattern: '^([0]|([1-9][0-9]{0,17}))([.][0-9]{0,3}[1-9])?$' + description: >- + The API data type Amount is a JSON String in a canonical format that is + restricted by a regular expression for interoperability reasons. This + pattern does not allow any trailing zeroes at all, but allows an amount + without a minor currency unit. It also only allows four digits in the + minor currency unit; a negative value is not allowed. Using more than 18 + digits in the major currency unit is not allowed. + example: '123.45' + Money: + title: Money + type: object + description: Data model for the complex type Money. + properties: + currency: + $ref: '#/components/schemas/Currency' + amount: + $ref: '#/components/schemas/Amount' + required: + - currency + - amount + TransactionScenario: + title: TransactionScenario + type: string + enum: + - DEPOSIT + - WITHDRAWAL + - TRANSFER + - PAYMENT + - REFUND + description: >- + Below are the allowed values for the enumeration. + + - DEPOSIT - Used for performing a Cash-In (deposit) transaction. In a + normal scenario, electronic funds are transferred from a Business + account to a Consumer account, and physical cash is given from the + Consumer to the Business User. + + - WITHDRAWAL - Used for performing a Cash-Out (withdrawal) transaction. + In a normal scenario, electronic funds are transferred from a Consumer’s + account to a Business account, and physical cash is given from the + Business User to the Consumer. + + - TRANSFER - Used for performing a P2P (Peer to Peer, or Consumer to + Consumer) transaction. + + - PAYMENT - Usually used for performing a transaction from a Consumer to + a Merchant or Organization, but could also be for a B2B (Business to + Business) payment. The transaction could be online for a purchase in an + Internet store, in a physical store where both the Consumer and Business + User are present, a bill payment, a donation, and so on. + + - REFUND - Used for performing a refund of transaction. + example: DEPOSIT + TransactionSubScenario: + title: TransactionSubScenario + type: string + pattern: '^[A-Z_]{1,32}$' + description: >- + Possible sub-scenario, defined locally within the scheme (UndefinedEnum + Type). + example: LOCALLY_DEFINED_SUBSCENARIO + TransactionInitiator: + title: TransactionInitiator + type: string + enum: + - PAYER + - PAYEE + description: >- + Below are the allowed values for the enumeration. + + - PAYER - Sender of funds is initiating the transaction. The account to + send from is either owned by the Payer or is connected to the Payer in + some way. + + - PAYEE - Recipient of the funds is initiating the transaction by + sending a transaction request. The Payer must approve the transaction, + either automatically by a pre-generated OTP or by pre-approval of the + Payee, or by manually approving in his or her own Device. + example: PAYEE + TransactionInitiatorType: + title: TransactionInitiatorType + type: string + enum: + - CONSUMER + - AGENT + - BUSINESS + - DEVICE + description: |- + Below are the allowed values for the enumeration. + - CONSUMER - Consumer is the initiator of the transaction. + - AGENT - Agent is the initiator of the transaction. + - BUSINESS - Business is the initiator of the transaction. + - DEVICE - Device is the initiator of the transaction. + example: CONSUMER + RefundReason: + title: RefundReason + type: string + minLength: 1 + maxLength: 128 + description: Reason for the refund. + example: Free text indicating reason for the refund. + Refund: + title: Refund + type: object + description: Data model for the complex type Refund. + properties: + originalTransactionId: + $ref: '#/components/schemas/CorrelationId' + refundReason: + $ref: '#/components/schemas/RefundReason' + required: + - originalTransactionId + BalanceOfPayments: + title: BalanceOfPayments + type: string + pattern: '^[1-9]\d{2}$' + description: >- + (BopCode) The API data type + [BopCode](https://www.imf.org/external/np/sta/bopcode/) is a JSON String + of 3 characters, consisting of digits only. Negative numbers are not + allowed. A leading zero is not allowed. + example: '123' + TransactionType: + title: TransactionType + type: object + description: Data model for the complex type TransactionType. + properties: + scenario: + $ref: '#/components/schemas/TransactionScenario' + subScenario: + $ref: '#/components/schemas/TransactionSubScenario' + initiator: + $ref: '#/components/schemas/TransactionInitiator' + initiatorType: + $ref: '#/components/schemas/TransactionInitiatorType' + refundInfo: + $ref: '#/components/schemas/Refund' + balanceOfPayments: + $ref: '#/components/schemas/BalanceOfPayments' + required: + - scenario + - initiator + - initiatorType + ThirdpartyTransactionIDInitiateRequest: + title: ThirdpartyTransactionIDInitiateRequest + type: object + description: >- + The object sent in the POST `/thirdpartyTransaction/{ID}/initiate` + request. + properties: + payee: + $ref: '#/components/schemas/Party' + payer: + $ref: '#/components/schemas/PartyIdInfoTPLink' + amountType: + $ref: '#/components/schemas/AmountType' + amount: + $ref: '#/components/schemas/Money' + transactionType: + $ref: '#/components/schemas/TransactionType' + expiration: + type: string + example: '2016-05-24T08:38:08.699-04:00' + required: + - payee + - payer + - amountType + - amount + - transactionType + - expiration + ThirdpartyTransactionIDInitiateState: + title: ThirdpartyTransactionIDInitiateState + description: state of thirdparty transaction for initiate phase + type: string + enum: + - partyLookupSuccess + - authorizationReceived + - errored + ThirdpartyTransactionIDInitiateResponseError: + title: ThirdpartyTransactionIDInitateResponseError + type: object + properties: + currentState: + $ref: '#/components/schemas/ThirdpartyTransactionIDInitiateState' + errorInformation: + $ref: '#/components/schemas/ErrorInformation' + required: + - currentState + - errorInformation + DateTime: + title: DateTime + type: string + pattern: >- + ^(?:[1-9]\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\d|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-02-29)T(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:(\.\d{3}))(?:Z|[+-][01]\d:[0-5]\d)$ + description: >- + The API data type DateTime is a JSON String in a lexical format that is + restricted by a regular expression for interoperability reasons. The + format is according to [ISO + 8601](https://www.iso.org/iso-8601-date-and-time-format.html), expressed + in a combined date, time and time zone format. A more readable version + of the format is yyyy-MM-ddTHH:mm:ss.SSS[-HH:MM]. Examples are + "2016-05-24T08:38:08.699-04:00", "2016-05-24T08:38:08.699Z" (where Z + indicates Zulu time zone, same as UTC). + example: '2016-05-24T08:38:08.699-04:00' + ThirdpartyRequestsAuthorizationsPostRequest: + title: ThirdpartyRequestsAuthorizationsPostRequest + description: POST /thirdpartyRequests/authorizations request object. + type: object + properties: + authorizationRequestId: + $ref: '#/components/schemas/CorrelationId' + transactionRequestId: + $ref: '#/components/schemas/CorrelationId' + challenge: + type: string + description: The challenge that the PISP's client is to sign + transferAmount: + allOf: + - $ref: '#/components/schemas/Money' + description: >- + The amount that will be debited from the sending customer’s account + as a consequence of the transaction. + payeeReceiveAmount: + allOf: + - $ref: '#/components/schemas/Money' + description: >- + The amount that will be credited to the receiving customer’s + account as a consequence of the transaction. + fees: + allOf: + - $ref: '#/components/schemas/Money' + description: >- + The amount of fees that the paying customer will be charged as part + of the transaction. + payer: + allOf: + - $ref: '#/components/schemas/PartyIdInfo' + description: >- + Information about the Payer type, id, sub-type/id, FSP Id in the + proposed financial transaction. + payee: + allOf: + - $ref: '#/components/schemas/Party' + description: Information about the Payee in the proposed financial transaction. + transactionType: + $ref: '#/components/schemas/TransactionType' + expiration: + allOf: + - $ref: '#/components/schemas/DateTime' + description: >- + The time by which the transfer must be completed, set by the payee + DFSP. + extensionList: + $ref: '#/components/schemas/ExtensionList' + required: + - authorizationRequestId + - transactionRequestId + - challenge + - transferAmount + - payeeReceiveAmount + - fees + - payer + - payee + - transactionType + - expiration + additionalProperties: false + ThirdpartyTransactionIDInitiateResponseSuccess: + title: ThirdpartyTransactionIDInitateResponseSuccess + type: object + properties: + currentState: + $ref: '#/components/schemas/ThirdpartyTransactionIDInitiateState' + authorization: + $ref: '#/components/schemas/ThirdpartyRequestsAuthorizationsPostRequest' + required: + - currentState + - authorization + ThirdpartyTransactionIDInitiateResponse: + oneOf: + - $ref: '#/components/schemas/ThirdpartyTransactionIDInitiateResponseError' + - $ref: '#/components/schemas/ThirdpartyTransactionIDInitiateResponseSuccess' + SignedPayloadTypeGeneric: + title: SignedPayloadTypeGeneric + type: string + enum: + - GENERIC + description: Describes a challenge that has been signed with a private key + BinaryString: + type: string + pattern: '^[A-Za-z0-9-_]+[=]{0,2}$' + description: >- + The API data type BinaryString is a JSON String. The string is a + base64url encoding of a string of raw bytes, where padding (character + ‘=’) is added at the end of the data if needed to ensure that the string + is a multiple of 4 characters. The length restriction indicates the + allowed number of characters. + ThirdpartyRequestsAuthorizationsIDPutResponseGeneric: + title: ThirdpartyRequestsAuthorizationsIDPutResponseGeneric + type: object + description: >- + The object sent in the PUT /thirdpartyRequests/authorizations/{ID} + callback. + properties: + signedPayloadType: + $ref: '#/components/schemas/SignedPayloadTypeGeneric' + signedPayload: + $ref: '#/components/schemas/BinaryString' + required: + - signedPayloadType + - authenticationValue + SignedPayloadTypeFIDO: + title: SignedPayloadTypeFIDO + type: string + enum: + - FIDO + description: Describes a challenge that has been signed with FIDO Attestation flows + FIDOPublicKeyCredentialAssertion: + title: FIDOPublicKeyCredentialAssertion + type: object + description: > + An object sent in a `PUT /thirdpartyRequests/authorization/{ID}` + request. + + based mostly on: https://webauthn.guide/#authentication + + AuthenticatorAssertionResponse + properties: + id: + type: string + description: | + credential id: identifier of pair of keys, base64 encoded + https://w3c.github.io/webauthn/#ref-for-dom-credential-id + minLength: 59 + maxLength: 118 + rawId: + type: string + description: | + raw credential id: identifier of pair of keys, base64 encoded. + minLength: 59 + maxLength: 118 + response: + type: object + description: | + AuthenticatorAssertionResponse + properties: + authenticatorData: + type: string + description: | + Authenticator data object. + minLength: 49 + maxLength: 256 + clientDataJSON: + type: string + description: | + JSON string with client data. + minLength: 121 + maxLength: 512 + signature: + type: string + description: > + The signature generated by the private key associated with this + credential. + minLength: 59 + maxLength: 256 + userHandle: + type: string + description: | + This field is optionally provided by the authenticator, and + represents the user.id that was supplied during registration. + minLength: 1 + maxLength: 88 + required: + - authenticatorData + - clientDataJSON + - signature + additionalProperties: false + type: + type: string + description: 'response type, we need only the type of public-key' + enum: + - public-key + required: + - id + - rawId + - response + - type + additionalProperties: false + ThirdpartyRequestsAuthorizationsIDPutResponseFIDO: + title: ThirdpartyRequestsAuthorizationsIDPutResponseFIDO + type: object + description: >- + The object sent in the PUT /thirdpartyRequests/authorizations/{ID} + callback. + properties: + signedPayloadType: + $ref: '#/components/schemas/SignedPayloadTypeFIDO' + signedPayload: + $ref: '#/components/schemas/FIDOPublicKeyCredentialAssertion' + required: + - signedPayloadType + - signedPayload + ThirdpartyTransactionIDApproveRequest: + title: ThirdpartyTransactionIDApproveRequest + type: object + properties: + authorizationResponse: + oneOf: + - $ref: >- + #/components/schemas/ThirdpartyRequestsAuthorizationsIDPutResponseGeneric + - $ref: >- + #/components/schemas/ThirdpartyRequestsAuthorizationsIDPutResponseFIDO + required: + - authorizationResponse + ThirdpartyTransactionIDApproveState: + title: ThirdpartyTransactionIDApproveState + description: state of thirdparty transaction + type: string + enum: + - authorizationReceived + - transactionStatusReceived + - errored + ThirdpartyTransactionIDApproveResponseError: + title: ThirdpartyTransactionIDApproveResponseError + type: object + properties: + currentState: + $ref: '#/components/schemas/ThirdpartyTransactionIDApproveState' + errorInformation: + $ref: '#/components/schemas/ErrorInformation' + required: + - currentState + - errorInformation + TransactionRequestState: + title: TransactionRequestState + type: string + enum: + - RECEIVED + - PENDING + - ACCEPTED + - REJECTED + description: |- + Below are the allowed values for the enumeration. + - RECEIVED - Payer FSP has received the transaction from the Payee FSP. + - PENDING - Payer FSP has sent the transaction request to the Payer. + - ACCEPTED - Payer has approved the transaction. + - REJECTED - Payer has rejected the transaction. + ThirdpartyTransactionIDApproveResponseSuccess: + title: ThirdpartyTransactionIDApproveResponseSuccess + type: object + properties: + transactionStatus: + type: object + properties: + transactionId: + $ref: '#/components/schemas/CorrelationId' + transactionRequestState: + $ref: '#/components/schemas/TransactionRequestState' + required: + - transactionId + - transactionRequestState + currentState: + $ref: '#/components/schemas/ThirdpartyTransactionIDApproveState' + required: + - currentState + - transactionStatus + ThirdpartyTransactionIDApproveResponse: + oneOf: + - $ref: '#/components/schemas/ThirdpartyTransactionIDApproveResponseError' + - $ref: '#/components/schemas/ThirdpartyTransactionIDApproveResponseSuccess' + LinkingProvidersState: + title: LinkingProvidersState + description: State of GET /linking/providers request + type: string + enum: + - start + - errored + - providersLookupSuccess + LinkingProvidersResponseError: + title: LinkingProvidersResponseError + type: object + properties: + errorInformation: + $ref: '#/components/schemas/ErrorInformation' + currentState: + $ref: '#/components/schemas/LinkingProvidersState' + required: + - errorInformation + - currentState + LinkingProvidersResponseSuccess: + title: LinkingProvidersResponseSuccess + type: object + properties: + providers: + type: array + items: + $ref: '#/components/schemas/FspId' + currentState: + $ref: '#/components/schemas/LinkingProvidersState' + required: + - providers + - currentState + LinkingProvidersResponse: + oneOf: + - $ref: '#/components/schemas/LinkingProvidersResponseError' + - $ref: '#/components/schemas/LinkingProvidersResponseSuccess' + AccountId: + title: AccountId + type: string + description: > + A long-lived unique account identifier provided by the DFSP. This MUST + NOT + + be Bank Account Number or anything that may expose a User's private bank + + account information. + pattern: '^([0-9A-Za-z_~\-\.]+[0-9A-Za-z_~\-])$' + minLength: 1 + maxLength: 1023 + Name: + title: Name + type: string + pattern: '^(?!\s*$)[\w .,''-]{1,128}$' + description: >- + The API data type Name is a JSON String, restricted by a regular + expression to avoid characters which are generally not used in a name. + + + Regular Expression - The regular expression for restricting the Name + type is "^(?!\s*$)[\w .,'-]{1,128}$". The restriction does not allow a + string consisting of whitespace only, all Unicode characters are + allowed, as well as the period (.) (apostrophe (‘), dash (-), comma (,) + and space characters ( ). + + + **Note:** In some programming languages, Unicode support must be + specifically enabled. For example, if Java is used, the flag + UNICODE_CHARACTER_CLASS must be enabled to allow Unicode characters. + Account: + title: Account + type: object + description: Data model for the complex type Account. + properties: + accountNickname: + $ref: '#/components/schemas/Name' + id: + $ref: '#/components/schemas/AccountId' + currency: + $ref: '#/components/schemas/Currency' + required: + - accountNickname + - id + - currency + AccountsIDPutResponse: + title: AccountsIDPutResponse + type: object + description: 'The object sent in a `PUT /accounts/{ID}` request.' + properties: + accounts: + type: array + items: + $ref: '#/components/schemas/Account' + required: + - accounts + ConsentScopeType: + title: ConsentScopeType + type: string + enum: + - accounts.getBalance + - accounts.transfer + description: | + The scopes requested for a ConsentRequest. + - "accounts.getBalance" - Get the balance of a given account. + - "accounts.transfer" - Initiate a transfer from an account. + LinkingRequestConsentPostRequest: + title: LinkingRequestConsentPostRequest + type: object + description: The object sent in a `POST /linking/request-consent` request. + properties: + toParticipantId: + type: string + consentRequestId: + $ref: '#/components/schemas/CorrelationId' + accounts: + type: array + items: + $ref: '#/components/schemas/Account' + actions: + type: array + items: + $ref: '#/components/schemas/ConsentScopeType' + userId: + type: string + description: ID used to associate request with GET /accounts request. + callbackUri: + type: string + description: >- + The callback uri that the user will be redirected to after + completing the WEB auth channel. + required: + - toParticipantId + - consentRequestId + - accounts + - userId + - callbackUri + - actions + LinkingRequestConsentState: + title: LinkingRequestConsentState + description: State of `POST /linking/request-consent` request + type: string + enum: + - start + - errored + - success + - OTPAuthenticationChannelResponseRecieved + - WebAuthenticationChannelResponseRecieved + LinkingRequestConsentResponseError: + title: LinkingRequestConsentResponseError + type: object + properties: + errorInformation: + $ref: '#/components/schemas/ErrorInformation' + currentState: + $ref: '#/components/schemas/LinkingRequestConsentState' + required: + - errorInformation + - currentState + Scope: + title: Scope + type: object + description: Scope + Account Identifier mapping for a Consent. + example: | + { + accountId: "dfsp.username.5678", + actions: [ "accounts.transfer", "accounts.getBalance" ] + } + properties: + accountId: + $ref: '#/components/schemas/AccountId' + actions: + type: array + items: + $ref: '#/components/schemas/ConsentScopeType' + required: + - accountId + - actions + ConsentRequestChannelTypeWeb: + title: ConsentRequestChannelTypeWeb + type: string + enum: + - WEB + description: | + The web auth channel being used for PUT consentRequest/{ID} request. + ConsentRequestsIDPutResponseWeb: + title: ConsentRequestsIDPutResponseWeb + type: object + description: > + The object sent in a `PUT /consentRequests/{ID}` request. + + + Schema used in the request consent phase of the account linking web + flow, + + the result is the PISP being instructed on a specific URL where this + + supposed user should be redirected. This URL should be a place where + + the user can prove their identity (e.g., by logging in). + properties: + consentRequestId: + $ref: '#/components/schemas/CorrelationId' + scopes: + type: array + items: + $ref: '#/components/schemas/Scope' + authChannels: + type: array + items: + $ref: '#/components/schemas/ConsentRequestChannelTypeWeb' + callbackUri: + type: string + description: >- + The callback uri that the user will be redirected to after + completing the WEB auth channel. + authUri: + type: string + description: >- + The callback uri that the pisp app redirects to for user to complete + their login. + required: + - consentRequestId + - scopes + - authChannels + - callbackUri + - authUri + additionalProperties: false + ConsentRequestChannelTypeOTP: + title: ConsentRequestChannelTypeOTP + type: string + enum: + - OTP + description: | + The OTP auth channel being used for PUT consentRequest/{ID} request. + ConsentRequestsIDPutResponseOTP: + title: ConsentRequestsIDPutResponseOTP + type: object + description: > + The object sent in a `PUT /consentRequests/{ID}` request. + + + Schema used in the request consent phase of the account linking OTP/SMS + flow. + properties: + consentRequestId: + $ref: '#/components/schemas/CorrelationId' + scopes: + type: array + items: + $ref: '#/components/schemas/Scope' + authChannels: + type: array + items: + $ref: '#/components/schemas/ConsentRequestChannelTypeOTP' + callbackUri: + type: string + description: >- + The callback uri that the user will be redirected to after + completing the WEB auth channel. + required: + - consentRequestId + - scopes + - authChannels + - callbackUri + additionalProperties: false + LinkingRequestConsentResponseSuccess: + title: LinkingRequestConsentResponseSuccess + type: object + properties: + channelResponse: + oneOf: + - $ref: '#/components/schemas/ConsentRequestsIDPutResponseWeb' + - $ref: '#/components/schemas/ConsentRequestsIDPutResponseOTP' + currentState: + $ref: '#/components/schemas/LinkingRequestConsentState' + required: + - channelResponse + - currentState + LinkingRequestConsentResponse: + oneOf: + - $ref: '#/components/schemas/LinkingRequestConsentResponseError' + - $ref: '#/components/schemas/LinkingRequestConsentResponseSuccess' + LinkingRequestConsentIDAuthenticateRequest: + title: LinkingRequestConsentIDAuthenticateRequest + description: 'PATCH /linking/request-consent/{ID}/authenticate Request object' + type: object + properties: + authToken: + type: string + required: + - authToken + additionalProperties: false + LinkingRequestConsentIDAuthenticateState: + title: LinkingRequestConsentIDAuthenticateState + description: State of PATCH linking request consent Authenticate + type: string + enum: + - errored + - consentReceivedAwaitingCredential + LinkingRequestConsentIDAuthenticateResponseError: + title: LinkingRequestConsentIDAuthenticateResponseError + type: object + properties: + errorInformation: + $ref: '#/components/schemas/ErrorInformation' + currentState: + $ref: '#/components/schemas/LinkingRequestConsentIDAuthenticateState' + required: + - errorInformation + - currentState + ConsentsPostRequestPISP: + title: ConsentPostRequestPISP + type: object + description: >- + The object sent in a `POST /consents` request to PISP by DFSP to ask for + delivering the credential object. + properties: + consentId: + allOf: + - $ref: '#/components/schemas/CorrelationId' + description: | + Common ID between the PISP and FSP for the Consent object + decided by the DFSP who creates the Consent + This field is REQUIRED for POST /consent. + consentRequestId: + allOf: + - $ref: '#/components/schemas/CorrelationId' + description: | + The id of the ConsentRequest that was used to initiate the + creation of this Consent. + scopes: + type: array + items: + $ref: '#/components/schemas/Scope' + required: + - consentId + - scopes + - consentRequestId + LinkingRequestConsentIDAuthenticateResponseSuccess: + title: LinkingRequestConsentIDAuthenticateResponse + type: object + properties: + consent: + $ref: '#/components/schemas/ConsentsPostRequestPISP' + challenge: + type: string + currentState: + $ref: '#/components/schemas/LinkingRequestConsentIDAuthenticateState' + required: + - consent + - challenge + - currentState + LinkingRequestConsentIDAuthenticateResponse: + oneOf: + - $ref: >- + #/components/schemas/LinkingRequestConsentIDAuthenticateResponseError + - $ref: >- + #/components/schemas/LinkingRequestConsentIDAuthenticateResponseSuccess + FIDOPublicKeyCredentialAttestation: + title: FIDOPublicKeyCredentialAttestation + type: object + description: > + An object sent in a `PUT /consents/{ID}` request. + + Based on https://w3c.github.io/webauthn/#iface-pkcredential + + and mostly on: https://webauthn.guide/#registration + + AuthenticatorAttestationResponse + + https://w3c.github.io/webauthn/#dom-authenticatorattestationresponse-attestationobject + properties: + id: + type: string + description: | + credential id: identifier of pair of keys, base64 encoded + https://w3c.github.io/webauthn/#ref-for-dom-credential-id + minLength: 59 + maxLength: 118 + rawId: + type: string + description: | + raw credential id: identifier of pair of keys, base64 encoded + minLength: 59 + maxLength: 118 + response: + type: object + description: | + AuthenticatorAttestationResponse + properties: + clientDataJSON: + type: string + description: | + JSON string with client data + minLength: 121 + maxLength: 512 + attestationObject: + type: string + description: | + CBOR.encoded attestation object + minLength: 306 + maxLength: 2048 + required: + - clientDataJSON + - attestationObject + additionalProperties: false + type: + type: string + description: 'response type, we need only the type of public-key' + enum: + - public-key + required: + - id + - rawId + - response + - type + additionalProperties: false + LinkingRequestConsentIDPassCredentialRequest: + title: LinkingRequestConsentIDPassCredentialRequest + description: 'POST /linking/request-consent/{ID}/pass-credential request object' + type: object + properties: + credential: + type: object + properties: + payload: + $ref: '#/components/schemas/FIDOPublicKeyCredentialAttestation' + required: + - payload + required: + - credential + additionalProperties: false + LinkingRequestConsentIDPassCredentialState: + title: LinkingRequestConsentIDPassCredentialState + description: State of post linking request consent pass credential + type: string + enum: + - errored + - accountsLinked + LinkingRequestConsentIDPassCredentialResponseError: + title: LinkingRequestConsentIDPassCredentialResponseError + type: object + properties: + errorInformation: + $ref: '#/components/schemas/ErrorInformation' + currentState: + $ref: '#/components/schemas/LinkingRequestConsentIDPassCredentialState' + required: + - errorInformation + - currentState + ConsentStatusTypeVerified: + title: ConsentStatusType + type: string + enum: + - VERIFIED + description: | + The status of the Consent. + - "VERIFIED" - The Consent is valid and verified. + LinkingRequestConsentIDPassCredentialResponseSuccess: + title: LinkingRequestConsentIDPassCredentialResponseSuccess + type: object + properties: + credential: + type: object + properties: + status: + $ref: '#/components/schemas/ConsentStatusTypeVerified' + required: + - status + currentState: + $ref: '#/components/schemas/LinkingRequestConsentIDPassCredentialState' + required: + - credential + - currentState + LinkingRequestConsentIDPassCredentialResponse: + oneOf: + - $ref: >- + #/components/schemas/LinkingRequestConsentIDPassCredentialResponseError + - $ref: >- + #/components/schemas/LinkingRequestConsentIDPassCredentialResponseSuccess + parameters: + ID: + name: ID + in: path + required: true + schema: + type: string + description: The identifier value. diff --git a/test/func/config/ml-testing-toolkit/spec_files/reports/templates/newman/html_template.html b/test/func/config/ttk-hub/spec_files/reports/templates/newman/html_template.html similarity index 100% rename from test/func/config/ml-testing-toolkit/spec_files/reports/templates/newman/html_template.html rename to test/func/config/ttk-hub/spec_files/reports/templates/newman/html_template.html diff --git a/test/func/config/ml-testing-toolkit/spec_files/reports/templates/newman/pdf_template.html b/test/func/config/ttk-hub/spec_files/reports/templates/newman/pdf_template.html similarity index 100% rename from test/func/config/ml-testing-toolkit/spec_files/reports/templates/newman/pdf_template.html rename to test/func/config/ttk-hub/spec_files/reports/templates/newman/pdf_template.html diff --git a/test/func/config/ml-testing-toolkit/spec_files/reports/templates/testcase_definition/table_view.html b/test/func/config/ttk-hub/spec_files/reports/templates/testcase_definition/table_view.html similarity index 100% rename from test/func/config/ml-testing-toolkit/spec_files/reports/templates/testcase_definition/table_view.html rename to test/func/config/ttk-hub/spec_files/reports/templates/testcase_definition/table_view.html diff --git a/test/func/config/ml-testing-toolkit/spec_files/rules_response/config.json b/test/func/config/ttk-hub/spec_files/rules_callback/config.json similarity index 100% rename from test/func/config/ml-testing-toolkit/spec_files/rules_response/config.json rename to test/func/config/ttk-hub/spec_files/rules_callback/config.json diff --git a/test/func/config/ttk-hub/spec_files/rules_callback/default.json b/test/func/config/ttk-hub/spec_files/rules_callback/default.json new file mode 100644 index 000000000..1ec5fed60 --- /dev/null +++ b/test/func/config/ttk-hub/spec_files/rules_callback/default.json @@ -0,0 +1,1247 @@ +[ + { + "ruleId": 30, + "priority": 1, + "description": "ttkpayeefsp PUT Notifications Failure Test-case due to invalid FSPIOP-Destination", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "conditions": { + "all": [ + { + "fact": "headers", + "operator": "equal", + "value": "testingtoolkitdfsp", + "path": "FSPIOP-Source" + }, + { + "fact": "headers", + "operator": "equal", + "value": "ttkpayeefsp", + "path": "FSPIOP-Destination" + }, + { + "fact": "body", + "operator": "numericEqual", + "value": "104", + "path": "amount.amount" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/transfers" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": "put", + "path": "/transfers/{ID}", + "params": { + "headers": { + "FSPIOP-Destination": "doesnotexistfsp" + }, + "scripts": { + "scriptingEngine": "postman" + } + }, + "type": "MOCK_CALLBACK" + }, + "type": "callback", + "version": 1 + }, + { + "ruleId": 29, + "priority": 1, + "description": "ttkpayeefsp PATCH Notifications Failure Test-case due to invalid fulfilment", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "conditions": { + "all": [ + { + "fact": "headers", + "operator": "equal", + "value": "testingtoolkitdfsp", + "path": "FSPIOP-Source" + }, + { + "fact": "headers", + "operator": "equal", + "value": "ttkpayeefsp", + "path": "FSPIOP-Destination" + }, + { + "fact": "headers", + "operator": "equal", + "value": "application/vnd.interoperability.transfers+json;version=1.1", + "path": "Content-Type" + }, + { + "fact": "body", + "operator": "numericEqual", + "value": "103", + "path": "amount.amount" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/transfers" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": "put", + "path": "/transfers/{ID}", + "params": { + "body": { + "fulfilment": "WLctttbu2HvTsa1XWvUoGRcQozHsqeu9Ahl2JW9Bsu8", + "completedTimestamp": "{$function.generic.curDateISO}", + "transferState": "RESERVED", + "extensionList": null + }, + "scripts": { + "scriptingEngine": "postman" + } + }, + "type": "MOCK_CALLBACK" + }, + "type": "callback", + "version": 1 + }, + { + "ruleId": 28, + "priority": 1, + "description": "ttkpayeefsp PATCH Notifications Failure Test-case due to invalid FSPIOP-Destination", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "conditions": { + "all": [ + { + "fact": "headers", + "operator": "equal", + "value": "testingtoolkitdfsp", + "path": "FSPIOP-Source" + }, + { + "fact": "headers", + "operator": "equal", + "value": "ttkpayeefsp", + "path": "FSPIOP-Destination" + }, + { + "fact": "headers", + "operator": "equal", + "value": "application/vnd.interoperability.transfers+json;version=1.1", + "path": "Content-Type" + }, + { + "fact": "body", + "operator": "numericEqual", + "value": "102", + "path": "amount.amount" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/transfers" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": "put", + "path": "/transfers/{ID}", + "params": { + "headers": { + "FSPIOP-Destination": "doesnotexistfsp" + }, + "body": { + "transferState": "RESERVED" + }, + "scripts": { + "scriptingEngine": "postman" + } + }, + "type": "MOCK_CALLBACK" + }, + "type": "callback", + "version": 1 + }, + { + "ruleId": 27, + "priority": 1, + "description": "ttkpayeefsp PATCH Notifications Success Test-case", + "apiVersion": { + "minorVersion": 1, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "conditions": { + "all": [ + { + "fact": "headers", + "operator": "equal", + "value": "testingtoolkitdfsp", + "path": "FSPIOP-Source" + }, + { + "fact": "headers", + "operator": "equal", + "value": "ttkpayeefsp", + "path": "FSPIOP-Destination" + }, + { + "fact": "headers", + "operator": "equal", + "value": "application/vnd.interoperability.transfers+json;version=1.1", + "path": "Content-Type" + }, + { + "fact": "body", + "operator": "numericEqual", + "value": "101", + "path": "amount.amount" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/transfers" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": "put", + "path": "/transfers/{ID}", + "params": { + "body": { + "transferState": "RESERVED" + }, + "scripts": { + "scriptingEngine": "postman" + } + }, + "type": "MOCK_CALLBACK" + }, + "type": "callback", + "version": 1 + }, + { + "ruleId": 20, + "priority": 1, + "description": "get /parties/{Type}/{ID} for pinkbank", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "conditions": { + "all": [ + { + "fact": "headers", + "operator": "equal", + "value": "pinkbankfsp", + "path": "FSPIOP-Source" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/parties/{Type}/{ID}" + }, + { + "fact": "method", + "operator": "equal", + "value": "get" + } + ] + }, + "event": { + "method": "put", + "path": "/parties/{Type}/{ID}", + "params": { + "headers": { + "Content-Type": "application/vnd.interoperability.parties+json;version=1.0", + "FSPIOP-Source": "greenbankfsp" + }, + "body": { + "party": { + "partyIdInfo": { + "fspId": "greenbankfsp" + }, + "merchantClassificationCode": null, + "name": "Justin Pierre", + "personalInfo": { + "complexName": { + "firstName": "Justin", + "middleName": "Pierre", + "lastName": "Trudeau" + }, + "dateOfBirth": "1971-12-25" + } + } + }, + "scripts": { + "scriptingEngine": "postman" + } + }, + "type": "MOCK_CALLBACK" + }, + "type": "callback", + "version": 1 + }, + { + "ruleId": 1, + "priority": 1, + "description": "get /parties/{Type}/{ID}", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "conditions": { + "all": [ + { + "fact": "operationPath", + "operator": "equal", + "value": "/parties/{Type}/{ID}" + }, + { + "fact": "method", + "operator": "equal", + "value": "get" + } + ] + }, + "event": { + "method": "put", + "path": "/parties/{Type}/{ID}", + "params": { + "headers": { + "Content-Type": "application/vnd.interoperability.parties+json;version=1.0" + }, + "body": { + "party": { + "partyIdInfo": { + "partySubIdOrType": null + } + } + }, + "scripts": {} + }, + "type": "MOCK_CALLBACK" + }, + "type": "callback", + "version": 1 + }, + { + "type": "callback", + "version": 1, + "ruleId": 2, + "priority": 1, + "description": "post /quotes", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "conditions": { + "all": [ + { + "fact": "operationPath", + "operator": "equal", + "value": "/quotes" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": "put", + "path": "/quotes/{ID}", + "params": { + "body": { + "transferAmount": { + "currency": "{$request.body.amount.currency}", + "amount": "{$environment.quoteTransferAmount}" + }, + "payeeReceiveAmount": { + "currency": "{$request.body.amount.currency}", + "amount": "{$environment.quotePayeeReceiveAmount}" + }, + "payeeFspFee": { + "currency": "{$request.body.amount.currency}", + "amount": "{$environment.quotePayeeFspFee}" + }, + "payeeFspCommission": { + "currency": "{$request.body.amount.currency}", + "amount": "{$environment.quotePayeeFspCommission}" + }, + "expiration": "{$environment.quoteExpiration}" + }, + "scripts": { + "exec": [ + "const quoteBody = JSON.parse(request.body)", + "environment.quoteTransferAmount = quoteBody.amount.amount", + "environment.quotePayeeFspFee = 0.2", + "environment.quotePayeeFspCommission = 0.3", + "environment.quotePayeeReceiveAmount = quoteBody.amount.amount", + "if (quoteBody.amountType === 'RECEIVE') {", + " environment.quoteTransferAmount = (+quoteBody.amount.amount) + environment.quotePayeeFspFee + environment.quotePayeeFspCommission", + "}", + "environment.quoteExpiration =new Date(new Date().getTime() + 24 * 60 * 60 * 1000).toISOString()" + ], + "scriptingEngine": "javascript" + } + }, + "delay": 0, + "type": "MOCK_CALLBACK" + } + }, + { + "type": "callback", + "version": 1, + "ruleId": 3, + "priority": 1, + "description": "post /transfers", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "conditions": { + "all": [ + { + "fact": "operationPath", + "operator": "equal", + "value": "/transfers" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": "put", + "path": "/transfers/{ID}", + "params": {}, + "delay": 0, + "type": "MOCK_CALLBACK" + } + }, + { + "type": "callback", + "version": 1, + "ruleId": 4, + "priority": 1, + "description": "post /transactionRequests", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "conditions": { + "all": [ + { + "fact": "operationPath", + "operator": "equal", + "value": "/transactionRequests" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": "put", + "path": "/transactionRequests/{ID}", + "params": { + "body": { + "transactionRequestState": "RECEIVED" + } + }, + "delay": 0, + "type": "MOCK_CALLBACK" + } + }, + { + "type": "callback", + "version": 1, + "ruleId": 5, + "priority": 1, + "description": "get /quotes/{ID}", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "conditions": { + "all": [ + { + "fact": "operationPath", + "operator": "equal", + "value": "/quotes/{ID}" + }, + { + "fact": "method", + "operator": "equal", + "value": "get" + } + ] + }, + "event": { + "method": "put", + "path": "/quotes/{ID}", + "params": {}, + "delay": 0, + "type": "MOCK_CALLBACK" + } + }, + { + "type": "callback", + "version": 1, + "ruleId": 6, + "priority": 1, + "description": "get /participants/{Type}/{ID}/{SubId}", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "conditions": { + "all": [ + { + "fact": "operationPath", + "operator": "equal", + "value": "/participants/{Type}/{ID}/{SubId}" + }, + { + "fact": "method", + "operator": "equal", + "value": "get" + } + ] + }, + "event": { + "method": "put", + "path": "/participants/{Type}/{ID}/{SubId}", + "params": {}, + "delay": 0, + "type": "MOCK_CALLBACK" + } + }, + { + "type": "callback", + "version": 1, + "ruleId": 7, + "priority": 1, + "description": "post /participants/{Type}/{ID}/{SubId}", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "conditions": { + "all": [ + { + "fact": "operationPath", + "operator": "equal", + "value": "/participants/{Type}/{ID}/{SubId}" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": "put", + "path": "/participants/{Type}/{ID}/{SubId}", + "params": {}, + "delay": 0, + "type": "MOCK_CALLBACK" + } + }, + { + "type": "callback", + "version": 1, + "ruleId": 8, + "priority": 1, + "description": "get /participants/{Type}/{ID}", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "conditions": { + "all": [ + { + "fact": "operationPath", + "operator": "equal", + "value": "/participants/{Type}/{ID}" + }, + { + "fact": "method", + "operator": "equal", + "value": "get" + } + ] + }, + "event": { + "method": "put", + "path": "/participants/{Type}/{ID}", + "params": {}, + "delay": 0, + "type": "MOCK_CALLBACK" + } + }, + { + "type": "callback", + "version": 1, + "ruleId": 9, + "priority": 1, + "description": "post /participants/{Type}/{ID}", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "conditions": { + "all": [ + { + "fact": "operationPath", + "operator": "equal", + "value": "/participants/{Type}/{ID}" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": "put", + "path": "/participants/{Type}/{ID}", + "params": {}, + "delay": 0, + "type": "MOCK_CALLBACK" + } + }, + { + "type": "callback", + "version": 1, + "ruleId": 10, + "priority": 1, + "description": "post /participants", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "conditions": { + "all": [ + { + "fact": "operationPath", + "operator": "equal", + "value": "/participants" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": "put", + "path": "/participants/{ID}", + "params": {}, + "delay": 0, + "type": "MOCK_CALLBACK" + } + }, + { + "type": "callback", + "version": 1, + "ruleId": 11, + "priority": 1, + "description": "get /parties/{Type}/{ID}/{SubId}", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "conditions": { + "all": [ + { + "fact": "operationPath", + "operator": "equal", + "value": "/parties/{Type}/{ID}/{SubId}" + }, + { + "fact": "method", + "operator": "equal", + "value": "get" + } + ] + }, + "event": { + "method": "put", + "path": "/parties/{Type}/{ID}/{SubId}", + "params": {}, + "delay": 0, + "type": "MOCK_CALLBACK" + } + }, + { + "type": "callback", + "version": 1, + "ruleId": 12, + "priority": 1, + "description": "get /transactionRequests/{ID}", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "conditions": { + "all": [ + { + "fact": "operationPath", + "operator": "equal", + "value": "/transactionRequests/{ID}" + }, + { + "fact": "method", + "operator": "equal", + "value": "get" + } + ] + }, + "event": { + "method": "put", + "path": "/transactionRequests/{ID}", + "params": {}, + "delay": 0, + "type": "MOCK_CALLBACK" + } + }, + { + "type": "callback", + "version": 1, + "ruleId": 13, + "priority": 1, + "description": "get /authorizations/{ID}", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "conditions": { + "all": [ + { + "fact": "operationPath", + "operator": "equal", + "value": "/authorizations/{ID}" + }, + { + "fact": "method", + "operator": "equal", + "value": "get" + } + ] + }, + "event": { + "method": "put", + "path": "/authorizations/{ID}", + "params": { + "body": { + "responseType": "ENTERED" + } + }, + "delay": 0, + "type": "MOCK_CALLBACK" + } + }, + { + "type": "callback", + "version": 1, + "ruleId": 14, + "priority": 1, + "description": "get /transfers/{ID}", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "conditions": { + "all": [ + { + "fact": "operationPath", + "operator": "equal", + "value": "/transfers/{ID}" + }, + { + "fact": "method", + "operator": "equal", + "value": "get" + } + ] + }, + "event": { + "method": "put", + "path": "/transfers/{ID}", + "params": {}, + "delay": 0, + "type": "MOCK_CALLBACK" + } + }, + { + "type": "callback", + "version": 1, + "ruleId": 15, + "priority": 1, + "description": "get /transactions/{ID}", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "conditions": { + "all": [ + { + "fact": "operationPath", + "operator": "equal", + "value": "/transactions/{ID}" + }, + { + "fact": "method", + "operator": "equal", + "value": "get" + } + ] + }, + "event": { + "method": "put", + "path": "/transactions/{ID}", + "params": { + "body": { + "transactionState": "COMPLETED" + } + }, + "delay": 0, + "type": "MOCK_CALLBACK" + } + }, + { + "type": "callback", + "version": 1, + "ruleId": 16, + "priority": 1, + "description": "get /bulkQuotes/{ID}", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "conditions": { + "all": [ + { + "fact": "operationPath", + "operator": "equal", + "value": "/bulkQuotes/{ID}" + }, + { + "fact": "method", + "operator": "equal", + "value": "get" + } + ] + }, + "event": { + "method": null, + "path": null, + "params": {}, + "delay": 0, + "type": "MOCK_CALLBACK" + } + }, + { + "type": "callback", + "version": 1, + "ruleId": 17, + "priority": 1, + "description": "post /bulkQuotes", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "conditions": { + "all": [ + { + "fact": "operationPath", + "operator": "equal", + "value": "/bulkQuotes" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": "put", + "path": "/bulkQuotes/{ID}", + "params": {}, + "delay": 0, + "type": "MOCK_CALLBACK" + } + }, + { + "type": "callback", + "version": 1, + "ruleId": 18, + "priority": 1, + "description": "get /bulkTransfers/{ID}", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "conditions": { + "all": [ + { + "fact": "operationPath", + "operator": "equal", + "value": "/bulkTransfers/{ID}" + }, + { + "fact": "method", + "operator": "equal", + "value": "get" + } + ] + }, + "event": { + "method": null, + "path": null, + "params": {}, + "delay": 0, + "type": "MOCK_CALLBACK" + } + }, + { + "type": "callback", + "version": 1, + "ruleId": 19, + "priority": 1, + "description": "post /bulkTransfers", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "conditions": { + "all": [ + { + "fact": "operationPath", + "operator": "equal", + "value": "/bulkTransfers" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": "put", + "path": "/bulkTransfers/{ID}", + "params": {}, + "delay": 0, + "type": "MOCK_CALLBACK" + } + }, + { + "ruleId": 21, + "priority": 1, + "description": "get /fxParties/{Type}/{ID}", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fx-api", + "asynchronous": true + }, + "conditions": { + "all": [ + { + "fact": "operationPath", + "operator": "equal", + "value": "/fxParties/{Type}/{ID}" + }, + { + "fact": "method", + "operator": "equal", + "value": "get" + } + ] + }, + "event": { + "method": "put", + "path": "/fxParties/{Type}/{ID}", + "params": { + "scripts": { + "scriptingEngine": "postman" + } + }, + "type": "MOCK_CALLBACK" + }, + "type": "callback", + "version": 1 + }, + { + "ruleId": 22, + "priority": 1, + "description": "get /fxParties/{Type}/{ID}/{SubId}", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fx-api", + "asynchronous": true + }, + "conditions": { + "all": [ + { + "fact": "operationPath", + "operator": "equal", + "value": "/fxParties/{Type}/{ID}/{SubId}" + }, + { + "fact": "method", + "operator": "equal", + "value": "get" + } + ] + }, + "event": { + "method": "put", + "path": "/fxParties/{Type}/{ID}/{SubId}", + "params": { + "scripts": { + "scriptingEngine": "postman" + } + }, + "type": "MOCK_CALLBACK" + }, + "type": "callback", + "version": 1 + }, + { + "ruleId": 23, + "priority": 1, + "description": "post /fxQuotes", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fx-api", + "asynchronous": true + }, + "conditions": { + "all": [ + { + "fact": "operationPath", + "operator": "equal", + "value": "/fxQuotes" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": "put", + "path": "/fxQuotes/{ID}", + "params": { + "scripts": { + "scriptingEngine": "postman" + } + }, + "type": "MOCK_CALLBACK" + }, + "type": "callback", + "version": 1 + }, + { + "ruleId": 24, + "priority": 1, + "description": "get /fxQuotes/{ID}", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fx-api", + "asynchronous": true + }, + "conditions": { + "all": [ + { + "fact": "operationPath", + "operator": "equal", + "value": "/fxQuotes/{ID}" + }, + { + "fact": "method", + "operator": "equal", + "value": "get" + } + ] + }, + "event": { + "method": "put", + "path": "/fxQuotes/{ID}", + "params": { + "scripts": { + "scriptingEngine": "postman" + } + }, + "type": "MOCK_CALLBACK" + }, + "type": "callback", + "version": 1 + }, + { + "ruleId": 25, + "priority": 1, + "description": "post /fxTransfers", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fx-api", + "asynchronous": true + }, + "conditions": { + "all": [ + { + "fact": "operationPath", + "operator": "equal", + "value": "/fxTransfers" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": "put", + "path": "/fxTransfers/{ID}", + "params": { + "scripts": { + "scriptingEngine": "postman" + } + }, + "type": "MOCK_CALLBACK" + }, + "type": "callback", + "version": 1 + }, + { + "ruleId": 26, + "priority": 1, + "description": "get /fxTransfers/{ID}", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 2, + "type": "fx-api", + "asynchronous": true + }, + "conditions": { + "all": [ + { + "fact": "operationPath", + "operator": "equal", + "value": "/fxTransfers/{ID}" + }, + { + "fact": "method", + "operator": "equal", + "value": "get" + } + ] + }, + "event": { + "method": "put", + "path": "/fxTransfers/{ID}", + "params": { + "scripts": { + "scriptingEngine": "postman" + } + }, + "type": "MOCK_CALLBACK" + }, + "type": "callback", + "version": 1 + } +] \ No newline at end of file diff --git a/test/func/config/ttk-hub/spec_files/rules_callback/p2p-limit.json b/test/func/config/ttk-hub/spec_files/rules_callback/p2p-limit.json new file mode 100644 index 000000000..3200dbcea --- /dev/null +++ b/test/func/config/ttk-hub/spec_files/rules_callback/p2p-limit.json @@ -0,0 +1,129 @@ +[ + { + "ruleId": 1, + "priority": 1, + "description": "get /parties/{Type}/{ID}", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "conditions": { + "all": [ + { + "fact": "operationPath", + "operator": "equal", + "value": "/parties/{Type}/{ID}" + }, + { + "fact": "method", + "operator": "equal", + "value": "get" + } + ] + }, + "event": { + "method": "put", + "path": "/parties/{Type}/{ID}", + "params": { + "scripts": { + "exec": [ + "const ttkAllowedAmount = pm.environment.get('ttkAllowedAmount')", + "if (ttkAllowedAmount === undefined) {", + " pm.environment.set('ttkAllowedAmount', 1000)", + "}" + ] + } + }, + "type": "MOCK_CALLBACK" + }, + "type": "callback", + "version": 1 + }, + { + "type": "callback", + "version": 1, + "ruleId": 2, + "priority": 1, + "description": "post /quotes", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "conditions": { + "all": [ + { + "fact": "operationPath", + "operator": "equal", + "value": "/quotes" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": null, + "path": null, + "params": {}, + "delay": 0, + "type": "MOCK_CALLBACK" + } + }, + { + "ruleId": 3, + "priority": 1, + "description": "post /transfers", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "conditions": { + "all": [ + { + "fact": "body", + "operator": "equal", + "value": "testingtoolkitdfsp", + "path": "payeeFsp" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/transfers" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": "put", + "path": "/transfers/{ID}", + "params": { + "scripts": { + "exec": [ + "const body = JSON.parse(pm.request.body)", + "var ttkdfspTotalAmount = pm.environment.get('ttkdfspTotalAmount') || 0", + "var ttkAllowedAmount = pm.environment.get('ttkAllowedAmount')", + "ttkdfspTotalAmount += +body.amount.amount", + "ttkAllowedAmount -= +body.amount.amount", + "pm.environment.set('ttkdfspTotalAmount', ttkdfspTotalAmount)", + "pm.environment.set('ttkAllowedAmount', ttkAllowedAmount)" + ] + } + }, + "type": "MOCK_CALLBACK" + }, + "type": "callback", + "version": 1 + } +] \ No newline at end of file diff --git a/test/func/config/ttk-hub/spec_files/rules_forward/config.json b/test/func/config/ttk-hub/spec_files/rules_forward/config.json new file mode 100644 index 000000000..599ca8fc6 --- /dev/null +++ b/test/func/config/ttk-hub/spec_files/rules_forward/config.json @@ -0,0 +1,3 @@ +{ + "activeRulesFile": "default.json" +} \ No newline at end of file diff --git a/test/func/config/ttk-hub/spec_files/rules_forward/default.json b/test/func/config/ttk-hub/spec_files/rules_forward/default.json new file mode 100644 index 000000000..94f981aed --- /dev/null +++ b/test/func/config/ttk-hub/spec_files/rules_forward/default.json @@ -0,0 +1,356 @@ +[ + { + "ruleId": 1, + "priority": 1, + "description": "get /parties/{Type}/{ID}", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "conditions": { + "all": [ + { + "fact": "pathParams", + "operator": "numberStringGreaterThanInclusive", + "value": "5678123400000", + "path": "ID" + }, + { + "fact": "pathParams", + "operator": "numberStringLessThanInclusive", + "value": "5678123406000", + "path": "ID" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/parties/{Type}/{ID}" + }, + { + "fact": "method", + "operator": "equal", + "value": "get" + } + ] + }, + "event": { + "params": { + "to": "ttksim2", + "dfspId": "ttksim2" + }, + "type": "FORWARD" + }, + "type": "forward", + "version": 1 + }, + { + "ruleId": 2, + "priority": 1, + "description": "get /parties/{Type}/{ID}", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "conditions": { + "all": [ + { + "fact": "pathParams", + "operator": "numberStringGreaterThanInclusive", + "value": "5678123500000", + "path": "ID" + }, + { + "fact": "pathParams", + "operator": "numberStringLessThanInclusive", + "value": "5678123506000", + "path": "ID" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/parties/{Type}/{ID}" + }, + { + "fact": "method", + "operator": "equal", + "value": "get" + } + ] + }, + "event": { + "params": { + "to": "ttksim3", + "dfspId": "ttksim3" + }, + "type": "FORWARD" + }, + "type": "forward", + "version": 1 + }, + { + "ruleId": 3, + "priority": 1, + "description": "put /parties/{Type}/{ID}", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "conditions": { + "all": [ + { + "fact": "operationPath", + "operator": "equal", + "value": "/parties/{Type}/{ID}" + }, + { + "fact": "method", + "operator": "equal", + "value": "put" + } + ] + }, + "event": { + "params": { + "to": "ttksim1", + "dfspId": "ttksim1" + }, + "type": "FORWARD" + }, + "type": "forward", + "version": 1 + }, + { + "ruleId": 4, + "priority": 1, + "description": "post /bulkQuotes to ttksim2", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "conditions": { + "all": [ + { + "fact": "headers", + "operator": "equal", + "value": "ttksim2", + "path": "fspiop-destination" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/bulkQuotes" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "params": { + "to": "ttksim2", + "dfspId": "ttksim2" + }, + "type": "FORWARD" + }, + "type": "forward", + "version": 1 + }, + { + "ruleId": 5, + "priority": 1, + "description": "post /bulkQuotes to ttksim3", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "conditions": { + "all": [ + { + "fact": "headers", + "operator": "equal", + "value": "ttksim3", + "path": "fspiop-destination" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/bulkQuotes" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "params": { + "to": "ttksim3", + "dfspId": "ttksim3" + }, + "type": "FORWARD" + }, + "type": "forward", + "version": 1 + }, + { + "ruleId": 6, + "priority": 1, + "description": "put /bulkQuotes", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "conditions": { + "all": [ + { + "fact": "operationPath", + "operator": "equal", + "value": "/bulkQuotes/{ID}" + }, + { + "fact": "method", + "operator": "equal", + "value": "put" + } + ] + }, + "event": { + "params": { + "to": "ttksim1", + "dfspId": "ttksim1" + }, + "type": "FORWARD" + }, + "type": "forward", + "version": 1 + }, + { + "ruleId": 7, + "priority": 1, + "description": "post /bulkTransfers to ttksim2", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "conditions": { + "all": [ + { + "fact": "body", + "operator": "equal", + "value": "ttksim2", + "path": "payeeFsp" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/bulkTransfers" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "params": { + "to": "ttksim2", + "dfspId": "ttksim2" + }, + "type": "FORWARD" + }, + "type": "forward", + "version": 1 + }, + { + "ruleId": 8, + "priority": 1, + "description": "post /bulkTransfers to ttksim3", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "conditions": { + "all": [ + { + "fact": "body", + "operator": "equal", + "value": "ttksim3", + "path": "payeeFsp" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/bulkTransfers" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "params": { + "to": "ttksim3", + "dfspId": "ttksim3" + }, + "type": "FORWARD" + }, + "type": "forward", + "version": 1 + }, + { + "ruleId": 9, + "priority": 1, + "description": "put /bulkTransfers", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "conditions": { + "all": [ + { + "fact": "operationPath", + "operator": "equal", + "value": "/bulkTransfers/{ID}" + }, + { + "fact": "method", + "operator": "equal", + "value": "put" + } + ] + }, + "event": { + "params": { + "to": "ttksim1", + "dfspId": "ttksim1" + }, + "type": "FORWARD" + }, + "type": "forward", + "version": 1 + } +] \ No newline at end of file diff --git a/test/func/config/ttk-hub/spec_files/rules_response/config.json b/test/func/config/ttk-hub/spec_files/rules_response/config.json new file mode 100644 index 000000000..599ca8fc6 --- /dev/null +++ b/test/func/config/ttk-hub/spec_files/rules_response/config.json @@ -0,0 +1,3 @@ +{ + "activeRulesFile": "default.json" +} \ No newline at end of file diff --git a/test/func/config/ttk-hub/spec_files/rules_response/default.json b/test/func/config/ttk-hub/spec_files/rules_response/default.json new file mode 100644 index 000000000..ba5cfdf1a --- /dev/null +++ b/test/func/config/ttk-hub/spec_files/rules_response/default.json @@ -0,0 +1,278 @@ +[ + { + "type": "response", + "version": 1, + "ruleId": 1, + "priority": 1, + "description": "post /settlementWindows/{id}", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "settlements", + "asynchronous": false + }, + "conditions": { + "all": [ + { + "fact": "operationPath", + "operator": "equal", + "value": "/settlementWindows/{id}" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": null, + "path": null, + "params": { + "body": { + "state": "OPEN" + }, + "statusCode": "200" + }, + "delay": 0, + "type": "MOCK_RESPONSE" + } + }, + { + "type": "response", + "version": 1, + "ruleId": 3, + "priority": 1, + "description": "post /settlements", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "settlements", + "asynchronous": false + }, + "conditions": { + "all": [ + { + "fact": "operationPath", + "operator": "equal", + "value": "/settlements" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": null, + "path": null, + "params": { + "body": { + "id": "123", + "state": "PENDING_SETTLEMENT", + "settlementWindows": [ + [ + { + "id": 123, + "createdDate": "1954-11-03", + "state": "PENDING_SETTLEMENT", + "reason": "do", + "changedDate": "1954-11-03" + } + ] + ], + "participants": [ + { + "id": -91450113, + "accounts": [ + { + "id": 81795155, + "reason": "veniam est proident commodo aliqua", + "state": "PENDING_SETTLEMENT", + "netSettlementAmount": { + "amount": 100, + "currency": "USD" + } + } + ] + } + ] + }, + "statusCode": "200" + }, + "delay": 0, + "type": "FIXED_RESPONSE" + } + }, + { + "type": "response", + "version": 1, + "ruleId": 4, + "priority": 1, + "description": "get /settlements/{id}", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "settlements", + "asynchronous": false + }, + "conditions": { + "all": [ + { + "fact": "operationPath", + "operator": "equal", + "value": "/settlements/{id}" + }, + { + "fact": "method", + "operator": "equal", + "value": "get" + } + ] + }, + "event": { + "method": null, + "path": null, + "params": { + "body": { + "id": "{$request.params.id}", + "state": "PS_TRANSFERS_RECORDED", + "settlementWindows": [ + [ + { + "createdDate": "2020-02-10", + "id": "{$request.params.id}", + "state": "PS_TRANSFERS_RECORDED", + "reason": "amet cillum culpa v", + "changedDate": "2020-02-10" + } + ] + ], + "participants": [ + { + "id": -35933071, + "accounts": [ + { + "id": -14386227, + "reason": "aliquip aliqua nulla deserunt", + "state": "PS_TRANSFERS_RECORDED", + "netSettlementAmount": { + "amount": 100, + "currency": "USD" + } + } + ] + } + ] + }, + "statusCode": "200" + }, + "delay": 0, + "type": "FIXED_RESPONSE" + } + }, + { + "type": "response", + "version": 1, + "ruleId": 5, + "priority": 1, + "description": "get /settlementWindows", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "settlements", + "asynchronous": false + }, + "conditions": { + "all": [ + { + "fact": "operationPath", + "operator": "equal", + "value": "/settlementWindows" + }, + { + "fact": "method", + "operator": "equal", + "value": "get" + } + ] + }, + "event": { + "method": null, + "path": null, + "params": { + "body": [ + { + "createdDate": "2020-02-10", + "id": 123, + "state": "{$request.query.state}", + "reason": "string", + "changedDate": "2020-02-10" + } + ], + "statusCode": "200" + }, + "delay": 0, + "type": "FIXED_RESPONSE" + } + }, + { + "ruleId": 6, + "priority": 1, + "description": "post /bulkTransfers", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true, + "specFile": "spec_files/api_definitions/fspiop_1.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/fspiop_1.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/fspiop_1.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/fspiop_1.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/fspiop_1.0/trigger_templates" + }, + "conditions": { + "all": [ + { + "fact": "operationPath", + "operator": "equal", + "value": "/bulkTransfers" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": null, + "path": null, + "params": { + "scripts": { + "exec": [ + "// environment.gvk = 'asdf'", + "const requestBody = JSON.parse(request.body)", + "const totalAmount = requestBody.individualTransfers.map(transfer=>Number(transfer.transferAmount.amount)).reduce((a,b)=>Number(a)+Number(b))", + "if(environment.positions === undefined) {", + " environment.positions = {}", + "}", + "if(environment.positions[requestBody.payeeFsp] === undefined) {", + " environment.positions[requestBody.payeeFsp] = 0", + "}", + "if(environment.positions[requestBody.payerFsp] === undefined) {", + " environment.positions[requestBody.payerFsp] = 0", + "}", + "environment.positions[requestBody.payeeFsp] = Number(environment.positions[requestBody.payeeFsp]) + totalAmount", + "environment.positions[requestBody.payerFsp] = Number(environment.positions[requestBody.payerFsp]) - totalAmount" + ], + "scriptingEngine": "javascript" + } + }, + "type": "MOCK_RESPONSE" + }, + "type": "response", + "version": 1 + } +] \ No newline at end of file diff --git a/test/func/config/ttk-hub/spec_files/rules_validation/config.json b/test/func/config/ttk-hub/spec_files/rules_validation/config.json new file mode 100644 index 000000000..599ca8fc6 --- /dev/null +++ b/test/func/config/ttk-hub/spec_files/rules_validation/config.json @@ -0,0 +1,3 @@ +{ + "activeRulesFile": "default.json" +} \ No newline at end of file diff --git a/test/func/config/ml-testing-toolkit/spec_files/rules_callback/default.json b/test/func/config/ttk-hub/spec_files/rules_validation/default.json similarity index 100% rename from test/func/config/ml-testing-toolkit/spec_files/rules_callback/default.json rename to test/func/config/ttk-hub/spec_files/rules_validation/default.json diff --git a/test/func/config/ttk-hub/spec_files/rules_validation/p2p-limit.json b/test/func/config/ttk-hub/spec_files/rules_validation/p2p-limit.json new file mode 100644 index 000000000..232bee20e --- /dev/null +++ b/test/func/config/ttk-hub/spec_files/rules_validation/p2p-limit.json @@ -0,0 +1,55 @@ +[ + { + "ruleId": 1, + "priority": 1, + "description": "post /quotes", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "fspiop", + "asynchronous": true + }, + "conditions": { + "all": [ + { + "fact": "body", + "operator": "numericGreaterThan", + "value": "{$environment.ttkAllowedAmount}", + "path": "amount.amount" + }, + { + "fact": "body", + "operator": "equal", + "value": "testingtoolkitdfsp", + "path": "payee.partyIdInfo.fspId" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/quotes" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": "put", + "path": "/quotes/{ID}/error", + "params": { + "body": { + "errorInformation": { + "errorCode": "5100", + "errorDescription": "The total allowed amount for the dfsp has been reached" + } + }, + "scripts": {} + }, + "type": "MOCK_ERROR_CALLBACK" + }, + "type": "validation", + "version": 1 + } +] \ No newline at end of file diff --git a/test/func/config/ttk-hub/spec_files/system_config.json b/test/func/config/ttk-hub/spec_files/system_config.json new file mode 100644 index 000000000..5f81208fe --- /dev/null +++ b/test/func/config/ttk-hub/spec_files/system_config.json @@ -0,0 +1,139 @@ +{ + "API_PORT": 4040, + "HOSTING_ENABLED": false, + "REQUEST_PAYLOAD_MAX_BYTES": 200485760, + "INBOUND_MUTUAL_TLS_ENABLED": false, + "OUTBOUND_MUTUAL_TLS_ENABLED": false, + "CONFIG_VERSIONS": { + "response": 1, + "callback": 1, + "validation": 1, + "forward": 1, + "userSettings": 1 + }, + "DB": { + "URI": "mongodb://ttk:ttk@localhost:27017/ttk" + }, + "OAUTH": { + "AUTH_ENABLED": false, + "APP_OAUTH_CLIENT_KEY": "ttk", + "APP_OAUTH_CLIENT_SECRET": "secret", + "MTA_ROLE": "Application/MTA", + "PTA_ROLE": "Application/PTA", + "EVERYONE_ROLE": "Internal/everyone", + "OAUTH2_TOKEN_ISS": "http://mojaloop-testing-toolkit:5050/api/oauth2/token", + "OAUTH2_ISSUER": "http://mojaloop-testing-toolkit:5050/api/oauth2/token", + "EMBEDDED_CERTIFICATE": "CERTIFICATE" + }, + "CONNECTION_MANAGER": { + "ENABLED": false, + "API_URL": "http://connection-manager-api:5061", + "AUTH_ENABLED": false, + "HUB_USERNAME": "hub", + "HUB_PASSWORD": "hub" + }, + "KEYCLOAK": { + "ENABLED": false, + "API_URL": "http://localhost:8080", + "REALM": "testingtoolkit", + "ADMIN_REALM": "master", + "ADMIN_USERNAME": "admin", + "ADMIN_PASSWORD": "admin", + "ADMIN_CLIENT_ID": "admin-cli" + }, + "SERVER_LOGS": { + "ENABLED": true, + "RESULTS_PAGE_SIZE": 50, + "ADAPTER": { + "TYPE": "ELASTICSEARCH", + "INDEX": "moja*", + "API_URL": "http://dev1-elasticsearch.mojaloop.live/" + } + }, + "HTTP_CLIENT": { + "KEEP_ALIVE": true, + "MAX_SOCKETS": 50, + "UNUSED_AGENTS_EXPIRY_MS": 1800000, + "UNUSED_AGENTS_CHECK_TIMER_MS": 300000 + }, + "INIT_CONFIG": { + "objectStore": {} + }, + "API_DEFINITIONS": [ + { + "type": "fspiop", + "version": "1.0", + "folderPath": "fspiop_1.0", + "asynchronous": true + }, + { + "type": "fspiop", + "version": "1.1", + "folderPath": "fspiop_1.1", + "asynchronous": true + }, + { + "type": "settlements", + "version": "1.0", + "folderPath": "settlements_1.0" + }, + { + "type": "settlements", + "version": "2.0", + "folderPath": "settlements_2.0", + "prefix": "v2" + }, + { + "type": "central_admin", + "caption": "(old)", + "version": "9.3", + "folderPath": "central_admin_old_9.3" + }, + { + "type": "central_admin", + "version": "1.0", + "folderPath": "central_admin_1.0" + }, + { + "type": "als_admin", + "version": "1.1", + "folderPath": "als_admin_1.1" + }, + { + "type": "mojaloop_simulator", + "version": "0.1", + "folderPath": "mojaloop_simulator_0.1" + }, + { + "type": "mojaloop_simulator_inbound", + "version": "1.4", + "folderPath": "mojaloop_simulator_sim_1.4" + }, + { + "type": "mojaloop_sdk_outbound_scheme_adapter", + "version": "1.0", + "folderPath": "mojaloop_sdk_outbound_scheme_adapter_1.0", + "hostnames": [], + "prefix": "/sdk-out" + }, + { + "type": "payment_manager", + "version": "1.4", + "folderPath": "payment_manager_1.4", + "hostnames": [ + "pm4ml.hostname.here" + ] + }, + { + "type": "fx-api", + "version": "2.0", + "folderPath": "fx-api_2.0", + "asynchronous": true + }, + { + "type": "thirdparty_sdk_outbound", + "version": "0.1", + "folderPath": "thirdparty_sdk_outbound_0.1" + } + ] +} \ No newline at end of file diff --git a/test/func/config/ttk-hub/spec_files/user_config.json b/test/func/config/ttk-hub/spec_files/user_config.json new file mode 100644 index 000000000..b155d0df6 --- /dev/null +++ b/test/func/config/ttk-hub/spec_files/user_config.json @@ -0,0 +1,112 @@ +{ + "VERSION": 1, + "CALLBACK_ENDPOINT": "http://localhost:4040", + "CALLBACK_RESOURCE_ENDPOINTS": { + "enabled": false, + "endpoints": [ + { + "method": "put", + "path": "/parties/{Type}/{ID}", + "endpoint": "http://localhost:4002" + }, + { + "method": "put", + "path": "/quotes/{ID}", + "endpoint": "http://localhost:3002" + }, + { + "method": "put", + "path": "/transfers/{ID}", + "endpoint": "http://localhost:3000" + } + ] + }, + "HUB_ONLY_MODE": true, + "ENDPOINTS_DFSP_WISE": { + "dfsps": { + "ttksim1": { + "defaultEndpoint": "http://ttksim1-sdk-api-svc:4000", + "endpoints": [] + }, + "ttksim2": { + "defaultEndpoint": "http://ttksim2-sdk-api-svc:4000", + "endpoints": [] + }, + "ttksim3": { + "defaultEndpoint": "http://ttksim3-sdk-api-svc:4000", + "endpoints": [] + } + } + }, + "SEND_CALLBACK_ENABLE": true, + "FSPID": "testingtoolkitdfsp", + "DEFAULT_USER_FSPID": "userdfsp", + "TRANSFERS_VALIDATION_WITH_PREVIOUS_QUOTES": true, + "TRANSFERS_VALIDATION_ILP_PACKET": true, + "TRANSFERS_VALIDATION_CONDITION": true, + "ILP_SECRET": "secret", + "VERSIONING_SUPPORT_ENABLE": true, + "VALIDATE_INBOUND_JWS": false, + "VALIDATE_INBOUND_PUT_PARTIES_JWS": false, + "JWS_SIGN": false, + "JWS_SIGN_PUT_PARTIES": false, + "CLIENT_MUTUAL_TLS_ENABLED": false, + "ADVANCED_FEATURES_ENABLED": true, + "CALLBACK_TIMEOUT": 10000, + "DEFAULT_REQUEST_TIMEOUT": 3000, + "SCRIPT_TIMEOUT": 5000, + "LOG_SERVER_UI_URL": "http://dev1-efk.mojaloop.live/app/kibana", + "UI_CONFIGURATION": { + "MOBILE_SIMULATOR": { + "HUB_CONSOLE_ENABLED": true + } + }, + "CLIENT_TLS_CREDS": [ + { + "HOST": "testfsp1", + "CERT": "-----BEGIN CERTIFICATE-----\nMIIFATCCAumgAwIBAgIUEcEtqgcXBoTykvaD6PprzY8kxpYwDQYJKoZIhvcNAQEL\nBQAwfzERMA8GA1UEChMITW9kdXNCb3gxHDAaBgNVBAsTE0luZnJhc3RydWN0dXJl\nIFRlYW0xTDBKBgNVBAMTQ3Rlc3Rmc3AxLnFhLnByZS5teWFubWFycGF5LXByZS5p\nby5pbnRlcm5hbCB0ZXN0ZnNwMSBJbnRlcm1lZGlhdGUgQ0EwHhcNMjEwMjIyMTkw\nMTEyWhcNMjMwMjIzMDY0MDA2WjBdMREwDwYDVQQKEwhNb2R1c0JveDEcMBoGA1UE\nCxMTSW5mcmFzdHJ1Y3R1cmUgVGVhbTEqMCgGA1UEAxMhdGVzdGZzcDEucWEucHJl\nLm15YW5tYXJwYXktcHJlLmlvMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKC\nAQEApndEBbmdlfrpnidagKb2D32bEL+iGYxLEicdQVs24018zNPdbrIYtXyDjgjA\nq718HH5XQW2FSz6cA1CbQ6jLuY88EZRUiCSJ4rCkENWw+mpVLyOd+mcYU4JwOQNC\nP+W8GGcW/haifkXtHEDUO4pIxnXWC6DftvxZ3TH5PxtWO8aJcsoj94oBTPOhnGi0\nC356XyseYl7o7hdxZu3DvY3Wyh/k5pDDHOCjQYxl9wjtW+BVWMCFxRaCu4f/3LVj\nca9BccwZ8O4Rdhu6lhJEUCUgTqdx3vXRB1xzwHT0W7gariy4RVbvwE35AaCliyEr\n4O5WlCvAMOct7POYDAwNuoeb7wIDAQABo4GWMIGTMA4GA1UdDwEB/wQEAwIDqDAT\nBgNVHSUEDDAKBggrBgEFBQcDAjAdBgNVHQ4EFgQU2alVxVOOplYXiLAYCDaII4E0\n/WgwHwYDVR0jBBgwFoAUCFvcCetcirxZPE3N6qMdOo5H7Z4wLAYDVR0RBCUwI4Ih\ndGVzdGZzcDEucWEucHJlLm15YW5tYXJwYXktcHJlLmlvMA0GCSqGSIb3DQEBCwUA\nA4ICAQBkX5LItY0calp7NT21O8z+iufVNV8onEch4J7HJjEVwtCB4UVl7LrWJ3cw\n9KLt7nj85/AUuuhtNPJO9DW/x+0xRyW94Ef5MYHP3nheFWTag8riYl/1SXljOssS\nHCpTvRhirnfGeqBGO1OBwCbkYNIEZI95eMerVoPFm0PfGBb4DJ6mUdfc3qzeOP7K\nOlE5VMhwH2PYv1TS7Hpj1k/1dxpdvyOs7EKVvWD+OokLhJaHgU8NWVetTUtsXSN/\nTv06ZN8JGTN/Udm7POVyEaol8Jw2FRGGKcwOBKbqroNs6POqTofqZeL4SFAkzzQL\nvOAhbQIB6GSznG1Gg1G9IjGVCMXUhpNK2PD8RR1ovzi0MZlRkITGRPhBYQf5xMFl\nZeq0mGFQR3VYDdlwT0O37C8fpaYvpdupeYdxcB623PNz1VkO1MbsXnOoHY8kcFGa\nMh4IARCeR/MwXNWHpGrd6J5Mzmhk0Vy8GyBbqcROUpNR/XTZYRTyfTEq5+amJyLi\n67OB9FP5cS7oQhj7gsaQCTJlxbh/CjmQdKmIimWSEZkDePK5eExNPafBk47tx4KA\nFmh9pIqRyheROesa/zTDGYySNcVd14dl703pyZQNO4b5rap0SZoyGDTfI+7OqAHM\nAz0kWYyZps2nqPZgbwDFigIy2TESvoXahCCtNUoCy9sawa3Diw==\n-----END CERTIFICATE-----", + "KEY": "-----BEGIN RSA PRIVATE KEY-----\nMIIEpAIBAAKCAQEApndEBbmdlfrpnidagKb2D32bEL+iGYxLEicdQVs24018zNPd\nbrIYtXyDjgjAq718HH5XQW2FSz6cA1CbQ6jLuY88EZRUiCSJ4rCkENWw+mpVLyOd\n+mcYU4JwOQNCP+W8GGcW/haifkXtHEDUO4pIxnXWC6DftvxZ3TH5PxtWO8aJcsoj\n94oBTPOhnGi0C356XyseYl7o7hdxZu3DvY3Wyh/k5pDDHOCjQYxl9wjtW+BVWMCF\nxRaCu4f/3LVjca9BccwZ8O4Rdhu6lhJEUCUgTqdx3vXRB1xzwHT0W7gariy4RVbv\nwE35AaCliyEr4O5WlCvAMOct7POYDAwNuoeb7wIDAQABAoIBAB4YIawHSn36xpFY\n+/uWM5XJV2dHvb5wpoG5oIhYPSwKri05gCaq+9yTjhT3cB2cO/vKu2uQqTBZOUtA\nH1G0CmCZjHqBHmcec+8PkBmbCEu9PXkwLzc9vCAczL0B4dA7cC3ZNUbqQKYjbiJV\ndgjtjwqR8whXJRqntHdQuYa3InfbufcHNHhSXJwE9MqVRpsv/BfY9wjhQfGBHUnT\nCz41xj1bu8Uy4+/1sRF/l9fYDm5E6WbgzvI49/fM7hA+8fQqoRkFLlEzzBhWb93Q\n2qVo2Y5RhVpffdyxPYX7b9RI7UmUZYp2sLl5GYj5ZzTzsffwUdPl2pZlRkYJGvUo\nortpToECgYEA17NVIZgeQ5VcSsZKGJlzPkcdPoWCk7RY5DugxTaNwSE/uO25B/Ax\nBPE6ZC9LbfXyfTQXaam2VtpSzvNJ7p7j30qkEK0Z+I2pGAVohZg4enkHaIQkYtIP\naZZ/wce5R8VZq6EpToprTm3cG6T+nNVOzqRjUqgnUZyY8nWy2CD5OucCgYEAxZEb\nOKjo9Iwrod2uOZlQDAsnTvgqZySW/lORrnfEWmOEiJpRvjlxMfNPNlc2iMTBQShq\naPZi48g17btU8ACs2NOH/FXuxooDe+0gJDj48WP9/bBzOAOJqhKZ+g9l/Cr978yJ\nAHNh/w8foUUkqAfxmXoTImw7LdSaPIc7ewAlPbkCgYAcGq6d6O8QiTZ0O6/N0riU\nRbnGuqiPzDDE1AwXhgskPcvKsZapNR998FxWT185nZERxSbDyqwKVvnxIvvgDm3M\nWzJTReqbWwHMMnAy7+lz868GbCk9gvclH8nXmslGU61iUmZKaHigyGmkZHQURSq2\ne+7BB03QMWIwPSunQ2yVwwKBgQCbPrzvNvtnPsYCeZmwNSLLc/A9g5B+YCguTSjK\nud4XUOASH4FgQu8J2zFBeCKoMkPRmZqURBfM+cQ2vN+vgDhSYVYYGMZ6SHUYamq5\nS/OCa5poQMEpIM6KT/eioXr4PigwyL5XFlPJAu9N4HE/gI5+lYh3oiiWiNtx+Knq\nq2CYMQKBgQCv+QTGDrSc3SUaWT+JMoFdfzvJyyqQOUvgRbSGAp5GryYqI9dozx70\nlT2IdoAZ0DHrJhNs13Pr7ngXwqS6pKlZU8NSX2ch7h5ZwIsYJESzKwXF/frLMQSy\nTPV3d0hb7UaW3wqOx2Dbj8vJJdvUo3UUkOcmgesqGg3nf3t51I6k0A==\n-----END RSA PRIVATE KEY-----" + }, + { + "HOST": "payeefsp", + "CERT": "-----BEGIN CERTIFICATE-----\nMIIFATCCAumgAwIBAgIUBDD1woZm3eqYA8FXUyiaAHu6sDkwDQYJKoZIhvcNAQEL\nBQAwfzERMA8GA1UEChMITW9kdXNCb3gxHDAaBgNVBAsTE0luZnJhc3RydWN0dXJl\nIFRlYW0xTDBKBgNVBAMTQ3BheWVlZnNwLnFhLnByZS5teWFubWFycGF5LXByZS5p\nby5pbnRlcm5hbCBwYXllZWZzcCBJbnRlcm1lZGlhdGUgQ0EwHhcNMjEwMjIyMTkw\nMTEyWhcNMjMwMjIzMDY0MDA1WjBdMREwDwYDVQQKEwhNb2R1c0JveDEcMBoGA1UE\nCxMTSW5mcmFzdHJ1Y3R1cmUgVGVhbTEqMCgGA1UEAxMhcGF5ZWVmc3AucWEucHJl\nLm15YW5tYXJwYXktcHJlLmlvMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKC\nAQEAwyJf0nOXqUSeYRJ3+QQGnkZ+s9yPlqYqNRyDpyqj9mLNWZ3F2lLgHQ/6idmB\ni+M4AoVWs9+ihr5zFTl0piEQkgqjBa6oCg3yqHmya9H/+xrD8SPQpKEI0LifPI75\nhHDqCNhuynA/JTiK2K0dH+Ea0jHQJfEyTmXwMJd0zqdeIBeAeMtyW1icZ6e/28ri\nmUEYPPk18dUoCMktpO0vXjJSH1a2YFI0eAp8kdEiuQc2bz/b5PW2aaurn8RSrtAC\ng2XASVs2mn2wfjq4zmx8LyhJHatU3nzQPQ6OOAcow/Lbbi5VSwQdXF0KwnMBY+x5\nE0H2mm0jIUfDIf6oZohtLVx8MQIDAQABo4GWMIGTMA4GA1UdDwEB/wQEAwIDqDAT\nBgNVHSUEDDAKBggrBgEFBQcDAjAdBgNVHQ4EFgQUCBshFUmmVQowZ4hS4lKGo4em\nG1MwHwYDVR0jBBgwFoAUb9x3dRUpXiQg40v5kFnYtesB5iUwLAYDVR0RBCUwI4Ih\ncGF5ZWVmc3AucWEucHJlLm15YW5tYXJwYXktcHJlLmlvMA0GCSqGSIb3DQEBCwUA\nA4ICAQBn+4cUHlaCdLM2U0zcYBrBAgNGUn74TgLc0lRzm+KlfS6lMhzMQtML+bwY\n6OMcDqd4RTozA98U8UH+aG3GBJlDGoccUGYuGcr/w6ZdNQ46tzqQ3lRG9VKv1L2V\n3gnox3EmnhwnPR2PERtvYUhBDfUcAJhQc/MN7aNdk9JYMAHy+VF7V7Mie6u99doj\noANKUf6NZfLZ0XAMuQIcGvvDv2TorNs33PR3dFyBH/HY0a19rVLiPUCK8WTWpjvO\nAwTmqiV38HwbJ/nFW9Skt3OM1GaPnfS6Eg+RT4JPVQG/Gg26XLuP15LQAOHTV6zi\nY7EwtBMs7FFEXE2p6E94YUNy2kKz4f9sZlxEImZ9hmpa9mRcM5WqSyHVQiEJantY\n2RMCbStjR5F2KUC5a0kQ/IywekfUtaUhfPKz0zrxN5TVywXX8MTqIscUgdZgpE0j\nxu7fiFrMmOEbin0gdTk5ojV3q4FToewezY/CVRSjf3/e/oNgVmvasyT5/bXtf+Ds\nmToyjUCuWeQN0N6xF6uXztr3DRsUCKIu72fSQD189MXcknSoj9xYVrRyNqvEllwy\nSyVd3XtHhRuW4ynRgPxqb8oI1cleOBOBi2MCOHQrnGqYq/e9K/GLXztmR2GAAkV3\nm/Dy3o5fDBi7UYiMBhUnZTGEz7xfREFl7kvgFLzqIsnHXc8caA==\n-----END CERTIFICATE-----", + "KEY": "-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAwyJf0nOXqUSeYRJ3+QQGnkZ+s9yPlqYqNRyDpyqj9mLNWZ3F\n2lLgHQ/6idmBi+M4AoVWs9+ihr5zFTl0piEQkgqjBa6oCg3yqHmya9H/+xrD8SPQ\npKEI0LifPI75hHDqCNhuynA/JTiK2K0dH+Ea0jHQJfEyTmXwMJd0zqdeIBeAeMty\nW1icZ6e/28rimUEYPPk18dUoCMktpO0vXjJSH1a2YFI0eAp8kdEiuQc2bz/b5PW2\naaurn8RSrtACg2XASVs2mn2wfjq4zmx8LyhJHatU3nzQPQ6OOAcow/Lbbi5VSwQd\nXF0KwnMBY+x5E0H2mm0jIUfDIf6oZohtLVx8MQIDAQABAoIBAAvRTB5Rs9CjgDf+\nx1dEYCY7vLal1+hWvd2jkXGRSobEaw1PWckkFcCM1C5/BrJzG1RDwQF5vL0OUafq\nZ98bx4YgsMjKUBDz0UtUu3J+MFODxnQXKC6gNgl19ObU/dWAhRvuB5+o9poJd5cx\nvL7OgjJSo/l4RwSqdcZrlb5iMngc+SEL/BWK8rsrNd21M7z+kPKLxohbECnH1yu7\nLbfCuoO2yUqMdevcm/qgRq0TpdWwagHZRBOMkAWpLbchOdpftyv6zYjsQWiIKnOW\nyLCMr1iZvpdxwYKr2eD+ki5AOVVuaqreY88C240YPVloTgrmrTZmjC4jr+eTL7XM\nvFXQAfECgYEA7mLDidTQVxnUS+RPUcjn1ylnBcuwyzRsd314DiW91FsDKBKEVje3\nHxRiOsNWQ3xqYNF3jZFctLY4TeFCSGzRFizxg40ZZV/vbUL34cTIX8x6ASdzzmqO\ngW535Oa8kMSd0IjXciXnEsCzaQQ+q52EEi7DeHv2CSyldOBouY9SCd0CgYEA0Y16\nMZHh1+eY8wloxHcwsAJNjh3pgVi3NT8bQKLJWvkRYPBcH+Qvg3cYhXIXL+EUlMtt\nyArmTxG3qTF3u8p/qrYNn/pguX3ICfbVJDrxbgobpIVpkPwDyacm9R8KVFwNQUXx\nrBcBo6Th0OX9bk8wX0mv0jRS8vWZv0vJhWZreGUCgYEAnUv2EsCmKJMWjm08GY8j\ny8m5/Q0Gv078M2xLB6rHs5PKZWqyf+GLp6pflr7F8Qnrd68/394G+gcy59C3V+rV\nnHhTdKZqF4ZSChqiTgr23J+j8ZcCxzVwit9FpXjK/AuAxtVEtEFmU+1rdOQkJkFt\noEHTIXFKS4t2McTR1X9IdtECgYB/6jGt8pP+3FPD/3lhfDRPLIi0+NNh7oqfSS9U\njEoHa0RNfUtu+DZ8tIVWaCd5RZbvoSIZW3XszC7la9nf2yOFTG4Sup6ye/JRCshe\nvlBD0I3BJuMi6oNRY+Rm+pSunCZHMu/sEXshrnNdtha2cEZh1DQsR15fCsbYO+X+\ntV9i9QKBgFqy36h5eDETA7Qvlw6cOQATukoNRux4PrvXHjdhRDtNlZeMUdpU00L+\n4vsyMOcsigJerOAA6Q4ATuNhoVlJW2CHYt39UD7Xiamsm33IzFx3HdNIJcRQ/+l+\n8Sa2UGfazug2B7fwHXxUZrek8VoJQtcAKeQoO1Fj3zd04pNjwE4K\n-----END RSA PRIVATE KEY-----" + }, + { + "HOST": "payerfsp", + "CERT": "-----BEGIN CERTIFICATE-----\nMIIFATCCAumgAwIBAgIUUJwMg2LBzd3FZBz75YVuk2s0q3gwDQYJKoZIhvcNAQEL\nBQAwfzERMA8GA1UEChMITW9kdXNCb3gxHDAaBgNVBAsTE0luZnJhc3RydWN0dXJl\nIFRlYW0xTDBKBgNVBAMTQ3BheWVyZnNwLnFhLnByZS5teWFubWFycGF5LXByZS5p\nby5pbnRlcm5hbCBwYXllcmZzcCBJbnRlcm1lZGlhdGUgQ0EwHhcNMjEwMjIyMTkw\nMTE2WhcNMjMwMjIzMDY0MDA5WjBdMREwDwYDVQQKEwhNb2R1c0JveDEcMBoGA1UE\nCxMTSW5mcmFzdHJ1Y3R1cmUgVGVhbTEqMCgGA1UEAxMhcGF5ZXJmc3AucWEucHJl\nLm15YW5tYXJwYXktcHJlLmlvMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKC\nAQEAsCJqQwV2i8Asi349qUUbcYtx07IQ8Gp6ZbsXPbGmOSeQ/LN/uofGs5LDs13M\nLDUNhFrSb6et5Y/Dj85j0qMvzhW1cgcxMXNYLhwWCAX99sqBGhnLfF6rSSi7ZkbE\nAtTDwHqBLk/Es0ts512k1H6ReejLbsgGYDwiuZULXpfd4Iw9t6V22lQw6B1n9CLm\nNueTKkUM7jAN5LnF4fBCof3jpTB821taDog0Dla7DUGV1AdIyyJyLqk+8obDqXuC\niooGwUTrBUOTrWRNlP/Tw7W0Lv76duoqLQs2INUeKRfUJYei/+cy2fFkZZ8GKaHG\nZ2eoOQ0L9VumbeCzW8MOsO4QawIDAQABo4GWMIGTMA4GA1UdDwEB/wQEAwIDqDAT\nBgNVHSUEDDAKBggrBgEFBQcDAjAdBgNVHQ4EFgQUr+lCpfITlgJJoxuW6NBFoT1t\nqAcwHwYDVR0jBBgwFoAU4UukJy4iiDZUSB5DrcfOAr6spT8wLAYDVR0RBCUwI4Ih\ncGF5ZXJmc3AucWEucHJlLm15YW5tYXJwYXktcHJlLmlvMA0GCSqGSIb3DQEBCwUA\nA4ICAQCHEus15MfR1svIOgalbtmwJPDwBURaryWf2D9BkKV2Csdlzp0miRxkhgn9\nWZ+Cym0GiMfmo6FZv+OCXbakBYFycs2lfgZXt6r3Vt6zwZcW0l5/iYUHn8g+BKYO\n9CBJpBwRpn4rDXwUCbHWXF1tHCWMg3eooLN9I2Ly2DZvSPmgH8c08W2SE72nfVyi\nqa/zdD7u8g+XxXXJd7A1AZDTE+cQ29goTpIDQQVpw+a/a9yT9BEbiKtScUTounX0\nmu0uPpBSLgQ3lkXJEy46O7etWjXpSUW8HnKiEDloDmkmKGxFj9m5wtsIZVmu+kYP\nZQWBLgN6goyuxB/cIiAC8mqLgv8/+AcZ91jpCy3dZ6a/Nla3Xq+L046AnpOYHLJp\nizV/O0UQdV/pdPtn0D7Jci++rsKBMWovX1bHPxqxHsnxMYHaUap1DFU2LWKKYBl2\nZcOfNb2My2IXK/tqEegkJoEQx+gFGGjWeV4iw/cZZosIoM4ibubS1BF3I3er+0Fo\nT3uqZJuqBePdu6II6Vbg+i6v3P0KRUYRRs3yNm9VuuNHfcc+KQaHH4iYsPi5fk95\n+EIDBWtGUu9pxx8trc33v51t7dKyQqNH4qLrKywM9OybG/FZT2aCRRXtjuMgmaN+\nXfV5OYksS9Mj+JFtCNWmhWC8BLAtfdyLejLpofUDwrdfwFwZ0g==\n-----END CERTIFICATE-----", + "KEY": "-----BEGIN RSA PRIVATE KEY-----\nMIIEpQIBAAKCAQEAsCJqQwV2i8Asi349qUUbcYtx07IQ8Gp6ZbsXPbGmOSeQ/LN/\nuofGs5LDs13MLDUNhFrSb6et5Y/Dj85j0qMvzhW1cgcxMXNYLhwWCAX99sqBGhnL\nfF6rSSi7ZkbEAtTDwHqBLk/Es0ts512k1H6ReejLbsgGYDwiuZULXpfd4Iw9t6V2\n2lQw6B1n9CLmNueTKkUM7jAN5LnF4fBCof3jpTB821taDog0Dla7DUGV1AdIyyJy\nLqk+8obDqXuCiooGwUTrBUOTrWRNlP/Tw7W0Lv76duoqLQs2INUeKRfUJYei/+cy\n2fFkZZ8GKaHGZ2eoOQ0L9VumbeCzW8MOsO4QawIDAQABAoIBAQCfRy/y1cDjFfDy\nYEHgjccIggJ4XuGkl5WB45Nbzge0Tcx2SNhr1RbiEwl4bY0SORO1KfB82hSOsNg3\ndnuc4sd7RPRlXo2k21rVr75YmRqVj4D6GnOCT5XzvariDYJ50PAIYn/pYmdNgBrG\ni09gfeiOZu94idgCNL9uNZMngow53vddASgFH+fN4W3xWxXgexXRIxzhObvJGzux\nS2gCvePJ6n//lNIFcB1DR0ewpeLSwvmX6lZDg9IBoWbSCE/jlnAO7owzHphg8+IV\naONKIqeI0JAR1Fnmnh2t06ovVLYdx2eRo29Oqb6W//smHFfMBF22YF6Uq6HGuPQr\nSzHo6+hRAoGBAOTQf8V1qSW19WOMyDFCvvsUweGYlHJsU4dlZV7NaJAUh5n39W3x\nnJi7jZSDW/OUY/7wfGEI+k6WS7ICkZYD+an6Q7l6c4aKq6YkOCQmh2J/b+ZkAkzy\n7b3AyNG1r81fxnq1DMZC4htIDmtt2ru1fElPk8vxAgjagdtxk+v68gezAoGBAMUP\noMvtXa4qgEIk+aYv3S55P1xD4cdjYDtq1PKnkcKuzgj5QqRF3FnsWDKsNHfrD7IM\nFREFx0/iyLBVk1IrjrxHA0m3T0GrAvjpMVtyZDLa2oiKgSVLiBbTigmLebsBQSda\n2COs1IZ2mhgKM6Luyk42r5COL96BjsUHS+lpP3hpAoGBANFreuXw0IUxSox4d2mO\nm1kWIHUnvwYS20hapzLjcUYdZBapeTnNHvQzBFve9jOzpunYlR4Cp4VxzYn5C+Jv\ndPv7kCycREvpczy2faOol9SwqmwFMI3Y8XrwjVxSm7quY+w+9Jgo8uThSEFO5BlU\n+5HlgXHw/Vm5E40TIL2kigw9AoGAffd4fQMVoDCw3hdOsmnkREHjO7J00AT5TeID\nj72IEl+1es0DSYkSyzSmSHYF8CYFWXYZvVDpUGqSiQ2a56rKShZGxsdz1XFgrAY8\ns80SueNmUGPhHBsFOjotAd7ziJPLt0F96ogfLnkAFZ/n1B46mfahEZGijeRZhB8e\n6myJ0wkCgYEA1fMa/pwU2JdNvoAoCh18FWAKk/j7nmF8NPb3a9g7Eyo7Kd5CywdG\nIqDOla0gX1ZvidSj8ujJU/6NVRfjXsaOAWb/shMvFnQF5EZHt/0Om0AUufkqxXly\nJ4rTmFSt4UqDlcm6B1avenWIRVIhDZIH+q07L1OudmX+PDmWVJ0PnSw=\n-----END RSA PRIVATE KEY-----" + } + ], + "GITHUB_CONFIG": { + "TEST_CASES_REPO_OWNER": "mojaloop", + "TEST_CASES_REPO_NAME": "testing-toolkit-test-cases", + "TEST_CASES_REPO_DEFAULT_RELEASE_TAG": "latest", + "TEST_CASES_REPO_BASE_PATH": "collections/dfsp", + "TEST_CASES_REPO_HUB_GP_PATH": "collections/hub/golden_path", + "TEST_CASES_REPO_HUB_PROVISIONING_PATH": "collections/hub/provisioning" + }, + "DEFAULT_ENVIRONMENT_FILE_NAME": "hub_local_environment.json", + "LABELS": [ + { + "name": "p2p", + "description": "tests related to p2p transfer", + "color": "red" + }, + { + "name": "settlements", + "description": "tests related to settlements", + "color": "green" + }, + { + "name": "quotes", + "description": "tests related to quoting service", + "color": "blue" + } + ], + "INSTANCE_NAME": "Mojaloop Testing Toolkit", + "UI_THEME": { + "HEADER_COLOR": "rgb(41, 62, 93)", + "TITLE_COLOR": "#fff" + } +} \ No newline at end of file diff --git a/test/func/config/ml-testing-toolkit/spec_files/api_definitions/mojaloop_sdk_outbound_scheme_adapter_1.0/api_spec.yaml b/test/func/config/ttk-ttksim1/spec_files/api_definitions/mojaloop_sdk_outbound_scheme_adapter_1.0/api_spec.yaml similarity index 98% rename from test/func/config/ml-testing-toolkit/spec_files/api_definitions/mojaloop_sdk_outbound_scheme_adapter_1.0/api_spec.yaml rename to test/func/config/ttk-ttksim1/spec_files/api_definitions/mojaloop_sdk_outbound_scheme_adapter_1.0/api_spec.yaml index 64f73d555..36af3efc4 100644 --- a/test/func/config/ml-testing-toolkit/spec_files/api_definitions/mojaloop_sdk_outbound_scheme_adapter_1.0/api_spec.yaml +++ b/test/func/config/ttk-ttksim1/spec_files/api_definitions/mojaloop_sdk_outbound_scheme_adapter_1.0/api_spec.yaml @@ -1045,6 +1045,7 @@ paths: type: boolean enum: - true + - false - type: object required: &ref_32 - acceptQuote @@ -1478,7 +1479,6 @@ paths: description: List of individual transfers in a bulk transfer. type: array minItems: 1 - maxItems: 1000 items: title: BulkTransactionIndividualTransfer type: object @@ -1986,7 +1986,9 @@ paths: schema: type: object required: &ref_98 + - bulkTransferId - homeTransactionId + - bulkQuoteId - from - individualTransfers properties: &ref_99 @@ -2009,6 +2011,20 @@ paths: reasons. A UUID is always 36 characters long, 32 hexadecimal symbols and 4 dashes (‘-‘). example: b51ec534-ee48-4575-b6a9-ead2955b8069 + bulkQuoteId: + title: CorrelationId + type: string + pattern: >- + ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + description: >- + Identifier that correlates all messages of the same + sequence. The API data type UUID (Universally Unique + Identifier) is a JSON String in canonical format, conforming + to [RFC 4122](https://tools.ietf.org/html/rfc4122), that is + restricted by a regular expression for interoperability + reasons. A UUID is always 36 characters long, 32 hexadecimal + symbols and 4 dashes (‘-‘). + example: b51ec534-ee48-4575-b6a9-ead2955b8069 from: type: object required: *ref_0 @@ -2089,6 +2105,25 @@ paths: type: string enum: *ref_5 description: Type of transaction. + ilpPacket: + title: IlpPacket + type: string + pattern: ^[A-Za-z0-9-_]+[=]{0,2}$ + minLength: 1 + maxLength: 32768 + description: >- + Information for recipient (transport layer + information). + example: >- + AYIBgQAAAAAAAASwNGxldmVsb25lLmRmc3AxLm1lci45T2RTOF81MDdqUUZERmZlakgyOVc4bXFmNEpLMHlGTFGCAUBQU0svMS4wCk5vbmNlOiB1SXlweUYzY3pYSXBFdzVVc05TYWh3CkVuY3J5cHRpb246IG5vbmUKUGF5bWVudC1JZDogMTMyMzZhM2ItOGZhOC00MTYzLTg0NDctNGMzZWQzZGE5OGE3CgpDb250ZW50LUxlbmd0aDogMTM1CkNvbnRlbnQtVHlwZTogYXBwbGljYXRpb24vanNvbgpTZW5kZXItSWRlbnRpZmllcjogOTI4MDYzOTEKCiJ7XCJmZWVcIjowLFwidHJhbnNmZXJDb2RlXCI6XCJpbnZvaWNlXCIsXCJkZWJpdE5hbWVcIjpcImFsaWNlIGNvb3BlclwiLFwiY3JlZGl0TmFtZVwiOlwibWVyIGNoYW50XCIsXCJkZWJpdElkZW50aWZpZXJcIjpcIjkyODA2MzkxXCJ9IgA + condition: + title: IlpCondition + type: string + pattern: ^[A-Za-z0-9-_]{43}$ + maxLength: 48 + description: >- + Condition that must be attached to the transfer by the + Payer. note: title: Note type: string @@ -2110,6 +2145,8 @@ paths: - amountType - currency - amount + - ilpPacket + - condition extensions: title: ExtensionList type: object @@ -2389,6 +2426,7 @@ paths: - bulkQuoteId - individualQuoteResults - currentState + - expiration properties: &ref_48 bulkQuoteId: title: CorrelationId @@ -2544,7 +2582,7 @@ paths: properties: *ref_22 - type: object required: - - bulkTansferState + - bulkQuoteState properties: bulkQuoteState: type: object diff --git a/test/func/config/ml-testing-toolkit/spec_files/api_definitions/mojaloop_sdk_outbound_scheme_adapter_1.0/callback_map.json b/test/func/config/ttk-ttksim1/spec_files/api_definitions/mojaloop_sdk_outbound_scheme_adapter_1.0/callback_map.json similarity index 100% rename from test/func/config/ml-testing-toolkit/spec_files/api_definitions/mojaloop_sdk_outbound_scheme_adapter_1.0/callback_map.json rename to test/func/config/ttk-ttksim1/spec_files/api_definitions/mojaloop_sdk_outbound_scheme_adapter_1.0/callback_map.json diff --git a/test/func/config/ttk-ttksim1/spec_files/api_definitions/mojaloop_sdk_outbound_scheme_adapter_1.0/mockRef.json b/test/func/config/ttk-ttksim1/spec_files/api_definitions/mojaloop_sdk_outbound_scheme_adapter_1.0/mockRef.json new file mode 100644 index 000000000..f0060c75d --- /dev/null +++ b/test/func/config/ttk-ttksim1/spec_files/api_definitions/mojaloop_sdk_outbound_scheme_adapter_1.0/mockRef.json @@ -0,0 +1,22 @@ +[ + { + "id": "party.personalInfo.dateOfBirth", + "pattern": "^(19)\\d\\d[-](0[1-9]|1[012])[-](0[1-9]|[12][0-9]|2[0-8])$" + }, + { + "id": "party.name", + "pattern": "Vijay Kumar Guthi" + }, + { + "id": "party.personalInfo.complexName.firstName", + "pattern": "Vijay" + }, + { + "id": "party.personalInfo.complexName.lastName", + "pattern": "Kumar" + }, + { + "id": "party.personalInfo.complexName.middleName", + "pattern": "Guthi" + } +] diff --git a/test/func/config/ttk-ttksim1/spec_files/api_definitions/mojaloop_sdk_outbound_scheme_adapter_1.0/response_map.json b/test/func/config/ttk-ttksim1/spec_files/api_definitions/mojaloop_sdk_outbound_scheme_adapter_1.0/response_map.json new file mode 100644 index 000000000..1ad829f38 --- /dev/null +++ b/test/func/config/ttk-ttksim1/spec_files/api_definitions/mojaloop_sdk_outbound_scheme_adapter_1.0/response_map.json @@ -0,0 +1,21 @@ +{ + "/parties/{Type}/{ID}": { + "get": { + "response": { + "bodyOverride": { + "party": { + "partyIdInfo": { + "partyIdType": "{$request.params.Type}", + "partyIdentifier": "{$request.params.ID}", + "fspId": "ttk", + "partySubIdOrType": null, + "extensionList": null + }, + "accounts": null, + "merchantClassificationCode": null + } + } + } + } + } +} \ No newline at end of file diff --git a/test/func/config/ml-testing-toolkit/spec_files/api_definitions/mojaloop_simulator_sim_1.4/api_spec.yaml b/test/func/config/ttk-ttksim1/spec_files/api_definitions/mojaloop_simulator_sim_1.4/api_spec.yaml similarity index 100% rename from test/func/config/ml-testing-toolkit/spec_files/api_definitions/mojaloop_simulator_sim_1.4/api_spec.yaml rename to test/func/config/ttk-ttksim1/spec_files/api_definitions/mojaloop_simulator_sim_1.4/api_spec.yaml diff --git a/test/func/config/ttk-ttksim1/spec_files/api_definitions/mojaloop_simulator_sim_1.4/mockRef.json b/test/func/config/ttk-ttksim1/spec_files/api_definitions/mojaloop_simulator_sim_1.4/mockRef.json new file mode 100644 index 000000000..a3c81ce8c --- /dev/null +++ b/test/func/config/ttk-ttksim1/spec_files/api_definitions/mojaloop_simulator_sim_1.4/mockRef.json @@ -0,0 +1,75 @@ +[ + { + "id": "firstName", + "pattern": "John|David|Michael|Chris|Mike|Mark|Paul|Daniel|James|Maria" + }, + { + "id": "middleName", + "pattern": "G|P|N|S" + }, + { + "id": "lastName", + "pattern": "Smith|Jones|Johnson|Lee|Brown|Williams|Rodriguez|Garcia|Gonzalez|Lopez" + }, + { + "id": "dateOfBirth", + "pattern": "^(19)\\d\\d[-](0[1-9]|1[012])[-](0[1-9]|[12][0-9]|2[0-8])$" + }, + { + "id": "transferState", + "pattern": "COMMITTED|RESERVED|ABORTED|RECEIVED" + }, + { + "id": "fulfilment", + "pattern": "[A-Fa-f0-9]{64}" + }, + { + "id": "condition", + "pattern": "[A-Fa-f0-9]{64}" + }, + { + "id": "ilpPacket", + "pattern": "[A-Fa-f0-9]{256}" + }, + { + "id": "transferAmount.currency", + "pattern": "USD" + }, + { + "id": "transferAmount.amount", + "pattern": "123" + }, + { + "id": "payeeReceiveAmountCurrency", + "pattern": "USD" + }, + { + "id": "payeeReceiveAmount", + "pattern": "123" + }, + { + "id": "payeeFspFeeAmountCurrency", + "pattern": "USD" + }, + { + "id": "payeeFspFeeAmount", + "pattern": "2" + }, + { + "id": "payeeFspCommissionAmountCurrency", + "pattern": "USD" + }, + { + "id": "payeeFspCommissionAmount", + "pattern": "3" + }, + + { + "id": "errorInformation.errorCode", + "pattern": "600[1-9]" + }, + { + "id": "errorInformation.errorDescription", + "pattern": "This is a mock error description" + } +] \ No newline at end of file diff --git a/test/func/config/ml-testing-toolkit/spec_files/api_definitions/mojaloop_simulator_sim_1.4/response_map.json b/test/func/config/ttk-ttksim1/spec_files/api_definitions/mojaloop_simulator_sim_1.4/response_map.json similarity index 100% rename from test/func/config/ml-testing-toolkit/spec_files/api_definitions/mojaloop_simulator_sim_1.4/response_map.json rename to test/func/config/ttk-ttksim1/spec_files/api_definitions/mojaloop_simulator_sim_1.4/response_map.json diff --git a/test/func/config/ttk-ttksim1/spec_files/reports/templates/newman/html_template.html b/test/func/config/ttk-ttksim1/spec_files/reports/templates/newman/html_template.html new file mode 100644 index 000000000..e10fc0b1f --- /dev/null +++ b/test/func/config/ttk-ttksim1/spec_files/reports/templates/newman/html_template.html @@ -0,0 +1,1118 @@ + + {{!-- {{#each items}} + + + {{name}} + + + $ {{price}} + + + {{/each}} + + + + Total: ${{total items}} + + --}} + + + + + + + + + Testing Toolkit Assertions Report + + + + + + + + +
+
+ + + +
+
+
+ +
+
+
+
+

Testing Toolkit Report

+
{{runtimeInformation.completedTime}}
+
+
+
+
+
+ +
+
Total Assertions
+

{{totalAssertions test_cases}}

+
+
+
+
+
+
+
+ +
+
Total Passed Tests
+

{{totalPassedAssertions test_cases}}

+
+
+
+
+
+
+
+ +
+
Total Failed Tests
+

{{totalFailedAssertions test_cases}}

+
+
+
+
+
+
+
+
+
+
+
+
Runtime Information
+ Template Name: {{name}}
+ {{#if runtimeInformation}} + Total run duration: {{runtimeInformation.runDurationMs}} ms
+ Average response time: {{runtimeInformation.avgResponseTime}}
+ {{/if}} + {{#if extraRuntimeInformation}} + {{#each extraRuntimeInformation}} + {{key}}: {{value}}
+ {{/each}} + + {{/if}} +
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Summary ItemTotalFailed
Test Cases{{totalTestCases test_cases}}{{failedTestCases test_cases}}
Requests{{totalRequests test_cases}}{{failedRequests test_cases}}
Assertions{{totalAssertions test_cases}}{{totalFailedAssertions test_cases}}
+
+
+
+
+
+
+
+
+
+
+ +
+
+ + + +
+ + + + +
+ +
+ +
+
+ {{#each test_cases}} +
+ + +
+ {{#each requests}} +
+
+
+
+ {{#if (ifSkippedRequest status)}} +
+ {{else}} + {{#if (ifAllTestsPassedInRequest request)}} +
+ {{else}} +
+ {{/if}} + {{/if}} + +
+
+
+
+
+
+
+
+
Request Information
+ {{#if (ifSkippedRequest status)}} +
+
+
SKIPPED
+
+
+ {{/if}} + Request Method: {{request.method}}
+ Request URL: {{request.path}}
+
+
+
+
+
Response Information
+ Response Code: {{response.status}} - {{response.statusText}}
+ Mean time per request: NA
+ Mean size per request: NA
+
+
Test Pass Percentage
+
+
+ {{#if (ifSkippedRequest status)}} +
+ {{else}} + {{#if (ifAllTestsPassedInRequest request)}} +
+ {{else}} +
+ {{/if}} + {{/if}} +
{{testPassPercentage request.tests}} %
+
+
+
+
+
+
+
+
+ {{#if request.headers}} +
+
+
+
+
+
Request Headers
+
+ + + + {{#each request.headers}} + + + + + {{/each}} + +
Header NameHeader Value
{{@key}}{{this}}
+
+
+
+
+
+
+ {{/if}} + {{#if request.body}} +
+
+
+
+
+
Request Body
+
+
{{jsonStringify request.body}}
+
+ +
+
+
+
+
+ {{/if}} + {{#if additionalInfo.curlRequest}} +
+
+
+
+
+
CURL command
+
+
{{additionalInfo.curlRequest}}
+
+ +
+
+
+
+
+ {{/if}} + {{#if response.headers}} +
+
+
+
+
+
Response Headers
+
+
{{jsonStringify response.headers}}
+
+ +
+
+
+
+
+ {{/if}} + {{#if response.body}} +
+
+
+
+
+
Response Body
+
+
{{jsonStringify response.body}}
+
+ +
+
+
+
+
+ {{/if}} + {{#if callback.headers}} +
+
+
+
+
+
Callback Headers
+
+ + + + {{#each callback.headers}} + + + + + {{/each}} + +
Header NameHeader Value
{{@key}}{{this}}
+
+
+
+
+
+
+ {{/if}} + {{#if callback.body}} +
+
+
+
+
+
Callback Body
+
+
{{jsonStringify callback.body}}
+
+ +
+
+
+
+
+ {{/if}} + +
+
+
+
Test Information
+
+ + + + {{#each request.tests.assertions}} + + + {{#if (isAssertionSkipped resultStatus.status)}} + + {{else if (isAssertionPassed resultStatus.status)}} + + {{else}} + + + {{/if}} + + {{/each}} + + + + + + + +
NameResult
{{description}} + SKIPPED + + PASSED + + FAILED +
({{resultStatus.message}})
Total{{request.tests.passedAssertionsCount}} / {{request.tests.assertions.length}}
+
+
+
+
+
+
+
Test Failure
+
+ + + + +
Test NameAssertion Error
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{/each}} +
+ +
+ {{/each}} +
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/func/config/ttk-ttksim1/spec_files/reports/templates/newman/pdf_template.html b/test/func/config/ttk-ttksim1/spec_files/reports/templates/newman/pdf_template.html new file mode 100644 index 000000000..412779954 --- /dev/null +++ b/test/func/config/ttk-ttksim1/spec_files/reports/templates/newman/pdf_template.html @@ -0,0 +1,785 @@ + + {{!-- {{#each items}} + + + {{name}} + + + $ {{price}} + + + {{/each}} + + + + Total: ${{total items}} + + --}} + + + + + + + + + Testing Toolkit Assertions Report + + + + + + + + +
+
+
+ +
+
+
+
+


+

Testing Toolkit Report

+
{{runtimeInformation.completedTime}}
+


+
+
+
+
+
+ +
+
Total Assertions
+

{{totalAssertions test_cases}}

+
+
+
+
+
+
+
+ +
+
Total Passed Tests
+

{{totalPassedAssertions test_cases}}

+
+
+
+
+
+
+
+ +
+
Total Failed Tests
+

{{totalFailedAssertions test_cases}}

+
+
+
+
+
+
+
+


+
+
+
+
+
Runtime Information
+ Template Name: {{name}}
+ {{#if runtimeInformation}} + Total run duration: {{runtimeInformation.runDurationMs}} ms
+ Average response time: {{runtimeInformation.avgResponseTime}}
+ {{/if}} +
+
+
+
+


+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Summary ItemTotalFailed
Test Cases{{totalTestCases test_cases}}{{failedTestCases test_cases}}
Requests{{totalRequests test_cases}}{{failedRequests test_cases}}
Assertions{{totalAssertions test_cases}}{{totalFailedAssertions test_cases}}
+
+
+
+
+
+
+
+
+
+

















+


+
+ + +
+ +
+
+ {{#each test_cases}} +
+ + +
+ {{#each requests}} +
+
+
+
+ {{#if (ifAllTestsPassedInRequest request)}} +
+ {{else}} + +
+
+
+
+
+
+
+
Request Information
+ Request Method: {{request.method}}
+ Request URL: {{request.path}}
+
+
+
+
+
Response Information
+ Response Code: {{response.status}} - {{response.statusText}}
+ Mean time per request: NA
+ Mean size per request: NA
+
+
Test Pass Percentage
+
+
+ {{#if (ifAllTestsPassedInRequest request)}} +
+ {{else}} +
+ {{/if}} +
{{testPassPercentage request.tests}} %
+
+
+
+
+
+
+
+
+ {{#if request.headers}} +
+
+
+
+
+
Request Headers
+
+ + + + {{#each request.headers}} + + + + + {{/each}} + +
Header NameHeader Value
{{@key}}{{this}}
+
+
+
+
+
+
+ {{/if}} + {{#if request.body}} +
+
+
+
+
+
Request Body
+
+
{{jsonStringify request.body}}
+
+
+
+
+
+
+ {{/if}} + {{#if response.headers}} +
+
+
+
+
+
Response Headers
+
+
{{jsonStringify response.headers}}
+
+
+
+
+
+
+ {{/if}} + {{#if response.body}} +
+
+
+
+
+
Response Body
+
+
{{jsonStringify response.body}}
+
+
+
+
+
+
+ {{/if}} + {{#if callback.headers}} +
+
+
+
+
+
Callback Headers
+
+ + + + {{#each callback.headers}} + + + + + {{/each}} + +
Header NameHeader Value
{{@key}}{{this}}
+
+
+
+
+
+
+ {{/if}} + {{#if callback.body}} +
+
+
+
+
+
Callback Body
+
+
{{jsonStringify callback.body}}
+
+
+
+
+
+
+ {{/if}} + +
+
+
+
Test Information
+
+ + + + {{#each request.tests.assertions}} + + + {{#if (isAssertionSkipped resultStatus.status)}} + + {{else if (isAssertionPassed resultStatus.status)}} + + {{else}} + + + {{/if}} + + {{/each}} + + + + + + + +
NameResult
{{description}} + SKIPPED + + PASSED + + FAILED +
({{resultStatus.message}})
Total{{request.tests.passedAssertionsCount}} / {{request.tests.assertions.length}}
+
+
+
+
+
+
+
Test Failure
+
+ + + + +
Test NameAssertion Error
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{/each}} +
+ +
+ {{/each}} +
+
+
+
+
+ + + + + + + diff --git a/test/func/config/ttk-ttksim1/spec_files/reports/templates/testcase_definition/table_view.html b/test/func/config/ttk-ttksim1/spec_files/reports/templates/testcase_definition/table_view.html new file mode 100644 index 000000000..13c536bf0 --- /dev/null +++ b/test/func/config/ttk-ttksim1/spec_files/reports/templates/testcase_definition/table_view.html @@ -0,0 +1,133 @@ + + + + + + + + +
+ +
+
+
+ + +
+
+
+ +
+
+
+
Testcase
+
Request Description
+
Test Scenario
+
Expected Result
+
+
+
+ {{#each test_cases}} +
+
+
+
{{fileInfo.path}} + {{#if fileInfo.labels}} + - (Labels: {{fileInfo.labels}}) + {{/if}} +
+
+ + +
+
+ {{#each requests}} +
+
{{#if @first}}{{../meta.info}}{{/if}}
+
{{meta.info}}
+
{{description}}
({{method}} {{operationPath}})
+
+ {{#if tests.assertions}} +
    + {{#each tests.assertions}} +
  • {{description}}
  • + {{/each}} +
+ {{/if}} +
+
+ {{/each}} +
+
+
+
+ {{/each}} + +
+ + + + + + + + + + + \ No newline at end of file diff --git a/test/func/config/ml-testing-toolkit/spec_files/rules_callback/config.json b/test/func/config/ttk-ttksim1/spec_files/rules_callback/config.json similarity index 100% rename from test/func/config/ml-testing-toolkit/spec_files/rules_callback/config.json rename to test/func/config/ttk-ttksim1/spec_files/rules_callback/config.json diff --git a/test/func/config/ml-testing-toolkit/spec_files/rules_validation/default.json b/test/func/config/ttk-ttksim1/spec_files/rules_callback/default.json similarity index 100% rename from test/func/config/ml-testing-toolkit/spec_files/rules_validation/default.json rename to test/func/config/ttk-ttksim1/spec_files/rules_callback/default.json diff --git a/test/func/config/ttk-ttksim1/spec_files/rules_response/config.json b/test/func/config/ttk-ttksim1/spec_files/rules_response/config.json new file mode 100644 index 000000000..599ca8fc6 --- /dev/null +++ b/test/func/config/ttk-ttksim1/spec_files/rules_response/config.json @@ -0,0 +1,3 @@ +{ + "activeRulesFile": "default.json" +} \ No newline at end of file diff --git a/test/func/config/ml-testing-toolkit/spec_files/rules_response/default.json b/test/func/config/ttk-ttksim1/spec_files/rules_response/default.json similarity index 100% rename from test/func/config/ml-testing-toolkit/spec_files/rules_response/default.json rename to test/func/config/ttk-ttksim1/spec_files/rules_response/default.json diff --git a/test/func/config/ml-testing-toolkit/spec_files/rules_validation/config.json b/test/func/config/ttk-ttksim1/spec_files/rules_validation/config.json similarity index 100% rename from test/func/config/ml-testing-toolkit/spec_files/rules_validation/config.json rename to test/func/config/ttk-ttksim1/spec_files/rules_validation/config.json diff --git a/test/func/config/ttk-ttksim1/spec_files/rules_validation/default.json b/test/func/config/ttk-ttksim1/spec_files/rules_validation/default.json new file mode 100644 index 000000000..0637a088a --- /dev/null +++ b/test/func/config/ttk-ttksim1/spec_files/rules_validation/default.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/test/func/config/ml-testing-toolkit/spec_files/system_config.json b/test/func/config/ttk-ttksim1/spec_files/system_config.json similarity index 97% rename from test/func/config/ml-testing-toolkit/spec_files/system_config.json rename to test/func/config/ttk-ttksim1/spec_files/system_config.json index 940133df4..383734132 100644 --- a/test/func/config/ml-testing-toolkit/spec_files/system_config.json +++ b/test/func/config/ttk-ttksim1/spec_files/system_config.json @@ -1,6 +1,7 @@ { "API_PORT": 4040, "HOSTING_ENABLED": false, + "REQUEST_PAYLOAD_MAX_BYTES": 200485760, "INBOUND_MUTUAL_TLS_ENABLED": false, "OUTBOUND_MUTUAL_TLS_ENABLED": false, "CONFIG_VERSIONS": { diff --git a/test/func/config/ml-testing-toolkit/spec_files/user_config.json b/test/func/config/ttk-ttksim1/spec_files/user_config.json similarity index 93% rename from test/func/config/ml-testing-toolkit/spec_files/user_config.json rename to test/func/config/ttk-ttksim1/spec_files/user_config.json index 857a7a8c7..237b8aa0c 100644 --- a/test/func/config/ml-testing-toolkit/spec_files/user_config.json +++ b/test/func/config/ttk-ttksim1/spec_files/user_config.json @@ -1,6 +1,7 @@ { "VERSION": 1, - "CALLBACK_ENDPOINT": "http://payee-sdk-api-svc:4001", + "CALLBACK_ENDPOINT": "http://ttksim1-sdk-api-svc:4001", + "MONITORING_LOG_INCLUDE_PAYLOAD": false, "CALLBACK_RESOURCE_ENDPOINTS": { "enabled": false, "endpoints": [] diff --git a/test/func/config/ttk-ttksim2/spec_files/api_definitions/mojaloop_sdk_outbound_scheme_adapter_1.0/api_spec.yaml b/test/func/config/ttk-ttksim2/spec_files/api_definitions/mojaloop_sdk_outbound_scheme_adapter_1.0/api_spec.yaml new file mode 100644 index 000000000..36af3efc4 --- /dev/null +++ b/test/func/config/ttk-ttksim2/spec_files/api_definitions/mojaloop_sdk_outbound_scheme_adapter_1.0/api_spec.yaml @@ -0,0 +1,5136 @@ +openapi: 3.0.1 +info: + title: Mojaloop SDK Outbound Scheme Adapter API + description: > + Specification for the Mojaloop SDK Scheme Adapter Outbound Transfers API + + + This API can be used by DFSP backends to simplify the process of sending + funds to other parties within a Mojaloop scheme. + + + Please see other documentation on + https://github.com/mojaloop/sdk-scheme-adapter for more information. + + + **Note on terminology:** The term "Switch" is equal to the term "Hub", and + the term "FSP" is equal to the term "DFSP". + license: + name: Apache License Version 2.0, January 2004 + url: https://github.com/mojaloop/documentation/blob/master/LICENSE.md + version: 1.0.0 +paths: + /: + get: + summary: Health check endpoint + description: >- + This endpoint allows a user of the SDK scheme adapter to check the + outbound transfers service is listening. + tags: + - Health + responses: + '200': + description: >- + Returns empty body if the scheme adapter outbound transfers service + is running. + /transfers: + post: + summary: Sends money from one account to another + description: > + The HTTP request `POST /transfers` is used to request the movement of + funds from payer DFSP to payee DFSP. + + The underlying Mojaloop API has three stages for money transfer: + + 1. Party lookup. This facilitates a check by the sending party that the destination party is correct before proceeding with a money movement. + 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. + 3. Transfer. The enactment of the previously agreed "contract" + + This method has several modes of operation. + + - If the configuration variables `AUTO_ACCEPT_PARTIES` is set to + `"false"` this method will terminate when the payee party has been + resolved and return the payee party details. + 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. + The scheme adapter will then proceed with quotation stage... + + - If the configuration variable `AUTO_ACCEPT_QUOTES` is set to `"false"` + this method will terminate and return the quotation when it has been + received from the payee DFSP. + 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. + The scheme adapter will then proceed with the transfer state. + + If the configuration variables `AUTO_ACCEPT_PARTIES` and + `AUTO_ACCEPT_QUOTES` are both set to `"true"` this method will block + until all three transfer stages are complete. Upon completion it will + return the entire set of transfer details received during the operation. + + + Combinations of settings for `AUTO_ACCEPT...` configuration variables + allow the scheme adapter user to decide which mode of operation best + suits their use cases. i.e. the scheme adapter can be configured to + "break" the three stage transfer at these points in order to execute + backend logic such as party verification, quoted fees assessments etc... + tags: + - Transfers + requestBody: + description: Transfer request body + content: + application/json: + schema: + type: object + required: &ref_70 + - homeTransactionId + - from + - to + - amountType + - currency + - amount + - transactionType + properties: &ref_71 + homeTransactionId: + type: string + description: >- + Transaction ID from the DFSP backend, used to reconcile + transactions between the Switch and DFSP backend systems. + from: + type: object + required: &ref_0 + - idType + - idValue + properties: &ref_1 + type: + title: TransactionInitiatorType + type: string + enum: &ref_52 + - CONSUMER + - AGENT + - BUSINESS + - DEVICE + description: >- + Below are the allowed values for the enumeration. + + - CONSUMER - Consumer is the initiator of the + transaction. + + - AGENT - Agent is the initiator of the transaction. + + - BUSINESS - Business is the initiator of the + transaction. + + - DEVICE - Device is the initiator of the transaction. + example: CONSUMER + idType: + title: PartyIdType + type: string + enum: &ref_23 + - MSISDN + - EMAIL + - PERSONAL_ID + - BUSINESS + - DEVICE + - ACCOUNT_ID + - IBAN + - ALIAS + description: >- + Below are the allowed values for the enumeration. + + - MSISDN - An MSISDN (Mobile Station International + Subscriber Directory Number, that is, the phone number) + is used as reference to a participant. The MSISDN + identifier should be in international format according + to the [ITU-T E.164 + standard](https://www.itu.int/rec/T-REC-E.164/en). + Optionally, the MSISDN may be prefixed by a single plus + sign, indicating the international prefix. + + - EMAIL - An email is used as reference to a + participant. The format of the email should be according + to the informational [RFC + 3696](https://tools.ietf.org/html/rfc3696). + + - PERSONAL_ID - A personal identifier is used as + reference to a participant. Examples of personal + identification are passport number, birth certificate + number, and national registration number. The identifier + number is added in the PartyIdentifier element. The + personal identifier type is added in the + PartySubIdOrType element. + + - BUSINESS - A specific Business (for example, an + organization or a company) is used as reference to a + participant. The BUSINESS identifier can be in any + format. To make a transaction connected to a specific + username or bill number in a Business, the + PartySubIdOrType element should be used. + + - DEVICE - A specific device (for example, a POS or ATM) + ID connected to a specific business or organization is + used as reference to a Party. For referencing a specific + device under a specific business or organization, use + the PartySubIdOrType element. + + - ACCOUNT_ID - A bank account number or FSP account ID + should be used as reference to a participant. The + ACCOUNT_ID identifier can be in any format, as formats + can greatly differ depending on country and FSP. + + - IBAN - A bank account number or FSP account ID is used + as reference to a participant. The IBAN identifier can + consist of up to 34 alphanumeric characters and should + be entered without whitespace. + + - ALIAS An alias is used as reference to a participant. + The alias should be created in the FSP as an alternative + reference to an account owner. Another example of an + alias is a username in the FSP system. The ALIAS + identifier can be in any format. It is also possible to + use the PartySubIdOrType element for identifying an + account under an Alias defined by the PartyIdentifier. + idValue: + title: PartyIdentifier + type: string + minLength: 1 + maxLength: 128 + description: Identifier of the Party. + example: '16135551212' + idSubValue: + title: PartySubIdOrType + type: string + minLength: 1 + maxLength: 128 + description: >- + Either a sub-identifier of a PartyIdentifier, or a + sub-type of the PartyIdType, normally a + PersonalIdentifierType. + displayName: + title: Name + type: string + pattern: ^(?!\s*$)[\w .,'-]{1,128}$ + description: >- + The API data type Name is a JSON String, restricted by a + regular expression to avoid characters which are + generally not used in a name. + + + Regular Expression - The regular expression for + restricting the Name type is "^(?!\s*$)[\w + .,'-]{1,128}$". The restriction does not allow a string + consisting of whitespace only, all Unicode characters + are allowed, as well as the period (.) (apostrophe (‘), + dash (-), comma (,) and space characters ( ). + + + **Note:** In some programming languages, Unicode support + must be specifically enabled. For example, if Java is + used, the flag UNICODE_CHARACTER_CLASS must be enabled + to allow Unicode characters. + firstName: + title: FirstName + type: string + minLength: 1 + maxLength: 128 + pattern: >- + ^(?!\s*$)[\p{L}\p{gc=Mark}\p{digit}\p{gc=Connector_Punctuation}\p{Join_Control} + .,''-]{1,128}$ + description: First name of the Party (Name Type). + example: Henrik + middleName: + title: MiddleName + type: string + minLength: 1 + maxLength: 128 + pattern: >- + ^(?!\s*$)[\p{L}\p{gc=Mark}\p{digit}\p{gc=Connector_Punctuation}\p{Join_Control} + .,''-]{1,128}$ + description: Middle name of the Party (Name Type). + example: Johannes + lastName: + title: LastName + type: string + minLength: 1 + maxLength: 128 + pattern: >- + ^(?!\s*$)[\p{L}\p{gc=Mark}\p{digit}\p{gc=Connector_Punctuation}\p{Join_Control} + .,''-]{1,128}$ + description: Last name of the Party (Name Type). + example: Karlsson + dateOfBirth: + title: DateofBirth (type Date) + type: string + pattern: >- + ^(?:[1-9]\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\d|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-02-29)$ + description: Date of Birth of the Party. + example: '1966-06-16' + merchantClassificationCode: + title: MerchantClassificationCode + type: string + pattern: ^[\d]{1,4}$ + description: >- + A limited set of pre-defined numbers. This list would be + a limited set of numbers identifying a set of popular + merchant types like School Fees, Pubs and Restaurants, + Groceries, etc. + fspId: + title: FspId + type: string + minLength: 1 + maxLength: 32 + description: FSP identifier. + extensionList: + type: array + items: &ref_2 + title: Extension + type: object + description: Data model for the complex type Extension. + properties: &ref_8 + key: + title: ExtensionKey + type: string + minLength: 1 + maxLength: 32 + description: Extension key. + value: + title: ExtensionValue + type: string + minLength: 1 + maxLength: 128 + description: Extension value. + required: &ref_9 + - key + - value + minItems: 0 + maxItems: 16 + to: + type: object + required: *ref_0 + properties: *ref_1 + amountType: + title: AmountType + type: string + enum: &ref_3 + - SEND + - RECEIVE + description: >- + Below are the allowed values for the enumeration AmountType. + + - SEND - Amount the Payer would like to send, that is, the + amount that should be withdrawn from the Payer account + including any fees. + + - RECEIVE - Amount the Payer would like the Payee to + receive, that is, the amount that should be sent to the + receiver exclusive of any fees. + example: RECEIVE + currency: + title: Currency + description: >- + The currency codes defined in [ISO + 4217](https://www.iso.org/iso-4217-currency-codes.html) as + three-letter alphabetic codes are used as the standard + naming representation for currencies. + type: string + minLength: 3 + maxLength: 3 + enum: &ref_4 + - AED + - AFN + - ALL + - AMD + - ANG + - AOA + - ARS + - AUD + - AWG + - AZN + - BAM + - BBD + - BDT + - BGN + - BHD + - BIF + - BMD + - BND + - BOB + - BRL + - BSD + - BTN + - BWP + - BYN + - BZD + - CAD + - CDF + - CHF + - CLP + - CNY + - COP + - CRC + - CUC + - CUP + - CVE + - CZK + - DJF + - DKK + - DOP + - DZD + - EGP + - ERN + - ETB + - EUR + - FJD + - FKP + - GBP + - GEL + - GGP + - GHS + - GIP + - GMD + - GNF + - GTQ + - GYD + - HKD + - HNL + - HRK + - HTG + - HUF + - IDR + - ILS + - IMP + - INR + - IQD + - IRR + - ISK + - JEP + - JMD + - JOD + - JPY + - KES + - KGS + - KHR + - KMF + - KPW + - KRW + - KWD + - KYD + - KZT + - LAK + - LBP + - LKR + - LRD + - LSL + - LYD + - MAD + - MDL + - MGA + - MKD + - MMK + - MNT + - MOP + - MRO + - MUR + - MVR + - MWK + - MXN + - MYR + - MZN + - NAD + - NGN + - NIO + - NOK + - NPR + - NZD + - OMR + - PAB + - PEN + - PGK + - PHP + - PKR + - PLN + - PYG + - QAR + - RON + - RSD + - RUB + - RWF + - SAR + - SBD + - SCR + - SDG + - SEK + - SGD + - SHP + - SLL + - SOS + - SPL + - SRD + - STD + - SVC + - SYP + - SZL + - THB + - TJS + - TMT + - TND + - TOP + - TRY + - TTD + - TVD + - TWD + - TZS + - UAH + - UGX + - USD + - UYU + - UZS + - VEF + - VND + - VUV + - WST + - XAF + - XCD + - XDR + - XOF + - XPF + - XTS + - XXX + - YER + - ZAR + - ZMW + - ZWD + amount: + title: Amount + type: string + pattern: ^([0]|([1-9][0-9]{0,17}))([.][0-9]{0,3}[1-9])?$ + description: >- + The API data type Amount is a JSON String in a canonical + format that is restricted by a regular expression for + interoperability reasons. This pattern does not allow any + trailing zeroes at all, but allows an amount without a minor + currency unit. It also only allows four digits in the minor + currency unit; a negative value is not allowed. Using more + than 18 digits in the major currency unit is not allowed. + example: '123.45' + transactionType: + title: transferTransactionType + type: string + enum: &ref_5 + - TRANSFER + description: Type of transaction. + note: + title: Note + type: string + minLength: 1 + maxLength: 128 + description: Memo assigned to transaction. + example: Note sent to Payee. + quoteRequestExtensions: + type: array + items: *ref_2 + minItems: 0 + maxItems: 16 + transferRequestExtensions: + type: array + items: *ref_2 + minItems: 0 + maxItems: 16 + skipPartyLookup: + description: >- + Set to true if supplying an FSPID for the payee party and no + party resolution is needed. This may be useful is a previous + party resolution has been performed. + type: boolean + required: true + responses: + '200': + description: Transfer completed successfully + content: &ref_15 + application/json: + schema: + type: object + required: &ref_12 + - homeTransactionId + - from + - to + - amountType + - currency + - amount + - transactionType + properties: &ref_13 + transferId: + title: CorrelationId + type: string + pattern: >- + ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + description: >- + Identifier that correlates all messages of the same + sequence. The API data type UUID (Universally Unique + Identifier) is a JSON String in canonical format, + conforming to [RFC + 4122](https://tools.ietf.org/html/rfc4122), that is + restricted by a regular expression for interoperability + reasons. A UUID is always 36 characters long, 32 + hexadecimal symbols and 4 dashes (‘-‘). + example: b51ec534-ee48-4575-b6a9-ead2955b8069 + homeTransactionId: + type: string + description: >- + Transaction ID from the DFSP backend, used to reconcile + transactions between the Switch and DFSP backend systems. + from: + type: object + required: *ref_0 + properties: *ref_1 + to: + type: object + required: *ref_0 + properties: *ref_1 + amountType: + title: AmountType + type: string + enum: *ref_3 + description: >- + Below are the allowed values for the enumeration + AmountType. + + - SEND - Amount the Payer would like to send, that is, the + amount that should be withdrawn from the Payer account + including any fees. + + - RECEIVE - Amount the Payer would like the Payee to + receive, that is, the amount that should be sent to the + receiver exclusive of any fees. + example: RECEIVE + currency: + title: Currency + description: >- + The currency codes defined in [ISO + 4217](https://www.iso.org/iso-4217-currency-codes.html) as + three-letter alphabetic codes are used as the standard + naming representation for currencies. + type: string + minLength: 3 + maxLength: 3 + enum: *ref_4 + amount: + title: Amount + type: string + pattern: ^([0]|([1-9][0-9]{0,17}))([.][0-9]{0,3}[1-9])?$ + description: >- + The API data type Amount is a JSON String in a canonical + format that is restricted by a regular expression for + interoperability reasons. This pattern does not allow any + trailing zeroes at all, but allows an amount without a + minor currency unit. It also only allows four digits in + the minor currency unit; a negative value is not allowed. + Using more than 18 digits in the major currency unit is + not allowed. + example: '123.45' + transactionType: + title: transferTransactionType + type: string + enum: *ref_5 + description: Type of transaction. + note: + title: Note + type: string + minLength: 1 + maxLength: 128 + description: Memo assigned to transaction. + example: Note sent to Payee. + currentState: + type: string + enum: &ref_19 + - ERROR_OCCURRED + - WAITING_FOR_PARTY_ACCEPTANCE + - WAITING_FOR_QUOTE_ACCEPTANCE + - COMPLETED + quoteId: + title: CorrelationId + type: string + pattern: >- + ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + description: >- + Identifier that correlates all messages of the same + sequence. The API data type UUID (Universally Unique + Identifier) is a JSON String in canonical format, + conforming to [RFC + 4122](https://tools.ietf.org/html/rfc4122), that is + restricted by a regular expression for interoperability + reasons. A UUID is always 36 characters long, 32 + hexadecimal symbols and 4 dashes (‘-‘). + example: b51ec534-ee48-4575-b6a9-ead2955b8069 + getPartiesResponse: + type: object + required: + - body + properties: + body: + type: object + headers: + type: object + quoteResponse: + type: object + required: + - body + properties: + body: + title: QuotesIDPutResponse + type: object + description: The object sent in the PUT /quotes/{ID} callback. + properties: &ref_56 + transferAmount: + title: Money + type: object + description: Data model for the complex type Money. + properties: &ref_6 + currency: + title: Currency + description: >- + The currency codes defined in [ISO + 4217](https://www.iso.org/iso-4217-currency-codes.html) + as three-letter alphabetic codes are used as + the standard naming representation for + currencies. + type: string + minLength: 3 + maxLength: 3 + enum: *ref_4 + amount: + title: Amount + type: string + pattern: >- + ^([0]|([1-9][0-9]{0,17}))([.][0-9]{0,3}[1-9])?$ + description: >- + The API data type Amount is a JSON String in a + canonical format that is restricted by a + regular expression for interoperability + reasons. This pattern does not allow any + trailing zeroes at all, but allows an amount + without a minor currency unit. It also only + allows four digits in the minor currency unit; + a negative value is not allowed. Using more + than 18 digits in the major currency unit is + not allowed. + example: '123.45' + required: &ref_7 + - currency + - amount + payeeReceiveAmount: + title: Money + type: object + description: Data model for the complex type Money. + properties: *ref_6 + required: *ref_7 + payeeFspFee: + title: Money + type: object + description: Data model for the complex type Money. + properties: *ref_6 + required: *ref_7 + payeeFspCommission: + title: Money + type: object + description: Data model for the complex type Money. + properties: *ref_6 + required: *ref_7 + expiration: + title: DateTime + type: string + pattern: >- + ^(?:[1-9]\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\d|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-02-29)T(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:(\.\d{3}))(?:Z|[+-][01]\d:[0-5]\d)$ + description: >- + The API data type DateTime is a JSON String in a + lexical format that is restricted by a regular + expression for interoperability reasons. The + format is according to [ISO + 8601](https://www.iso.org/iso-8601-date-and-time-format.html), + expressed in a combined date, time and time zone + format. A more readable version of the format is + yyyy-MM-ddTHH:mm:ss.SSS[-HH:MM]. Examples are + "2016-05-24T08:38:08.699-04:00", + "2016-05-24T08:38:08.699Z" (where Z indicates Zulu + time zone, same as UTC). + example: '2016-05-24T08:38:08.699-04:00' + geoCode: + title: GeoCode + type: object + description: >- + Data model for the complex type GeoCode. Indicates + the geographic location from where the transaction + was initiated. + properties: &ref_44 + latitude: + title: Latitude + type: string + pattern: >- + ^(\+|-)?(?:90(?:(?:\.0{1,6})?)|(?:[0-9]|[1-8][0-9])(?:(?:\.[0-9]{1,6})?))$ + description: >- + The API data type Latitude is a JSON String in + a lexical format that is restricted by a + regular expression for interoperability + reasons. + example: '+45.4215' + longitude: + title: Longitude + type: string + pattern: >- + ^(\+|-)?(?:180(?:(?:\.0{1,6})?)|(?:[0-9]|[1-9][0-9]|1[0-7][0-9])(?:(?:\.[0-9]{1,6})?))$ + description: >- + The API data type Longitude is a JSON String + in a lexical format that is restricted by a + regular expression for interoperability + reasons. + example: '+75.6972' + required: &ref_45 + - latitude + - longitude + ilpPacket: + title: IlpPacket + type: string + pattern: ^[A-Za-z0-9-_]+[=]{0,2}$ + minLength: 1 + maxLength: 32768 + description: >- + Information for recipient (transport layer + information). + example: >- + AYIBgQAAAAAAAASwNGxldmVsb25lLmRmc3AxLm1lci45T2RTOF81MDdqUUZERmZlakgyOVc4bXFmNEpLMHlGTFGCAUBQU0svMS4wCk5vbmNlOiB1SXlweUYzY3pYSXBFdzVVc05TYWh3CkVuY3J5cHRpb246IG5vbmUKUGF5bWVudC1JZDogMTMyMzZhM2ItOGZhOC00MTYzLTg0NDctNGMzZWQzZGE5OGE3CgpDb250ZW50LUxlbmd0aDogMTM1CkNvbnRlbnQtVHlwZTogYXBwbGljYXRpb24vanNvbgpTZW5kZXItSWRlbnRpZmllcjogOTI4MDYzOTEKCiJ7XCJmZWVcIjowLFwidHJhbnNmZXJDb2RlXCI6XCJpbnZvaWNlXCIsXCJkZWJpdE5hbWVcIjpcImFsaWNlIGNvb3BlclwiLFwiY3JlZGl0TmFtZVwiOlwibWVyIGNoYW50XCIsXCJkZWJpdElkZW50aWZpZXJcIjpcIjkyODA2MzkxXCJ9IgA + condition: + title: IlpCondition + type: string + pattern: ^[A-Za-z0-9-_]{43}$ + maxLength: 48 + description: >- + Condition that must be attached to the transfer by + the Payer. + extensionList: + title: ExtensionList + type: object + description: >- + Data model for the complex type ExtensionList. An + optional list of extensions, specific to + deployment. + properties: &ref_10 + extension: + type: array + items: + title: Extension + type: object + description: Data model for the complex type Extension. + properties: *ref_8 + required: *ref_9 + minItems: 1 + maxItems: 16 + description: Number of Extension elements. + required: &ref_11 + - extension + required: &ref_57 + - transferAmount + - expiration + - ilpPacket + - condition + headers: + type: object + quoteResponseSource: + type: string + description: > + FSPID of the entity that supplied the quote response. This + may not be the same as the FSPID of the entity which owns + the end user account in the case of a FOREX transfer. i.e. + it may be a FOREX gateway. + fulfil: + type: object + required: + - body + properties: + body: + title: TransfersIDPutResponse + type: object + description: The object sent in the PUT /transfers/{ID} callback. + properties: &ref_20 + fulfilment: + title: IlpFulfilment + type: string + pattern: ^[A-Za-z0-9-_]{43}$ + maxLength: 48 + description: >- + Fulfilment that must be attached to the transfer + by the Payee. + example: WLctttbu2HvTsa1XWvUoGRcQozHsqeu9Ahl2JW9Bsu8 + completedTimestamp: + title: DateTime + type: string + pattern: >- + ^(?:[1-9]\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\d|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-02-29)T(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:(\.\d{3}))(?:Z|[+-][01]\d:[0-5]\d)$ + description: >- + The API data type DateTime is a JSON String in a + lexical format that is restricted by a regular + expression for interoperability reasons. The + format is according to [ISO + 8601](https://www.iso.org/iso-8601-date-and-time-format.html), + expressed in a combined date, time and time zone + format. A more readable version of the format is + yyyy-MM-ddTHH:mm:ss.SSS[-HH:MM]. Examples are + "2016-05-24T08:38:08.699-04:00", + "2016-05-24T08:38:08.699Z" (where Z indicates Zulu + time zone, same as UTC). + example: '2016-05-24T08:38:08.699-04:00' + transferState: + title: TransferState + type: string + enum: &ref_27 + - RECEIVED + - RESERVED + - COMMITTED + - ABORTED + description: >- + Below are the allowed values for the enumeration. + + - RECEIVED - Next ledger has received the + transfer. + + - RESERVED - Next ledger has reserved the + transfer. + + - COMMITTED - Next ledger has successfully + performed the transfer. + + - ABORTED - Next ledger has aborted the transfer + due to a rejection or failure to perform the + transfer. + example: RESERVED + extensionList: + title: ExtensionList + type: object + description: >- + Data model for the complex type ExtensionList. An + optional list of extensions, specific to + deployment. + properties: *ref_10 + required: *ref_11 + required: &ref_21 + - transferState + headers: + type: object + lastError: + description: >- + This object represents a Mojaloop API error received at + any time during the transfer process + type: object + properties: &ref_26 + httpStatusCode: + type: integer + description: >- + The HTTP status code returned to the caller. This is + the same as the actual HTTP status code returned with + the response. + mojaloopError: + description: >- + If a transfer process results in an error callback + during the asynchronous Mojaloop API exchange, this + property will contain the underlying Mojaloop API + error object. + type: object + properties: &ref_36 + errorInformation: + title: ErrorInformation + type: object + description: Data model for the complex type ErrorInformation. + properties: &ref_63 + errorCode: + title: ErrorCode + type: string + pattern: ^[1-9]\d{3}$ + description: >- + The API data type ErrorCode is a JSON String + of four characters, consisting of digits only. + Negative numbers are not allowed. A leading + zero is not allowed. Each error code in the + API is a four-digit number, for example, 1234, + where the first number (1 in the example) + represents the high-level error category, the + second number (2 in the example) represents + the low-level error category, and the last two + numbers (34 in the example) represent the + specific error. + example: '5100' + errorDescription: + title: ErrorDescription + type: string + minLength: 1 + maxLength: 128 + description: Error description string. + extensionList: + title: ExtensionList + type: object + description: >- + Data model for the complex type ExtensionList. + An optional list of extensions, specific to + deployment. + properties: *ref_10 + required: *ref_11 + required: &ref_64 + - errorCode + - errorDescription + skipPartyLookup: + description: >- + Set to true if supplying an FSPID for the payee party and + no party resolution is needed. This may be useful is a + previous party resolution has been performed. + type: boolean + '400': + description: Malformed or missing required body, headers or parameters + content: &ref_143 + application/json: + schema: + allOf: &ref_14 + - type: object + properties: &ref_22 + statusCode: + type: string + description: Error code as string. + message: + type: string + description: Error message text. + - type: object + required: + - transferState + properties: + transferState: + type: object + required: *ref_12 + properties: *ref_13 + '500': + description: An error occurred processing the transfer + content: &ref_16 + application/json: + schema: + allOf: *ref_14 + '504': + description: Timeout occurred processing the transfer + content: &ref_17 + application/json: + schema: + allOf: *ref_14 + /transfers/{transferId}: + put: + summary: >- + Continues a transfer that has paused at the quote stage in order to + accept or reject payee party and/or quote + description: > + The HTTP request `PUT /transfers/{transferId}` is used to continue a + transfer initiated via the `POST /transfers` method that has halted + after party lookup and/or quotation stage. + + + The request body should contain either the "acceptParty" or + "acceptQuote" property set to `true` as required to continue the + transfer. + + + See the description of the `POST /transfers` HTTP method for more + information on modes of transfer. + tags: + - Transfers + requestBody: + content: + application/json: + schema: + oneOf: + - type: object + required: &ref_28 + - acceptParty + properties: &ref_29 + acceptParty: + type: boolean + enum: + - true + - false + - type: object + required: &ref_32 + - acceptQuote + properties: &ref_33 + acceptQuote: + type: boolean + enum: + - true + - false + parameters: + - name: transferId + in: path + required: true + schema: &ref_18 + title: CorrelationId + type: string + pattern: >- + ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + description: >- + Identifier that correlates all messages of the same sequence. The + API data type UUID (Universally Unique Identifier) is a JSON + String in canonical format, conforming to [RFC + 4122](https://tools.ietf.org/html/rfc4122), that is restricted by + a regular expression for interoperability reasons. A UUID is + always 36 characters long, 32 hexadecimal symbols and 4 dashes + (‘-‘). + example: b51ec534-ee48-4575-b6a9-ead2955b8069 + description: >- + Identifier of the transfer to continue as returned in the response + to a `POST /transfers` request. + responses: + '200': + description: Transfer completed successfully + content: *ref_15 + '500': + description: An error occurred processing the transfer + content: *ref_16 + '504': + description: Timeout occurred processing the transfer + content: *ref_17 + get: + summary: Retrieves information for a specific transfer + description: >- + The HTTP request `GET /transfers/{transferId}` is used to get + information regarding a transfer created or requested earlier. The + `{transferId}` in the URI should contain the `transferId` that was used + for the creation of the transfer. + tags: + - Transfers + parameters: + - name: transferId + in: path + required: true + schema: *ref_18 + description: >- + Identifier of the transfer to continue as returned in the response + to a `POST /transfers` request. + responses: + '200': + description: Transfer information successfully retrieved + content: + application/json: + schema: + type: object + required: &ref_72 + - transferId + - currentState + - fulfil + properties: &ref_73 + transferId: + title: CorrelationId + type: string + pattern: >- + ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + description: >- + Identifier that correlates all messages of the same + sequence. The API data type UUID (Universally Unique + Identifier) is a JSON String in canonical format, + conforming to [RFC + 4122](https://tools.ietf.org/html/rfc4122), that is + restricted by a regular expression for interoperability + reasons. A UUID is always 36 characters long, 32 + hexadecimal symbols and 4 dashes (‘-‘). + example: b51ec534-ee48-4575-b6a9-ead2955b8069 + currentState: + type: string + enum: *ref_19 + fulfil: + type: object + required: + - body + properties: + body: + title: TransfersIDPutResponse + type: object + description: The object sent in the PUT /transfers/{ID} callback. + properties: *ref_20 + required: *ref_21 + headers: + type: object + '500': + description: An error occurred processing the transfer + content: + application/json: + schema: + type: object + properties: *ref_22 + /bulkTransactions: + post: + summary: Sends money from one account to multiple accounts + description: > + The HTTP request `POST /bulkTransactions` is used to request the + movement of funds from payer DFSP to payees' DFSP. + tags: + - BulkTransactions + requestBody: + description: Bulk transfer request body + content: + application/json: + schema: + type: object + required: &ref_88 + - bulkTransactionId + - bulkHomeTransactionID + - options + - from + - individualTransfers + properties: &ref_89 + bulkHomeTransactionID: + type: string + description: >- + Transaction ID from the DFSP backend, used to reconcile + transactions between the Switch and DFSP backend systems. + bulkTransactionId: + title: CorrelationId + type: string + pattern: >- + ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + description: >- + Identifier that correlates all messages of the same + sequence. The API data type UUID (Universally Unique + Identifier) is a JSON String in canonical format, conforming + to [RFC 4122](https://tools.ietf.org/html/rfc4122), that is + restricted by a regular expression for interoperability + reasons. A UUID is always 36 characters long, 32 hexadecimal + symbols and 4 dashes (‘-‘). + example: b51ec534-ee48-4575-b6a9-ead2955b8069 + options: + type: object + required: &ref_80 + - autoAcceptParty + - autoAcceptQuote + - bulkExpiration + properties: &ref_81 + onlyValidateParty: + description: >- + Set to true if only party validation is required. This + means the quotes and transfers will not run. This is + useful for only party resolution. + type: boolean + autoAcceptParty: + type: object + required: &ref_74 + - enabled + properties: &ref_75 + enabled: + type: boolean + enum: + - false + - true + autoAcceptQuote: + description: >- + Set to true if the quote response is accepted without + confirmation from the payer. The fees applied by the + payee will be acceptable to the payer abiding by the + limits set by optional 'perTransferFeeLimits' array. + type: object + oneOf: + - type: object + required: &ref_78 + - enabled + properties: &ref_79 + enabled: + type: boolean + enum: + - true + - false + perTransferFeeLimits: + type: array + minItems: 0 + items: + type: object + required: &ref_76 + - currency + - amount + properties: &ref_77 + currency: + title: Currency + description: >- + The currency codes defined in [ISO + 4217](https://www.iso.org/iso-4217-currency-codes.html) + as three-letter alphabetic codes are used + as the standard naming representation for + currencies. + type: string + minLength: 3 + maxLength: 3 + enum: *ref_4 + amount: + title: Amount + type: string + pattern: >- + ^([0]|([1-9][0-9]{0,17}))([.][0-9]{0,3}[1-9])?$ + description: >- + The API data type Amount is a JSON String + in a canonical format that is restricted + by a regular expression for + interoperability reasons. This pattern + does not allow any trailing zeroes at all, + but allows an amount without a minor + currency unit. It also only allows four + digits in the minor currency unit; a + negative value is not allowed. Using more + than 18 digits in the major currency unit + is not allowed. + example: '123.45' + skipPartyLookup: + description: >- + Set to true if supplying an FSPID for the payee party + and no party resolution is needed. This may be useful if + a previous party resolution has been performed. + type: boolean + synchronous: + description: >- + Set to true if the bulkTransfer requests need be handled + synchronous. Otherwise the requests will be handled + asynchronously, meaning there will be callbacks + whenever the processing is done + type: boolean + bulkExpiration: + title: DateTime + type: string + pattern: >- + ^(?:[1-9]\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\d|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-02-29)T(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:(\.\d{3}))(?:Z|[+-][01]\d:[0-5]\d)$ + description: >- + The API data type DateTime is a JSON String in a lexical + format that is restricted by a regular expression for + interoperability reasons. The format is according to + [ISO + 8601](https://www.iso.org/iso-8601-date-and-time-format.html), + expressed in a combined date, time and time zone format. + A more readable version of the format is + yyyy-MM-ddTHH:mm:ss.SSS[-HH:MM]. Examples are + "2016-05-24T08:38:08.699-04:00", + "2016-05-24T08:38:08.699Z" (where Z indicates Zulu time + zone, same as UTC). + example: '2016-05-24T08:38:08.699-04:00' + from: + title: Party + type: object + description: Data model for the complex type Party. + properties: &ref_24 + partyIdInfo: + title: PartyIdInfo + type: object + description: >- + Data model for the complex type PartyIdInfo. An + ExtensionList element has been added to this reqeust in + version v1.1 + properties: &ref_82 + partyIdType: + title: PartyIdType + type: string + enum: *ref_23 + description: >- + Below are the allowed values for the enumeration. + + - MSISDN - An MSISDN (Mobile Station International + Subscriber Directory Number, that is, the phone + number) is used as reference to a participant. The + MSISDN identifier should be in international format + according to the [ITU-T E.164 + standard](https://www.itu.int/rec/T-REC-E.164/en). + Optionally, the MSISDN may be prefixed by a single + plus sign, indicating the international prefix. + + - EMAIL - An email is used as reference to a + participant. The format of the email should be + according to the informational [RFC + 3696](https://tools.ietf.org/html/rfc3696). + + - PERSONAL_ID - A personal identifier is used as + reference to a participant. Examples of personal + identification are passport number, birth + certificate number, and national registration + number. The identifier number is added in the + PartyIdentifier element. The personal identifier + type is added in the PartySubIdOrType element. + + - BUSINESS - A specific Business (for example, an + organization or a company) is used as reference to a + participant. The BUSINESS identifier can be in any + format. To make a transaction connected to a + specific username or bill number in a Business, the + PartySubIdOrType element should be used. + + - DEVICE - A specific device (for example, a POS or + ATM) ID connected to a specific business or + organization is used as reference to a Party. For + referencing a specific device under a specific + business or organization, use the PartySubIdOrType + element. + + - ACCOUNT_ID - A bank account number or FSP account + ID should be used as reference to a participant. The + ACCOUNT_ID identifier can be in any format, as + formats can greatly differ depending on country and + FSP. + + - IBAN - A bank account number or FSP account ID is + used as reference to a participant. The IBAN + identifier can consist of up to 34 alphanumeric + characters and should be entered without whitespace. + + - ALIAS An alias is used as reference to a + participant. The alias should be created in the FSP + as an alternative reference to an account owner. + Another example of an alias is a username in the FSP + system. The ALIAS identifier can be in any format. + It is also possible to use the PartySubIdOrType + element for identifying an account under an Alias + defined by the PartyIdentifier. + partyIdentifier: + title: PartyIdentifier + type: string + minLength: 1 + maxLength: 128 + description: Identifier of the Party. + example: '16135551212' + partySubIdOrType: + title: PartySubIdOrType + type: string + minLength: 1 + maxLength: 128 + description: >- + Either a sub-identifier of a PartyIdentifier, or a + sub-type of the PartyIdType, normally a + PersonalIdentifierType. + fspId: + title: FspId + type: string + minLength: 1 + maxLength: 32 + description: FSP identifier. + extensionList: + title: ExtensionList + type: object + description: >- + Data model for the complex type ExtensionList. An + optional list of extensions, specific to deployment. + properties: *ref_10 + required: *ref_11 + required: &ref_83 + - partyIdType + - partyIdentifier + merchantClassificationCode: + title: MerchantClassificationCode + type: string + pattern: ^[\d]{1,4}$ + description: >- + A limited set of pre-defined numbers. This list would be + a limited set of numbers identifying a set of popular + merchant types like School Fees, Pubs and Restaurants, + Groceries, etc. + name: + title: PartyName + type: string + minLength: 1 + maxLength: 128 + description: Name of the Party. Could be a real name or a nickname. + personalInfo: + title: PartyPersonalInfo + type: object + description: Data model for the complex type PartyPersonalInfo. + properties: &ref_85 + complexName: + title: PartyComplexName + type: object + description: Data model for the complex type PartyComplexName. + properties: &ref_84 + firstName: + title: FirstName + type: string + minLength: 1 + maxLength: 128 + pattern: >- + ^(?!\s*$)[\p{L}\p{gc=Mark}\p{digit}\p{gc=Connector_Punctuation}\p{Join_Control} + .,''-]{1,128}$ + description: First name of the Party (Name Type). + example: Henrik + middleName: + title: MiddleName + type: string + minLength: 1 + maxLength: 128 + pattern: >- + ^(?!\s*$)[\p{L}\p{gc=Mark}\p{digit}\p{gc=Connector_Punctuation}\p{Join_Control} + .,''-]{1,128}$ + description: Middle name of the Party (Name Type). + example: Johannes + lastName: + title: LastName + type: string + minLength: 1 + maxLength: 128 + pattern: >- + ^(?!\s*$)[\p{L}\p{gc=Mark}\p{digit}\p{gc=Connector_Punctuation}\p{Join_Control} + .,''-]{1,128}$ + description: Last name of the Party (Name Type). + example: Karlsson + dateOfBirth: + title: DateofBirth (type Date) + type: string + pattern: >- + ^(?:[1-9]\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\d|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-02-29)$ + description: Date of Birth of the Party. + example: '1966-06-16' + required: &ref_25 + - partyIdInfo + individualTransfers: + description: List of individual transfers in a bulk transfer. + type: array + minItems: 1 + items: + title: BulkTransactionIndividualTransfer + type: object + description: >- + Data model for the complex type + 'bulkTransactionIndividualTransfer'. + properties: &ref_86 + homeTransactionId: + type: string + description: >- + Transaction ID from the DFSP backend, used to + reconcile transactions between the Switch and DFSP + backend systems. + to: + title: Party + type: object + description: Data model for the complex type Party. + properties: *ref_24 + required: *ref_25 + reference: + description: Payer Loan reference + type: string + amountType: + title: AmountType + type: string + enum: *ref_3 + description: >- + Below are the allowed values for the enumeration + AmountType. + + - SEND - Amount the Payer would like to send, that is, + the amount that should be withdrawn from the Payer + account including any fees. + + - RECEIVE - Amount the Payer would like the Payee to + receive, that is, the amount that should be sent to + the receiver exclusive of any fees. + example: RECEIVE + currency: + title: Currency + description: >- + The currency codes defined in [ISO + 4217](https://www.iso.org/iso-4217-currency-codes.html) + as three-letter alphabetic codes are used as the + standard naming representation for currencies. + type: string + minLength: 3 + maxLength: 3 + enum: *ref_4 + amount: + title: Amount + type: string + pattern: ^([0]|([1-9][0-9]{0,17}))([.][0-9]{0,3}[1-9])?$ + description: >- + The API data type Amount is a JSON String in a + canonical format that is restricted by a regular + expression for interoperability reasons. This pattern + does not allow any trailing zeroes at all, but allows + an amount without a minor currency unit. It also only + allows four digits in the minor currency unit; a + negative value is not allowed. Using more than 18 + digits in the major currency unit is not allowed. + example: '123.45' + note: + title: Note + type: string + minLength: 1 + maxLength: 128 + description: Memo assigned to transaction. + example: Note sent to Payee. + quoteExtensions: + title: ExtensionList + type: object + description: >- + Data model for the complex type ExtensionList. An + optional list of extensions, specific to deployment. + properties: *ref_10 + required: *ref_11 + transferExtensions: + title: ExtensionList + type: object + description: >- + Data model for the complex type ExtensionList. An + optional list of extensions, specific to deployment. + properties: *ref_10 + required: *ref_11 + lastError: + type: object + description: >- + This object represents a Mojaloop API error received + at any time during the transfer process + properties: *ref_26 + required: &ref_87 + - homeTransactionId + - to + - amountType + - currency + - amount + extensions: + title: ExtensionList + type: object + description: >- + Data model for the complex type ExtensionList. An optional + list of extensions, specific to deployment. + properties: *ref_10 + required: *ref_11 + required: true + responses: + '202': + description: Bulk transfer accepted successfully + '400': + description: Malformed or missing required body, headers or parameters + content: &ref_41 + application/json: + schema: + allOf: &ref_92 + - type: object + properties: *ref_22 + - type: object + required: + - bulkTransferState + properties: + bulkTransferState: + type: object + required: &ref_39 + - bulkTransferId + - individualTransferResults + - currentState + properties: &ref_40 + bulkTransferId: + title: CorrelationId + type: string + pattern: >- + ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + description: >- + Identifier that correlates all messages of the + same sequence. The API data type UUID (Universally + Unique Identifier) is a JSON String in canonical + format, conforming to [RFC + 4122](https://tools.ietf.org/html/rfc4122), that + is restricted by a regular expression for + interoperability reasons. A UUID is always 36 + characters long, 32 hexadecimal symbols and 4 + dashes (‘-‘). + example: b51ec534-ee48-4575-b6a9-ead2955b8069 + bulkQuoteId: + title: CorrelationId + type: string + pattern: >- + ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + description: >- + Identifier that correlates all messages of the + same sequence. The API data type UUID (Universally + Unique Identifier) is a JSON String in canonical + format, conforming to [RFC + 4122](https://tools.ietf.org/html/rfc4122), that + is restricted by a regular expression for + interoperability reasons. A UUID is always 36 + characters long, 32 hexadecimal symbols and 4 + dashes (‘-‘). + example: b51ec534-ee48-4575-b6a9-ead2955b8069 + homeTransactionId: + type: string + description: >- + Transaction ID from the DFSP backend, used to + reconcile transactions between the Switch and DFSP + backend systems. + bulkTransferState: + title: TransferState + type: string + enum: *ref_27 + description: >- + Below are the allowed values for the enumeration. + + - RECEIVED - Next ledger has received the + transfer. + + - RESERVED - Next ledger has reserved the + transfer. + + - COMMITTED - Next ledger has successfully + performed the transfer. + + - ABORTED - Next ledger has aborted the transfer + due to a rejection or failure to perform the + transfer. + example: RESERVED + completedTimestamp: + title: DateTime + type: string + pattern: >- + ^(?:[1-9]\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\d|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-02-29)T(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:(\.\d{3}))(?:Z|[+-][01]\d:[0-5]\d)$ + description: >- + The API data type DateTime is a JSON String in a + lexical format that is restricted by a regular + expression for interoperability reasons. The + format is according to [ISO + 8601](https://www.iso.org/iso-8601-date-and-time-format.html), + expressed in a combined date, time and time zone + format. A more readable version of the format is + yyyy-MM-ddTHH:mm:ss.SSS[-HH:MM]. Examples are + "2016-05-24T08:38:08.699-04:00", + "2016-05-24T08:38:08.699Z" (where Z indicates Zulu + time zone, same as UTC). + example: '2016-05-24T08:38:08.699-04:00' + extensionList: + title: ExtensionList + type: object + description: >- + Data model for the complex type ExtensionList. An + optional list of extensions, specific to + deployment. + properties: *ref_10 + required: *ref_11 + currentState: + type: string + enum: &ref_43 + - ERROR_OCCURRED + - COMPLETED + individualTransferResults: + type: array + maxItems: 1000 + items: + type: object + required: &ref_90 + - transferId + properties: &ref_91 + transferId: + title: CorrelationId + type: string + pattern: >- + ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + description: >- + Identifier that correlates all messages of + the same sequence. The API data type UUID + (Universally Unique Identifier) is a JSON + String in canonical format, conforming to + [RFC + 4122](https://tools.ietf.org/html/rfc4122), + that is restricted by a regular expression + for interoperability reasons. A UUID is + always 36 characters long, 32 hexadecimal + symbols and 4 dashes (‘-‘). + example: b51ec534-ee48-4575-b6a9-ead2955b8069 + fulfilment: + description: >- + Fulfilment that must be attached to the + transfer by the Payee. + title: IlpFulfilment + type: string + pattern: ^[A-Za-z0-9-_]{43}$ + maxLength: 48 + example: WLctttbu2HvTsa1XWvUoGRcQozHsqeu9Ahl2JW9Bsu8 + extensionList: + description: >- + Data model for the complex type + ExtensionList. An optional list of + extensions, specific to deployment. + title: ExtensionList + type: object + properties: *ref_10 + required: *ref_11 + lastError: + type: object + description: >- + This object represents a Mojaloop API error + received at any time during the transfer + process + properties: *ref_26 + description: >- + List of individual transfer result in a bulk + transfer response. + '500': + description: Internal Server Error + content: &ref_42 + application/json: + schema: + type: object + properties: *ref_22 + /bulkTransactions/{bulkTransactionId}: + put: + summary: Amends the bulk transaction request + description: >- + The HTTP request `PUT /bulkTransactions/{bulkTransactionId}` is used to + amend information regarding a bulk transaction, i.e. when + autoAcceptParty or autoAcceptQuote is false then the payer need to + provide confirmation to proceed with further processing of the request. + The `{bulkTransactionId}` in the URI should contain the + `bulkTransactionId` that was used for the creation of the bulk transfer. + tags: + - BulkTransactions + parameters: + - name: bulkTransactionId + in: path + required: true + schema: &ref_159 + title: CorrelationId + type: string + pattern: >- + ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + description: >- + Identifier that correlates all messages of the same sequence. The + API data type UUID (Universally Unique Identifier) is a JSON + String in canonical format, conforming to [RFC + 4122](https://tools.ietf.org/html/rfc4122), that is restricted by + a regular expression for interoperability reasons. A UUID is + always 36 characters long, 32 hexadecimal symbols and 4 dashes + (‘-‘). + example: b51ec534-ee48-4575-b6a9-ead2955b8069 + description: >- + Identifier of the bulk transaction to continue as returned in the + response to a `POST /bulkTransaction` request. + requestBody: + description: Bulk transaction request body + content: + application/json: + schema: + oneOf: + - description: >- + The object sent back as confirmation of payee parties when + autoAcceptParty is false. + type: object + required: &ref_34 + - bulkHomeTransactionID + - individualTransfers + properties: &ref_35 + bulkHomeTransactionID: + type: string + description: >- + Transaction ID from the DFSP backend, used to reconcile + transactions between the Switch and DFSP backend + systems. + individualTransfers: + description: >- + List of individual transfers in a bulk transfer with + accept party information. + type: array + minItems: 1 + maxItems: 1000 + items: + allOf: + - type: object + description: >- + Data model for the 'individualTransfer' while + accepting party or quote. + properties: &ref_30 + homeTransactionId: + type: string + description: >- + Transaction ID from the DFSP backend, used to + reconcile transactions between the Switch and + DFSP backend systems. + transactionId: + title: CorrelationId + type: string + pattern: >- + ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + description: >- + Identifier that correlates all messages of the + same sequence. The API data type UUID + (Universally Unique Identifier) is a JSON + String in canonical format, conforming to [RFC + 4122](https://tools.ietf.org/html/rfc4122), + that is restricted by a regular expression for + interoperability reasons. A UUID is always 36 + characters long, 32 hexadecimal symbols and 4 + dashes (‘-‘). + example: b51ec534-ee48-4575-b6a9-ead2955b8069 + required: &ref_31 + - homeTransactionId + - transactionId + - type: object + required: *ref_28 + properties: *ref_29 + - description: >- + The object sent back as confirmation of quotes when + autoAcceptQuotes is false. + type: object + required: &ref_37 + - bulkHomeTransactionID + - individualTransfers + properties: &ref_38 + bulkHomeTransactionID: + type: string + description: >- + Transaction ID from the DFSP backend, used to reconcile + transactions between the Switch and DFSP backend + systems. + individualTransfers: + description: List of individual transfers in a bulk transfer. + type: array + minItems: 1 + maxItems: 1000 + items: + allOf: + - type: object + description: >- + Data model for the 'individualTransfer' while + accepting party or quote. + properties: *ref_30 + required: *ref_31 + - type: object + required: *ref_32 + properties: *ref_33 + required: true + responses: + '202': + description: Bulk transaction information successfully amended + '400': + description: Malformed or missing required body, headers or parameters + content: &ref_144 + application/json: + schema: + oneOf: + - allOf: &ref_94 + - type: object + properties: *ref_22 + - type: object + required: + - bulkTransferState + properties: + bulkTransferState: + allOf: + - description: >- + The object sent back as confirmation of payee + parties when autoAcceptParty is false. + type: object + required: *ref_34 + properties: *ref_35 + - type: object + description: >- + This object represents a Mojaloop API error + received at any time during the party + discovery process + properties: &ref_93 + httpStatusCode: + type: integer + description: >- + The HTTP status code returned to the + caller. This is the same as the actual + HTTP status code returned with the + response. + mojaloopError: + description: >- + If a transfer process results in an error + callback during the asynchronous Mojaloop + API exchange, this property will contain + the underlying Mojaloop API error object. + type: object + properties: *ref_36 + - allOf: &ref_95 + - type: object + properties: *ref_22 + - type: object + required: + - bulkTansferState + properties: + bulkTransferState: + allOf: + - description: >- + The object sent back as confirmation of quotes + when autoAcceptQuotes is false. + type: object + required: *ref_37 + properties: *ref_38 + - type: object + description: >- + This object represents a Mojaloop API error + received at any time during the quote process + properties: &ref_46 + httpStatusCode: + type: integer + description: >- + The HTTP status code returned to the + caller. This is the same as the actual + HTTP status code returned with the + response. + mojaloopError: + description: >- + If a quote process results in an error + callback during the asynchronous Mojaloop + API exchange, this property will contain + the underlying Mojaloop API error object. + type: object + properties: *ref_36 + '500': + description: An error occurred processing the bulk transaction + content: + application/json: + schema: + type: object + properties: *ref_22 + /bulkTransfers: + post: + summary: Sends money from one account to multiple accounts + description: > + The HTTP request `POST /bulkTransfers` is used to request the movement + of funds from payer DFSP to payees' DFSP. + tags: + - BulkTransfers + requestBody: + description: Bulk transfer request body + content: + application/json: + schema: + type: object + required: &ref_98 + - bulkTransferId + - homeTransactionId + - bulkQuoteId + - from + - individualTransfers + properties: &ref_99 + homeTransactionId: + type: string + description: >- + Transaction ID from the DFSP backend, used to reconcile + transactions between the Switch and DFSP backend systems. + bulkTransferId: + title: CorrelationId + type: string + pattern: >- + ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + description: >- + Identifier that correlates all messages of the same + sequence. The API data type UUID (Universally Unique + Identifier) is a JSON String in canonical format, conforming + to [RFC 4122](https://tools.ietf.org/html/rfc4122), that is + restricted by a regular expression for interoperability + reasons. A UUID is always 36 characters long, 32 hexadecimal + symbols and 4 dashes (‘-‘). + example: b51ec534-ee48-4575-b6a9-ead2955b8069 + bulkQuoteId: + title: CorrelationId + type: string + pattern: >- + ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + description: >- + Identifier that correlates all messages of the same + sequence. The API data type UUID (Universally Unique + Identifier) is a JSON String in canonical format, conforming + to [RFC 4122](https://tools.ietf.org/html/rfc4122), that is + restricted by a regular expression for interoperability + reasons. A UUID is always 36 characters long, 32 hexadecimal + symbols and 4 dashes (‘-‘). + example: b51ec534-ee48-4575-b6a9-ead2955b8069 + from: + type: object + required: *ref_0 + properties: *ref_1 + individualTransfers: + description: List of individual transfers in a bulk transfer. + type: array + minItems: 1 + maxItems: 1000 + items: + title: IndividualTransfer + type: object + description: Data model for the complex type 'individualTransfer'. + properties: &ref_96 + transferId: + title: CorrelationId + type: string + pattern: >- + ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + description: >- + Identifier that correlates all messages of the same + sequence. The API data type UUID (Universally Unique + Identifier) is a JSON String in canonical format, + conforming to [RFC + 4122](https://tools.ietf.org/html/rfc4122), that is + restricted by a regular expression for + interoperability reasons. A UUID is always 36 + characters long, 32 hexadecimal symbols and 4 dashes + (‘-‘). + example: b51ec534-ee48-4575-b6a9-ead2955b8069 + to: + type: object + required: *ref_0 + properties: *ref_1 + amountType: + title: AmountType + type: string + enum: *ref_3 + description: >- + Below are the allowed values for the enumeration + AmountType. + + - SEND - Amount the Payer would like to send, that is, + the amount that should be withdrawn from the Payer + account including any fees. + + - RECEIVE - Amount the Payer would like the Payee to + receive, that is, the amount that should be sent to + the receiver exclusive of any fees. + example: RECEIVE + currency: + title: Currency + description: >- + The currency codes defined in [ISO + 4217](https://www.iso.org/iso-4217-currency-codes.html) + as three-letter alphabetic codes are used as the + standard naming representation for currencies. + type: string + minLength: 3 + maxLength: 3 + enum: *ref_4 + amount: + title: Amount + type: string + pattern: ^([0]|([1-9][0-9]{0,17}))([.][0-9]{0,3}[1-9])?$ + description: >- + The API data type Amount is a JSON String in a + canonical format that is restricted by a regular + expression for interoperability reasons. This pattern + does not allow any trailing zeroes at all, but allows + an amount without a minor currency unit. It also only + allows four digits in the minor currency unit; a + negative value is not allowed. Using more than 18 + digits in the major currency unit is not allowed. + example: '123.45' + transactionType: + title: transferTransactionType + type: string + enum: *ref_5 + description: Type of transaction. + ilpPacket: + title: IlpPacket + type: string + pattern: ^[A-Za-z0-9-_]+[=]{0,2}$ + minLength: 1 + maxLength: 32768 + description: >- + Information for recipient (transport layer + information). + example: >- + AYIBgQAAAAAAAASwNGxldmVsb25lLmRmc3AxLm1lci45T2RTOF81MDdqUUZERmZlakgyOVc4bXFmNEpLMHlGTFGCAUBQU0svMS4wCk5vbmNlOiB1SXlweUYzY3pYSXBFdzVVc05TYWh3CkVuY3J5cHRpb246IG5vbmUKUGF5bWVudC1JZDogMTMyMzZhM2ItOGZhOC00MTYzLTg0NDctNGMzZWQzZGE5OGE3CgpDb250ZW50LUxlbmd0aDogMTM1CkNvbnRlbnQtVHlwZTogYXBwbGljYXRpb24vanNvbgpTZW5kZXItSWRlbnRpZmllcjogOTI4MDYzOTEKCiJ7XCJmZWVcIjowLFwidHJhbnNmZXJDb2RlXCI6XCJpbnZvaWNlXCIsXCJkZWJpdE5hbWVcIjpcImFsaWNlIGNvb3BlclwiLFwiY3JlZGl0TmFtZVwiOlwibWVyIGNoYW50XCIsXCJkZWJpdElkZW50aWZpZXJcIjpcIjkyODA2MzkxXCJ9IgA + condition: + title: IlpCondition + type: string + pattern: ^[A-Za-z0-9-_]{43}$ + maxLength: 48 + description: >- + Condition that must be attached to the transfer by the + Payer. + note: + title: Note + type: string + minLength: 1 + maxLength: 128 + description: Memo assigned to transaction. + example: Note sent to Payee. + extensions: + title: ExtensionList + type: object + description: >- + Data model for the complex type ExtensionList. An + optional list of extensions, specific to deployment. + properties: *ref_10 + required: *ref_11 + required: &ref_97 + - transferId + - to + - amountType + - currency + - amount + - ilpPacket + - condition + extensions: + title: ExtensionList + type: object + description: >- + Data model for the complex type ExtensionList. An optional + list of extensions, specific to deployment. + properties: *ref_10 + required: *ref_11 + required: true + responses: + '200': + description: Bulk transfer completed successfully + content: &ref_145 + application/json: + schema: + type: object + required: *ref_39 + properties: *ref_40 + '400': + description: Malformed or missing required body, headers or parameters + content: *ref_41 + '500': + description: Internal Server Error + content: *ref_42 + /bulkTransfers/{bulkTransferId}: + get: + summary: Retrieves information for a specific bulk transfer + description: >- + The HTTP request `GET /bulkTransfers/{bulkTransferId}` is used to get + information regarding a bulk transfer created or requested earlier. The + `{bulkTransferId}` in the URI should contain the `bulkTransferId` that + was used for the creation of the bulk transfer. + tags: + - BulkTransfers + parameters: + - name: bulkTransferId + in: path + required: true + schema: &ref_160 + title: CorrelationId + type: string + pattern: >- + ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + description: >- + Identifier that correlates all messages of the same sequence. The + API data type UUID (Universally Unique Identifier) is a JSON + String in canonical format, conforming to [RFC + 4122](https://tools.ietf.org/html/rfc4122), that is restricted by + a regular expression for interoperability reasons. A UUID is + always 36 characters long, 32 hexadecimal symbols and 4 dashes + (‘-‘). + example: b51ec534-ee48-4575-b6a9-ead2955b8069 + description: >- + Identifier of the bulk transfer to continue as returned in the + response to a `POST /bulkTransfers` request. + responses: + '200': + description: Bulk transfer information successfully retrieved + content: + application/json: + schema: + type: object + required: &ref_101 + - bulkTransferId + - currentState + - fulfils + properties: &ref_102 + bulkTransferId: + title: CorrelationId + type: string + pattern: >- + ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + description: >- + Identifier that correlates all messages of the same + sequence. The API data type UUID (Universally Unique + Identifier) is a JSON String in canonical format, + conforming to [RFC + 4122](https://tools.ietf.org/html/rfc4122), that is + restricted by a regular expression for interoperability + reasons. A UUID is always 36 characters long, 32 + hexadecimal symbols and 4 dashes (‘-‘). + example: b51ec534-ee48-4575-b6a9-ead2955b8069 + currentState: + type: string + enum: *ref_43 + fulfils: + type: array + minItems: 1 + maxItems: 1000 + items: + type: object + description: >- + A Mojaloop API transfer fulfilment for individual + transfers in a bulk transfer + properties: &ref_100 + fulfilment: + description: >- + Fulfilment that must be attached to the transfer by + the Payee. + title: IlpFulfilment + type: string + pattern: ^[A-Za-z0-9-_]{43}$ + maxLength: 48 + example: WLctttbu2HvTsa1XWvUoGRcQozHsqeu9Ahl2JW9Bsu8 + extensionList: + description: >- + Data model for the complex type ExtensionList. An + optional list of extensions, specific to deployment. + title: ExtensionList + type: object + properties: *ref_10 + required: *ref_11 + '500': + description: An error occurred processing the bulk transfer + content: + application/json: + schema: + type: object + properties: *ref_22 + /bulkQuotes: + post: + summary: Request bulk quotes for the provided financial transactions + description: > + The HTTP request `POST /bulkQuotes` is used to request a bulk quote to + fascilitate funds transfer from payer DFSP to payees' DFSP. + tags: + - BulkQuotes + requestBody: + description: Bulk quote request body + content: + application/json: + schema: + type: object + required: &ref_103 + - homeTransactionId + - from + - individualQuotes + properties: &ref_104 + homeTransactionId: + type: string + description: >- + Transaction ID from the DFSP backend, used to reconcile + transactions between the Switch and DFSP backend systems. + bulkQuoteId: + title: CorrelationId + type: string + pattern: >- + ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + description: >- + Identifier that correlates all messages of the same + sequence. The API data type UUID (Universally Unique + Identifier) is a JSON String in canonical format, conforming + to [RFC 4122](https://tools.ietf.org/html/rfc4122), that is + restricted by a regular expression for interoperability + reasons. A UUID is always 36 characters long, 32 hexadecimal + symbols and 4 dashes (‘-‘). + example: b51ec534-ee48-4575-b6a9-ead2955b8069 + from: + type: object + required: *ref_0 + properties: *ref_1 + individualQuotes: + description: List of individual quotes in a bulk quote. + type: array + minItems: 1 + maxItems: 1000 + items: + title: IndividualQuote + type: object + description: Data model for the complex type 'individualQuote'. + properties: &ref_50 + quoteId: + title: CorrelationId + type: string + pattern: >- + ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + description: >- + Identifier that correlates all messages of the same + sequence. The API data type UUID (Universally Unique + Identifier) is a JSON String in canonical format, + conforming to [RFC + 4122](https://tools.ietf.org/html/rfc4122), that is + restricted by a regular expression for + interoperability reasons. A UUID is always 36 + characters long, 32 hexadecimal symbols and 4 dashes + (‘-‘). + example: b51ec534-ee48-4575-b6a9-ead2955b8069 + to: + type: object + required: *ref_0 + properties: *ref_1 + amountType: + title: AmountType + type: string + enum: *ref_3 + description: >- + Below are the allowed values for the enumeration + AmountType. + + - SEND - Amount the Payer would like to send, that is, + the amount that should be withdrawn from the Payer + account including any fees. + + - RECEIVE - Amount the Payer would like the Payee to + receive, that is, the amount that should be sent to + the receiver exclusive of any fees. + example: RECEIVE + currency: + title: Currency + description: >- + The currency codes defined in [ISO + 4217](https://www.iso.org/iso-4217-currency-codes.html) + as three-letter alphabetic codes are used as the + standard naming representation for currencies. + type: string + minLength: 3 + maxLength: 3 + enum: *ref_4 + amount: + title: Amount + type: string + pattern: ^([0]|([1-9][0-9]{0,17}))([.][0-9]{0,3}[1-9])?$ + description: >- + The API data type Amount is a JSON String in a + canonical format that is restricted by a regular + expression for interoperability reasons. This pattern + does not allow any trailing zeroes at all, but allows + an amount without a minor currency unit. It also only + allows four digits in the minor currency unit; a + negative value is not allowed. Using more than 18 + digits in the major currency unit is not allowed. + example: '123.45' + transactionType: + title: transferTransactionType + type: string + enum: *ref_5 + description: Type of transaction. + note: + title: Note + type: string + minLength: 1 + maxLength: 128 + description: Memo assigned to transaction. + example: Note sent to Payee. + extensions: + title: ExtensionList + type: object + description: >- + Data model for the complex type ExtensionList. An + optional list of extensions, specific to deployment. + properties: *ref_10 + required: *ref_11 + required: &ref_51 + - quoteId + - to + - amountType + - currency + - transactionType + - amount + extensions: + title: ExtensionList + type: object + description: >- + Data model for the complex type ExtensionList. An optional + list of extensions, specific to deployment. + properties: *ref_10 + required: *ref_11 + required: true + responses: + '200': + description: Bulk quote completed successfully + content: &ref_146 + application/json: + schema: + type: object + required: &ref_47 + - bulkQuoteId + - individualQuoteResults + - currentState + - expiration + properties: &ref_48 + bulkQuoteId: + title: CorrelationId + type: string + pattern: >- + ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + description: >- + Identifier that correlates all messages of the same + sequence. The API data type UUID (Universally Unique + Identifier) is a JSON String in canonical format, + conforming to [RFC + 4122](https://tools.ietf.org/html/rfc4122), that is + restricted by a regular expression for interoperability + reasons. A UUID is always 36 characters long, 32 + hexadecimal symbols and 4 dashes (‘-‘). + example: b51ec534-ee48-4575-b6a9-ead2955b8069 + homeTransactionId: + type: string + description: >- + Transaction ID from the DFSP backend, used to reconcile + transactions between the Switch and DFSP backend systems. + expiration: + title: DateTime + type: string + pattern: >- + ^(?:[1-9]\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\d|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-02-29)T(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:(\.\d{3}))(?:Z|[+-][01]\d:[0-5]\d)$ + description: >- + The API data type DateTime is a JSON String in a lexical + format that is restricted by a regular expression for + interoperability reasons. The format is according to [ISO + 8601](https://www.iso.org/iso-8601-date-and-time-format.html), + expressed in a combined date, time and time zone format. A + more readable version of the format is + yyyy-MM-ddTHH:mm:ss.SSS[-HH:MM]. Examples are + "2016-05-24T08:38:08.699-04:00", + "2016-05-24T08:38:08.699Z" (where Z indicates Zulu time + zone, same as UTC). + example: '2016-05-24T08:38:08.699-04:00' + extensionList: + title: ExtensionList + type: object + description: >- + Data model for the complex type ExtensionList. An optional + list of extensions, specific to deployment. + properties: *ref_10 + required: *ref_11 + currentState: + type: string + enum: *ref_43 + individualQuoteResults: + type: array + maxItems: 1000 + items: + type: object + properties: &ref_105 + quoteId: + title: CorrelationId + type: string + pattern: >- + ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + description: >- + Identifier that correlates all messages of the same + sequence. The API data type UUID (Universally Unique + Identifier) is a JSON String in canonical format, + conforming to [RFC + 4122](https://tools.ietf.org/html/rfc4122), that is + restricted by a regular expression for + interoperability reasons. A UUID is always 36 + characters long, 32 hexadecimal symbols and 4 dashes + (‘-‘). + example: b51ec534-ee48-4575-b6a9-ead2955b8069 + transferAmount: + title: Money + type: object + description: Data model for the complex type Money. + properties: *ref_6 + required: *ref_7 + payeeReceiveAmount: + title: Money + type: object + description: Data model for the complex type Money. + properties: *ref_6 + required: *ref_7 + payeeFspFee: + title: Money + type: object + description: Data model for the complex type Money. + properties: *ref_6 + required: *ref_7 + payeeFspCommission: + title: Money + type: object + description: Data model for the complex type Money. + properties: *ref_6 + required: *ref_7 + geoCode: + title: GeoCode + type: object + description: >- + Data model for the complex type GeoCode. Indicates + the geographic location from where the transaction + was initiated. + properties: *ref_44 + required: *ref_45 + ilpPacket: + title: IlpPacket + type: string + pattern: ^[A-Za-z0-9-_]+[=]{0,2}$ + minLength: 1 + maxLength: 32768 + description: >- + Information for recipient (transport layer + information). + example: >- + AYIBgQAAAAAAAASwNGxldmVsb25lLmRmc3AxLm1lci45T2RTOF81MDdqUUZERmZlakgyOVc4bXFmNEpLMHlGTFGCAUBQU0svMS4wCk5vbmNlOiB1SXlweUYzY3pYSXBFdzVVc05TYWh3CkVuY3J5cHRpb246IG5vbmUKUGF5bWVudC1JZDogMTMyMzZhM2ItOGZhOC00MTYzLTg0NDctNGMzZWQzZGE5OGE3CgpDb250ZW50LUxlbmd0aDogMTM1CkNvbnRlbnQtVHlwZTogYXBwbGljYXRpb24vanNvbgpTZW5kZXItSWRlbnRpZmllcjogOTI4MDYzOTEKCiJ7XCJmZWVcIjowLFwidHJhbnNmZXJDb2RlXCI6XCJpbnZvaWNlXCIsXCJkZWJpdE5hbWVcIjpcImFsaWNlIGNvb3BlclwiLFwiY3JlZGl0TmFtZVwiOlwibWVyIGNoYW50XCIsXCJkZWJpdElkZW50aWZpZXJcIjpcIjkyODA2MzkxXCJ9IgA + condition: + title: IlpCondition + type: string + pattern: ^[A-Za-z0-9-_]{43}$ + maxLength: 48 + description: >- + Condition that must be attached to the transfer by + the Payer. + extensionList: + description: >- + Data model for the complex type ExtensionList. An + optional list of extensions, specific to deployment. + title: ExtensionList + type: object + properties: *ref_10 + required: *ref_11 + lastError: + description: >- + This object represents a Mojaloop API error received + at any time during the quote process + type: object + properties: *ref_46 + required: &ref_106 + - quoteId + - transferAmount + - ilpPacket + - condition + description: >- + List of individualQuoteResults in a bulk transfer + response. + '400': + description: Malformed or missing required body, headers or parameters + content: &ref_147 + application/json: + schema: + allOf: &ref_49 + - type: object + properties: *ref_22 + - type: object + required: + - bulkQuoteState + properties: + bulkQuoteState: + type: object + required: *ref_47 + properties: *ref_48 + '500': + description: An error occurred processing the bulk quote + content: &ref_148 + application/json: + schema: + allOf: *ref_49 + '504': + description: Timeout occurred processing the bulk quote + content: &ref_149 + application/json: + schema: + allOf: *ref_49 + /bulkQuotes/{bulkQuoteId}: + get: + summary: Retrieves information for a specific bulk quote + description: >- + The HTTP request `GET /bulkQuotes/{bulktQuoteId}` is used to get + information regarding a bulk quote created or requested earlier. The + `{bulkQuoteId}` in the URI should contain the `bulkQuoteId` that was + used for the creation of the bulk quote. + tags: + - BulkQuotes + parameters: + - name: bulkQuoteId + in: path + required: true + schema: &ref_161 + title: CorrelationId + type: string + pattern: >- + ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + description: >- + Identifier that correlates all messages of the same sequence. The + API data type UUID (Universally Unique Identifier) is a JSON + String in canonical format, conforming to [RFC + 4122](https://tools.ietf.org/html/rfc4122), that is restricted by + a regular expression for interoperability reasons. A UUID is + always 36 characters long, 32 hexadecimal symbols and 4 dashes + (‘-‘). + example: b51ec534-ee48-4575-b6a9-ead2955b8069 + description: >- + Identifier of the bulk transfer to continue as returned in the + response to a `POST /bulkTransfers` request. + responses: + '200': + description: Bulk quote information successfully retrieved + content: + application/json: + schema: + type: object + required: &ref_108 + - bulkQuoteId + - currentState + - individualQuotes + properties: &ref_109 + bulkQuoteId: + title: CorrelationId + type: string + pattern: >- + ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + description: >- + Identifier that correlates all messages of the same + sequence. The API data type UUID (Universally Unique + Identifier) is a JSON String in canonical format, + conforming to [RFC + 4122](https://tools.ietf.org/html/rfc4122), that is + restricted by a regular expression for interoperability + reasons. A UUID is always 36 characters long, 32 + hexadecimal symbols and 4 dashes (‘-‘). + example: b51ec534-ee48-4575-b6a9-ead2955b8069 + currentState: + type: string + enum: &ref_107 + - ERROR_OCCURRED + - COMPLETED + individualQuotes: + type: array + minItems: 1 + maxItems: 1000 + items: + title: IndividualQuote + type: object + description: Data model for the complex type 'individualQuote'. + properties: *ref_50 + required: *ref_51 + '500': + description: An error occurred processing the bulk quote + content: + application/json: + schema: + type: object + properties: *ref_22 + /requestToPay: + post: + summary: Receiver requesting funds from Sender + description: > + The HTTP request `POST /requestToPay` is used to support Pull Funds + pattern where in a receiver can request for funds from the Sender. + + The underlying API has two stages: + + 1. Party lookup. This facilitates a check by the sending party that the destination party is correct before proceeding with a money movement. + 2. Transaction Request. This request enables a Payee to request Payer to send electronic funds to the Payee. + tags: + - RequestToPay + requestBody: + description: RequestToPay request body + content: + application/json: + schema: + type: object + required: &ref_113 + - homeTransactionId + - from + - to + - amountType + - currency + - amount + - scenario + - initiator + - initiatorType + properties: &ref_114 + homeTransactionId: + type: string + description: >- + Transaction ID from the DFSP backend, used to reconcile + transactions between the Switch and DFSP backend systems. + from: + type: object + required: *ref_0 + properties: *ref_1 + to: + type: object + required: *ref_0 + properties: *ref_1 + amountType: + title: AmountType + type: string + enum: *ref_3 + description: >- + Below are the allowed values for the enumeration AmountType. + + - SEND - Amount the Payer would like to send, that is, the + amount that should be withdrawn from the Payer account + including any fees. + + - RECEIVE - Amount the Payer would like the Payee to + receive, that is, the amount that should be sent to the + receiver exclusive of any fees. + example: RECEIVE + currency: + title: Currency + description: >- + The currency codes defined in [ISO + 4217](https://www.iso.org/iso-4217-currency-codes.html) as + three-letter alphabetic codes are used as the standard + naming representation for currencies. + type: string + minLength: 3 + maxLength: 3 + enum: *ref_4 + amount: + title: Amount + type: string + pattern: ^([0]|([1-9][0-9]{0,17}))([.][0-9]{0,3}[1-9])?$ + description: >- + The API data type Amount is a JSON String in a canonical + format that is restricted by a regular expression for + interoperability reasons. This pattern does not allow any + trailing zeroes at all, but allows an amount without a minor + currency unit. It also only allows four digits in the minor + currency unit; a negative value is not allowed. Using more + than 18 digits in the major currency unit is not allowed. + example: '123.45' + scenario: + title: TransactionType + type: object + description: Data model for the complex type TransactionType. + properties: &ref_54 + scenario: + title: TransactionScenario + type: string + enum: &ref_110 + - DEPOSIT + - WITHDRAWAL + - TRANSFER + - PAYMENT + - REFUND + description: >- + Below are the allowed values for the enumeration. + + - DEPOSIT - Used for performing a Cash-In (deposit) + transaction. In a normal scenario, electronic funds are + transferred from a Business account to a Consumer + account, and physical cash is given from the Consumer to + the Business User. + + - WITHDRAWAL - Used for performing a Cash-Out + (withdrawal) transaction. In a normal scenario, + electronic funds are transferred from a Consumer’s + account to a Business account, and physical cash is + given from the Business User to the Consumer. + + - TRANSFER - Used for performing a P2P (Peer to Peer, or + Consumer to Consumer) transaction. + + - PAYMENT - Usually used for performing a transaction + from a Consumer to a Merchant or Organization, but could + also be for a B2B (Business to Business) payment. The + transaction could be online for a purchase in an + Internet store, in a physical store where both the + Consumer and Business User are present, a bill payment, + a donation, and so on. + + - REFUND - Used for performing a refund of transaction. + example: DEPOSIT + subScenario: + title: TransactionSubScenario + type: string + pattern: ^[A-Z_]{1,32}$ + description: >- + Possible sub-scenario, defined locally within the scheme + (UndefinedEnum Type). + example: LOCALLY_DEFINED_SUBSCENARIO + initiator: + title: TransactionInitiator + type: string + enum: &ref_53 + - PAYER + - PAYEE + description: >- + Below are the allowed values for the enumeration. + + - PAYER - Sender of funds is initiating the transaction. + The account to send from is either owned by the Payer or + is connected to the Payer in some way. + + - PAYEE - Recipient of the funds is initiating the + transaction by sending a transaction request. The Payer + must approve the transaction, either automatically by a + pre-generated OTP or by pre-approval of the Payee, or by + manually approving in his or her own Device. + example: PAYEE + initiatorType: + title: TransactionInitiatorType + type: string + enum: *ref_52 + description: >- + Below are the allowed values for the enumeration. + + - CONSUMER - Consumer is the initiator of the + transaction. + + - AGENT - Agent is the initiator of the transaction. + + - BUSINESS - Business is the initiator of the + transaction. + + - DEVICE - Device is the initiator of the transaction. + example: CONSUMER + refundInfo: + title: Refund + type: object + description: Data model for the complex type Refund. + properties: &ref_111 + originalTransactionId: + title: CorrelationId + type: string + pattern: >- + ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + description: >- + Identifier that correlates all messages of the same + sequence. The API data type UUID (Universally Unique + Identifier) is a JSON String in canonical format, + conforming to [RFC + 4122](https://tools.ietf.org/html/rfc4122), that is + restricted by a regular expression for + interoperability reasons. A UUID is always 36 + characters long, 32 hexadecimal symbols and 4 dashes + (‘-‘). + example: b51ec534-ee48-4575-b6a9-ead2955b8069 + refundReason: + title: RefundReason + type: string + minLength: 1 + maxLength: 128 + description: Reason for the refund. + example: Free text indicating reason for the refund. + required: &ref_112 + - originalTransactionId + balanceOfPayments: + title: BalanceOfPayments + type: string + pattern: ^[1-9]\d{2}$ + description: >- + (BopCode) The API data type + [BopCode](https://www.imf.org/external/np/sta/bopcode/) + is a JSON String of 3 characters, consisting of digits + only. Negative numbers are not allowed. A leading zero + is not allowed. + example: '123' + required: &ref_55 + - scenario + - initiator + - initiatorType + initiator: + title: TransactionInitiator + type: string + enum: *ref_53 + description: >- + Below are the allowed values for the enumeration. + + - PAYER - Sender of funds is initiating the transaction. The + account to send from is either owned by the Payer or is + connected to the Payer in some way. + + - PAYEE - Recipient of the funds is initiating the + transaction by sending a transaction request. The Payer must + approve the transaction, either automatically by a + pre-generated OTP or by pre-approval of the Payee, or by + manually approving in his or her own Device. + example: PAYEE + initiatorType: + title: TransactionInitiatorType + type: string + enum: *ref_52 + description: |- + Below are the allowed values for the enumeration. + - CONSUMER - Consumer is the initiator of the transaction. + - AGENT - Agent is the initiator of the transaction. + - BUSINESS - Business is the initiator of the transaction. + - DEVICE - Device is the initiator of the transaction. + example: CONSUMER + required: true + responses: + '200': + description: Request to Pay completed successfully + content: &ref_150 + application/json: + schema: + type: object + required: &ref_117 + - transactionRequestId + - from + - to + - amountType + - currency + - amount + - transactionType + - requestToPayState + properties: &ref_118 + transactionRequestId: + title: CorrelationId + type: string + pattern: >- + ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + description: >- + Identifier that correlates all messages of the same + sequence. The API data type UUID (Universally Unique + Identifier) is a JSON String in canonical format, + conforming to [RFC + 4122](https://tools.ietf.org/html/rfc4122), that is + restricted by a regular expression for interoperability + reasons. A UUID is always 36 characters long, 32 + hexadecimal symbols and 4 dashes (‘-‘). + example: b51ec534-ee48-4575-b6a9-ead2955b8069 + from: + type: object + required: *ref_0 + properties: *ref_1 + to: + type: object + required: *ref_0 + properties: *ref_1 + amountType: + title: AmountType + type: string + enum: *ref_3 + description: >- + Below are the allowed values for the enumeration + AmountType. + + - SEND - Amount the Payer would like to send, that is, the + amount that should be withdrawn from the Payer account + including any fees. + + - RECEIVE - Amount the Payer would like the Payee to + receive, that is, the amount that should be sent to the + receiver exclusive of any fees. + example: RECEIVE + currency: + title: Currency + description: >- + The currency codes defined in [ISO + 4217](https://www.iso.org/iso-4217-currency-codes.html) as + three-letter alphabetic codes are used as the standard + naming representation for currencies. + type: string + minLength: 3 + maxLength: 3 + enum: *ref_4 + amount: + title: Amount + type: string + pattern: ^([0]|([1-9][0-9]{0,17}))([.][0-9]{0,3}[1-9])?$ + description: >- + The API data type Amount is a JSON String in a canonical + format that is restricted by a regular expression for + interoperability reasons. This pattern does not allow any + trailing zeroes at all, but allows an amount without a + minor currency unit. It also only allows four digits in + the minor currency unit; a negative value is not allowed. + Using more than 18 digits in the major currency unit is + not allowed. + example: '123.45' + scenario: + title: TransactionType + type: object + description: Data model for the complex type TransactionType. + properties: *ref_54 + required: *ref_55 + initiator: + title: TransactionInitiator + type: string + enum: *ref_53 + description: >- + Below are the allowed values for the enumeration. + + - PAYER - Sender of funds is initiating the transaction. + The account to send from is either owned by the Payer or + is connected to the Payer in some way. + + - PAYEE - Recipient of the funds is initiating the + transaction by sending a transaction request. The Payer + must approve the transaction, either automatically by a + pre-generated OTP or by pre-approval of the Payee, or by + manually approving in his or her own Device. + example: PAYEE + initiatorType: + title: TransactionInitiatorType + type: string + enum: *ref_52 + description: |- + Below are the allowed values for the enumeration. + - CONSUMER - Consumer is the initiator of the transaction. + - AGENT - Agent is the initiator of the transaction. + - BUSINESS - Business is the initiator of the transaction. + - DEVICE - Device is the initiator of the transaction. + example: CONSUMER + authenticationType: + title: AuthenticationType + type: string + enum: &ref_115 + - OTP + - QRCODE + - U2F + description: >- + Below are the allowed values for the enumeration + AuthenticationType. + + - OTP - One-time password generated by the Payer FSP. + + - QRCODE - QR code used as One Time Password. + + - U2F - U2F is a new addition isolated to Thirdparty + stream. + example: OTP + requestToPayState: + title: TransactionRequestState + type: string + enum: &ref_116 + - RECEIVED + - PENDING + - ACCEPTED + - REJECTED + description: >- + Below are the allowed values for the enumeration. + + - RECEIVED - Payer FSP has received the transaction from + the Payee FSP. + + - PENDING - Payer FSP has sent the transaction request to + the Payer. + + - ACCEPTED - Payer has approved the transaction. + + - REJECTED - Payer has rejected the transaction. + example: RECEIVED + /requestToPayTransfer: + post: + summary: >- + Used to trigger funds from customer fsp account to merchant fsp account. + This is a follow-up request to requestToPay. + description: > + The HTTP request `POST /requestToPayTransfer` is used to request the + movement of funds from payer DFSP to payee DFSP. + + The underlying Mojaloop API has three stages for money transfer: + + 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. + 2. Authorization. This facilitates getting OTP from payee DFSP. + 3. Transfer. The enactment of the previously agreed "contract" + + This method has several modes of operation. + + - If the configuration variable `AUTO_ACCEPT_QUOTES` is set to `"false"` + this method will terminate and return the quotation when it has been + received from the payee DFSP. + 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. + The scheme adapter will then proceed with the transfer state. + + - If the configuration variable `AUTO_ACCEPT_OTP` is set to `"false"` + this method will terminate and return the otp when it has been received + from the payee DFSP. + 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. + The scheme adapter will then proceed with the transfer state. + + If the configuration variables `AUTO_ACCEPT_PARTIES` and + `AUTO_ACCEPT_QUOTES` are both set to `"true"` this method will block + until all three transfer stages are complete. Upon completion it will + return the entire set of transfer details received during the operation. + + + Combinations of settings for `AUTO_ACCEPT...` configuration variables + allow the scheme adapter user to decide which mode of operation best + suits their use cases. i.e. the scheme adapter can be configured to + "break" the three stage transfer at these points in order to execute + backend logic such as party verification, quoted fees assessments etc... + tags: + - RequestToPayTransfer + requestBody: + description: Request To Pay Transfer request body + content: + application/json: + schema: + type: object + required: &ref_119 + - requestToPayTransactionId + - from + - to + - amountType + - currency + - amount + - scenario + - initiator + - initiatorType + properties: &ref_120 + requestToPayTransactionId: + type: string + description: >- + Transaction ID from the DFSP backend, used to reconcile + transactions between the Switch and DFSP backend systems. + from: + type: object + required: *ref_0 + properties: *ref_1 + to: + type: object + required: *ref_0 + properties: *ref_1 + amountType: + title: AmountType + type: string + enum: *ref_3 + description: >- + Below are the allowed values for the enumeration AmountType. + + - SEND - Amount the Payer would like to send, that is, the + amount that should be withdrawn from the Payer account + including any fees. + + - RECEIVE - Amount the Payer would like the Payee to + receive, that is, the amount that should be sent to the + receiver exclusive of any fees. + example: RECEIVE + currency: + title: Currency + description: >- + The currency codes defined in [ISO + 4217](https://www.iso.org/iso-4217-currency-codes.html) as + three-letter alphabetic codes are used as the standard + naming representation for currencies. + type: string + minLength: 3 + maxLength: 3 + enum: *ref_4 + amount: + title: Amount + type: string + pattern: ^([0]|([1-9][0-9]{0,17}))([.][0-9]{0,3}[1-9])?$ + description: >- + The API data type Amount is a JSON String in a canonical + format that is restricted by a regular expression for + interoperability reasons. This pattern does not allow any + trailing zeroes at all, but allows an amount without a minor + currency unit. It also only allows four digits in the minor + currency unit; a negative value is not allowed. Using more + than 18 digits in the major currency unit is not allowed. + example: '123.45' + scenario: + title: TransactionType + type: object + description: Data model for the complex type TransactionType. + properties: *ref_54 + required: *ref_55 + initiator: + title: TransactionInitiator + type: string + enum: *ref_53 + description: >- + Below are the allowed values for the enumeration. + + - PAYER - Sender of funds is initiating the transaction. The + account to send from is either owned by the Payer or is + connected to the Payer in some way. + + - PAYEE - Recipient of the funds is initiating the + transaction by sending a transaction request. The Payer must + approve the transaction, either automatically by a + pre-generated OTP or by pre-approval of the Payee, or by + manually approving in his or her own Device. + example: PAYEE + initiatorType: + title: TransactionInitiatorType + type: string + enum: *ref_52 + description: |- + Below are the allowed values for the enumeration. + - CONSUMER - Consumer is the initiator of the transaction. + - AGENT - Agent is the initiator of the transaction. + - BUSINESS - Business is the initiator of the transaction. + - DEVICE - Device is the initiator of the transaction. + example: CONSUMER + note: + title: Note + type: string + minLength: 1 + maxLength: 128 + description: Memo assigned to transaction. + example: Note sent to Payee. + required: true + responses: + '200': + description: Transfer completed successfully + content: &ref_151 + application/json: + schema: + type: object + required: &ref_121 + - requestToPayTransactionId + - from + - to + - amountType + - currency + - amount + - transactionType + properties: &ref_122 + transferId: + title: CorrelationId + type: string + pattern: >- + ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + description: >- + Identifier that correlates all messages of the same + sequence. The API data type UUID (Universally Unique + Identifier) is a JSON String in canonical format, + conforming to [RFC + 4122](https://tools.ietf.org/html/rfc4122), that is + restricted by a regular expression for interoperability + reasons. A UUID is always 36 characters long, 32 + hexadecimal symbols and 4 dashes (‘-‘). + example: b51ec534-ee48-4575-b6a9-ead2955b8069 + requestToPayTransactionId: + type: string + description: >- + Transaction ID from the DFSP backend, used to reconcile + transactions between the Switch and DFSP backend systems. + from: + type: object + required: *ref_0 + properties: *ref_1 + to: + type: object + required: *ref_0 + properties: *ref_1 + amountType: + title: AmountType + type: string + enum: *ref_3 + description: >- + Below are the allowed values for the enumeration + AmountType. + + - SEND - Amount the Payer would like to send, that is, the + amount that should be withdrawn from the Payer account + including any fees. + + - RECEIVE - Amount the Payer would like the Payee to + receive, that is, the amount that should be sent to the + receiver exclusive of any fees. + example: RECEIVE + currency: + title: Currency + description: >- + The currency codes defined in [ISO + 4217](https://www.iso.org/iso-4217-currency-codes.html) as + three-letter alphabetic codes are used as the standard + naming representation for currencies. + type: string + minLength: 3 + maxLength: 3 + enum: *ref_4 + amount: + title: Amount + type: string + pattern: ^([0]|([1-9][0-9]{0,17}))([.][0-9]{0,3}[1-9])?$ + description: >- + The API data type Amount is a JSON String in a canonical + format that is restricted by a regular expression for + interoperability reasons. This pattern does not allow any + trailing zeroes at all, but allows an amount without a + minor currency unit. It also only allows four digits in + the minor currency unit; a negative value is not allowed. + Using more than 18 digits in the major currency unit is + not allowed. + example: '123.45' + transactionType: + title: transferTransactionType + type: string + enum: *ref_5 + description: Type of transaction. + note: + title: Note + type: string + minLength: 1 + maxLength: 128 + description: Memo assigned to transaction. + example: Note sent to Payee. + currentState: + type: string + enum: *ref_19 + quoteId: + title: CorrelationId + type: string + pattern: >- + ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + description: >- + Identifier that correlates all messages of the same + sequence. The API data type UUID (Universally Unique + Identifier) is a JSON String in canonical format, + conforming to [RFC + 4122](https://tools.ietf.org/html/rfc4122), that is + restricted by a regular expression for interoperability + reasons. A UUID is always 36 characters long, 32 + hexadecimal symbols and 4 dashes (‘-‘). + example: b51ec534-ee48-4575-b6a9-ead2955b8069 + quoteResponse: + title: QuotesIDPutResponse + type: object + description: The object sent in the PUT /quotes/{ID} callback. + properties: *ref_56 + required: *ref_57 + quoteResponseSource: + type: string + description: > + FSPID of the entity that supplied the quote response. This + may not be the same as the FSPID of the entity which owns + the end user account in the case of a FOREX transfer. i.e. + it may be a FOREX gateway. + fulfil: + title: TransfersIDPutResponse + type: object + description: The object sent in the PUT /transfers/{ID} callback. + properties: *ref_20 + required: *ref_21 + lastError: + description: >- + This object represents a Mojaloop API error received at + any time during the transfer process + type: object + properties: *ref_26 + '400': + description: Malformed or missing required body, headers or parameters + content: &ref_152 + application/json: + schema: + allOf: *ref_14 + '500': + description: An error occurred processing the transfer + content: *ref_16 + '504': + description: Timeout occurred processing the transfer + content: *ref_17 + /requestToPayTransfer/{requestToPayTransactionId}: + put: + summary: >- + Continues a transfer that has paused at the otp stage in order to accept + or reject quote + description: > + The HTTP request `PUT /transfers/{transferId}` is used to continue a + transfer initiated via the `POST /transfers` method that has halted + after party lookup and/or quotation stage. + + + The request body should contain either the "acceptOTP" or "acceptQuote" + property set to `true` as required to continue the transfer. + + + See the description of the `POST /requestToPayTransfer` HTTP method for + more information on modes of transfer. + tags: + - RequestToPayTransferID + requestBody: + content: + application/json: + schema: + oneOf: + - type: object + required: *ref_32 + properties: *ref_33 + - type: object + required: &ref_123 + - acceptOTP + properties: &ref_124 + acceptOTP: + type: boolean + enum: + - true + - false + parameters: + - name: requestToPayTransactionId + in: path + required: true + schema: &ref_162 + title: CorrelationId + type: string + pattern: >- + ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + description: >- + Identifier that correlates all messages of the same sequence. The + API data type UUID (Universally Unique Identifier) is a JSON + String in canonical format, conforming to [RFC + 4122](https://tools.ietf.org/html/rfc4122), that is restricted by + a regular expression for interoperability reasons. A UUID is + always 36 characters long, 32 hexadecimal symbols and 4 dashes + (‘-‘). + example: b51ec534-ee48-4575-b6a9-ead2955b8069 + description: >- + Identifier of the merchant request to pay transfer to continue as + returned in the response to a `POST /requestToPayTransfer` request. + responses: + '200': + description: Transfer completed successfully + content: *ref_15 + '500': + description: An error occurred processing the transfer + content: *ref_16 + '504': + description: Timeout occurred processing the transfer + content: *ref_17 + /accounts: + post: + summary: Create accounts on the Account Lookup Service + description: >- + The HTTP request `POST /accounts` is used to create account information + on the Account Lookup Service (ALS) regarding the provided list of + identities. + + + Caller DFSP is used as the account source FSP information + tags: + - Accounts + requestBody: + description: Identities list request body + content: + application/json: + schema: + type: array + items: &ref_58 + type: object + required: + - idType + - idValue + - currency + properties: + idType: + title: PartyIdType + type: string + enum: *ref_23 + description: >- + Below are the allowed values for the enumeration. + + - MSISDN - An MSISDN (Mobile Station International + Subscriber Directory Number, that is, the phone number) is + used as reference to a participant. The MSISDN identifier + should be in international format according to the [ITU-T + E.164 standard](https://www.itu.int/rec/T-REC-E.164/en). + Optionally, the MSISDN may be prefixed by a single plus + sign, indicating the international prefix. + + - EMAIL - An email is used as reference to a participant. + The format of the email should be according to the + informational [RFC + 3696](https://tools.ietf.org/html/rfc3696). + + - PERSONAL_ID - A personal identifier is used as reference + to a participant. Examples of personal identification are + passport number, birth certificate number, and national + registration number. The identifier number is added in the + PartyIdentifier element. The personal identifier type is + added in the PartySubIdOrType element. + + - BUSINESS - A specific Business (for example, an + organization or a company) is used as reference to a + participant. The BUSINESS identifier can be in any format. + To make a transaction connected to a specific username or + bill number in a Business, the PartySubIdOrType element + should be used. + + - DEVICE - A specific device (for example, a POS or ATM) + ID connected to a specific business or organization is + used as reference to a Party. For referencing a specific + device under a specific business or organization, use the + PartySubIdOrType element. + + - ACCOUNT_ID - A bank account number or FSP account ID + should be used as reference to a participant. The + ACCOUNT_ID identifier can be in any format, as formats can + greatly differ depending on country and FSP. + + - IBAN - A bank account number or FSP account ID is used + as reference to a participant. The IBAN identifier can + consist of up to 34 alphanumeric characters and should be + entered without whitespace. + + - ALIAS An alias is used as reference to a participant. + The alias should be created in the FSP as an alternative + reference to an account owner. Another example of an alias + is a username in the FSP system. The ALIAS identifier can + be in any format. It is also possible to use the + PartySubIdOrType element for identifying an account under + an Alias defined by the PartyIdentifier. + idValue: + title: PartyIdentifier + type: string + minLength: 1 + maxLength: 128 + description: Identifier of the Party. + example: '16135551212' + idSubValue: + title: PartySubIdOrType + type: string + minLength: 1 + maxLength: 128 + description: >- + Either a sub-identifier of a PartyIdentifier, or a + sub-type of the PartyIdType, normally a + PersonalIdentifierType. + currency: + title: Currency + description: >- + The currency codes defined in [ISO + 4217](https://www.iso.org/iso-4217-currency-codes.html) as + three-letter alphabetic codes are used as the standard + naming representation for currencies. + type: string + minLength: 3 + maxLength: 3 + enum: *ref_4 + required: true + responses: + '200': + description: Accounts creation completed + content: &ref_153 + application/json: + schema: + type: object + required: &ref_59 + - accounts + properties: &ref_60 + modelId: + title: CorrelationId + type: string + pattern: >- + ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + description: >- + Identifier that correlates all messages of the same + sequence. The API data type UUID (Universally Unique + Identifier) is a JSON String in canonical format, + conforming to [RFC + 4122](https://tools.ietf.org/html/rfc4122), that is + restricted by a regular expression for interoperability + reasons. A UUID is always 36 characters long, 32 + hexadecimal symbols and 4 dashes (‘-‘). + example: b51ec534-ee48-4575-b6a9-ead2955b8069 + accounts: + type: array + items: *ref_58 + response: + type: array + items: &ref_125 + type: object + required: + - idType + - idValue + properties: + idType: + title: PartyIdType + type: string + enum: *ref_23 + description: >- + Below are the allowed values for the enumeration. + + - MSISDN - An MSISDN (Mobile Station International + Subscriber Directory Number, that is, the phone + number) is used as reference to a participant. The + MSISDN identifier should be in international format + according to the [ITU-T E.164 + standard](https://www.itu.int/rec/T-REC-E.164/en). + Optionally, the MSISDN may be prefixed by a single + plus sign, indicating the international prefix. + + - EMAIL - An email is used as reference to a + participant. The format of the email should be + according to the informational [RFC + 3696](https://tools.ietf.org/html/rfc3696). + + - PERSONAL_ID - A personal identifier is used as + reference to a participant. Examples of personal + identification are passport number, birth + certificate number, and national registration + number. The identifier number is added in the + PartyIdentifier element. The personal identifier + type is added in the PartySubIdOrType element. + + - BUSINESS - A specific Business (for example, an + organization or a company) is used as reference to a + participant. The BUSINESS identifier can be in any + format. To make a transaction connected to a + specific username or bill number in a Business, the + PartySubIdOrType element should be used. + + - DEVICE - A specific device (for example, a POS or + ATM) ID connected to a specific business or + organization is used as reference to a Party. For + referencing a specific device under a specific + business or organization, use the PartySubIdOrType + element. + + - ACCOUNT_ID - A bank account number or FSP account + ID should be used as reference to a participant. The + ACCOUNT_ID identifier can be in any format, as + formats can greatly differ depending on country and + FSP. + + - IBAN - A bank account number or FSP account ID is + used as reference to a participant. The IBAN + identifier can consist of up to 34 alphanumeric + characters and should be entered without whitespace. + + - ALIAS An alias is used as reference to a + participant. The alias should be created in the FSP + as an alternative reference to an account owner. + Another example of an alias is a username in the FSP + system. The ALIAS identifier can be in any format. + It is also possible to use the PartySubIdOrType + element for identifying an account under an Alias + defined by the PartyIdentifier. + idValue: + title: PartyIdentifier + type: string + minLength: 1 + maxLength: 128 + description: Identifier of the Party. + example: '16135551212' + idSubValue: + title: PartySubIdOrType + type: string + minLength: 1 + maxLength: 128 + description: >- + Either a sub-identifier of a PartyIdentifier, or a + sub-type of the PartyIdType, normally a + PersonalIdentifierType. + error: + type: object + properties: *ref_22 + currentState: + type: string + enum: &ref_126 + - ERROR_OCCURRED + - COMPLETED + lastError: + type: object + description: >- + This object represents a Mojaloop API error received at + any time during the transfer process + properties: *ref_26 + postAccountsResponse: + type: object + required: + - body + properties: + body: + type: object + headers: + type: object + '400': + description: An error occurred creating accounts + content: &ref_61 + application/json: + schema: + allOf: &ref_62 + - type: object + properties: *ref_22 + - type: object + required: + - executionState + properties: + executionState: + type: object + required: *ref_59 + properties: *ref_60 + '500': + description: An error occurred creating accounts + content: *ref_61 + '504': + description: Timeout occurred creating accounts + content: &ref_154 + application/json: + schema: + allOf: *ref_62 + /parties/{Type}/{ID}: + parameters: + - name: Type + in: path + required: true + schema: &ref_65 + type: string + description: >- + The type of the party identifier. For example, `MSISDN`, + `PERSONAL_ID`. + - name: ID + in: path + required: true + schema: &ref_66 + type: string + description: The identifier value. + get: + description: >- + The HTTP request GET /parties// (or GET /parties///) is used to lookup + information regarding the requested Party, defined by , and optionally + (for example, GET /parties/MSISDN/123456789, or GET + /parties/BUSINESS/shoecompany/employee1). + summary: PartiesByTypeAndID + tags: + - parties + operationId: PartiesByTypeAndID + responses: + '200': + description: PartiesByIdSuccess + content: &ref_67 + application/json: + schema: + title: partiesByIdResponse + type: object + description: GET /parties/{Type}/{ID} response object + properties: &ref_127 + party: + properties: + body: + description: Data model for the complex type Party. + title: Party + type: object + properties: *ref_24 + required: *ref_25 + headers: + type: object + required: + - body + - headers + currentState: + type: string + enum: &ref_69 + - WAITING_FOR_ACTION + - COMPLETED + - ERROR_OCCURRED + required: &ref_128 + - party + - currentState + '404': + description: PartiesByIdError404 + content: &ref_68 + application/json: + schema: + type: object + properties: + errorInformation: + title: ErrorInformation + type: object + description: Data model for the complex type ErrorInformation. + properties: *ref_63 + required: *ref_64 + /parties/{Type}/{ID}/{SubId}: + parameters: + - name: Type + in: path + required: true + schema: *ref_65 + description: >- + The type of the party identifier. For example, `MSISDN`, + `PERSONAL_ID`. + - name: ID + in: path + required: true + schema: *ref_66 + description: The identifier value. + - name: SubId + in: path + required: true + schema: &ref_163 + type: string + description: >- + A sub-identifier of the party identifier, or a sub-type of the party + identifier's type. For example, `PASSPORT`, `DRIVING_LICENSE`. + get: + description: >- + The HTTP request GET /parties// (or GET /parties///) is used to lookup + information regarding the requested Party, defined by , and optionally + (for example, GET /parties/MSISDN/123456789, or GET + /parties/BUSINESS/shoecompany/employee1). + summary: PartiesSubIdByTypeAndID + tags: + - parties + operationId: PartiesSubIdByTypeAndID + responses: + '200': + description: PartiesByIdSuccess + content: *ref_67 + '404': + description: PartiesByIdError404 + content: *ref_68 + /quotes: + post: + summary: Quotes endpoint + description: is used to request quotes from other DFSP + tags: + - quotes + operationId: QuotesPost + requestBody: + description: Quotes request payload + content: + application/json: + schema: + title: simpleQuotesPostRequest + type: object + properties: &ref_131 + fspId: + title: FspId + type: string + minLength: 1 + maxLength: 32 + description: FSP identifier. + quotesPostRequest: + title: QuotesPostRequest + type: object + description: The object sent in the POST /quotes request. + properties: &ref_129 + quoteId: + title: CorrelationId + type: string + pattern: >- + ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + description: >- + Identifier that correlates all messages of the same + sequence. The API data type UUID (Universally Unique + Identifier) is a JSON String in canonical format, + conforming to [RFC + 4122](https://tools.ietf.org/html/rfc4122), that is + restricted by a regular expression for interoperability + reasons. A UUID is always 36 characters long, 32 + hexadecimal symbols and 4 dashes (‘-‘). + example: b51ec534-ee48-4575-b6a9-ead2955b8069 + transactionId: + title: CorrelationId + type: string + pattern: >- + ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + description: >- + Identifier that correlates all messages of the same + sequence. The API data type UUID (Universally Unique + Identifier) is a JSON String in canonical format, + conforming to [RFC + 4122](https://tools.ietf.org/html/rfc4122), that is + restricted by a regular expression for interoperability + reasons. A UUID is always 36 characters long, 32 + hexadecimal symbols and 4 dashes (‘-‘). + example: b51ec534-ee48-4575-b6a9-ead2955b8069 + transactionRequestId: + title: CorrelationId + type: string + pattern: >- + ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + description: >- + Identifier that correlates all messages of the same + sequence. The API data type UUID (Universally Unique + Identifier) is a JSON String in canonical format, + conforming to [RFC + 4122](https://tools.ietf.org/html/rfc4122), that is + restricted by a regular expression for interoperability + reasons. A UUID is always 36 characters long, 32 + hexadecimal symbols and 4 dashes (‘-‘). + example: b51ec534-ee48-4575-b6a9-ead2955b8069 + payee: + title: Party + type: object + description: Data model for the complex type Party. + properties: *ref_24 + required: *ref_25 + payer: + title: Party + type: object + description: Data model for the complex type Party. + properties: *ref_24 + required: *ref_25 + amountType: + title: AmountType + type: string + enum: *ref_3 + description: >- + Below are the allowed values for the enumeration + AmountType. + + - SEND - Amount the Payer would like to send, that is, + the amount that should be withdrawn from the Payer + account including any fees. + + - RECEIVE - Amount the Payer would like the Payee to + receive, that is, the amount that should be sent to the + receiver exclusive of any fees. + example: RECEIVE + amount: + title: Money + type: object + description: Data model for the complex type Money. + properties: *ref_6 + required: *ref_7 + fees: + title: Money + type: object + description: Data model for the complex type Money. + properties: *ref_6 + required: *ref_7 + transactionType: + title: TransactionType + type: object + description: Data model for the complex type TransactionType. + properties: *ref_54 + required: *ref_55 + geoCode: + title: GeoCode + type: object + description: >- + Data model for the complex type GeoCode. Indicates the + geographic location from where the transaction was + initiated. + properties: *ref_44 + required: *ref_45 + note: + title: Note + type: string + minLength: 1 + maxLength: 128 + description: Memo assigned to transaction. + example: Note sent to Payee. + expiration: + title: DateTime + type: string + pattern: >- + ^(?:[1-9]\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\d|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-02-29)T(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:(\.\d{3}))(?:Z|[+-][01]\d:[0-5]\d)$ + description: >- + The API data type DateTime is a JSON String in a lexical + format that is restricted by a regular expression for + interoperability reasons. The format is according to + [ISO + 8601](https://www.iso.org/iso-8601-date-and-time-format.html), + expressed in a combined date, time and time zone format. + A more readable version of the format is + yyyy-MM-ddTHH:mm:ss.SSS[-HH:MM]. Examples are + "2016-05-24T08:38:08.699-04:00", + "2016-05-24T08:38:08.699Z" (where Z indicates Zulu time + zone, same as UTC). + example: '2016-05-24T08:38:08.699-04:00' + extensionList: + title: ExtensionList + type: object + description: >- + Data model for the complex type ExtensionList. An + optional list of extensions, specific to deployment. + properties: *ref_10 + required: *ref_11 + required: &ref_130 + - quoteId + - transactionId + - payee + - payer + - amountType + - amount + - transactionType + required: &ref_132 + - fspId + - quotesPostRequest + required: true + responses: + '200': + description: sync response from POST /quotes + content: &ref_155 + application/json: + schema: + title: QuotesPostResponse + type: object + properties: &ref_133 + quotes: + title: QuotesIDPutResponse + type: object + description: The object sent in the PUT /quotes/{ID} callback. + properties: + body: + type: object + properties: + transferAmount: + title: Money + type: object + description: Data model for the complex type Money. + properties: *ref_6 + required: *ref_7 + payeeReceiveAmount: + title: Money + type: object + description: Data model for the complex type Money. + properties: *ref_6 + required: *ref_7 + payeeFspFee: + title: Money + type: object + description: Data model for the complex type Money. + properties: *ref_6 + required: *ref_7 + payeeFspCommission: + title: Money + type: object + description: Data model for the complex type Money. + properties: *ref_6 + required: *ref_7 + expiration: + type: string + description: >- + Date and time until when the quotation is valid + and can be honored when used in the subsequent + transaction. + example: '2016-05-24T08:38:08.699-04:00' + geoCode: + title: GeoCode + type: object + description: >- + Data model for the complex type GeoCode. Indicates + the geographic location from where the transaction + was initiated. + properties: *ref_44 + required: *ref_45 + ilpPacket: + title: IlpPacket + type: string + pattern: ^[A-Za-z0-9-_]+[=]{0,2}$ + minLength: 1 + maxLength: 32768 + description: >- + Information for recipient (transport layer + information). + example: >- + AYIBgQAAAAAAAASwNGxldmVsb25lLmRmc3AxLm1lci45T2RTOF81MDdqUUZERmZlakgyOVc4bXFmNEpLMHlGTFGCAUBQU0svMS4wCk5vbmNlOiB1SXlweUYzY3pYSXBFdzVVc05TYWh3CkVuY3J5cHRpb246IG5vbmUKUGF5bWVudC1JZDogMTMyMzZhM2ItOGZhOC00MTYzLTg0NDctNGMzZWQzZGE5OGE3CgpDb250ZW50LUxlbmd0aDogMTM1CkNvbnRlbnQtVHlwZTogYXBwbGljYXRpb24vanNvbgpTZW5kZXItSWRlbnRpZmllcjogOTI4MDYzOTEKCiJ7XCJmZWVcIjowLFwidHJhbnNmZXJDb2RlXCI6XCJpbnZvaWNlXCIsXCJkZWJpdE5hbWVcIjpcImFsaWNlIGNvb3BlclwiLFwiY3JlZGl0TmFtZVwiOlwibWVyIGNoYW50XCIsXCJkZWJpdElkZW50aWZpZXJcIjpcIjkyODA2MzkxXCJ9IgA + condition: + title: IlpCondition + type: string + pattern: ^[A-Za-z0-9-_]{43}$ + maxLength: 48 + description: >- + Condition that must be attached to the transfer by + the Payer. + extensionList: + title: ExtensionList + type: object + description: >- + Data model for the complex type ExtensionList. An + optional list of extensions, specific to + deployment. + properties: *ref_10 + required: *ref_11 + required: + - transferAmount + - expiration + - ilpPacket + - condition + headers: + type: object + required: + - body + - headers + currentState: + type: string + enum: *ref_69 + required: &ref_134 + - quotes + - currentState + '500': + description: An error occurred processing the quotes request + content: &ref_156 + application/json: + schema: + allOf: &ref_135 + - type: object + properties: *ref_22 + - type: object + /simpleTransfers: + post: + summary: Simple Transfers endpoint + description: is used to request a transfer + tags: + - transfers + operationId: SimpleTransfersPost + requestBody: + description: Simple Transfer request payload + content: + application/json: + schema: + title: SimpleTransfersPostRequest + type: object + properties: &ref_138 + fspId: + title: FspId + type: string + minLength: 1 + maxLength: 32 + description: FSP identifier. + transfersPostRequest: + title: TransfersPostRequest + type: object + description: The object sent in the POST /transfers request. + properties: &ref_136 + transferId: + title: CorrelationId + type: string + pattern: >- + ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + description: >- + Identifier that correlates all messages of the same + sequence. The API data type UUID (Universally Unique + Identifier) is a JSON String in canonical format, + conforming to [RFC + 4122](https://tools.ietf.org/html/rfc4122), that is + restricted by a regular expression for interoperability + reasons. A UUID is always 36 characters long, 32 + hexadecimal symbols and 4 dashes (‘-‘). + example: b51ec534-ee48-4575-b6a9-ead2955b8069 + payeeFsp: + title: FspId + type: string + minLength: 1 + maxLength: 32 + description: FSP identifier. + payerFsp: + title: FspId + type: string + minLength: 1 + maxLength: 32 + description: FSP identifier. + amount: + title: Money + type: object + description: Data model for the complex type Money. + properties: *ref_6 + required: *ref_7 + ilpPacket: + title: IlpPacket + type: string + pattern: ^[A-Za-z0-9-_]+[=]{0,2}$ + minLength: 1 + maxLength: 32768 + description: Information for recipient (transport layer information). + example: >- + AYIBgQAAAAAAAASwNGxldmVsb25lLmRmc3AxLm1lci45T2RTOF81MDdqUUZERmZlakgyOVc4bXFmNEpLMHlGTFGCAUBQU0svMS4wCk5vbmNlOiB1SXlweUYzY3pYSXBFdzVVc05TYWh3CkVuY3J5cHRpb246IG5vbmUKUGF5bWVudC1JZDogMTMyMzZhM2ItOGZhOC00MTYzLTg0NDctNGMzZWQzZGE5OGE3CgpDb250ZW50LUxlbmd0aDogMTM1CkNvbnRlbnQtVHlwZTogYXBwbGljYXRpb24vanNvbgpTZW5kZXItSWRlbnRpZmllcjogOTI4MDYzOTEKCiJ7XCJmZWVcIjowLFwidHJhbnNmZXJDb2RlXCI6XCJpbnZvaWNlXCIsXCJkZWJpdE5hbWVcIjpcImFsaWNlIGNvb3BlclwiLFwiY3JlZGl0TmFtZVwiOlwibWVyIGNoYW50XCIsXCJkZWJpdElkZW50aWZpZXJcIjpcIjkyODA2MzkxXCJ9IgA + condition: + title: IlpCondition + type: string + pattern: ^[A-Za-z0-9-_]{43}$ + maxLength: 48 + description: >- + Condition that must be attached to the transfer by the + Payer. + expiration: + title: DateTime + type: string + pattern: >- + ^(?:[1-9]\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\d|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-02-29)T(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:(\.\d{3}))(?:Z|[+-][01]\d:[0-5]\d)$ + description: >- + The API data type DateTime is a JSON String in a lexical + format that is restricted by a regular expression for + interoperability reasons. The format is according to + [ISO + 8601](https://www.iso.org/iso-8601-date-and-time-format.html), + expressed in a combined date, time and time zone format. + A more readable version of the format is + yyyy-MM-ddTHH:mm:ss.SSS[-HH:MM]. Examples are + "2016-05-24T08:38:08.699-04:00", + "2016-05-24T08:38:08.699Z" (where Z indicates Zulu time + zone, same as UTC). + example: '2016-05-24T08:38:08.699-04:00' + extensionList: + title: ExtensionList + type: object + description: >- + Data model for the complex type ExtensionList. An + optional list of extensions, specific to deployment. + properties: *ref_10 + required: *ref_11 + required: &ref_137 + - transferId + - payeeFsp + - payerFsp + - amount + - ilpPacket + - condition + - expiration + required: &ref_139 + - fspId + - transfersPostRequest + required: true + responses: + '200': + description: sync response from POST /simpleTransfers + content: &ref_157 + application/json: + schema: + title: SimpleTransfersPostResponse + type: object + properties: &ref_140 + transfer: + properties: + body: + title: TransfersIDPutResponse + type: object + description: The object sent in the PUT /transfers/{ID} callback. + properties: *ref_20 + required: *ref_21 + headers: + type: object + required: + - body + - headers + currentState: + type: string + enum: *ref_69 + required: &ref_141 + - transfer + - currentState + '500': + description: An error occurred processing the simple transfers request + content: &ref_158 + application/json: + schema: + allOf: &ref_142 + - type: object + properties: *ref_22 + - type: object +components: + schemas: + TransactionInitiatorType: + title: TransactionInitiatorType + type: string + enum: *ref_52 + description: |- + Below are the allowed values for the enumeration. + - CONSUMER - Consumer is the initiator of the transaction. + - AGENT - Agent is the initiator of the transaction. + - BUSINESS - Business is the initiator of the transaction. + - DEVICE - Device is the initiator of the transaction. + example: CONSUMER + PartyIdType: + title: PartyIdType + type: string + enum: *ref_23 + description: >- + Below are the allowed values for the enumeration. + + - MSISDN - An MSISDN (Mobile Station International Subscriber Directory + Number, that is, the phone number) is used as reference to a + participant. The MSISDN identifier should be in international format + according to the [ITU-T E.164 + standard](https://www.itu.int/rec/T-REC-E.164/en). Optionally, the + MSISDN may be prefixed by a single plus sign, indicating the + international prefix. + + - EMAIL - An email is used as reference to a participant. The format of + the email should be according to the informational [RFC + 3696](https://tools.ietf.org/html/rfc3696). + + - PERSONAL_ID - A personal identifier is used as reference to a + participant. Examples of personal identification are passport number, + birth certificate number, and national registration number. The + identifier number is added in the PartyIdentifier element. The personal + identifier type is added in the PartySubIdOrType element. + + - BUSINESS - A specific Business (for example, an organization or a + company) is used as reference to a participant. The BUSINESS identifier + can be in any format. To make a transaction connected to a specific + username or bill number in a Business, the PartySubIdOrType element + should be used. + + - DEVICE - A specific device (for example, a POS or ATM) ID connected to + a specific business or organization is used as reference to a Party. For + referencing a specific device under a specific business or organization, + use the PartySubIdOrType element. + + - ACCOUNT_ID - A bank account number or FSP account ID should be used as + reference to a participant. The ACCOUNT_ID identifier can be in any + format, as formats can greatly differ depending on country and FSP. + + - IBAN - A bank account number or FSP account ID is used as reference to + a participant. The IBAN identifier can consist of up to 34 alphanumeric + characters and should be entered without whitespace. + + - ALIAS An alias is used as reference to a participant. The alias should + be created in the FSP as an alternative reference to an account owner. + Another example of an alias is a username in the FSP system. The ALIAS + identifier can be in any format. It is also possible to use the + PartySubIdOrType element for identifying an account under an Alias + defined by the PartyIdentifier. + PartyIdentifier: + title: PartyIdentifier + type: string + minLength: 1 + maxLength: 128 + description: Identifier of the Party. + example: '16135551212' + PartySubIdOrType: + title: PartySubIdOrType + type: string + minLength: 1 + maxLength: 128 + description: >- + Either a sub-identifier of a PartyIdentifier, or a sub-type of the + PartyIdType, normally a PersonalIdentifierType. + Name: + title: Name + type: string + pattern: ^(?!\s*$)[\w .,'-]{1,128}$ + description: >- + The API data type Name is a JSON String, restricted by a regular + expression to avoid characters which are generally not used in a name. + + + Regular Expression - The regular expression for restricting the Name + type is "^(?!\s*$)[\w .,'-]{1,128}$". The restriction does not allow a + string consisting of whitespace only, all Unicode characters are + allowed, as well as the period (.) (apostrophe (‘), dash (-), comma (,) + and space characters ( ). + + + **Note:** In some programming languages, Unicode support must be + specifically enabled. For example, if Java is used, the flag + UNICODE_CHARACTER_CLASS must be enabled to allow Unicode characters. + FirstName: + title: FirstName + type: string + minLength: 1 + maxLength: 128 + pattern: >- + ^(?!\s*$)[\p{L}\p{gc=Mark}\p{digit}\p{gc=Connector_Punctuation}\p{Join_Control} + .,''-]{1,128}$ + description: First name of the Party (Name Type). + example: Henrik + MiddleName: + title: MiddleName + type: string + minLength: 1 + maxLength: 128 + pattern: >- + ^(?!\s*$)[\p{L}\p{gc=Mark}\p{digit}\p{gc=Connector_Punctuation}\p{Join_Control} + .,''-]{1,128}$ + description: Middle name of the Party (Name Type). + example: Johannes + LastName: + title: LastName + type: string + minLength: 1 + maxLength: 128 + pattern: >- + ^(?!\s*$)[\p{L}\p{gc=Mark}\p{digit}\p{gc=Connector_Punctuation}\p{Join_Control} + .,''-]{1,128}$ + description: Last name of the Party (Name Type). + example: Karlsson + DateOfBirth: + title: DateofBirth (type Date) + type: string + pattern: >- + ^(?:[1-9]\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\d|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-02-29)$ + description: Date of Birth of the Party. + example: '1966-06-16' + MerchantClassificationCode: + title: MerchantClassificationCode + type: string + pattern: ^[\d]{1,4}$ + description: >- + A limited set of pre-defined numbers. This list would be a limited set + of numbers identifying a set of popular merchant types like School Fees, + Pubs and Restaurants, Groceries, etc. + FspId: + title: FspId + type: string + minLength: 1 + maxLength: 32 + description: FSP identifier. + ExtensionKey: + title: ExtensionKey + type: string + minLength: 1 + maxLength: 32 + description: Extension key. + ExtensionValue: + title: ExtensionValue + type: string + minLength: 1 + maxLength: 128 + description: Extension value. + Extension: + title: Extension + type: object + description: Data model for the complex type Extension. + properties: *ref_8 + required: *ref_9 + extensionListEmptiable: + type: array + items: *ref_2 + minItems: 0 + maxItems: 16 + transferParty: + type: object + required: *ref_0 + properties: *ref_1 + AmountType: + title: AmountType + type: string + enum: *ref_3 + description: >- + Below are the allowed values for the enumeration AmountType. + + - SEND - Amount the Payer would like to send, that is, the amount that + should be withdrawn from the Payer account including any fees. + + - RECEIVE - Amount the Payer would like the Payee to receive, that is, + the amount that should be sent to the receiver exclusive of any fees. + example: RECEIVE + Currency: + title: Currency + description: >- + The currency codes defined in [ISO + 4217](https://www.iso.org/iso-4217-currency-codes.html) as three-letter + alphabetic codes are used as the standard naming representation for + currencies. + type: string + minLength: 3 + maxLength: 3 + enum: *ref_4 + Amount: + title: Amount + type: string + pattern: ^([0]|([1-9][0-9]{0,17}))([.][0-9]{0,3}[1-9])?$ + description: >- + The API data type Amount is a JSON String in a canonical format that is + restricted by a regular expression for interoperability reasons. This + pattern does not allow any trailing zeroes at all, but allows an amount + without a minor currency unit. It also only allows four digits in the + minor currency unit; a negative value is not allowed. Using more than 18 + digits in the major currency unit is not allowed. + example: '123.45' + transferTransactionType: + title: transferTransactionType + type: string + enum: *ref_5 + description: Type of transaction. + Note: + title: Note + type: string + minLength: 1 + maxLength: 128 + description: Memo assigned to transaction. + example: Note sent to Payee. + transferRequest: + type: object + required: *ref_70 + properties: *ref_71 + CorrelationId: + title: CorrelationId + type: string + pattern: >- + ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + description: >- + Identifier that correlates all messages of the same sequence. The API + data type UUID (Universally Unique Identifier) is a JSON String in + canonical format, conforming to [RFC + 4122](https://tools.ietf.org/html/rfc4122), that is restricted by a + regular expression for interoperability reasons. A UUID is always 36 + characters long, 32 hexadecimal symbols and 4 dashes (‘-‘). + example: b51ec534-ee48-4575-b6a9-ead2955b8069 + transferStatus: + type: string + enum: *ref_19 + Money: + title: Money + type: object + description: Data model for the complex type Money. + properties: *ref_6 + required: *ref_7 + DateTime: + title: DateTime + type: string + pattern: >- + ^(?:[1-9]\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\d|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-02-29)T(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:(\.\d{3}))(?:Z|[+-][01]\d:[0-5]\d)$ + description: >- + The API data type DateTime is a JSON String in a lexical format that is + restricted by a regular expression for interoperability reasons. The + format is according to [ISO + 8601](https://www.iso.org/iso-8601-date-and-time-format.html), expressed + in a combined date, time and time zone format. A more readable version + of the format is yyyy-MM-ddTHH:mm:ss.SSS[-HH:MM]. Examples are + "2016-05-24T08:38:08.699-04:00", "2016-05-24T08:38:08.699Z" (where Z + indicates Zulu time zone, same as UTC). + example: '2016-05-24T08:38:08.699-04:00' + Latitude: + title: Latitude + type: string + pattern: >- + ^(\+|-)?(?:90(?:(?:\.0{1,6})?)|(?:[0-9]|[1-8][0-9])(?:(?:\.[0-9]{1,6})?))$ + description: >- + The API data type Latitude is a JSON String in a lexical format that is + restricted by a regular expression for interoperability reasons. + example: '+45.4215' + Longitude: + title: Longitude + type: string + pattern: >- + ^(\+|-)?(?:180(?:(?:\.0{1,6})?)|(?:[0-9]|[1-9][0-9]|1[0-7][0-9])(?:(?:\.[0-9]{1,6})?))$ + description: >- + The API data type Longitude is a JSON String in a lexical format that is + restricted by a regular expression for interoperability reasons. + example: '+75.6972' + GeoCode: + title: GeoCode + type: object + description: >- + Data model for the complex type GeoCode. Indicates the geographic + location from where the transaction was initiated. + properties: *ref_44 + required: *ref_45 + IlpPacket: + title: IlpPacket + type: string + pattern: ^[A-Za-z0-9-_]+[=]{0,2}$ + minLength: 1 + maxLength: 32768 + description: Information for recipient (transport layer information). + example: >- + AYIBgQAAAAAAAASwNGxldmVsb25lLmRmc3AxLm1lci45T2RTOF81MDdqUUZERmZlakgyOVc4bXFmNEpLMHlGTFGCAUBQU0svMS4wCk5vbmNlOiB1SXlweUYzY3pYSXBFdzVVc05TYWh3CkVuY3J5cHRpb246IG5vbmUKUGF5bWVudC1JZDogMTMyMzZhM2ItOGZhOC00MTYzLTg0NDctNGMzZWQzZGE5OGE3CgpDb250ZW50LUxlbmd0aDogMTM1CkNvbnRlbnQtVHlwZTogYXBwbGljYXRpb24vanNvbgpTZW5kZXItSWRlbnRpZmllcjogOTI4MDYzOTEKCiJ7XCJmZWVcIjowLFwidHJhbnNmZXJDb2RlXCI6XCJpbnZvaWNlXCIsXCJkZWJpdE5hbWVcIjpcImFsaWNlIGNvb3BlclwiLFwiY3JlZGl0TmFtZVwiOlwibWVyIGNoYW50XCIsXCJkZWJpdElkZW50aWZpZXJcIjpcIjkyODA2MzkxXCJ9IgA + IlpCondition: + title: IlpCondition + type: string + pattern: ^[A-Za-z0-9-_]{43}$ + maxLength: 48 + description: Condition that must be attached to the transfer by the Payer. + ExtensionList: + title: ExtensionList + type: object + description: >- + Data model for the complex type ExtensionList. An optional list of + extensions, specific to deployment. + properties: *ref_10 + required: *ref_11 + QuotesIDPutResponse: + title: QuotesIDPutResponse + type: object + description: The object sent in the PUT /quotes/{ID} callback. + properties: *ref_56 + required: *ref_57 + IlpFulfilment: + title: IlpFulfilment + type: string + pattern: ^[A-Za-z0-9-_]{43}$ + maxLength: 48 + description: Fulfilment that must be attached to the transfer by the Payee. + example: WLctttbu2HvTsa1XWvUoGRcQozHsqeu9Ahl2JW9Bsu8 + TransferState: + title: TransferState + type: string + enum: *ref_27 + description: >- + Below are the allowed values for the enumeration. + + - RECEIVED - Next ledger has received the transfer. + + - RESERVED - Next ledger has reserved the transfer. + + - COMMITTED - Next ledger has successfully performed the transfer. + + - ABORTED - Next ledger has aborted the transfer due to a rejection or + failure to perform the transfer. + example: RESERVED + TransfersIDPutResponse: + title: TransfersIDPutResponse + type: object + description: The object sent in the PUT /transfers/{ID} callback. + properties: *ref_20 + required: *ref_21 + ErrorCode: + title: ErrorCode + type: string + pattern: ^[1-9]\d{3}$ + description: >- + The API data type ErrorCode is a JSON String of four characters, + consisting of digits only. Negative numbers are not allowed. A leading + zero is not allowed. Each error code in the API is a four-digit number, + for example, 1234, where the first number (1 in the example) represents + the high-level error category, the second number (2 in the example) + represents the low-level error category, and the last two numbers (34 in + the example) represent the specific error. + example: '5100' + ErrorDescription: + title: ErrorDescription + type: string + minLength: 1 + maxLength: 128 + description: Error description string. + ErrorInformation: + title: ErrorInformation + type: object + description: Data model for the complex type ErrorInformation. + properties: *ref_63 + required: *ref_64 + mojaloopError: + type: object + properties: *ref_36 + transferError: + type: object + description: >- + This object represents a Mojaloop API error received at any time during + the transfer process + properties: *ref_26 + transferResponse: + type: object + required: *ref_12 + properties: *ref_13 + errorResponse: + type: object + properties: *ref_22 + errorTransferResponse: + allOf: *ref_14 + transferStatusResponse: + type: object + required: *ref_72 + properties: *ref_73 + transferContinuationAcceptParty: + type: object + required: *ref_28 + properties: *ref_29 + transferContinuationAcceptQuote: + type: object + required: *ref_32 + properties: *ref_33 + autoAcceptPartyOption: + type: object + required: *ref_74 + properties: *ref_75 + bulkPerTransferFeeLimit: + type: object + required: *ref_76 + properties: *ref_77 + autoAcceptQuote: + type: object + required: *ref_78 + properties: *ref_79 + bulkTransactionOptions: + type: object + required: *ref_80 + properties: *ref_81 + PartyIdInfo: + title: PartyIdInfo + type: object + description: >- + Data model for the complex type PartyIdInfo. An ExtensionList element + has been added to this reqeust in version v1.1 + properties: *ref_82 + required: *ref_83 + PartyName: + title: PartyName + type: string + minLength: 1 + maxLength: 128 + description: Name of the Party. Could be a real name or a nickname. + PartyComplexName: + title: PartyComplexName + type: object + description: Data model for the complex type PartyComplexName. + properties: *ref_84 + PartyPersonalInfo: + title: PartyPersonalInfo + type: object + description: Data model for the complex type PartyPersonalInfo. + properties: *ref_85 + Party: + title: Party + type: object + description: Data model for the complex type Party. + properties: *ref_24 + required: *ref_25 + bulkTransactionIndividualTransfer: + title: BulkTransactionIndividualTransfer + type: object + description: Data model for the complex type 'bulkTransactionIndividualTransfer'. + properties: *ref_86 + required: *ref_87 + bulkTransactionRequest: + type: object + required: *ref_88 + properties: *ref_89 + bulkTransferStatus: + type: string + enum: *ref_43 + individualTransferResult: + type: object + required: *ref_90 + properties: *ref_91 + bulkTransferResponse: + type: object + required: *ref_39 + properties: *ref_40 + bulkTransferErrorResponse: + allOf: *ref_92 + bulkTransactionIndividualTransferAccept: + type: object + description: Data model for the 'individualTransfer' while accepting party or quote. + properties: *ref_30 + required: *ref_31 + bulkTransactionContinuationAcceptParty: + description: >- + The object sent back as confirmation of payee parties when + autoAcceptParty is false. + type: object + required: *ref_34 + properties: *ref_35 + bulkTransactionContinuationAcceptQuote: + description: >- + The object sent back as confirmation of quotes when autoAcceptQuotes is + false. + type: object + required: *ref_37 + properties: *ref_38 + partyError: + type: object + description: >- + This object represents a Mojaloop API error received at any time during + the party discovery process + properties: *ref_93 + bulkTransactionAcceptPartyErrorResponse: + allOf: *ref_94 + quoteError: + type: object + description: >- + This object represents a Mojaloop API error received at any time during + the quote process + properties: *ref_46 + bulkTransactionAcceptQuoteErrorResponse: + allOf: *ref_95 + individualTransfer: + title: IndividualTransfer + type: object + description: Data model for the complex type 'individualTransfer'. + properties: *ref_96 + required: *ref_97 + bulkTransferRequest: + type: object + required: *ref_98 + properties: *ref_99 + individualTransferFulfilment: + type: object + description: >- + A Mojaloop API transfer fulfilment for individual transfers in a bulk + transfer + properties: *ref_100 + bulkTransferStatusResponse: + type: object + required: *ref_101 + properties: *ref_102 + individualQuote: + title: IndividualQuote + type: object + description: Data model for the complex type 'individualQuote'. + properties: *ref_50 + required: *ref_51 + bulkQuoteRequest: + type: object + required: *ref_103 + properties: *ref_104 + individualQuoteResult: + type: object + properties: *ref_105 + required: *ref_106 + bulkQuoteResponse: + type: object + required: *ref_47 + properties: *ref_48 + bulkQuoteErrorResponse: + allOf: *ref_49 + bulkQuoteStatus: + type: string + enum: *ref_107 + bulkQuoteStatusResponse: + type: object + required: *ref_108 + properties: *ref_109 + TransactionScenario: + title: TransactionScenario + type: string + enum: *ref_110 + description: >- + Below are the allowed values for the enumeration. + + - DEPOSIT - Used for performing a Cash-In (deposit) transaction. In a + normal scenario, electronic funds are transferred from a Business + account to a Consumer account, and physical cash is given from the + Consumer to the Business User. + + - WITHDRAWAL - Used for performing a Cash-Out (withdrawal) transaction. + In a normal scenario, electronic funds are transferred from a Consumer’s + account to a Business account, and physical cash is given from the + Business User to the Consumer. + + - TRANSFER - Used for performing a P2P (Peer to Peer, or Consumer to + Consumer) transaction. + + - PAYMENT - Usually used for performing a transaction from a Consumer to + a Merchant or Organization, but could also be for a B2B (Business to + Business) payment. The transaction could be online for a purchase in an + Internet store, in a physical store where both the Consumer and Business + User are present, a bill payment, a donation, and so on. + + - REFUND - Used for performing a refund of transaction. + example: DEPOSIT + TransactionSubScenario: + title: TransactionSubScenario + type: string + pattern: ^[A-Z_]{1,32}$ + description: >- + Possible sub-scenario, defined locally within the scheme (UndefinedEnum + Type). + example: LOCALLY_DEFINED_SUBSCENARIO + TransactionInitiator: + title: TransactionInitiator + type: string + enum: *ref_53 + description: >- + Below are the allowed values for the enumeration. + + - PAYER - Sender of funds is initiating the transaction. The account to + send from is either owned by the Payer or is connected to the Payer in + some way. + + - PAYEE - Recipient of the funds is initiating the transaction by + sending a transaction request. The Payer must approve the transaction, + either automatically by a pre-generated OTP or by pre-approval of the + Payee, or by manually approving in his or her own Device. + example: PAYEE + RefundReason: + title: RefundReason + type: string + minLength: 1 + maxLength: 128 + description: Reason for the refund. + example: Free text indicating reason for the refund. + Refund: + title: Refund + type: object + description: Data model for the complex type Refund. + properties: *ref_111 + required: *ref_112 + BalanceOfPayments: + title: BalanceOfPayments + type: string + pattern: ^[1-9]\d{2}$ + description: >- + (BopCode) The API data type + [BopCode](https://www.imf.org/external/np/sta/bopcode/) is a JSON String + of 3 characters, consisting of digits only. Negative numbers are not + allowed. A leading zero is not allowed. + example: '123' + TransactionType: + title: TransactionType + type: object + description: Data model for the complex type TransactionType. + properties: *ref_54 + required: *ref_55 + requestToPayRequest: + type: object + required: *ref_113 + properties: *ref_114 + AuthenticationType: + title: AuthenticationType + type: string + enum: *ref_115 + description: |- + Below are the allowed values for the enumeration AuthenticationType. + - OTP - One-time password generated by the Payer FSP. + - QRCODE - QR code used as One Time Password. + - U2F - U2F is a new addition isolated to Thirdparty stream. + example: OTP + TransactionRequestState: + title: TransactionRequestState + type: string + enum: *ref_116 + description: |- + Below are the allowed values for the enumeration. + - RECEIVED - Payer FSP has received the transaction from the Payee FSP. + - PENDING - Payer FSP has sent the transaction request to the Payer. + - ACCEPTED - Payer has approved the transaction. + - REJECTED - Payer has rejected the transaction. + example: RECEIVED + requestToPayResponse: + type: object + required: *ref_117 + properties: *ref_118 + requestToPayTransferRequest: + type: object + required: *ref_119 + properties: *ref_120 + requestToPayTransferResponse: + type: object + required: *ref_121 + properties: *ref_122 + transferContinuationAcceptOTP: + type: object + required: *ref_123 + properties: *ref_124 + accountsRequest: + type: array + items: *ref_58 + accountCreationStatus: + type: array + items: *ref_125 + accountsCreationState: + type: string + enum: *ref_126 + accountsResponse: + type: object + required: *ref_59 + properties: *ref_60 + errorAccountsResponse: + allOf: *ref_62 + async2SyncCurrentState: + type: string + enum: *ref_69 + partiesByIdResponse: + title: partiesByIdResponse + type: object + description: GET /parties/{Type}/{ID} response object + properties: *ref_127 + required: *ref_128 + QuotesPostRequest: + title: QuotesPostRequest + type: object + description: The object sent in the POST /quotes request. + properties: *ref_129 + required: *ref_130 + simpleQuotesPostRequest: + title: simpleQuotesPostRequest + type: object + properties: *ref_131 + required: *ref_132 + quotesPostResponse: + title: QuotesPostResponse + type: object + properties: *ref_133 + required: *ref_134 + errorQuotesResponse: + allOf: *ref_135 + TransfersPostRequest: + title: TransfersPostRequest + type: object + description: The object sent in the POST /transfers request. + properties: *ref_136 + required: *ref_137 + simpleTransfersPostRequest: + title: SimpleTransfersPostRequest + type: object + properties: *ref_138 + required: *ref_139 + simpleTransfersPostResponse: + title: SimpleTransfersPostResponse + type: object + properties: *ref_140 + required: *ref_141 + errorSimpleTransfersResponse: + allOf: *ref_142 + responses: + transferSuccess: + description: Transfer completed successfully + content: *ref_15 + transferBadRequest: + description: Malformed or missing required body, headers or parameters + content: *ref_143 + transferServerError: + description: An error occurred processing the transfer + content: *ref_16 + transferTimeout: + description: Timeout occurred processing the transfer + content: *ref_17 + bulkTransactionAccepted: + description: Bulk transfer accepted successfully + bulkTransferBadRequest: + description: Malformed or missing required body, headers or parameters + content: *ref_41 + errorResponse: + description: Internal Server Error + content: *ref_42 + bulkTransactionPutBadRequest: + description: Malformed or missing required body, headers or parameters + content: *ref_144 + bulkTransferSuccess: + description: Bulk transfer completed successfully + content: *ref_145 + bulkQuoteSuccess: + description: Bulk quote completed successfully + content: *ref_146 + bulkQuoteBadRequest: + description: Malformed or missing required body, headers or parameters + content: *ref_147 + bulkQuoteServerError: + description: An error occurred processing the bulk quote + content: *ref_148 + bulkQuoteTimeout: + description: Timeout occurred processing the bulk quote + content: *ref_149 + requestToPaySuccess: + description: Request to Pay completed successfully + content: *ref_150 + requestToPayTransferSuccess: + description: Transfer completed successfully + content: *ref_151 + requestToPayTransferBadRequest: + description: Malformed or missing required body, headers or parameters + content: *ref_152 + accountsCreationCompleted: + description: Accounts creation completed + content: *ref_153 + accountsCreationError: + description: An error occurred creating accounts + content: *ref_61 + accountsCreationTimeout: + description: Timeout occurred creating accounts + content: *ref_154 + partiesByIdSuccess: + description: PartiesByIdSuccess + content: *ref_67 + partiesByIdError404: + description: PartiesByIdError404 + content: *ref_68 + quotesPostSuccess: + description: sync response from POST /quotes + content: *ref_155 + quotesServerError: + description: An error occurred processing the quotes request + content: *ref_156 + simpleTransfersPostSuccess: + description: sync response from POST /simpleTransfers + content: *ref_157 + simpleTransfersServerError: + description: An error occurred processing the simple transfers request + content: *ref_158 + parameters: + transferId: + name: transferId + in: path + required: true + schema: *ref_18 + description: >- + Identifier of the transfer to continue as returned in the response to a + `POST /transfers` request. + bulkTransactionId: + name: bulkTransactionId + in: path + required: true + schema: *ref_159 + description: >- + Identifier of the bulk transaction to continue as returned in the + response to a `POST /bulkTransaction` request. + bulkTransferId: + name: bulkTransferId + in: path + required: true + schema: *ref_160 + description: >- + Identifier of the bulk transfer to continue as returned in the response + to a `POST /bulkTransfers` request. + bulkQuoteId: + name: bulkQuoteId + in: path + required: true + schema: *ref_161 + description: >- + Identifier of the bulk transfer to continue as returned in the response + to a `POST /bulkTransfers` request. + requestToPayTransactionId: + name: requestToPayTransactionId + in: path + required: true + schema: *ref_162 + description: >- + Identifier of the merchant request to pay transfer to continue as + returned in the response to a `POST /requestToPayTransfer` request. + Type: + name: Type + in: path + required: true + schema: *ref_65 + description: The type of the party identifier. For example, `MSISDN`, `PERSONAL_ID`. + ID: + name: ID + in: path + required: true + schema: *ref_66 + description: The identifier value. + SubId: + name: SubId + in: path + required: true + schema: *ref_163 + description: >- + A sub-identifier of the party identifier, or a sub-type of the party + identifier's type. For example, `PASSPORT`, `DRIVING_LICENSE`. \ No newline at end of file diff --git a/test/func/config/ttk-ttksim2/spec_files/api_definitions/mojaloop_sdk_outbound_scheme_adapter_1.0/callback_map.json b/test/func/config/ttk-ttksim2/spec_files/api_definitions/mojaloop_sdk_outbound_scheme_adapter_1.0/callback_map.json new file mode 100644 index 000000000..ee8d0472f --- /dev/null +++ b/test/func/config/ttk-ttksim2/spec_files/api_definitions/mojaloop_sdk_outbound_scheme_adapter_1.0/callback_map.json @@ -0,0 +1,46 @@ +{ + "/bulkTransactions": { + "post": { + "fspid": "{$request.headers.fspiop-source}", + "successCallback": { + "method": "put", + "path": "/bulkTransactions/{bulkTransactionId}", + "pathPattern": "/bulkTransactions/{$request.body.bulkTransactionId}", + "headerOverride": { + "Date": "{$request.headers.date}" + }, + "bodyOverride": {} + }, + "errorCallback": { + "method": "put", + "path": "/bulkTransactions/{bulkTransactionId}/error", + "pathPattern": "/bulkTransactions/{$request.body.bulkTransactionId}/error", + "headerOverride": { + "Date": "{$request.headers.date}" + } + } + } + }, + "/bulkTransactions/{bulkTransactionId}": { + "put": { + "fspid": "{$request.headers.fspiop-source}", + "successCallback": { + "method": "put", + "path": "/bulkTransactions/{bulkTransactionId}", + "pathPattern": "/bulkTransactions/{$request.params.bulkTransactionId}", + "headerOverride": { + "Date": "{$request.headers.date}" + }, + "bodyOverride": {} + }, + "errorCallback": { + "method": "put", + "path": "/bulkTransactions/{bulkTransactionId}/error", + "pathPattern": "/bulkTransactions/{$request.params.bulkTransactionId}/error", + "headerOverride": { + "Date": "{$request.headers.date}" + } + } + } + } +} diff --git a/test/func/config/ttk-ttksim2/spec_files/api_definitions/mojaloop_sdk_outbound_scheme_adapter_1.0/mockRef.json b/test/func/config/ttk-ttksim2/spec_files/api_definitions/mojaloop_sdk_outbound_scheme_adapter_1.0/mockRef.json new file mode 100644 index 000000000..f0060c75d --- /dev/null +++ b/test/func/config/ttk-ttksim2/spec_files/api_definitions/mojaloop_sdk_outbound_scheme_adapter_1.0/mockRef.json @@ -0,0 +1,22 @@ +[ + { + "id": "party.personalInfo.dateOfBirth", + "pattern": "^(19)\\d\\d[-](0[1-9]|1[012])[-](0[1-9]|[12][0-9]|2[0-8])$" + }, + { + "id": "party.name", + "pattern": "Vijay Kumar Guthi" + }, + { + "id": "party.personalInfo.complexName.firstName", + "pattern": "Vijay" + }, + { + "id": "party.personalInfo.complexName.lastName", + "pattern": "Kumar" + }, + { + "id": "party.personalInfo.complexName.middleName", + "pattern": "Guthi" + } +] diff --git a/test/func/config/ttk-ttksim2/spec_files/api_definitions/mojaloop_sdk_outbound_scheme_adapter_1.0/response_map.json b/test/func/config/ttk-ttksim2/spec_files/api_definitions/mojaloop_sdk_outbound_scheme_adapter_1.0/response_map.json new file mode 100644 index 000000000..1ad829f38 --- /dev/null +++ b/test/func/config/ttk-ttksim2/spec_files/api_definitions/mojaloop_sdk_outbound_scheme_adapter_1.0/response_map.json @@ -0,0 +1,21 @@ +{ + "/parties/{Type}/{ID}": { + "get": { + "response": { + "bodyOverride": { + "party": { + "partyIdInfo": { + "partyIdType": "{$request.params.Type}", + "partyIdentifier": "{$request.params.ID}", + "fspId": "ttk", + "partySubIdOrType": null, + "extensionList": null + }, + "accounts": null, + "merchantClassificationCode": null + } + } + } + } + } +} \ No newline at end of file diff --git a/test/func/config/ttk-ttksim2/spec_files/api_definitions/mojaloop_simulator_sim_1.4/api_spec.yaml b/test/func/config/ttk-ttksim2/spec_files/api_definitions/mojaloop_simulator_sim_1.4/api_spec.yaml new file mode 100644 index 000000000..010ec3d13 --- /dev/null +++ b/test/func/config/ttk-ttksim2/spec_files/api_definitions/mojaloop_simulator_sim_1.4/api_spec.yaml @@ -0,0 +1,1205 @@ +openapi: 3.0.1 +info: + title: Mojaloop Simulator Inbound + description: Mojaloop Simulator Inbound - To be implemented by DFSP backend + license: + name: Open API for FSP Interoperability (FSPIOP) + url: http://www.majaloop.io + version: 1.1.1 + +paths: + /: + get: + summary: Health check endpoint. + operationId: healthCheck + responses: + 200: + description: Returns empty body if the service is running. + /participants/{idType}/{idValue}: + get: + summary: Asks for the FSPID of the scheme participant that can handle transfers for the specified identifier type and value + tags: + - Participants + operationId: ParticipantsGetByTypeAndID + parameters: + - name: idType + in: path + required: true + schema: + $ref: '#/components/schemas/idType' + - name: idValue + in: path + required: true + schema: + $ref: '#/components/schemas/idValue' + responses: + 200: + description: Response containing details of the requested party + content: + application/json: + schema: + $ref: '#/components/schemas/participantsResponse' + 404: + description: The party specified by the provided identifier type and value is not known to the server + 400: + description: Malformed or missing required headers or parameters + content: + application/json: + schema: + $ref: '#/components/schemas/errorResponse' + 500: + description: An error occured processing the request + content: + application/json: + schema: + $ref: '#/components/schemas/errorResponse' + + /participants/{idType}/{idValue}/{subIdValue}: + get: + summary: Asks for the FSPID of the scheme participant that can handle transfers for the specified identifier type, value and subId value + tags: + - Participants + operationId: ParticipantsGetByTypeIDAndSubId + parameters: + - name: idType + in: path + required: true + schema: + $ref: '#/components/schemas/idType' + - name: idValue + in: path + required: true + schema: + $ref: '#/components/schemas/idValue' + - name: subIdValue + in: path + required: true + schema: + $ref: '#/components/schemas/subIdValue' + responses: + 200: + description: Response containing details of the requested party + content: + application/json: + schema: + $ref: '#/components/schemas/participantsResponse' + 404: + description: The party specified by the provided identifier type and value/subId is not known to the server + 400: + description: Malformed or missing required headers or parameters + content: + application/json: + schema: + $ref: '#/components/schemas/errorResponse' + 500: + description: An error occured processing the request + content: + application/json: + schema: + $ref: '#/components/schemas/errorResponse' + + /parties/{idType}/{idValue}: + get: + summary: Requests information relating to a transfer party identified by the specified identifier type and value + tags: + - Parties + operationId: PartiesGetByTypeAndID + parameters: + - name: idType + in: path + required: true + schema: + $ref: '#/components/schemas/idType' + - name: idValue + in: path + required: true + schema: + $ref: '#/components/schemas/idValue' + responses: + 200: + description: Response containing details of the requested party + content: + application/json: + schema: + $ref: '#/components/schemas/transferParty' + 404: + description: The party specified by the provided identifier type and value is not known to the server + 400: + description: Malformed or missing required headers or parameters + content: + application/json: + schema: + $ref: '#/components/schemas/errorResponse' + 500: + description: An error occured processing the request + content: + application/json: + schema: + $ref: '#/components/schemas/errorResponse' + + /parties/{idType}/{idValue}/{subIdValue}: + get: + summary: Requests information relating to a transfer party identified by the specified identifier type, value and subId value + tags: + - Parties + operationId: PartiesGetByTypeIdAndSubId + parameters: + - name: idType + in: path + required: true + schema: + $ref: '#/components/schemas/idType' + - name: idValue + in: path + required: true + schema: + $ref: '#/components/schemas/idValue' + - name: subIdValue + in: path + required: true + schema: + $ref: '#/components/schemas/subIdValue' + responses: + 200: + description: Response containing details of the requested party + content: + application/json: + schema: + $ref: '#/components/schemas/transferParty' + 404: + description: The party specified by the provided identifier type and value is not known to the server + 400: + description: Malformed or missing required headers or parameters + content: + application/json: + schema: + $ref: '#/components/schemas/errorResponse' + 500: + description: An error occured processing the request + content: + application/json: + schema: + $ref: '#/components/schemas/errorResponse' + + /quoterequests: + post: + summary: Requests a quote for the specified transfer + tags: + - Quotes + operationId: QuoteRequest + requestBody: + description: Request for a transfer quotation + content: + application/json: + schema: + $ref: '#/components/schemas/quoteRequest' + responses: + 200: + description: A response to the transfer quotation request + content: + application/json: + schema: + $ref: '#/components/schemas/quoteResponse' + 400: + description: Malformed or missing required headers or parameters + content: + application/json: + schema: + $ref: '#/components/schemas/errorResponse' + 500: + description: An error occured processing the request + content: + application/json: + schema: + $ref: '#/components/schemas/errorResponse' + + /transactionrequests: + post: + summary: transaction request that supports pull based transfers + tags: + - TransactionRequest + operationId: TransactionRequest + requestBody: + description: Request for Transaction Request + content: + application/json: + schema: + $ref: '#/components/schemas/transactionRequest' + responses: + 200: + description: A response to the transfer transaction request + content: + application/json: + schema: + $ref: '#/components/schemas/transactionRequestResponse' + 400: + description: Malformed or missing required headers or parameters + content: + application/json: + schema: + $ref: '#/components/schemas/errorResponse' + 500: + description: An error occured processing the request + content: + application/json: + schema: + $ref: '#/components/schemas/errorResponse' + + /transfers: + post: + summary: Transfers funds from an external account to an internal account + tags: + - Transfers + operationId: TransfersPost + requestBody: + description: An incoming transfer request + content: + application/json: + schema: + $ref: '#/components/schemas/transferRequest' + responses: + 200: + description: The transfer was accepted + content: + application/json: + schema: + $ref: '#/components/schemas/transferResponse' + 400: + description: Malformed or missing required headers or parameters + content: + application/json: + schema: + $ref: '#/components/schemas/errorResponse' + 500: + description: An error occured processing the request + content: + application/json: + schema: + $ref: '#/components/schemas/errorResponse' + + /transfers/{transferId}: + put: + summary: Receive notification for a specific transfer + description: The HTTP request `PUT /transfers/{transferId}` is used to receive notification for transfer being fulfiled when the FSP is a Payee + parameters: + - name: transferId + in: path + required: true + schema: + $ref: '#/components/schemas/idValue' + tags: + - Transfers + operationId: TransfersPut + requestBody: + description: An incoming notification for fulfiled transfer + content: + application/json: + schema: + $ref: '#/components/schemas/fulfilNotification' + responses: + 200: + description: The notification was accepted + 500: + description: An error occured processing the request + content: + application/json: + schema: + $ref: '#/components/schemas/errorResponse' + + + /otp/{requestToPayId}: + get: + summary: Requests OTP + tags: + - OTP + operationId: OtpGet + parameters: + - name: requestToPayId + in: path + required: true + schema: + $ref: '#/components/schemas/idValue' + responses: + 200: + description: Response containing details of the OTP + content: + application/json: + schema: + $ref: '#/components/schemas/otpDetails' + 404: + description: The party specified by the provided identifier type and value is not known to the server + 400: + description: Malformed or missing required headers or parameters + content: + application/json: + schema: + $ref: '#/components/schemas/errorResponse' + 500: + description: An error occured processing the request + content: + application/json: + schema: + $ref: '#/components/schemas/errorResponse' + + /bulkQuotes: + post: + summary: Requests a bulk quote + tags: + - BulkQuotes + operationId: BulkQuotesPost + requestBody: + description: Incoming request for a bulk quotation + content: + application/json: + schema: + $ref: '#/components/schemas/bulkQuoteRequest' + responses: + 200: + description: A response to the bulk quote request + content: + application/json: + schema: + $ref: '#/components/schemas/bulkQuoteResponse' + 400: + description: Malformed or missing required headers or parameters + content: + application/json: + schema: + $ref: '#/components/schemas/errorResponse' + 500: + description: An error occured processing the request + content: + application/json: + schema: + $ref: '#/components/schemas/errorResponse' + + /bulkQuotes/{idValue}: + get: + summary: Requests information relating to a bulk quote identified by the specified identifier value + tags: + - BulkQuotes + operationId: BulkQuotesGet + parameters: + - name: idValue + in: path + required: true + schema: + $ref: '#/components/schemas/idValue' + responses: + 200: + description: Response containing details of the requested bulk quote + content: + application/json: + schema: + $ref: '#/components/schemas/bulkQuoteResponse' + 404: + description: The bulk quote specified by the provided identifier value is not known to the server + 400: + description: Malformed or missing required headers or parameters + content: + application/json: + schema: + $ref: '#/components/schemas/errorResponse' + 500: + description: An error occured processing the request + content: + application/json: + schema: + $ref: '#/components/schemas/errorResponse' + + /bulkTransactions/{bulkTransactionId}: + put: + summary: Callbacks for the bulk transaction request + operationId: BulkTransactionsPut + description: >- + The HTTP request `PUT /bulkTransactions/{bulkTransactionId}` is used to + amend information regarding a bulk transaction, i.e. when + autoAcceptParty or autoAcceptQuote is false then the payer need to + provide confirmation to proceed with further processing of the request. + The `{bulkTransactionId}` in the URI should contain the + `bulkTransactionId` that was used for the creation of the bulk transfer. + tags: + - BulkTransactionsPut + parameters: + - name: bulkTransactionId + in: path + required: true + schema: + title: CorrelationId + type: string + pattern: >- + ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + description: >- + Identifier that correlates all messages of the same sequence. The + API data type UUID (Universally Unique Identifier) is a JSON + String in canonical format, conforming to [RFC + 4122](https://tools.ietf.org/html/rfc4122), that is restricted by + a regular expression for interoperability reasons. A UUID is + always 36 characters long, 32 hexadecimal symbols and 4 dashes + (‘-‘). + example: b51ec534-ee48-4575-b6a9-ead2955b8069 + description: >- + Identifier of the bulk transaction to continue as returned in the + response to a `POST /bulkTransaction` request. + requestBody: + description: Bulk transaction request body + content: + application/json: + schema: + type: object + required: + - bulkHomeTransactionID + - individualTransferResults + properties: + bulkHomeTransactionID: + type: string + description: >- + Transaction ID from the DFSP backend, used to reconcile + transactions between the Switch and DFSP backend + systems. + individualTransferResults: + description: >- + List of individual transfers in a bulk transfer with + accept party information. + type: array + minItems: 1 + items: + type: object + description: >- + Data model for the 'individualTransfer' while + accepting party or quote. + properties: + homeTransactionId: + type: string + description: >- + Transaction ID from the DFSP backend, used to + reconcile transactions between the Switch and + DFSP backend systems. + transactionId: + title: CorrelationId + type: string + pattern: >- + ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + description: >- + Identifier that correlates all messages of the + same sequence. The API data type UUID + (Universally Unique Identifier) is a JSON + String in canonical format, conforming to [RFC + 4122](https://tools.ietf.org/html/rfc4122), + that is restricted by a regular expression for + interoperability reasons. A UUID is always 36 + characters long, 32 hexadecimal symbols and 4 + dashes (‘-‘). + example: b51ec534-ee48-4575-b6a9-ead2955b8069 + required: + - homeTransactionId + - transactionId + + required: true + responses: + '202': + description: Bulk transaction information successfully amended + '400': + description: Malformed or missing required body, headers or parameters + '500': + description: An error occurred processing the bulk transaction + + + /bulkTransfers: + post: + summary: Execute bulk transfer of funds from an external account to internal accounts + tags: + - BulkTransfers + operationId: BulkTransfersPost + requestBody: + description: An incoming bulk transfer request + content: + application/json: + schema: + $ref: '#/components/schemas/bulkTransferRequest' + responses: + 200: + description: The bulk transfer was accepted + content: + application/json: + schema: + $ref: '#/components/schemas/bulkTransferResponse' + 400: + description: Malformed or missing required headers or parameters + content: + application/json: + schema: + $ref: '#/components/schemas/errorResponse' + 500: + description: An error occured processing the request + content: + application/json: + schema: + $ref: '#/components/schemas/errorResponse' + + /bulkTransfers/{idValue}: + get: + summary: Requests information relating to a bulk transfer identified by the specified identifier value + tags: + - BulkTransfers + operationId: BulkTransfersGet + parameters: + - name: idValue + in: path + required: true + schema: + $ref: '#/components/schemas/idValue' + responses: + 200: + description: Response containing details of the requested bulk transfer + content: + application/json: + schema: + $ref: '#/components/schemas/bulkTransferResponse' + 404: + description: The bulk transfer specified by the provided identifier value is not known to the server + 400: + description: Malformed or missing required headers or parameters + content: + application/json: + schema: + $ref: '#/components/schemas/errorResponse' + 500: + description: An error occured processing the request + content: + application/json: + schema: + $ref: '#/components/schemas/errorResponse' + +components: + schemas: + quoteRequest: + type: object + description: A request for a quote for transfer from the DFSP backend + required: + - quoteId + - transactionId + - to + - from + - amountType + - amount + - currency + - transactionType + - initiator + - initiatorType + properties: + quoteId: + $ref: '#/components/schemas/quoteId' + transactionId: + $ref: '#/components/schemas/transactionId' + to: + $ref: '#/components/schemas/transferParty' + from: + $ref: '#/components/schemas/transferParty' + amountType: + $ref: '#/components/schemas/amountType' + amount: + $ref: '#/components/schemas/money' + currency: + $ref: '#/components/schemas/currency' + feesAmount: + $ref: '#/components/schemas/money' + feesCurrency: + $ref: '#/components/schemas/currency' + transactionType: + $ref: '#/components/schemas/transactionType' + initiator: + $ref: '#/components/schemas/initiator' + initiatorType: + $ref: '#/components/schemas/initiatorType' + geoCode: + $ref: '#/components/schemas/geoCode' + note: + type: string + minLength: 1 + maxLength: 128 + description: An optional note associated with the requested transfer + expiration: + $ref: '#/components/schemas/timestamp' + + transactionRequest: + type: object + description: A request for a pull based transfer + required: + - transactionRequestId + - to + - from + - amount + - currency + - transactionType + - initiator + - initiatorType + properties: + transactionRequestId: + $ref: '#/components/schemas/transactionRequestId' + to: + $ref: '#/components/schemas/transferParty' + from: + $ref: '#/components/schemas/transferParty' + amount: + $ref: '#/components/schemas/money' + currency: + $ref: '#/components/schemas/currency' + transactionType: + $ref: '#/components/schemas/transactionType' + initiator: + $ref: '#/components/schemas/initiator' + initiatorType: + $ref: '#/components/schemas/initiatorType' + geoCode: + $ref: '#/components/schemas/geoCode' + note: + type: string + minLength: 1 + maxLength: 128 + description: An optional note associated with the requested transfer + expiration: + $ref: '#/components/schemas/timestamp' + + timestamp: + type: string + description: An ISO-8601 formatted timestamp + pattern: ^(?:[1-9]\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\d|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-02-29)T(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:(\.\d{3}))(?:Z|[+-][01]\d:[0-5]\d)$ + + dateOfBirth: + type: string + description: Date of birth in the form YYYY-MM-DD + pattern: ^(?:[1-9]\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\d|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-02-29)$ + + initiator: + type: string + enum: + - PAYER + - PAYEE + + initiatorType: + type: string + enum: + - CONSUMER + - AGENT + - BUSINESS + - DEVICE + + quoteResponse: + type: object + description: A response to a request for a quote + required: + - quoteId + - transactionId + - transferAmount + - transferAmountCurrency + properties: + quoteId: + $ref: '#/components/schemas/quoteId' + transactionId: + $ref: '#/components/schemas/transactionId' + transferAmount: + $ref: '#/components/schemas/money' + transferAmountCurrency: + $ref: '#/components/schemas/currency' + payeeReceiveAmount: + $ref: '#/components/schemas/money' + payeeReceiveAmountCurrency: + $ref: '#/components/schemas/currency' + payeeFspFeeAmount: + $ref: '#/components/schemas/money' + payeeFspFeeAmountCurrency: + $ref: '#/components/schemas/currency' + payeeFspCommissionAmount: + $ref: '#/components/schemas/money' + payeeFspCommissionAmountCurrency: + $ref: '#/components/schemas/currency' + expiration: + $ref: '#/components/schemas/timestamp' + geoCode: + $ref: '#/components/schemas/geoCode' + extensionList: + $ref: '#/components/schemas/extensionList' + + transactionRequestResponse: + type: object + description: A response to a request for a quote + required: + - transactionId + - transactionRequestState + properties: + transactionId: + $ref: '#/components/schemas/transactionId' + transferAmount: + $ref: '#/components/schemas/transactionRequestState' + + participantsResponse: + type: object + properties: + fspId: + $ref: '#/components/schemas/fspId' + + fspId: + type: string + minLength: 1 + maxLength: 32 + + payerType: + type: string + enum: + - CONSUMER + - AGENT + - BUSINESS + - DEVICE + + amountType: + type: string + enum: + - SEND + - RECEIVE + + transactionType: + type: string + enum: + - TRANSFER + - DEPOSIT + - PAYMENT + + transactionRequestState: + type: string + enum: + - RECEIVED + - PENDING + - ACCEPTED + - REJECTED + + transferRequest: + type: object + required: + - transferId + - currency + - amount + properties: + transferId: + $ref: '#/components/schemas/transferId' + quote: + $ref: '#/components/schemas/quoteResponse' + from: + $ref: '#/components/schemas/transferParty' + to: + $ref: '#/components/schemas/transferParty' + amountType: + $ref: '#/components/schemas/amountType' + currency: + $ref: '#/components/schemas/currency' + amount: + $ref: '#/components/schemas/money' + transactionType: + $ref: '#/components/schemas/transactionType' + note: + maxLength: 128 + type: string + + otpDetails: + type: object + required: + - otpValue + properties: + otpValue: + type: string + description: OTP value + + idType: + type: string + enum: + - MSISDN + - ACCOUNT_NO + - EMAIL + - PERSONAL_ID + - BUSINESS + - DEVICE + - ACCOUNT_ID + - IBAN + - ALIAS + + idValue: + type: string + minLength: 1 + maxLength: 128 + + subIdValue: + type: string + minLength: 1 + maxLength: 128 + + money: + pattern: ^([0]|([1-9][0-9]{0,17}))([.][0-9]{0,3}[1-9])?$ + type: string + + transferResponse: + type: object + required: + - homeTransactionId + properties: + homeTransactionId: + type: string + description: Transaction ID from the DFSP backend, used to reconcile transactions between the switch and DFSP backend systems + + currency: + maxLength: 3 + minLength: 3 + type: string + + transferId: + pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + type: string + description: A Mojaloop API transfer identifier (UUID) + + quoteId: + pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + type: string + description: A Mojaloop API quote identifier (UUID) + + transactionRequestId: + pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + type: string + description: A Mojaloop API transaction request identifier (UUID) + + transactionId: + pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + type: string + description: ID of the transaction, the ID is decided by the Payer FSP during the creation of the quote + + transferParty: + type: object + required: + - idType + - idValue + properties: + type: + $ref: '#/components/schemas/payerType' + idType: + $ref: '#/components/schemas/idType' + idValue: + type: string + description: The identifier string used to identify the sender + subIdValue: + type: string + description: The sub identifier string used to identify the sender + displayName: + type: string + description: Display name of the sender if known + firstName: + type: string + description: Party first name + middleName: + type: string + description: Party moddle name + lastName: + type: string + description: Party last name + dateOfBirth: + $ref: '#/components/schemas/dateOfBirth' + merchantClassificationCode: + type: string + description: Up to 4 digits specifying the senders merchant classification, if known and applicable + + bulkQuoteRequest: + type: object + description: A request for a bulk quote + required: + - bulkQuoteId + - from + - individualQuotes + properties: + bulkQuoteId: + $ref: '#/components/schemas/bulkQuoteId' + from: + $ref: '#/components/schemas/transferParty' + geoCode: + $ref: '#/components/schemas/geoCode' + expiration: + $ref: '#/components/schemas/timestamp' + individualQuotes: + type: array + minItems: 1 + maxItems: 1000 + items: + $ref: '#/components/schemas/IndividualQuote' + + bulkQuoteResponse: + type: object + description: A response to a request for a bulk quote + required: + - bulkQuoteId + - individualQuoteResults + properties: + bulkQuoteId: + $ref: '#/components/schemas/bulkQuoteId' + expiration: + $ref: '#/components/schemas/timestamp' + individualQuoteResults: + type: array + minItems: 1 + maxItems: 1000 + items: + oneOf: + - $ref: '#/components/schemas/IndividualQuoteResultSuccess' + - $ref: '#/components/schemas/IndividualQuoteResultFailed' + description: Fees for each individual transaction, if any of them are charged per + transaction. + + IndividualQuote: + type: object + description: Data model for individual quote in a bulk quote request + required: + - quoteId + - transactionId + - to + - amountType + - amount + - currency + - transactionType + - initiator + - initiatorType + properties: + quoteId: + $ref: '#/components/schemas/quoteId' + transactionId: + $ref: '#/components/schemas/transactionId' + to: + $ref: '#/components/schemas/transferParty' + amountType: + $ref: '#/components/schemas/amountType' + amount: + $ref: '#/components/schemas/money' + currency: + $ref: '#/components/schemas/currency' + feesAmount: + $ref: '#/components/schemas/money' + feesCurrency: + $ref: '#/components/schemas/currency' + transactionType: + $ref: '#/components/schemas/transactionType' + initiator: + $ref: '#/components/schemas/initiator' + initiatorType: + $ref: '#/components/schemas/initiatorType' + note: + type: string + minLength: 1 + maxLength: 128 + description: An optional note associated with the quote + + IndividualQuoteResultSuccess: + type: object + description: Data model for successful individual quote in a bulk quote response + properties: + quoteId: + $ref: '#/components/schemas/quoteId' + transferAmount: + $ref: '#/components/schemas/money' + transferAmountCurrency: + $ref: '#/components/schemas/currency' + payeeReceiveAmount: + $ref: '#/components/schemas/money' + payeeReceiveAmountCurrency: + $ref: '#/components/schemas/currency' + payeeFspFeeAmount: + $ref: '#/components/schemas/money' + payeeFspFeeAmountCurrency: + $ref: '#/components/schemas/currency' + payeeFspCommissionAmount: + $ref: '#/components/schemas/money' + payeeFspCommissionAmountCurrency: + $ref: '#/components/schemas/currency' + required: + - quoteId + + IndividualQuoteResultFailed: + type: object + description: Data model for failed individual quote in a bulk quote response + properties: + quoteId: + $ref: '#/components/schemas/quoteId' + errorResponse: + $ref: '#/components/schemas/errorResponse' + required: + - quoteId + - errorResponse + + bulkQuoteId: + pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + type: string + description: A Mojaloop API bulk quote identifier (UUID) + + bulkTransferRequest: + type: object + required: + - bulkTransferId + - individualTransfers + properties: + bulkTransferId: + $ref: '#/components/schemas/bulkTransferId' + bulkQuote: + $ref: '#/components/schemas/bulkQuoteResponse' + from: + $ref: '#/components/schemas/transferParty' + individualTransfers: + type: array + minItems: 1 + maxItems: 1000 + items: + $ref: '#/components/schemas/IndividualTransfer' + + IndividualTransfer: + type: object + description: Data model for individual transfer in a bulk transfer request + required: + - transferId + - amount + - currency + properties: + transferId: + $ref: '#/components/schemas/transferId' + to: + $ref: '#/components/schemas/transferParty' + amountType: + $ref: '#/components/schemas/amountType' + amount: + $ref: '#/components/schemas/money' + currency: + $ref: '#/components/schemas/currency' + feesAmount: + $ref: '#/components/schemas/money' + feesCurrency: + $ref: '#/components/schemas/currency' + transactionType: + $ref: '#/components/schemas/transactionType' + initiator: + $ref: '#/components/schemas/initiator' + initiatorType: + $ref: '#/components/schemas/initiatorType' + note: + type: string + minLength: 1 + maxLength: 128 + description: An optional note associated with the quote + + IndividualTransferResult: + type: object + description: Data model for individual transfer in a bulk transfer response + required: + - transferId + properties: + transferId: + $ref: '#/components/schemas/transferId' + errorResponse: + $ref: '#components/schemes/errorResponse' + extensionList: + $ref: '#/components/schemas/extensionList' + + bulkTransferResponse: + type: object + required: + - homeTransactionId + properties: + bulkTransferId: + $ref: '#/components/schemas/bulkTransferId' + homeTransactionId: + type: string + description: Transaction ID from the DFSP backend, used to reconcile transactions between the switch and DFSP backend systems + individualTransferResults: + type: array + minItems: 1 + maxItems: 1000 + items: + $ref: '#/components/schemas/IndividualTransferResult' + + bulkTransferId: + pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + type: string + description: A Mojaloop API transfer identifier (UUID) + + geoCode: + type: object + description: Indicates the geographic location from where the transaction was initiated. + properties: + latitude: + $ref: '#/components/schemas/latitude' + longitude: + $ref: '#/components/schemas/longitude' + required: + - latitude + - longitude + + latitude: + type: string + pattern: ^(\+|-)?(?:90(?:(?:\.0{1,6})?)|(?:[0-9]|[1-8][0-9])(?:(?:\.[0-9]{1,6})?))$ + description: The API data type Latitude is a JSON String in a lexical format that is restricted by a regular expression for interoperability reasons. + + longitude: + type: string + pattern: ^(\+|-)?(?:180(?:(?:\.0{1,6})?)|(?:[0-9]|[1-9][0-9]|1[0-7][0-9])(?:(?:\.[0-9]{1,6})?))$ + description: The API data type Longitude is a JSON String in a lexical format that is restricted by a regular expression for interoperability reasons. + + errorResponse: + type: object + properties: + statusCode: + type: string + description: | + Backend error code from FSP. Ideally, statusCode is FSPIOP conforming. SDK will use status code to retrieve an FSPIOP error with the same code. + Otherwise, a suitable generic FSPIOP will be used with the errorResponse in the FSPIOP error message. + message: + type: string + description: Error message text + + extensionList: + type: array + items: + $ref: '#/components/schemas/extensionItem' + minItems: 0 + maxItems: 16 + + extensionItem: + type: object + properties: + key: + type: string + minLength: 1 + maxLength: 32 + value: + type: string + minLength: 1 + maxLength: 128 + + transferState: + type: string + enum: + - RECEIVED + - RESERVED + - COMMITTED + - ABORTED + description: > + Below are the allowed values for the enumeration + - RECEIVED DFSP has received the transfer. + - RESERVED DFSP has reserved the transfer. + - COMMITTED DFSP has successfully performed the transfer. + - ABORTED DFSP has aborted the transfer due a rejection or failure to perform the transfer. + + fulfilNotification: + title: TransfersIDPatchResponse + type: object + description: PUT /transfers/{transferId} object + properties: + completedTimestamp: + $ref: '#/components/schemas/timestamp' + transferState: + $ref: '#/components/schemas/transferState' + extensionList: + $ref: '#/components/schemas/extensionList' + required: + - completedTimestamp + - transferState + diff --git a/test/func/config/ttk-ttksim2/spec_files/api_definitions/mojaloop_simulator_sim_1.4/mockRef.json b/test/func/config/ttk-ttksim2/spec_files/api_definitions/mojaloop_simulator_sim_1.4/mockRef.json new file mode 100644 index 000000000..a3c81ce8c --- /dev/null +++ b/test/func/config/ttk-ttksim2/spec_files/api_definitions/mojaloop_simulator_sim_1.4/mockRef.json @@ -0,0 +1,75 @@ +[ + { + "id": "firstName", + "pattern": "John|David|Michael|Chris|Mike|Mark|Paul|Daniel|James|Maria" + }, + { + "id": "middleName", + "pattern": "G|P|N|S" + }, + { + "id": "lastName", + "pattern": "Smith|Jones|Johnson|Lee|Brown|Williams|Rodriguez|Garcia|Gonzalez|Lopez" + }, + { + "id": "dateOfBirth", + "pattern": "^(19)\\d\\d[-](0[1-9]|1[012])[-](0[1-9]|[12][0-9]|2[0-8])$" + }, + { + "id": "transferState", + "pattern": "COMMITTED|RESERVED|ABORTED|RECEIVED" + }, + { + "id": "fulfilment", + "pattern": "[A-Fa-f0-9]{64}" + }, + { + "id": "condition", + "pattern": "[A-Fa-f0-9]{64}" + }, + { + "id": "ilpPacket", + "pattern": "[A-Fa-f0-9]{256}" + }, + { + "id": "transferAmount.currency", + "pattern": "USD" + }, + { + "id": "transferAmount.amount", + "pattern": "123" + }, + { + "id": "payeeReceiveAmountCurrency", + "pattern": "USD" + }, + { + "id": "payeeReceiveAmount", + "pattern": "123" + }, + { + "id": "payeeFspFeeAmountCurrency", + "pattern": "USD" + }, + { + "id": "payeeFspFeeAmount", + "pattern": "2" + }, + { + "id": "payeeFspCommissionAmountCurrency", + "pattern": "USD" + }, + { + "id": "payeeFspCommissionAmount", + "pattern": "3" + }, + + { + "id": "errorInformation.errorCode", + "pattern": "600[1-9]" + }, + { + "id": "errorInformation.errorDescription", + "pattern": "This is a mock error description" + } +] \ No newline at end of file diff --git a/test/func/config/ttk-ttksim2/spec_files/api_definitions/mojaloop_simulator_sim_1.4/response_map.json b/test/func/config/ttk-ttksim2/spec_files/api_definitions/mojaloop_simulator_sim_1.4/response_map.json new file mode 100644 index 000000000..23d28b6fa --- /dev/null +++ b/test/func/config/ttk-ttksim2/spec_files/api_definitions/mojaloop_simulator_sim_1.4/response_map.json @@ -0,0 +1,60 @@ +{ + "/parties/{idType}/{idValue}": { + "get": { + "response": { + "bodyOverride": { + "idType": "{$request.params.idType}", + "idValue": "{$request.params.idValue}", + "merchantClassificationCode": null + } + } + } + }, + "/quoterequests": { + "post": { + "response": { + "bodyOverride": { + "quoteId": "{$request.body.quoteId}", + "transactionId": "{$request.body.transactionId}", + "transferAmount": "{$request.body.amount}", + "transferAmountCurrency": "{$request.body.currency}", + "expiration": "{$request.body.expiration}", + "geoCode": null, + "extensionList": null + } + } + } + }, + "/transfers": { + "post": { + "response": { + "bodyOverride": { + "homeTransactionId": "{$request.body.transferId}" + } + } + } + }, + "/bulkQuotes": { + "post": { + "response": { + "bodyOverride": { + "bulkQuoteId": "{$request.body.bulkQuoteId}" + } + } + } + }, + "/bulkTransfers": { + "post": { + "response": { + "bodyOverride": { + "bulkTransferId": "{$request.body.bulkTransferId}" + } + } + } + }, + "/bulkTransactions/{bulkTransactionId}": { + "put": { + "response": {} + } + } +} \ No newline at end of file diff --git a/test/func/config/ttk-ttksim2/spec_files/reports/templates/newman/html_template.html b/test/func/config/ttk-ttksim2/spec_files/reports/templates/newman/html_template.html new file mode 100644 index 000000000..e10fc0b1f --- /dev/null +++ b/test/func/config/ttk-ttksim2/spec_files/reports/templates/newman/html_template.html @@ -0,0 +1,1118 @@ + + {{!-- {{#each items}} + + + {{name}} + + + $ {{price}} + + + {{/each}} + + + + Total: ${{total items}} + + --}} + + + + + + + + + Testing Toolkit Assertions Report + + + + + + + + +
+
+ + + +
+
+
+ +
+
+
+
+

Testing Toolkit Report

+
{{runtimeInformation.completedTime}}
+
+
+
+
+
+ +
+
Total Assertions
+

{{totalAssertions test_cases}}

+
+
+
+
+
+
+
+ +
+
Total Passed Tests
+

{{totalPassedAssertions test_cases}}

+
+
+
+
+
+
+
+ +
+
Total Failed Tests
+

{{totalFailedAssertions test_cases}}

+
+
+
+
+
+
+
+
+
+
+
+
Runtime Information
+ Template Name: {{name}}
+ {{#if runtimeInformation}} + Total run duration: {{runtimeInformation.runDurationMs}} ms
+ Average response time: {{runtimeInformation.avgResponseTime}}
+ {{/if}} + {{#if extraRuntimeInformation}} + {{#each extraRuntimeInformation}} + {{key}}: {{value}}
+ {{/each}} + + {{/if}} +
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Summary ItemTotalFailed
Test Cases{{totalTestCases test_cases}}{{failedTestCases test_cases}}
Requests{{totalRequests test_cases}}{{failedRequests test_cases}}
Assertions{{totalAssertions test_cases}}{{totalFailedAssertions test_cases}}
+
+
+
+
+
+
+
+
+
+
+ +
+
+ + + +
+ + + + +
+ +
+ +
+
+ {{#each test_cases}} +
+ + +
+ {{#each requests}} +
+
+
+
+ {{#if (ifSkippedRequest status)}} +
+ {{else}} + {{#if (ifAllTestsPassedInRequest request)}} +
+ {{else}} +
+ {{/if}} + {{/if}} + +
+
+
+
+
+
+
+
+
Request Information
+ {{#if (ifSkippedRequest status)}} +
+
+
SKIPPED
+
+
+ {{/if}} + Request Method: {{request.method}}
+ Request URL: {{request.path}}
+
+
+
+
+
Response Information
+ Response Code: {{response.status}} - {{response.statusText}}
+ Mean time per request: NA
+ Mean size per request: NA
+
+
Test Pass Percentage
+
+
+ {{#if (ifSkippedRequest status)}} +
+ {{else}} + {{#if (ifAllTestsPassedInRequest request)}} +
+ {{else}} +
+ {{/if}} + {{/if}} +
{{testPassPercentage request.tests}} %
+
+
+
+
+
+
+
+
+ {{#if request.headers}} +
+
+
+
+
+
Request Headers
+
+ + + + {{#each request.headers}} + + + + + {{/each}} + +
Header NameHeader Value
{{@key}}{{this}}
+
+
+
+
+
+
+ {{/if}} + {{#if request.body}} +
+
+
+
+
+
Request Body
+
+
{{jsonStringify request.body}}
+
+ +
+
+
+
+
+ {{/if}} + {{#if additionalInfo.curlRequest}} +
+
+
+
+
+
CURL command
+
+
{{additionalInfo.curlRequest}}
+
+ +
+
+
+
+
+ {{/if}} + {{#if response.headers}} +
+
+
+
+
+
Response Headers
+
+
{{jsonStringify response.headers}}
+
+ +
+
+
+
+
+ {{/if}} + {{#if response.body}} +
+
+
+
+
+
Response Body
+
+
{{jsonStringify response.body}}
+
+ +
+
+
+
+
+ {{/if}} + {{#if callback.headers}} +
+
+
+
+
+
Callback Headers
+
+ + + + {{#each callback.headers}} + + + + + {{/each}} + +
Header NameHeader Value
{{@key}}{{this}}
+
+
+
+
+
+
+ {{/if}} + {{#if callback.body}} +
+
+
+
+
+
Callback Body
+
+
{{jsonStringify callback.body}}
+
+ +
+
+
+
+
+ {{/if}} + +
+
+
+
Test Information
+
+ + + + {{#each request.tests.assertions}} + + + {{#if (isAssertionSkipped resultStatus.status)}} + + {{else if (isAssertionPassed resultStatus.status)}} + + {{else}} + + + {{/if}} + + {{/each}} + + + + + + + +
NameResult
{{description}} + SKIPPED + + PASSED + + FAILED +
({{resultStatus.message}})
Total{{request.tests.passedAssertionsCount}} / {{request.tests.assertions.length}}
+
+
+
+
+
+
+
Test Failure
+
+ + + + +
Test NameAssertion Error
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{/each}} +
+ +
+ {{/each}} +
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/func/config/ttk-ttksim2/spec_files/reports/templates/newman/pdf_template.html b/test/func/config/ttk-ttksim2/spec_files/reports/templates/newman/pdf_template.html new file mode 100644 index 000000000..412779954 --- /dev/null +++ b/test/func/config/ttk-ttksim2/spec_files/reports/templates/newman/pdf_template.html @@ -0,0 +1,785 @@ + + {{!-- {{#each items}} + + + {{name}} + + + $ {{price}} + + + {{/each}} + + + + Total: ${{total items}} + + --}} + + + + + + + + + Testing Toolkit Assertions Report + + + + + + + + +
+
+
+ +
+
+
+
+


+

Testing Toolkit Report

+
{{runtimeInformation.completedTime}}
+


+
+
+
+
+
+ +
+
Total Assertions
+

{{totalAssertions test_cases}}

+
+
+
+
+
+
+
+ +
+
Total Passed Tests
+

{{totalPassedAssertions test_cases}}

+
+
+
+
+
+
+
+ +
+
Total Failed Tests
+

{{totalFailedAssertions test_cases}}

+
+
+
+
+
+
+
+


+
+
+
+
+
Runtime Information
+ Template Name: {{name}}
+ {{#if runtimeInformation}} + Total run duration: {{runtimeInformation.runDurationMs}} ms
+ Average response time: {{runtimeInformation.avgResponseTime}}
+ {{/if}} +
+
+
+
+


+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Summary ItemTotalFailed
Test Cases{{totalTestCases test_cases}}{{failedTestCases test_cases}}
Requests{{totalRequests test_cases}}{{failedRequests test_cases}}
Assertions{{totalAssertions test_cases}}{{totalFailedAssertions test_cases}}
+
+
+
+
+
+
+
+
+
+

















+


+
+ + +
+ +
+
+ {{#each test_cases}} +
+ + +
+ {{#each requests}} +
+
+
+
+ {{#if (ifAllTestsPassedInRequest request)}} +
+ {{else}} + +
+
+
+
+
+
+
+
Request Information
+ Request Method: {{request.method}}
+ Request URL: {{request.path}}
+
+
+
+
+
Response Information
+ Response Code: {{response.status}} - {{response.statusText}}
+ Mean time per request: NA
+ Mean size per request: NA
+
+
Test Pass Percentage
+
+
+ {{#if (ifAllTestsPassedInRequest request)}} +
+ {{else}} +
+ {{/if}} +
{{testPassPercentage request.tests}} %
+
+
+
+
+
+
+
+
+ {{#if request.headers}} +
+
+
+
+
+
Request Headers
+
+ + + + {{#each request.headers}} + + + + + {{/each}} + +
Header NameHeader Value
{{@key}}{{this}}
+
+
+
+
+
+
+ {{/if}} + {{#if request.body}} +
+
+
+
+
+
Request Body
+
+
{{jsonStringify request.body}}
+
+
+
+
+
+
+ {{/if}} + {{#if response.headers}} +
+
+
+
+
+
Response Headers
+
+
{{jsonStringify response.headers}}
+
+
+
+
+
+
+ {{/if}} + {{#if response.body}} +
+
+
+
+
+
Response Body
+
+
{{jsonStringify response.body}}
+
+
+
+
+
+
+ {{/if}} + {{#if callback.headers}} +
+
+
+
+
+
Callback Headers
+
+ + + + {{#each callback.headers}} + + + + + {{/each}} + +
Header NameHeader Value
{{@key}}{{this}}
+
+
+
+
+
+
+ {{/if}} + {{#if callback.body}} +
+
+
+
+
+
Callback Body
+
+
{{jsonStringify callback.body}}
+
+
+
+
+
+
+ {{/if}} + +
+
+
+
Test Information
+
+ + + + {{#each request.tests.assertions}} + + + {{#if (isAssertionSkipped resultStatus.status)}} + + {{else if (isAssertionPassed resultStatus.status)}} + + {{else}} + + + {{/if}} + + {{/each}} + + + + + + + +
NameResult
{{description}} + SKIPPED + + PASSED + + FAILED +
({{resultStatus.message}})
Total{{request.tests.passedAssertionsCount}} / {{request.tests.assertions.length}}
+
+
+
+
+
+
+
Test Failure
+
+ + + + +
Test NameAssertion Error
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{/each}} +
+ +
+ {{/each}} +
+
+
+
+
+ + + + + + + diff --git a/test/func/config/ttk-ttksim2/spec_files/reports/templates/testcase_definition/table_view.html b/test/func/config/ttk-ttksim2/spec_files/reports/templates/testcase_definition/table_view.html new file mode 100644 index 000000000..13c536bf0 --- /dev/null +++ b/test/func/config/ttk-ttksim2/spec_files/reports/templates/testcase_definition/table_view.html @@ -0,0 +1,133 @@ + + + + + + + + +
+ +
+
+
+ + +
+
+
+ +
+
+
+
Testcase
+
Request Description
+
Test Scenario
+
Expected Result
+
+
+
+ {{#each test_cases}} +
+
+
+
{{fileInfo.path}} + {{#if fileInfo.labels}} + - (Labels: {{fileInfo.labels}}) + {{/if}} +
+
+ + +
+
+ {{#each requests}} +
+
{{#if @first}}{{../meta.info}}{{/if}}
+
{{meta.info}}
+
{{description}}
({{method}} {{operationPath}})
+
+ {{#if tests.assertions}} +
    + {{#each tests.assertions}} +
  • {{description}}
  • + {{/each}} +
+ {{/if}} +
+
+ {{/each}} +
+
+
+
+ {{/each}} + +
+ + + + + + + + + + + \ No newline at end of file diff --git a/test/func/config/ttk-ttksim2/spec_files/rules_callback/config.json b/test/func/config/ttk-ttksim2/spec_files/rules_callback/config.json new file mode 100644 index 000000000..08320e433 --- /dev/null +++ b/test/func/config/ttk-ttksim2/spec_files/rules_callback/config.json @@ -0,0 +1,3 @@ +{ + "activeRulesFile": "default.json" +} diff --git a/test/func/config/ttk-ttksim2/spec_files/rules_callback/default.json b/test/func/config/ttk-ttksim2/spec_files/rules_callback/default.json new file mode 100644 index 000000000..0637a088a --- /dev/null +++ b/test/func/config/ttk-ttksim2/spec_files/rules_callback/default.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/test/func/config/ttk-ttksim2/spec_files/rules_response/config.json b/test/func/config/ttk-ttksim2/spec_files/rules_response/config.json new file mode 100644 index 000000000..599ca8fc6 --- /dev/null +++ b/test/func/config/ttk-ttksim2/spec_files/rules_response/config.json @@ -0,0 +1,3 @@ +{ + "activeRulesFile": "default.json" +} \ No newline at end of file diff --git a/test/func/config/ttk-ttksim2/spec_files/rules_response/default.json b/test/func/config/ttk-ttksim2/spec_files/rules_response/default.json new file mode 100644 index 000000000..afe16a5dd --- /dev/null +++ b/test/func/config/ttk-ttksim2/spec_files/rules_response/default.json @@ -0,0 +1,1949 @@ +[ + { + "ruleId": 1, + "priority": 1, + "description": "get /parties/{idType}/{idValue} - error case - receiver errors out", + "apiVersion": { + "minorVersion": 4, + "majorVersion": 1, + "type": "mojaloop_simulator_inbound", + "specFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/callback_map.json", + "responseMapFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/response_map.json", + "jsfRefFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/trigger_templates" + }, + "conditions": { + "all": [ + { + "fact": "pathParams", + "operator": "equal", + "value": "fsp2msisdnerrorsout", + "path": "idValue" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/parties/{idType}/{idValue}" + }, + { + "fact": "method", + "operator": "equal", + "value": "get" + } + ] + }, + "event": { + "method": null, + "path": null, + "params": { + "body": { + "statusCode": "4001", + "message": "ID Not Found" + }, + "statusCode": "404", + "scripts": { + "scriptingEngine": "postman" + } + }, + "type": "FIXED_RESPONSE" + }, + "type": "response", + "version": 1 + }, + { + "ruleId": 2, + "priority": 2, + "description": "get /parties/{idType}/{idValue} - error case - timeout", + "apiVersion": { + "minorVersion": 4, + "majorVersion": 1, + "type": "mojaloop_simulator_inbound", + "specFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/callback_map.json", + "responseMapFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/response_map.json", + "jsfRefFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/trigger_templates" + }, + "conditions": { + "all": [ + { + "fact": "pathParams", + "operator": "equal", + "value": "idtimesout", + "path": "idValue" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/parties/{idType}/{idValue}" + }, + { + "fact": "method", + "operator": "equal", + "value": "get" + } + ] + }, + "event": { + "method": null, + "path": null, + "params": { + "body": { + "idType": "MSISDN", + "idValue": "{$request.params.idValue}", + "displayName": "ReceiverFirst ReceiverLast", + "firstName": "ReceiverFirst", + "middleName": "ReceiverMiddle", + "lastName": "ReceiverLast", + "dateOfBirth": "1984-01-01", + "fspId": "ttkpm4mlreceiver" + }, + "statusCode": "200", + "scripts": { + "scriptingEngine": "postman" + }, + "delay": 300000 + }, + "type": "FIXED_RESPONSE" + }, + "type": "response", + "version": 1 + }, + { + "ruleId": 3, + "priority": 3, + "description": "get /parties/{idType}/{idValue} - default path", + "apiVersion": { + "minorVersion": 4, + "majorVersion": 1, + "type": "mojaloop_simulator_inbound", + "specFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/callback_map.json", + "responseMapFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/response_map.json", + "jsfRefFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/trigger_templates" + }, + "conditions": { + "all": [ + { + "fact": "operationPath", + "operator": "equal", + "value": "/parties/{idType}/{idValue}" + }, + { + "fact": "method", + "operator": "equal", + "value": "get" + } + ] + }, + "event": { + "method": null, + "path": null, + "params": { + "body": { + "idType": "MSISDN", + "idValue": "{$request.params.idValue}", + "displayName": "ReceiverFirst ReceiverLast", + "firstName": "ReceiverFirst", + "middleName": "ReceiverMiddle", + "lastName": "ReceiverLast", + "dateOfBirth": "1984-01-01", + "fspId": "ttkpm4mlreceiver" + }, + "statusCode": "200", + "scripts": { + "scriptingEngine": "postman" + } + }, + "type": "FIXED_RESPONSE" + }, + "type": "response", + "version": 1 + }, + { + "ruleId": 16, + "priority": 1, + "description": "post /bulkQuotes - receiver fails entire batch", + "apiVersion": { + "minorVersion": 4, + "majorVersion": 1, + "type": "mojaloop_simulator_inbound", + "specFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/callback_map.json", + "responseMapFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/response_map.json", + "jsfRefFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/trigger_templates" + }, + "conditions": { + "all": [ + { + "fact": "body", + "operator": "equal", + "value": "blkqtbatchfailure", + "path": "note" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/bulkQuotes" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": null, + "path": null, + "params": { + "body": { + "statusCode": "2001", + "message": "Error processing bulk quote" + }, + "statusCode": "500", + "scripts": { + "scriptingEngine": "postman" + } + }, + "type": "FIXED_RESPONSE" + }, + "type": "response", + "version": 1 + }, + { + "ruleId": 7, + "priority": 7, + "description": "post /bulkQuotes - bulk transfer test case - receiver fails the entire batch", + "apiVersion": { + "minorVersion": 4, + "majorVersion": 1, + "type": "mojaloop_simulator_inbound", + "specFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/callback_map.json", + "responseMapFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/response_map.json", + "jsfRefFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/trigger_templates" + }, + "conditions": { + "all": [ + { + "fact": "body", + "operator": "equal", + "value": "blktrbatchfailure", + "path": "note" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/bulkQuotes" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": null, + "path": null, + "params": { + "body": { + "bulkQuoteId": "{$request.body.bulkQuoteId}", + "expiration": "{$request.body.expiration}", + "individualQuoteResults": [ + { + "quoteId": "{$request.body.individualQuotes[0].quoteId}", + "transferAmount": "{$request.body.individualQuotes[0].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[0].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[0].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[0].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[0].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[0].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[1].quoteId}", + "transferAmount": "{$request.body.individualQuotes[1].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[1].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[1].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[1].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[1].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[1].currency}" + } + ] + }, + "statusCode": "200", + "scripts": { + "scriptingEngine": "postman" + } + }, + "type": "FIXED_RESPONSE" + }, + "type": "response", + "version": 1 + }, + { + "ruleId": 6, + "priority": 6, + "description": "post /bulkQuotes - receiver times out entire batch", + "apiVersion": { + "minorVersion": 4, + "majorVersion": 1, + "type": "mojaloop_simulator_inbound", + "specFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/callback_map.json", + "responseMapFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/response_map.json", + "jsfRefFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/trigger_templates" + }, + "conditions": { + "all": [ + { + "fact": "body", + "operator": "equal", + "value": "blkqtbatchtimesout", + "path": "note" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/bulkQuotes" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": null, + "path": null, + "params": { + "body": { + "quoteId": "{$request.body.individualQuotes[0].quoteId}", + "transferAmount": "{$request.body.individualQuotes[0].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[0].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[0].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[0].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[0].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[0].currency}" + }, + "statusCode": "200", + "scripts": { + "scriptingEngine": "postman" + }, + "delay": 300000 + }, + "type": "FIXED_RESPONSE" + }, + "type": "response", + "version": 1 + }, + { + "ruleId": 17, + "priority": 1, + "description": "post /bulkQuotes - bulk transfer test case - receiver times out entire batch", + "apiVersion": { + "minorVersion": 4, + "majorVersion": 1, + "type": "mojaloop_simulator_inbound", + "specFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/callback_map.json", + "responseMapFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/response_map.json", + "jsfRefFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/trigger_templates" + }, + "conditions": { + "all": [ + { + "fact": "body", + "operator": "equal", + "value": "blktrbatchtimesout", + "path": "note" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/bulkQuotes" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": null, + "path": null, + "params": { + "body": { + "bulkQuoteId": "{$request.body.bulkQuoteId}", + "expiration": "2040-01-01T00:00:00.000Z", + "individualQuoteResults": [ + { + "quoteId": "{$request.body.individualQuotes[0].quoteId}", + "transferAmount": "{$request.body.individualQuotes[0].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[0].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[0].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[0].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[0].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[0].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[1].quoteId}", + "transferAmount": "{$request.body.individualQuotes[1].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[1].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[1].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[1].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[1].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[1].currency}" + } + ] + }, + "statusCode": "200", + "scripts": { + "scriptingEngine": "postman" + } + }, + "type": "FIXED_RESPONSE" + }, + "type": "response", + "version": 1 + }, + { + "ruleId": 8, + "priority": 8, + "description": "post /bulkQuotes - receiver sends success response for one quote and failure for other", + "apiVersion": { + "minorVersion": 4, + "majorVersion": 1, + "type": "mojaloop_simulator_inbound", + "specFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/callback_map.json", + "responseMapFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/response_map.json", + "jsfRefFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/trigger_templates" + }, + "conditions": { + "all": [ + { + "fact": "body", + "operator": "equal", + "value": "blkqtbatchpartialsuccess", + "path": "note" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/bulkQuotes" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": null, + "path": null, + "params": { + "body": { + "bulkQuoteId": "{$request.body.bulkQuoteId}", + "expiration": "2040-01-01T00:00:00.000Z", + "individualQuoteResults": [ + { + "quoteId": "{$request.body.individualQuotes[0].quoteId}", + "transferAmount": "{$request.body.individualQuotes[0].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[0].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[0].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[0].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[0].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[0].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[1].quoteId}", + "errorResponse": { + "statusCode": "5101", + "message": "Payee Rejected Quote" + } + } + ] + }, + "statusCode": "200", + "scripts": { + "scriptingEngine": "postman" + } + }, + "type": "FIXED_RESPONSE" + }, + "type": "response", + "version": 1 + }, + { + "ruleId": 9, + "priority": 9, + "description": "post /bulkQuotes - bulk transfer test case - receiver sends success response for one transfer and failure for other", + "apiVersion": { + "minorVersion": 4, + "majorVersion": 1, + "type": "mojaloop_simulator_inbound", + "specFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/callback_map.json", + "responseMapFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/response_map.json", + "jsfRefFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/trigger_templates" + }, + "conditions": { + "all": [ + { + "fact": "body", + "operator": "equal", + "value": "blktrbatchpartialsuccess", + "path": "note" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/bulkQuotes" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": null, + "path": null, + "params": { + "body": { + "bulkQuoteId": "{$request.body.bulkQuoteId}", + "expiration": "2040-01-01T00:00:00.000Z", + "individualQuoteResults": [ + { + "quoteId": "{$request.body.individualQuotes[0].quoteId}", + "transferAmount": "{$request.body.individualQuotes[0].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[0].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[0].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[0].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[0].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[0].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[1].quoteId}", + "transferAmount": "{$request.body.individualQuotes[1].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[1].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[1].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[1].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[1].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[1].currency}" + } + ] + }, + "statusCode": "200", + "scripts": { + "scriptingEngine": "postman" + } + }, + "type": "FIXED_RESPONSE" + }, + "type": "response", + "version": 1 + }, + { + "ruleId": 10, + "priority": 10, + "description": "post /bulkQuotes - bulk transfer test case - quotes response for transfers scenario that has an error in the result", + "apiVersion": { + "minorVersion": 4, + "majorVersion": 1, + "type": "mojaloop_simulator_inbound", + "specFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/callback_map.json", + "responseMapFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/response_map.json", + "jsfRefFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/trigger_templates" + }, + "conditions": { + "all": [ + { + "fact": "body", + "operator": "equal", + "value": "bulktransferresponsehas1error", + "path": "from.idValue" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/bulkQuotes" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": null, + "path": null, + "params": { + "body": { + "bulkQuoteId": "{$request.body.bulkQuoteId}", + "expiration": "{$request.body.expiration}", + "individualQuoteResults": [ + { + "quoteId": "{$request.body.individualQuotes[0].quoteId}", + "transferAmount": "{$request.body.individualQuotes[0].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[0].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[0].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[0].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[0].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[0].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[1].quoteId}", + "transferAmount": "{$request.body.individualQuotes[1].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[1].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[1].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[1].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[1].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[1].currency}" + } + ] + }, + "statusCode": "200", + "scripts": { + "scriptingEngine": "postman" + } + }, + "type": "FIXED_RESPONSE" + }, + "type": "response", + "version": 1 + }, + { + "ruleId": 20, + "priority": 1, + "description": "post /bulkQuotes - bulk transfer test case -transaction with 1 transfer", + "apiVersion": { + "minorVersion": 4, + "majorVersion": 1, + "type": "mojaloop_simulator_inbound", + "specFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/callback_map.json", + "responseMapFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/response_map.json", + "jsfRefFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/trigger_templates" + }, + "conditions": { + "all": [ + { + "fact": "body", + "operator": "equal", + "value": "blktrrcvr1transfer", + "path": "individualQuotes[0].to.fspId" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/bulkQuotes" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": null, + "path": null, + "params": { + "body": { + "bulkQuoteId": "{$request.body.bulkQuoteId}", + "expiration": "{$request.body.expiration}", + "individualQuoteResults": [ + { + "quoteId": "{$request.body.individualQuotes[0].quoteId}", + "transferAmount": "{$request.body.individualQuotes[0].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[0].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[0].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[0].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[0].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[0].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[1].quoteId}", + "transferAmount": "{$request.body.individualQuotes[1].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[1].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[1].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[1].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[1].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[1].currency}" + } + ] + }, + "statusCode": "200", + "scripts": { + "scriptingEngine": "postman" + } + }, + "type": "FIXED_RESPONSE" + }, + "type": "response", + "version": 1 + }, + { + "ruleId": 5, + "priority": 5, + "description": "post /bulkQuotes - receiver responds with 1 quote result", + "apiVersion": { + "minorVersion": 4, + "majorVersion": 1, + "type": "mojaloop_simulator_inbound", + "specFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/callback_map.json", + "responseMapFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/response_map.json", + "jsfRefFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/trigger_templates" + }, + "conditions": { + "all": [ + { + "fact": "body", + "operator": "equal", + "value": "blkqtbatchwith1qtresponse", + "path": "note" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/bulkQuotes" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": null, + "path": null, + "params": { + "body": { + "bulkQuoteId": "{$request.body.bulkQuoteId}", + "expiration": "{$request.body.expiration}", + "individualQuoteResults": [ + { + "quoteId": "{$request.body.individualQuotes[0].quoteId}", + "transferAmount": "{$request.body.individualQuotes[0].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[0].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[0].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[0].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[0].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[0].currency}" + } + ] + }, + "statusCode": "200", + "scripts": { + "scriptingEngine": "postman" + } + }, + "type": "FIXED_RESPONSE" + }, + "type": "response", + "version": 1 + }, + { + "ruleId": 21, + "priority": 1, + "description": "post /bulkQuotes - receiver responds with 50 quote results", + "apiVersion": { + "minorVersion": 4, + "majorVersion": 1, + "type": "mojaloop_simulator_inbound", + "specFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/callback_map.json", + "responseMapFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/response_map.json", + "jsfRefFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/trigger_templates" + }, + "conditions": { + "all": [ + { + "fact": "body", + "operator": "equal", + "value": "receiverfspwith50responses", + "path": "note" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/bulkQuotes" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": null, + "path": null, + "params": { + "body": { + "bulkQuoteId": "{$request.body.bulkQuoteId}", + "expiration": "2040-01-01T00:00:00.000Z", + "individualQuoteResults": [ + { + "quoteId": "{$request.body.individualQuotes[0].quoteId}", + "transferAmount": "{$request.body.individualQuotes[0].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[0].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[0].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[0].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[0].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[0].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[1].quoteId}", + "transferAmount": "{$request.body.individualQuotes[1].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[1].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[1].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[1].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[1].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[1].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[2].quoteId}", + "transferAmount": "{$request.body.individualQuotes[2].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[2].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[2].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[2].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[2].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[2].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[3].quoteId}", + "transferAmount": "{$request.body.individualQuotes[3].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[3].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[3].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[3].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[3].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[3].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[4].quoteId}", + "transferAmount": "{$request.body.individualQuotes[4].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[4].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[4].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[4].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[4].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[4].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[5].quoteId}", + "transferAmount": "{$request.body.individualQuotes[5].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[5].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[5].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[5].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[5].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[5].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[6].quoteId}", + "transferAmount": "{$request.body.individualQuotes[6].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[6].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[6].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[6].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[6].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[6].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[7].quoteId}", + "transferAmount": "{$request.body.individualQuotes[7].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[7].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[7].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[7].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[7].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[7].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[8].quoteId}", + "transferAmount": "{$request.body.individualQuotes[8].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[8].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[8].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[8].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[8].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[8].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[9].quoteId}", + "transferAmount": "{$request.body.individualQuotes[9].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[9].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[9].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[9].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[9].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[9].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[10].quoteId}", + "transferAmount": "{$request.body.individualQuotes[10].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[10].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[10].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[10].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[10].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[10].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[11].quoteId}", + "transferAmount": "{$request.body.individualQuotes[11].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[11].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[11].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[11].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[11].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[11].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[12].quoteId}", + "transferAmount": "{$request.body.individualQuotes[12].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[12].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[12].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[12].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[12].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[12].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[13].quoteId}", + "transferAmount": "{$request.body.individualQuotes[13].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[13].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[13].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[13].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[13].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[13].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[14].quoteId}", + "transferAmount": "{$request.body.individualQuotes[14].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[14].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[14].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[14].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[14].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[14].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[15].quoteId}", + "transferAmount": "{$request.body.individualQuotes[15].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[15].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[15].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[15].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[15].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[15].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[16].quoteId}", + "transferAmount": "{$request.body.individualQuotes[16].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[16].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[16].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[16].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[16].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[16].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[17].quoteId}", + "transferAmount": "{$request.body.individualQuotes[17].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[17].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[17].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[17].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[17].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[17].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[18].quoteId}", + "transferAmount": "{$request.body.individualQuotes[18].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[18].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[18].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[18].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[18].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[18].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[19].quoteId}", + "transferAmount": "{$request.body.individualQuotes[19].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[19].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[19].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[19].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[19].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[19].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[20].quoteId}", + "transferAmount": "{$request.body.individualQuotes[20].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[20].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[20].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[20].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[20].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[20].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[21].quoteId}", + "transferAmount": "{$request.body.individualQuotes[21].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[21].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[21].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[21].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[21].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[21].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[22].quoteId}", + "transferAmount": "{$request.body.individualQuotes[22].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[22].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[22].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[22].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[22].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[22].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[23].quoteId}", + "transferAmount": "{$request.body.individualQuotes[23].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[23].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[23].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[23].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[23].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[23].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[24].quoteId}", + "transferAmount": "{$request.body.individualQuotes[24].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[24].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[24].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[24].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[24].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[24].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[25].quoteId}", + "transferAmount": "{$request.body.individualQuotes[25].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[25].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[25].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[25].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[25].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[25].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[26].quoteId}", + "transferAmount": "{$request.body.individualQuotes[26].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[26].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[26].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[26].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[26].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[26].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[27].quoteId}", + "transferAmount": "{$request.body.individualQuotes[27].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[27].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[27].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[27].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[27].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[27].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[28].quoteId}", + "transferAmount": "{$request.body.individualQuotes[28].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[28].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[28].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[28].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[28].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[28].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[29].quoteId}", + "transferAmount": "{$request.body.individualQuotes[29].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[29].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[29].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[29].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[29].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[29].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[30].quoteId}", + "transferAmount": "{$request.body.individualQuotes[30].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[30].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[30].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[30].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[30].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[30].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[31].quoteId}", + "transferAmount": "{$request.body.individualQuotes[31].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[31].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[31].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[31].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[31].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[31].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[32].quoteId}", + "transferAmount": "{$request.body.individualQuotes[32].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[32].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[32].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[32].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[32].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[32].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[33].quoteId}", + "transferAmount": "{$request.body.individualQuotes[33].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[33].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[33].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[33].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[33].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[33].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[34].quoteId}", + "transferAmount": "{$request.body.individualQuotes[34].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[34].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[34].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[34].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[34].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[34].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[35].quoteId}", + "transferAmount": "{$request.body.individualQuotes[35].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[35].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[35].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[35].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[35].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[35].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[36].quoteId}", + "transferAmount": "{$request.body.individualQuotes[36].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[36].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[36].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[36].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[36].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[36].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[37].quoteId}", + "transferAmount": "{$request.body.individualQuotes[37].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[37].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[37].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[37].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[37].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[37].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[38].quoteId}", + "transferAmount": "{$request.body.individualQuotes[38].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[38].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[38].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[38].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[38].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[38].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[39].quoteId}", + "transferAmount": "{$request.body.individualQuotes[39].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[39].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[39].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[39].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[39].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[39].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[40].quoteId}", + "transferAmount": "{$request.body.individualQuotes[40].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[40].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[40].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[40].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[40].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[40].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[41].quoteId}", + "transferAmount": "{$request.body.individualQuotes[41].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[41].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[41].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[41].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[41].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[41].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[42].quoteId}", + "transferAmount": "{$request.body.individualQuotes[42].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[42].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[42].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[42].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[42].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[42].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[43].quoteId}", + "transferAmount": "{$request.body.individualQuotes[43].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[43].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[43].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[43].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[43].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[43].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[44].quoteId}", + "transferAmount": "{$request.body.individualQuotes[44].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[44].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[44].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[44].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[44].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[44].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[45].quoteId}", + "transferAmount": "{$request.body.individualQuotes[45].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[45].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[45].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[45].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[45].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[45].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[46].quoteId}", + "transferAmount": "{$request.body.individualQuotes[46].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[46].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[46].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[46].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[46].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[46].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[47].quoteId}", + "transferAmount": "{$request.body.individualQuotes[47].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[47].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[47].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[47].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[47].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[47].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[48].quoteId}", + "transferAmount": "{$request.body.individualQuotes[48].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[48].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[48].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[48].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[48].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[48].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[49].quoteId}", + "transferAmount": "{$request.body.individualQuotes[49].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[49].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[49].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[49].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[49].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[49].currency}" + } + ] + }, + "statusCode": "200", + "scripts": { + "scriptingEngine": "postman" + } + }, + "type": "FIXED_RESPONSE" + }, + "type": "response", + "version": 1 + }, + { + "ruleId": 11, + "priority": 11, + "description": "post /bulkQuotes - default path", + "apiVersion": { + "minorVersion": 4, + "majorVersion": 1, + "type": "mojaloop_simulator_inbound", + "specFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/callback_map.json", + "responseMapFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/response_map.json", + "jsfRefFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/trigger_templates" + }, + "conditions": { + "all": [ + { + "fact": "operationPath", + "operator": "equal", + "value": "/bulkQuotes" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": null, + "path": null, + "params": { + "body": { + "bulkQuoteId": "{$request.body.bulkQuoteId}", + "expiration": "2040-01-01T00:00:00.000Z", + "individualQuoteResults": [] + }, + "statusCode": "200", + "scripts": { + "exec": [ + "const reqBody = JSON.parse(request.body)", + "const individualQuoteResults = reqBody.individualQuotes.map(quote => ({", + " payeeFspCommissionAmount: \"0\",", + " payeeFspCommissionAmountCurrency: quote.currency,", + " payeeFspFeeAmount: \"0\",", + " payeeFspFeeAmountCurrency: quote.currency,", + " payeeReceiveAmount: quote.amount,", + " payeeReceiveAmountCurrency: quote.currency,", + " quoteId: quote.quoteId,", + " transferAmount: quote.amount,", + " transferAmountCurrency: quote.currency", + "}))", + "", + "custom.appendEventBody({", + " individualQuoteResults", + "})" + ], + "scriptingEngine": "javascript" + } + }, + "type": "FIXED_RESPONSE" + }, + "type": "response", + "version": 1 + }, + { + "ruleId": 12, + "priority": 12, + "description": "put /bulkTransactions/{bulkTransactionId}", + "apiVersion": { + "minorVersion": 4, + "majorVersion": 1, + "type": "mojaloop_simulator_inbound", + "specFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/callback_map.json", + "responseMapFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/response_map.json", + "jsfRefFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/trigger_templates" + }, + "conditions": { + "all": [ + { + "fact": "operationPath", + "operator": "equal", + "value": "/bulkTransactions/{bulkTransactionId}" + }, + { + "fact": "method", + "operator": "equal", + "value": "put" + } + ] + }, + "event": { + "method": null, + "path": null, + "params": { + "scripts": { + "scriptingEngine": "postman" + }, + "statusCode": "202" + }, + "type": "FIXED_RESPONSE" + }, + "type": "response", + "version": 1 + }, + { + "ruleId": 13, + "priority": 13, + "description": "post /bulkTransfers - receiver fails the entire batch", + "apiVersion": { + "minorVersion": 4, + "majorVersion": 1, + "type": "mojaloop_simulator_inbound", + "specFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/callback_map.json", + "responseMapFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/response_map.json", + "jsfRefFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/trigger_templates" + }, + "conditions": { + "all": [ + { + "fact": "body", + "operator": "equal", + "value": "blktrbatchfailure", + "path": "individualTransfers[0].note" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/bulkTransfers" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": null, + "path": null, + "params": { + "body": { + "statusCode": "4001", + "message": "Cannot process the bulk transfer" + }, + "statusCode": "500", + "scripts": { + "scriptingEngine": "postman" + } + }, + "type": "FIXED_RESPONSE" + }, + "type": "response", + "version": 1 + }, + { + "ruleId": 18, + "priority": 1, + "description": "post /bulkTransfers - receiver times out entire batch", + "apiVersion": { + "minorVersion": 4, + "majorVersion": 1, + "type": "mojaloop_simulator_inbound", + "specFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/callback_map.json", + "responseMapFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/response_map.json", + "jsfRefFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/trigger_templates" + }, + "conditions": { + "all": [ + { + "fact": "body", + "operator": "equal", + "value": "blktrbatchtimesout", + "path": "individualTransfers[0].note" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/bulkTransfers" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": null, + "path": null, + "params": { + "body": { + "bulkTransferId": "{$request.body.bulkTransferId}", + "homeTransactionId": "{$request.body.homeTransactionId}", + "individualTransferResults": [ + { + "transferId": "{$request.body.individualTransfers[0].transferId}" + }, + { + "transferId": "{$request.body.individualTransfers[1].transferId}" + } + ] + }, + "statusCode": "200", + "scripts": { + "scriptingEngine": "postman" + }, + "delay": 300000 + }, + "type": "FIXED_RESPONSE" + }, + "type": "response", + "version": 1 + }, + { + "ruleId": 14, + "priority": 14, + "description": "post /bulkTransfers - receiver sends success response for one transfer and failure for other", + "apiVersion": { + "minorVersion": 4, + "majorVersion": 1, + "type": "mojaloop_simulator_inbound", + "hostnames": [ + "ttkpm4mlreceiver-ttk-backend" + ], + "specFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/callback_map.json", + "responseMapFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/response_map.json", + "jsfRefFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/trigger_templates" + }, + "conditions": { + "all": [ + { + "fact": "body", + "operator": "equal", + "value": "blktrbatchpartialsuccess", + "path": "individualTransfers[0].note" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/bulkTransfers" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": null, + "path": null, + "params": { + "body": { + "bulkTransferId": "{$request.body.bulkTransferId}", + "homeTransactionId": "{$request.body.homeTransactionId}", + "individualTransferResults": [ + { + "transferId": "{$request.body.individualTransfers[0].transferId}" + }, + { + "transferId": "{$request.body.individualTransfers[1].transferId}", + "errorResponse": { + "statusCode": "4001", + "message": "Cannot process the transfer" + } + } + ] + }, + "statusCode": "200", + "scripts": { + "scriptingEngine": "postman" + } + }, + "type": "FIXED_RESPONSE" + }, + "type": "response", + "version": 1 + }, + { + "ruleId": 22, + "priority": 1, + "description": "post /bulkTransfers - receiver responds with 50 transfer results", + "apiVersion": { + "minorVersion": 4, + "majorVersion": 1, + "type": "mojaloop_simulator_inbound", + "specFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/callback_map.json", + "responseMapFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/response_map.json", + "jsfRefFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/trigger_templates" + }, + "conditions": { + "all": [ + { + "fact": "body", + "operator": "equal", + "value": "receiverfspwith50responses", + "path": "individualTransfers[0].note" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/bulkTransfers" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": null, + "path": null, + "params": { + "body": { + "bulkTransferId": "{$request.body.bulkTransferId}", + "homeTransactionId": "{$request.body.homeTransactionId}", + "individualTransferResults": [ + { + "transferId": "{$request.body.individualTransfers[0].transferId}" + }, + { + "transferId": "{$request.body.individualTransfers[1].transferId}" + }, + { + "transferId": "{$request.body.individualTransfers[2].transferId}" + }, + { + "transferId": "{$request.body.individualTransfers[3].transferId}" + }, + { + "transferId": "{$request.body.individualTransfers[4].transferId}" + }, + { + "transferId": "{$request.body.individualTransfers[5].transferId}" + }, + { + "transferId": "{$request.body.individualTransfers[6].transferId}" + }, + { + "transferId": "{$request.body.individualTransfers[7].transferId}" + }, + { + "transferId": "{$request.body.individualTransfers[8].transferId}" + }, + { + "transferId": "{$request.body.individualTransfers[9].transferId}" + }, + { + "transferId": "{$request.body.individualTransfers[10].transferId}" + }, + { + "transferId": "{$request.body.individualTransfers[11].transferId}" + }, + { + "transferId": "{$request.body.individualTransfers[12].transferId}" + }, + { + "transferId": "{$request.body.individualTransfers[13].transferId}" + }, + { + "transferId": "{$request.body.individualTransfers[14].transferId}" + }, + { + "transferId": "{$request.body.individualTransfers[15].transferId}" + }, + { + "transferId": "{$request.body.individualTransfers[16].transferId}" + }, + { + "transferId": "{$request.body.individualTransfers[17].transferId}" + }, + { + "transferId": "{$request.body.individualTransfers[18].transferId}" + }, + { + "transferId": "{$request.body.individualTransfers[19].transferId}" + }, + { + "transferId": "{$request.body.individualTransfers[20].transferId}" + }, + { + "transferId": "{$request.body.individualTransfers[21].transferId}" + }, + { + "transferId": "{$request.body.individualTransfers[22].transferId}" + }, + { + "transferId": "{$request.body.individualTransfers[23].transferId}" + }, + { + "transferId": "{$request.body.individualTransfers[24].transferId}" + }, + { + "transferId": "{$request.body.individualTransfers[25].transferId}" + }, + { + "transferId": "{$request.body.individualTransfers[26].transferId}" + }, + { + "transferId": "{$request.body.individualTransfers[27].transferId}" + }, + { + "transferId": "{$request.body.individualTransfers[28].transferId}" + }, + { + "transferId": "{$request.body.individualTransfers[29].transferId}" + }, + { + "transferId": "{$request.body.individualTransfers[30].transferId}" + }, + { + "transferId": "{$request.body.individualTransfers[31].transferId}" + }, + { + "transferId": "{$request.body.individualTransfers[32].transferId}" + }, + { + "transferId": "{$request.body.individualTransfers[33].transferId}" + }, + { + "transferId": "{$request.body.individualTransfers[34].transferId}" + }, + { + "transferId": "{$request.body.individualTransfers[35].transferId}" + }, + { + "transferId": "{$request.body.individualTransfers[36].transferId}" + }, + { + "transferId": "{$request.body.individualTransfers[37].transferId}" + }, + { + "transferId": "{$request.body.individualTransfers[38].transferId}" + }, + { + "transferId": "{$request.body.individualTransfers[39].transferId}" + }, + { + "transferId": "{$request.body.individualTransfers[40].transferId}" + }, + { + "transferId": "{$request.body.individualTransfers[41].transferId}" + }, + { + "transferId": "{$request.body.individualTransfers[42].transferId}" + }, + { + "transferId": "{$request.body.individualTransfers[43].transferId}" + }, + { + "transferId": "{$request.body.individualTransfers[44].transferId}" + }, + { + "transferId": "{$request.body.individualTransfers[45].transferId}" + }, + { + "transferId": "{$request.body.individualTransfers[46].transferId}" + }, + { + "transferId": "{$request.body.individualTransfers[47].transferId}" + }, + { + "transferId": "{$request.body.individualTransfers[48].transferId}" + }, + { + "transferId": "{$request.body.individualTransfers[49].transferId}" + } + ] + }, + "statusCode": "200", + "scripts": { + "scriptingEngine": "postman" + } + }, + "type": "FIXED_RESPONSE" + }, + "type": "response", + "version": 1 + }, + { + "ruleId": 15, + "priority": 15, + "description": "post /bulkTransfers - default path", + "apiVersion": { + "minorVersion": 4, + "majorVersion": 1, + "type": "mojaloop_simulator_inbound", + "hostnames": [ + "ttkpm4mlreceiver-ttk-backend" + ], + "specFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/callback_map.json", + "responseMapFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/response_map.json", + "jsfRefFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/trigger_templates" + }, + "conditions": { + "all": [ + { + "fact": "operationPath", + "operator": "equal", + "value": "/bulkTransfers" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": null, + "path": null, + "params": { + "body": { + "bulkTransferId": "{$request.body.bulkTransferId}", + "homeTransactionId": "{$request.body.homeTransactionId}", + "individualTransferResults": [] + }, + "statusCode": "200", + "scripts": { + "exec": [ + "const reqBody = JSON.parse(request.body)", + "const individualTransferResults = reqBody.individualTransfers.map(transfer => ({", + " transferId: transfer.transferId", + "}))", + "", + "custom.appendEventBody({", + " individualTransferResults", + "})" + ], + "scriptingEngine": "javascript" + } + }, + "type": "FIXED_RESPONSE" + }, + "type": "response", + "version": 1 + } +] \ No newline at end of file diff --git a/test/func/config/ttk-ttksim2/spec_files/rules_validation/config.json b/test/func/config/ttk-ttksim2/spec_files/rules_validation/config.json new file mode 100644 index 000000000..08320e433 --- /dev/null +++ b/test/func/config/ttk-ttksim2/spec_files/rules_validation/config.json @@ -0,0 +1,3 @@ +{ + "activeRulesFile": "default.json" +} diff --git a/test/func/config/ttk-ttksim2/spec_files/rules_validation/default.json b/test/func/config/ttk-ttksim2/spec_files/rules_validation/default.json new file mode 100644 index 000000000..0637a088a --- /dev/null +++ b/test/func/config/ttk-ttksim2/spec_files/rules_validation/default.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/test/func/config/ttk-ttksim2/spec_files/system_config.json b/test/func/config/ttk-ttksim2/spec_files/system_config.json new file mode 100644 index 000000000..383734132 --- /dev/null +++ b/test/func/config/ttk-ttksim2/spec_files/system_config.json @@ -0,0 +1,78 @@ +{ + "API_PORT": 4040, + "HOSTING_ENABLED": false, + "REQUEST_PAYLOAD_MAX_BYTES": 200485760, + "INBOUND_MUTUAL_TLS_ENABLED": false, + "OUTBOUND_MUTUAL_TLS_ENABLED": false, + "CONFIG_VERSIONS": { + "response": 1, + "callback": 1, + "validation": 1, + "forward": 1, + "userSettings": 1 + }, + "DB": { + "URI": "mongodb://ttk:ttk@localhost:27017/ttk" + }, + "OAUTH": { + "AUTH_ENABLED": false, + "APP_OAUTH_CLIENT_KEY": "ttk", + "APP_OAUTH_CLIENT_SECRET": "secret", + "MTA_ROLE": "Application/MTA", + "PTA_ROLE": "Application/PTA", + "EVERYONE_ROLE": "Internal/everyone", + "OAUTH2_TOKEN_ISS": "http://mojaloop-testing-toolkit:5050/api/oauth2/token", + "OAUTH2_ISSUER": "http://mojaloop-testing-toolkit:5050/api/oauth2/token", + "EMBEDDED_CERTIFICATE": "CERTIFICATE" + }, + "CONNECTION_MANAGER": { + "ENABLED": false, + "API_URL": "http://connection-manager-api:5061", + "AUTH_ENABLED": false, + "HUB_USERNAME": "hub", + "HUB_PASSWORD": "hub" + }, + "KEYCLOAK": { + "ENABLED": false, + "API_URL": "http://localhost:8080", + "REALM": "testingtoolkit", + "ADMIN_REALM": "master", + "ADMIN_USERNAME": "admin", + "ADMIN_PASSWORD": "admin", + "ADMIN_CLIENT_ID": "admin-cli" + }, + "SERVER_LOGS": { + "ENABLED": true, + "RESULTS_PAGE_SIZE": 50, + "ADAPTER": { + "TYPE": "ELASTICSEARCH", + "INDEX": "moja*", + "API_URL": "http://dev1-elasticsearch.mojaloop.live/" + } + }, + "HTTP_CLIENT": { + "KEEP_ALIVE": true, + "MAX_SOCKETS": 50, + "UNUSED_AGENTS_EXPIRY_MS": 1800000, + "UNUSED_AGENTS_CHECK_TIMER_MS": 300000 + }, + "INIT_CONFIG": { + "objectStore": {} + }, + "API_DEFINITIONS": [ + { + "type": "mojaloop_simulator_inbound", + "version": "1.4", + "folderPath": "mojaloop_simulator_sim_1.4", + "asynchronous": true + }, + { + "type": "scheme_adapter_outbound", + "version": "1.0", + "folderPath": "mojaloop_sdk_outbound_scheme_adapter_1.0", + "hostnames": [], + "prefix": "/sdk-out", + "asynchronous": true + } + ] +} \ No newline at end of file diff --git a/test/func/config/ttk-ttksim2/spec_files/user_config.json b/test/func/config/ttk-ttksim2/spec_files/user_config.json new file mode 100644 index 000000000..ecc607cbe --- /dev/null +++ b/test/func/config/ttk-ttksim2/spec_files/user_config.json @@ -0,0 +1,47 @@ +{ + "VERSION": 1, + "CALLBACK_ENDPOINT": "http://ttksim2-sdk-api-svc:4001", + "MONITORING_LOG_INCLUDE_PAYLOAD": false, + "CALLBACK_RESOURCE_ENDPOINTS": { + "enabled": false, + "endpoints": [] + }, + "HUB_ONLY_MODE": false, + "ENDPOINTS_DFSP_WISE": { + "dfsps": {} + }, + "SEND_CALLBACK_ENABLE": true, + "FSPID": "switch", + "DEFAULT_USER_FSPID": "userdfsp", + "TRANSFERS_VALIDATION_WITH_PREVIOUS_QUOTES": false, + "TRANSFERS_VALIDATION_ILP_PACKET": false, + "TRANSFERS_VALIDATION_CONDITION": false, + "ILP_SECRET": "secret", + "VERSIONING_SUPPORT_ENABLE": true, + "VALIDATE_INBOUND_JWS": false, + "VALIDATE_INBOUND_PUT_PARTIES_JWS": false, + "JWS_SIGN": false, + "JWS_SIGN_PUT_PARTIES": false, + "CLIENT_MUTUAL_TLS_ENABLED": false, + "ADVANCED_FEATURES_ENABLED": true, + "CALLBACK_TIMEOUT": 60000, + "DEFAULT_REQUEST_TIMEOUT": 60000, + "SCRIPT_TIMEOUT": 60000, + "LOG_SERVER_UI_URL": "http://url-here", + "UI_CONFIGURATION": { + "MOBILE_SIMULATOR": { + "HUB_CONSOLE_ENABLED": true + } + }, + "CLIENT_TLS_CREDS": [], + "GITHUB_CONFIG": { + "TEST_CASES_REPO_OWNER": "mojaloop", + "TEST_CASES_REPO_NAME": "testing-toolkit-test-cases", + "TEST_CASES_REPO_DEFAULT_RELEASE_TAG": "latest", + "TEST_CASES_REPO_BASE_PATH": "collections/dfsp", + "TEST_CASES_REPO_HUB_GP_PATH": "collections/hub/golden_path", + "TEST_CASES_REPO_HUB_PROVISIONING_PATH": "collections/hub/provisioning" + }, + "DEFAULT_ENVIRONMENT_FILE_NAME": "dfsp_local_environment.json", + "LABELS": [] +} \ No newline at end of file diff --git a/test/func/config/ttk-ttksim3/spec_files/api_definitions/mojaloop_sdk_outbound_scheme_adapter_1.0/api_spec.yaml b/test/func/config/ttk-ttksim3/spec_files/api_definitions/mojaloop_sdk_outbound_scheme_adapter_1.0/api_spec.yaml new file mode 100644 index 000000000..36af3efc4 --- /dev/null +++ b/test/func/config/ttk-ttksim3/spec_files/api_definitions/mojaloop_sdk_outbound_scheme_adapter_1.0/api_spec.yaml @@ -0,0 +1,5136 @@ +openapi: 3.0.1 +info: + title: Mojaloop SDK Outbound Scheme Adapter API + description: > + Specification for the Mojaloop SDK Scheme Adapter Outbound Transfers API + + + This API can be used by DFSP backends to simplify the process of sending + funds to other parties within a Mojaloop scheme. + + + Please see other documentation on + https://github.com/mojaloop/sdk-scheme-adapter for more information. + + + **Note on terminology:** The term "Switch" is equal to the term "Hub", and + the term "FSP" is equal to the term "DFSP". + license: + name: Apache License Version 2.0, January 2004 + url: https://github.com/mojaloop/documentation/blob/master/LICENSE.md + version: 1.0.0 +paths: + /: + get: + summary: Health check endpoint + description: >- + This endpoint allows a user of the SDK scheme adapter to check the + outbound transfers service is listening. + tags: + - Health + responses: + '200': + description: >- + Returns empty body if the scheme adapter outbound transfers service + is running. + /transfers: + post: + summary: Sends money from one account to another + description: > + The HTTP request `POST /transfers` is used to request the movement of + funds from payer DFSP to payee DFSP. + + The underlying Mojaloop API has three stages for money transfer: + + 1. Party lookup. This facilitates a check by the sending party that the destination party is correct before proceeding with a money movement. + 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. + 3. Transfer. The enactment of the previously agreed "contract" + + This method has several modes of operation. + + - If the configuration variables `AUTO_ACCEPT_PARTIES` is set to + `"false"` this method will terminate when the payee party has been + resolved and return the payee party details. + 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. + The scheme adapter will then proceed with quotation stage... + + - If the configuration variable `AUTO_ACCEPT_QUOTES` is set to `"false"` + this method will terminate and return the quotation when it has been + received from the payee DFSP. + 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. + The scheme adapter will then proceed with the transfer state. + + If the configuration variables `AUTO_ACCEPT_PARTIES` and + `AUTO_ACCEPT_QUOTES` are both set to `"true"` this method will block + until all three transfer stages are complete. Upon completion it will + return the entire set of transfer details received during the operation. + + + Combinations of settings for `AUTO_ACCEPT...` configuration variables + allow the scheme adapter user to decide which mode of operation best + suits their use cases. i.e. the scheme adapter can be configured to + "break" the three stage transfer at these points in order to execute + backend logic such as party verification, quoted fees assessments etc... + tags: + - Transfers + requestBody: + description: Transfer request body + content: + application/json: + schema: + type: object + required: &ref_70 + - homeTransactionId + - from + - to + - amountType + - currency + - amount + - transactionType + properties: &ref_71 + homeTransactionId: + type: string + description: >- + Transaction ID from the DFSP backend, used to reconcile + transactions between the Switch and DFSP backend systems. + from: + type: object + required: &ref_0 + - idType + - idValue + properties: &ref_1 + type: + title: TransactionInitiatorType + type: string + enum: &ref_52 + - CONSUMER + - AGENT + - BUSINESS + - DEVICE + description: >- + Below are the allowed values for the enumeration. + + - CONSUMER - Consumer is the initiator of the + transaction. + + - AGENT - Agent is the initiator of the transaction. + + - BUSINESS - Business is the initiator of the + transaction. + + - DEVICE - Device is the initiator of the transaction. + example: CONSUMER + idType: + title: PartyIdType + type: string + enum: &ref_23 + - MSISDN + - EMAIL + - PERSONAL_ID + - BUSINESS + - DEVICE + - ACCOUNT_ID + - IBAN + - ALIAS + description: >- + Below are the allowed values for the enumeration. + + - MSISDN - An MSISDN (Mobile Station International + Subscriber Directory Number, that is, the phone number) + is used as reference to a participant. The MSISDN + identifier should be in international format according + to the [ITU-T E.164 + standard](https://www.itu.int/rec/T-REC-E.164/en). + Optionally, the MSISDN may be prefixed by a single plus + sign, indicating the international prefix. + + - EMAIL - An email is used as reference to a + participant. The format of the email should be according + to the informational [RFC + 3696](https://tools.ietf.org/html/rfc3696). + + - PERSONAL_ID - A personal identifier is used as + reference to a participant. Examples of personal + identification are passport number, birth certificate + number, and national registration number. The identifier + number is added in the PartyIdentifier element. The + personal identifier type is added in the + PartySubIdOrType element. + + - BUSINESS - A specific Business (for example, an + organization or a company) is used as reference to a + participant. The BUSINESS identifier can be in any + format. To make a transaction connected to a specific + username or bill number in a Business, the + PartySubIdOrType element should be used. + + - DEVICE - A specific device (for example, a POS or ATM) + ID connected to a specific business or organization is + used as reference to a Party. For referencing a specific + device under a specific business or organization, use + the PartySubIdOrType element. + + - ACCOUNT_ID - A bank account number or FSP account ID + should be used as reference to a participant. The + ACCOUNT_ID identifier can be in any format, as formats + can greatly differ depending on country and FSP. + + - IBAN - A bank account number or FSP account ID is used + as reference to a participant. The IBAN identifier can + consist of up to 34 alphanumeric characters and should + be entered without whitespace. + + - ALIAS An alias is used as reference to a participant. + The alias should be created in the FSP as an alternative + reference to an account owner. Another example of an + alias is a username in the FSP system. The ALIAS + identifier can be in any format. It is also possible to + use the PartySubIdOrType element for identifying an + account under an Alias defined by the PartyIdentifier. + idValue: + title: PartyIdentifier + type: string + minLength: 1 + maxLength: 128 + description: Identifier of the Party. + example: '16135551212' + idSubValue: + title: PartySubIdOrType + type: string + minLength: 1 + maxLength: 128 + description: >- + Either a sub-identifier of a PartyIdentifier, or a + sub-type of the PartyIdType, normally a + PersonalIdentifierType. + displayName: + title: Name + type: string + pattern: ^(?!\s*$)[\w .,'-]{1,128}$ + description: >- + The API data type Name is a JSON String, restricted by a + regular expression to avoid characters which are + generally not used in a name. + + + Regular Expression - The regular expression for + restricting the Name type is "^(?!\s*$)[\w + .,'-]{1,128}$". The restriction does not allow a string + consisting of whitespace only, all Unicode characters + are allowed, as well as the period (.) (apostrophe (‘), + dash (-), comma (,) and space characters ( ). + + + **Note:** In some programming languages, Unicode support + must be specifically enabled. For example, if Java is + used, the flag UNICODE_CHARACTER_CLASS must be enabled + to allow Unicode characters. + firstName: + title: FirstName + type: string + minLength: 1 + maxLength: 128 + pattern: >- + ^(?!\s*$)[\p{L}\p{gc=Mark}\p{digit}\p{gc=Connector_Punctuation}\p{Join_Control} + .,''-]{1,128}$ + description: First name of the Party (Name Type). + example: Henrik + middleName: + title: MiddleName + type: string + minLength: 1 + maxLength: 128 + pattern: >- + ^(?!\s*$)[\p{L}\p{gc=Mark}\p{digit}\p{gc=Connector_Punctuation}\p{Join_Control} + .,''-]{1,128}$ + description: Middle name of the Party (Name Type). + example: Johannes + lastName: + title: LastName + type: string + minLength: 1 + maxLength: 128 + pattern: >- + ^(?!\s*$)[\p{L}\p{gc=Mark}\p{digit}\p{gc=Connector_Punctuation}\p{Join_Control} + .,''-]{1,128}$ + description: Last name of the Party (Name Type). + example: Karlsson + dateOfBirth: + title: DateofBirth (type Date) + type: string + pattern: >- + ^(?:[1-9]\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\d|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-02-29)$ + description: Date of Birth of the Party. + example: '1966-06-16' + merchantClassificationCode: + title: MerchantClassificationCode + type: string + pattern: ^[\d]{1,4}$ + description: >- + A limited set of pre-defined numbers. This list would be + a limited set of numbers identifying a set of popular + merchant types like School Fees, Pubs and Restaurants, + Groceries, etc. + fspId: + title: FspId + type: string + minLength: 1 + maxLength: 32 + description: FSP identifier. + extensionList: + type: array + items: &ref_2 + title: Extension + type: object + description: Data model for the complex type Extension. + properties: &ref_8 + key: + title: ExtensionKey + type: string + minLength: 1 + maxLength: 32 + description: Extension key. + value: + title: ExtensionValue + type: string + minLength: 1 + maxLength: 128 + description: Extension value. + required: &ref_9 + - key + - value + minItems: 0 + maxItems: 16 + to: + type: object + required: *ref_0 + properties: *ref_1 + amountType: + title: AmountType + type: string + enum: &ref_3 + - SEND + - RECEIVE + description: >- + Below are the allowed values for the enumeration AmountType. + + - SEND - Amount the Payer would like to send, that is, the + amount that should be withdrawn from the Payer account + including any fees. + + - RECEIVE - Amount the Payer would like the Payee to + receive, that is, the amount that should be sent to the + receiver exclusive of any fees. + example: RECEIVE + currency: + title: Currency + description: >- + The currency codes defined in [ISO + 4217](https://www.iso.org/iso-4217-currency-codes.html) as + three-letter alphabetic codes are used as the standard + naming representation for currencies. + type: string + minLength: 3 + maxLength: 3 + enum: &ref_4 + - AED + - AFN + - ALL + - AMD + - ANG + - AOA + - ARS + - AUD + - AWG + - AZN + - BAM + - BBD + - BDT + - BGN + - BHD + - BIF + - BMD + - BND + - BOB + - BRL + - BSD + - BTN + - BWP + - BYN + - BZD + - CAD + - CDF + - CHF + - CLP + - CNY + - COP + - CRC + - CUC + - CUP + - CVE + - CZK + - DJF + - DKK + - DOP + - DZD + - EGP + - ERN + - ETB + - EUR + - FJD + - FKP + - GBP + - GEL + - GGP + - GHS + - GIP + - GMD + - GNF + - GTQ + - GYD + - HKD + - HNL + - HRK + - HTG + - HUF + - IDR + - ILS + - IMP + - INR + - IQD + - IRR + - ISK + - JEP + - JMD + - JOD + - JPY + - KES + - KGS + - KHR + - KMF + - KPW + - KRW + - KWD + - KYD + - KZT + - LAK + - LBP + - LKR + - LRD + - LSL + - LYD + - MAD + - MDL + - MGA + - MKD + - MMK + - MNT + - MOP + - MRO + - MUR + - MVR + - MWK + - MXN + - MYR + - MZN + - NAD + - NGN + - NIO + - NOK + - NPR + - NZD + - OMR + - PAB + - PEN + - PGK + - PHP + - PKR + - PLN + - PYG + - QAR + - RON + - RSD + - RUB + - RWF + - SAR + - SBD + - SCR + - SDG + - SEK + - SGD + - SHP + - SLL + - SOS + - SPL + - SRD + - STD + - SVC + - SYP + - SZL + - THB + - TJS + - TMT + - TND + - TOP + - TRY + - TTD + - TVD + - TWD + - TZS + - UAH + - UGX + - USD + - UYU + - UZS + - VEF + - VND + - VUV + - WST + - XAF + - XCD + - XDR + - XOF + - XPF + - XTS + - XXX + - YER + - ZAR + - ZMW + - ZWD + amount: + title: Amount + type: string + pattern: ^([0]|([1-9][0-9]{0,17}))([.][0-9]{0,3}[1-9])?$ + description: >- + The API data type Amount is a JSON String in a canonical + format that is restricted by a regular expression for + interoperability reasons. This pattern does not allow any + trailing zeroes at all, but allows an amount without a minor + currency unit. It also only allows four digits in the minor + currency unit; a negative value is not allowed. Using more + than 18 digits in the major currency unit is not allowed. + example: '123.45' + transactionType: + title: transferTransactionType + type: string + enum: &ref_5 + - TRANSFER + description: Type of transaction. + note: + title: Note + type: string + minLength: 1 + maxLength: 128 + description: Memo assigned to transaction. + example: Note sent to Payee. + quoteRequestExtensions: + type: array + items: *ref_2 + minItems: 0 + maxItems: 16 + transferRequestExtensions: + type: array + items: *ref_2 + minItems: 0 + maxItems: 16 + skipPartyLookup: + description: >- + Set to true if supplying an FSPID for the payee party and no + party resolution is needed. This may be useful is a previous + party resolution has been performed. + type: boolean + required: true + responses: + '200': + description: Transfer completed successfully + content: &ref_15 + application/json: + schema: + type: object + required: &ref_12 + - homeTransactionId + - from + - to + - amountType + - currency + - amount + - transactionType + properties: &ref_13 + transferId: + title: CorrelationId + type: string + pattern: >- + ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + description: >- + Identifier that correlates all messages of the same + sequence. The API data type UUID (Universally Unique + Identifier) is a JSON String in canonical format, + conforming to [RFC + 4122](https://tools.ietf.org/html/rfc4122), that is + restricted by a regular expression for interoperability + reasons. A UUID is always 36 characters long, 32 + hexadecimal symbols and 4 dashes (‘-‘). + example: b51ec534-ee48-4575-b6a9-ead2955b8069 + homeTransactionId: + type: string + description: >- + Transaction ID from the DFSP backend, used to reconcile + transactions between the Switch and DFSP backend systems. + from: + type: object + required: *ref_0 + properties: *ref_1 + to: + type: object + required: *ref_0 + properties: *ref_1 + amountType: + title: AmountType + type: string + enum: *ref_3 + description: >- + Below are the allowed values for the enumeration + AmountType. + + - SEND - Amount the Payer would like to send, that is, the + amount that should be withdrawn from the Payer account + including any fees. + + - RECEIVE - Amount the Payer would like the Payee to + receive, that is, the amount that should be sent to the + receiver exclusive of any fees. + example: RECEIVE + currency: + title: Currency + description: >- + The currency codes defined in [ISO + 4217](https://www.iso.org/iso-4217-currency-codes.html) as + three-letter alphabetic codes are used as the standard + naming representation for currencies. + type: string + minLength: 3 + maxLength: 3 + enum: *ref_4 + amount: + title: Amount + type: string + pattern: ^([0]|([1-9][0-9]{0,17}))([.][0-9]{0,3}[1-9])?$ + description: >- + The API data type Amount is a JSON String in a canonical + format that is restricted by a regular expression for + interoperability reasons. This pattern does not allow any + trailing zeroes at all, but allows an amount without a + minor currency unit. It also only allows four digits in + the minor currency unit; a negative value is not allowed. + Using more than 18 digits in the major currency unit is + not allowed. + example: '123.45' + transactionType: + title: transferTransactionType + type: string + enum: *ref_5 + description: Type of transaction. + note: + title: Note + type: string + minLength: 1 + maxLength: 128 + description: Memo assigned to transaction. + example: Note sent to Payee. + currentState: + type: string + enum: &ref_19 + - ERROR_OCCURRED + - WAITING_FOR_PARTY_ACCEPTANCE + - WAITING_FOR_QUOTE_ACCEPTANCE + - COMPLETED + quoteId: + title: CorrelationId + type: string + pattern: >- + ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + description: >- + Identifier that correlates all messages of the same + sequence. The API data type UUID (Universally Unique + Identifier) is a JSON String in canonical format, + conforming to [RFC + 4122](https://tools.ietf.org/html/rfc4122), that is + restricted by a regular expression for interoperability + reasons. A UUID is always 36 characters long, 32 + hexadecimal symbols and 4 dashes (‘-‘). + example: b51ec534-ee48-4575-b6a9-ead2955b8069 + getPartiesResponse: + type: object + required: + - body + properties: + body: + type: object + headers: + type: object + quoteResponse: + type: object + required: + - body + properties: + body: + title: QuotesIDPutResponse + type: object + description: The object sent in the PUT /quotes/{ID} callback. + properties: &ref_56 + transferAmount: + title: Money + type: object + description: Data model for the complex type Money. + properties: &ref_6 + currency: + title: Currency + description: >- + The currency codes defined in [ISO + 4217](https://www.iso.org/iso-4217-currency-codes.html) + as three-letter alphabetic codes are used as + the standard naming representation for + currencies. + type: string + minLength: 3 + maxLength: 3 + enum: *ref_4 + amount: + title: Amount + type: string + pattern: >- + ^([0]|([1-9][0-9]{0,17}))([.][0-9]{0,3}[1-9])?$ + description: >- + The API data type Amount is a JSON String in a + canonical format that is restricted by a + regular expression for interoperability + reasons. This pattern does not allow any + trailing zeroes at all, but allows an amount + without a minor currency unit. It also only + allows four digits in the minor currency unit; + a negative value is not allowed. Using more + than 18 digits in the major currency unit is + not allowed. + example: '123.45' + required: &ref_7 + - currency + - amount + payeeReceiveAmount: + title: Money + type: object + description: Data model for the complex type Money. + properties: *ref_6 + required: *ref_7 + payeeFspFee: + title: Money + type: object + description: Data model for the complex type Money. + properties: *ref_6 + required: *ref_7 + payeeFspCommission: + title: Money + type: object + description: Data model for the complex type Money. + properties: *ref_6 + required: *ref_7 + expiration: + title: DateTime + type: string + pattern: >- + ^(?:[1-9]\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\d|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-02-29)T(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:(\.\d{3}))(?:Z|[+-][01]\d:[0-5]\d)$ + description: >- + The API data type DateTime is a JSON String in a + lexical format that is restricted by a regular + expression for interoperability reasons. The + format is according to [ISO + 8601](https://www.iso.org/iso-8601-date-and-time-format.html), + expressed in a combined date, time and time zone + format. A more readable version of the format is + yyyy-MM-ddTHH:mm:ss.SSS[-HH:MM]. Examples are + "2016-05-24T08:38:08.699-04:00", + "2016-05-24T08:38:08.699Z" (where Z indicates Zulu + time zone, same as UTC). + example: '2016-05-24T08:38:08.699-04:00' + geoCode: + title: GeoCode + type: object + description: >- + Data model for the complex type GeoCode. Indicates + the geographic location from where the transaction + was initiated. + properties: &ref_44 + latitude: + title: Latitude + type: string + pattern: >- + ^(\+|-)?(?:90(?:(?:\.0{1,6})?)|(?:[0-9]|[1-8][0-9])(?:(?:\.[0-9]{1,6})?))$ + description: >- + The API data type Latitude is a JSON String in + a lexical format that is restricted by a + regular expression for interoperability + reasons. + example: '+45.4215' + longitude: + title: Longitude + type: string + pattern: >- + ^(\+|-)?(?:180(?:(?:\.0{1,6})?)|(?:[0-9]|[1-9][0-9]|1[0-7][0-9])(?:(?:\.[0-9]{1,6})?))$ + description: >- + The API data type Longitude is a JSON String + in a lexical format that is restricted by a + regular expression for interoperability + reasons. + example: '+75.6972' + required: &ref_45 + - latitude + - longitude + ilpPacket: + title: IlpPacket + type: string + pattern: ^[A-Za-z0-9-_]+[=]{0,2}$ + minLength: 1 + maxLength: 32768 + description: >- + Information for recipient (transport layer + information). + example: >- + AYIBgQAAAAAAAASwNGxldmVsb25lLmRmc3AxLm1lci45T2RTOF81MDdqUUZERmZlakgyOVc4bXFmNEpLMHlGTFGCAUBQU0svMS4wCk5vbmNlOiB1SXlweUYzY3pYSXBFdzVVc05TYWh3CkVuY3J5cHRpb246IG5vbmUKUGF5bWVudC1JZDogMTMyMzZhM2ItOGZhOC00MTYzLTg0NDctNGMzZWQzZGE5OGE3CgpDb250ZW50LUxlbmd0aDogMTM1CkNvbnRlbnQtVHlwZTogYXBwbGljYXRpb24vanNvbgpTZW5kZXItSWRlbnRpZmllcjogOTI4MDYzOTEKCiJ7XCJmZWVcIjowLFwidHJhbnNmZXJDb2RlXCI6XCJpbnZvaWNlXCIsXCJkZWJpdE5hbWVcIjpcImFsaWNlIGNvb3BlclwiLFwiY3JlZGl0TmFtZVwiOlwibWVyIGNoYW50XCIsXCJkZWJpdElkZW50aWZpZXJcIjpcIjkyODA2MzkxXCJ9IgA + condition: + title: IlpCondition + type: string + pattern: ^[A-Za-z0-9-_]{43}$ + maxLength: 48 + description: >- + Condition that must be attached to the transfer by + the Payer. + extensionList: + title: ExtensionList + type: object + description: >- + Data model for the complex type ExtensionList. An + optional list of extensions, specific to + deployment. + properties: &ref_10 + extension: + type: array + items: + title: Extension + type: object + description: Data model for the complex type Extension. + properties: *ref_8 + required: *ref_9 + minItems: 1 + maxItems: 16 + description: Number of Extension elements. + required: &ref_11 + - extension + required: &ref_57 + - transferAmount + - expiration + - ilpPacket + - condition + headers: + type: object + quoteResponseSource: + type: string + description: > + FSPID of the entity that supplied the quote response. This + may not be the same as the FSPID of the entity which owns + the end user account in the case of a FOREX transfer. i.e. + it may be a FOREX gateway. + fulfil: + type: object + required: + - body + properties: + body: + title: TransfersIDPutResponse + type: object + description: The object sent in the PUT /transfers/{ID} callback. + properties: &ref_20 + fulfilment: + title: IlpFulfilment + type: string + pattern: ^[A-Za-z0-9-_]{43}$ + maxLength: 48 + description: >- + Fulfilment that must be attached to the transfer + by the Payee. + example: WLctttbu2HvTsa1XWvUoGRcQozHsqeu9Ahl2JW9Bsu8 + completedTimestamp: + title: DateTime + type: string + pattern: >- + ^(?:[1-9]\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\d|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-02-29)T(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:(\.\d{3}))(?:Z|[+-][01]\d:[0-5]\d)$ + description: >- + The API data type DateTime is a JSON String in a + lexical format that is restricted by a regular + expression for interoperability reasons. The + format is according to [ISO + 8601](https://www.iso.org/iso-8601-date-and-time-format.html), + expressed in a combined date, time and time zone + format. A more readable version of the format is + yyyy-MM-ddTHH:mm:ss.SSS[-HH:MM]. Examples are + "2016-05-24T08:38:08.699-04:00", + "2016-05-24T08:38:08.699Z" (where Z indicates Zulu + time zone, same as UTC). + example: '2016-05-24T08:38:08.699-04:00' + transferState: + title: TransferState + type: string + enum: &ref_27 + - RECEIVED + - RESERVED + - COMMITTED + - ABORTED + description: >- + Below are the allowed values for the enumeration. + + - RECEIVED - Next ledger has received the + transfer. + + - RESERVED - Next ledger has reserved the + transfer. + + - COMMITTED - Next ledger has successfully + performed the transfer. + + - ABORTED - Next ledger has aborted the transfer + due to a rejection or failure to perform the + transfer. + example: RESERVED + extensionList: + title: ExtensionList + type: object + description: >- + Data model for the complex type ExtensionList. An + optional list of extensions, specific to + deployment. + properties: *ref_10 + required: *ref_11 + required: &ref_21 + - transferState + headers: + type: object + lastError: + description: >- + This object represents a Mojaloop API error received at + any time during the transfer process + type: object + properties: &ref_26 + httpStatusCode: + type: integer + description: >- + The HTTP status code returned to the caller. This is + the same as the actual HTTP status code returned with + the response. + mojaloopError: + description: >- + If a transfer process results in an error callback + during the asynchronous Mojaloop API exchange, this + property will contain the underlying Mojaloop API + error object. + type: object + properties: &ref_36 + errorInformation: + title: ErrorInformation + type: object + description: Data model for the complex type ErrorInformation. + properties: &ref_63 + errorCode: + title: ErrorCode + type: string + pattern: ^[1-9]\d{3}$ + description: >- + The API data type ErrorCode is a JSON String + of four characters, consisting of digits only. + Negative numbers are not allowed. A leading + zero is not allowed. Each error code in the + API is a four-digit number, for example, 1234, + where the first number (1 in the example) + represents the high-level error category, the + second number (2 in the example) represents + the low-level error category, and the last two + numbers (34 in the example) represent the + specific error. + example: '5100' + errorDescription: + title: ErrorDescription + type: string + minLength: 1 + maxLength: 128 + description: Error description string. + extensionList: + title: ExtensionList + type: object + description: >- + Data model for the complex type ExtensionList. + An optional list of extensions, specific to + deployment. + properties: *ref_10 + required: *ref_11 + required: &ref_64 + - errorCode + - errorDescription + skipPartyLookup: + description: >- + Set to true if supplying an FSPID for the payee party and + no party resolution is needed. This may be useful is a + previous party resolution has been performed. + type: boolean + '400': + description: Malformed or missing required body, headers or parameters + content: &ref_143 + application/json: + schema: + allOf: &ref_14 + - type: object + properties: &ref_22 + statusCode: + type: string + description: Error code as string. + message: + type: string + description: Error message text. + - type: object + required: + - transferState + properties: + transferState: + type: object + required: *ref_12 + properties: *ref_13 + '500': + description: An error occurred processing the transfer + content: &ref_16 + application/json: + schema: + allOf: *ref_14 + '504': + description: Timeout occurred processing the transfer + content: &ref_17 + application/json: + schema: + allOf: *ref_14 + /transfers/{transferId}: + put: + summary: >- + Continues a transfer that has paused at the quote stage in order to + accept or reject payee party and/or quote + description: > + The HTTP request `PUT /transfers/{transferId}` is used to continue a + transfer initiated via the `POST /transfers` method that has halted + after party lookup and/or quotation stage. + + + The request body should contain either the "acceptParty" or + "acceptQuote" property set to `true` as required to continue the + transfer. + + + See the description of the `POST /transfers` HTTP method for more + information on modes of transfer. + tags: + - Transfers + requestBody: + content: + application/json: + schema: + oneOf: + - type: object + required: &ref_28 + - acceptParty + properties: &ref_29 + acceptParty: + type: boolean + enum: + - true + - false + - type: object + required: &ref_32 + - acceptQuote + properties: &ref_33 + acceptQuote: + type: boolean + enum: + - true + - false + parameters: + - name: transferId + in: path + required: true + schema: &ref_18 + title: CorrelationId + type: string + pattern: >- + ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + description: >- + Identifier that correlates all messages of the same sequence. The + API data type UUID (Universally Unique Identifier) is a JSON + String in canonical format, conforming to [RFC + 4122](https://tools.ietf.org/html/rfc4122), that is restricted by + a regular expression for interoperability reasons. A UUID is + always 36 characters long, 32 hexadecimal symbols and 4 dashes + (‘-‘). + example: b51ec534-ee48-4575-b6a9-ead2955b8069 + description: >- + Identifier of the transfer to continue as returned in the response + to a `POST /transfers` request. + responses: + '200': + description: Transfer completed successfully + content: *ref_15 + '500': + description: An error occurred processing the transfer + content: *ref_16 + '504': + description: Timeout occurred processing the transfer + content: *ref_17 + get: + summary: Retrieves information for a specific transfer + description: >- + The HTTP request `GET /transfers/{transferId}` is used to get + information regarding a transfer created or requested earlier. The + `{transferId}` in the URI should contain the `transferId` that was used + for the creation of the transfer. + tags: + - Transfers + parameters: + - name: transferId + in: path + required: true + schema: *ref_18 + description: >- + Identifier of the transfer to continue as returned in the response + to a `POST /transfers` request. + responses: + '200': + description: Transfer information successfully retrieved + content: + application/json: + schema: + type: object + required: &ref_72 + - transferId + - currentState + - fulfil + properties: &ref_73 + transferId: + title: CorrelationId + type: string + pattern: >- + ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + description: >- + Identifier that correlates all messages of the same + sequence. The API data type UUID (Universally Unique + Identifier) is a JSON String in canonical format, + conforming to [RFC + 4122](https://tools.ietf.org/html/rfc4122), that is + restricted by a regular expression for interoperability + reasons. A UUID is always 36 characters long, 32 + hexadecimal symbols and 4 dashes (‘-‘). + example: b51ec534-ee48-4575-b6a9-ead2955b8069 + currentState: + type: string + enum: *ref_19 + fulfil: + type: object + required: + - body + properties: + body: + title: TransfersIDPutResponse + type: object + description: The object sent in the PUT /transfers/{ID} callback. + properties: *ref_20 + required: *ref_21 + headers: + type: object + '500': + description: An error occurred processing the transfer + content: + application/json: + schema: + type: object + properties: *ref_22 + /bulkTransactions: + post: + summary: Sends money from one account to multiple accounts + description: > + The HTTP request `POST /bulkTransactions` is used to request the + movement of funds from payer DFSP to payees' DFSP. + tags: + - BulkTransactions + requestBody: + description: Bulk transfer request body + content: + application/json: + schema: + type: object + required: &ref_88 + - bulkTransactionId + - bulkHomeTransactionID + - options + - from + - individualTransfers + properties: &ref_89 + bulkHomeTransactionID: + type: string + description: >- + Transaction ID from the DFSP backend, used to reconcile + transactions between the Switch and DFSP backend systems. + bulkTransactionId: + title: CorrelationId + type: string + pattern: >- + ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + description: >- + Identifier that correlates all messages of the same + sequence. The API data type UUID (Universally Unique + Identifier) is a JSON String in canonical format, conforming + to [RFC 4122](https://tools.ietf.org/html/rfc4122), that is + restricted by a regular expression for interoperability + reasons. A UUID is always 36 characters long, 32 hexadecimal + symbols and 4 dashes (‘-‘). + example: b51ec534-ee48-4575-b6a9-ead2955b8069 + options: + type: object + required: &ref_80 + - autoAcceptParty + - autoAcceptQuote + - bulkExpiration + properties: &ref_81 + onlyValidateParty: + description: >- + Set to true if only party validation is required. This + means the quotes and transfers will not run. This is + useful for only party resolution. + type: boolean + autoAcceptParty: + type: object + required: &ref_74 + - enabled + properties: &ref_75 + enabled: + type: boolean + enum: + - false + - true + autoAcceptQuote: + description: >- + Set to true if the quote response is accepted without + confirmation from the payer. The fees applied by the + payee will be acceptable to the payer abiding by the + limits set by optional 'perTransferFeeLimits' array. + type: object + oneOf: + - type: object + required: &ref_78 + - enabled + properties: &ref_79 + enabled: + type: boolean + enum: + - true + - false + perTransferFeeLimits: + type: array + minItems: 0 + items: + type: object + required: &ref_76 + - currency + - amount + properties: &ref_77 + currency: + title: Currency + description: >- + The currency codes defined in [ISO + 4217](https://www.iso.org/iso-4217-currency-codes.html) + as three-letter alphabetic codes are used + as the standard naming representation for + currencies. + type: string + minLength: 3 + maxLength: 3 + enum: *ref_4 + amount: + title: Amount + type: string + pattern: >- + ^([0]|([1-9][0-9]{0,17}))([.][0-9]{0,3}[1-9])?$ + description: >- + The API data type Amount is a JSON String + in a canonical format that is restricted + by a regular expression for + interoperability reasons. This pattern + does not allow any trailing zeroes at all, + but allows an amount without a minor + currency unit. It also only allows four + digits in the minor currency unit; a + negative value is not allowed. Using more + than 18 digits in the major currency unit + is not allowed. + example: '123.45' + skipPartyLookup: + description: >- + Set to true if supplying an FSPID for the payee party + and no party resolution is needed. This may be useful if + a previous party resolution has been performed. + type: boolean + synchronous: + description: >- + Set to true if the bulkTransfer requests need be handled + synchronous. Otherwise the requests will be handled + asynchronously, meaning there will be callbacks + whenever the processing is done + type: boolean + bulkExpiration: + title: DateTime + type: string + pattern: >- + ^(?:[1-9]\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\d|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-02-29)T(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:(\.\d{3}))(?:Z|[+-][01]\d:[0-5]\d)$ + description: >- + The API data type DateTime is a JSON String in a lexical + format that is restricted by a regular expression for + interoperability reasons. The format is according to + [ISO + 8601](https://www.iso.org/iso-8601-date-and-time-format.html), + expressed in a combined date, time and time zone format. + A more readable version of the format is + yyyy-MM-ddTHH:mm:ss.SSS[-HH:MM]. Examples are + "2016-05-24T08:38:08.699-04:00", + "2016-05-24T08:38:08.699Z" (where Z indicates Zulu time + zone, same as UTC). + example: '2016-05-24T08:38:08.699-04:00' + from: + title: Party + type: object + description: Data model for the complex type Party. + properties: &ref_24 + partyIdInfo: + title: PartyIdInfo + type: object + description: >- + Data model for the complex type PartyIdInfo. An + ExtensionList element has been added to this reqeust in + version v1.1 + properties: &ref_82 + partyIdType: + title: PartyIdType + type: string + enum: *ref_23 + description: >- + Below are the allowed values for the enumeration. + + - MSISDN - An MSISDN (Mobile Station International + Subscriber Directory Number, that is, the phone + number) is used as reference to a participant. The + MSISDN identifier should be in international format + according to the [ITU-T E.164 + standard](https://www.itu.int/rec/T-REC-E.164/en). + Optionally, the MSISDN may be prefixed by a single + plus sign, indicating the international prefix. + + - EMAIL - An email is used as reference to a + participant. The format of the email should be + according to the informational [RFC + 3696](https://tools.ietf.org/html/rfc3696). + + - PERSONAL_ID - A personal identifier is used as + reference to a participant. Examples of personal + identification are passport number, birth + certificate number, and national registration + number. The identifier number is added in the + PartyIdentifier element. The personal identifier + type is added in the PartySubIdOrType element. + + - BUSINESS - A specific Business (for example, an + organization or a company) is used as reference to a + participant. The BUSINESS identifier can be in any + format. To make a transaction connected to a + specific username or bill number in a Business, the + PartySubIdOrType element should be used. + + - DEVICE - A specific device (for example, a POS or + ATM) ID connected to a specific business or + organization is used as reference to a Party. For + referencing a specific device under a specific + business or organization, use the PartySubIdOrType + element. + + - ACCOUNT_ID - A bank account number or FSP account + ID should be used as reference to a participant. The + ACCOUNT_ID identifier can be in any format, as + formats can greatly differ depending on country and + FSP. + + - IBAN - A bank account number or FSP account ID is + used as reference to a participant. The IBAN + identifier can consist of up to 34 alphanumeric + characters and should be entered without whitespace. + + - ALIAS An alias is used as reference to a + participant. The alias should be created in the FSP + as an alternative reference to an account owner. + Another example of an alias is a username in the FSP + system. The ALIAS identifier can be in any format. + It is also possible to use the PartySubIdOrType + element for identifying an account under an Alias + defined by the PartyIdentifier. + partyIdentifier: + title: PartyIdentifier + type: string + minLength: 1 + maxLength: 128 + description: Identifier of the Party. + example: '16135551212' + partySubIdOrType: + title: PartySubIdOrType + type: string + minLength: 1 + maxLength: 128 + description: >- + Either a sub-identifier of a PartyIdentifier, or a + sub-type of the PartyIdType, normally a + PersonalIdentifierType. + fspId: + title: FspId + type: string + minLength: 1 + maxLength: 32 + description: FSP identifier. + extensionList: + title: ExtensionList + type: object + description: >- + Data model for the complex type ExtensionList. An + optional list of extensions, specific to deployment. + properties: *ref_10 + required: *ref_11 + required: &ref_83 + - partyIdType + - partyIdentifier + merchantClassificationCode: + title: MerchantClassificationCode + type: string + pattern: ^[\d]{1,4}$ + description: >- + A limited set of pre-defined numbers. This list would be + a limited set of numbers identifying a set of popular + merchant types like School Fees, Pubs and Restaurants, + Groceries, etc. + name: + title: PartyName + type: string + minLength: 1 + maxLength: 128 + description: Name of the Party. Could be a real name or a nickname. + personalInfo: + title: PartyPersonalInfo + type: object + description: Data model for the complex type PartyPersonalInfo. + properties: &ref_85 + complexName: + title: PartyComplexName + type: object + description: Data model for the complex type PartyComplexName. + properties: &ref_84 + firstName: + title: FirstName + type: string + minLength: 1 + maxLength: 128 + pattern: >- + ^(?!\s*$)[\p{L}\p{gc=Mark}\p{digit}\p{gc=Connector_Punctuation}\p{Join_Control} + .,''-]{1,128}$ + description: First name of the Party (Name Type). + example: Henrik + middleName: + title: MiddleName + type: string + minLength: 1 + maxLength: 128 + pattern: >- + ^(?!\s*$)[\p{L}\p{gc=Mark}\p{digit}\p{gc=Connector_Punctuation}\p{Join_Control} + .,''-]{1,128}$ + description: Middle name of the Party (Name Type). + example: Johannes + lastName: + title: LastName + type: string + minLength: 1 + maxLength: 128 + pattern: >- + ^(?!\s*$)[\p{L}\p{gc=Mark}\p{digit}\p{gc=Connector_Punctuation}\p{Join_Control} + .,''-]{1,128}$ + description: Last name of the Party (Name Type). + example: Karlsson + dateOfBirth: + title: DateofBirth (type Date) + type: string + pattern: >- + ^(?:[1-9]\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\d|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-02-29)$ + description: Date of Birth of the Party. + example: '1966-06-16' + required: &ref_25 + - partyIdInfo + individualTransfers: + description: List of individual transfers in a bulk transfer. + type: array + minItems: 1 + items: + title: BulkTransactionIndividualTransfer + type: object + description: >- + Data model for the complex type + 'bulkTransactionIndividualTransfer'. + properties: &ref_86 + homeTransactionId: + type: string + description: >- + Transaction ID from the DFSP backend, used to + reconcile transactions between the Switch and DFSP + backend systems. + to: + title: Party + type: object + description: Data model for the complex type Party. + properties: *ref_24 + required: *ref_25 + reference: + description: Payer Loan reference + type: string + amountType: + title: AmountType + type: string + enum: *ref_3 + description: >- + Below are the allowed values for the enumeration + AmountType. + + - SEND - Amount the Payer would like to send, that is, + the amount that should be withdrawn from the Payer + account including any fees. + + - RECEIVE - Amount the Payer would like the Payee to + receive, that is, the amount that should be sent to + the receiver exclusive of any fees. + example: RECEIVE + currency: + title: Currency + description: >- + The currency codes defined in [ISO + 4217](https://www.iso.org/iso-4217-currency-codes.html) + as three-letter alphabetic codes are used as the + standard naming representation for currencies. + type: string + minLength: 3 + maxLength: 3 + enum: *ref_4 + amount: + title: Amount + type: string + pattern: ^([0]|([1-9][0-9]{0,17}))([.][0-9]{0,3}[1-9])?$ + description: >- + The API data type Amount is a JSON String in a + canonical format that is restricted by a regular + expression for interoperability reasons. This pattern + does not allow any trailing zeroes at all, but allows + an amount without a minor currency unit. It also only + allows four digits in the minor currency unit; a + negative value is not allowed. Using more than 18 + digits in the major currency unit is not allowed. + example: '123.45' + note: + title: Note + type: string + minLength: 1 + maxLength: 128 + description: Memo assigned to transaction. + example: Note sent to Payee. + quoteExtensions: + title: ExtensionList + type: object + description: >- + Data model for the complex type ExtensionList. An + optional list of extensions, specific to deployment. + properties: *ref_10 + required: *ref_11 + transferExtensions: + title: ExtensionList + type: object + description: >- + Data model for the complex type ExtensionList. An + optional list of extensions, specific to deployment. + properties: *ref_10 + required: *ref_11 + lastError: + type: object + description: >- + This object represents a Mojaloop API error received + at any time during the transfer process + properties: *ref_26 + required: &ref_87 + - homeTransactionId + - to + - amountType + - currency + - amount + extensions: + title: ExtensionList + type: object + description: >- + Data model for the complex type ExtensionList. An optional + list of extensions, specific to deployment. + properties: *ref_10 + required: *ref_11 + required: true + responses: + '202': + description: Bulk transfer accepted successfully + '400': + description: Malformed or missing required body, headers or parameters + content: &ref_41 + application/json: + schema: + allOf: &ref_92 + - type: object + properties: *ref_22 + - type: object + required: + - bulkTransferState + properties: + bulkTransferState: + type: object + required: &ref_39 + - bulkTransferId + - individualTransferResults + - currentState + properties: &ref_40 + bulkTransferId: + title: CorrelationId + type: string + pattern: >- + ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + description: >- + Identifier that correlates all messages of the + same sequence. The API data type UUID (Universally + Unique Identifier) is a JSON String in canonical + format, conforming to [RFC + 4122](https://tools.ietf.org/html/rfc4122), that + is restricted by a regular expression for + interoperability reasons. A UUID is always 36 + characters long, 32 hexadecimal symbols and 4 + dashes (‘-‘). + example: b51ec534-ee48-4575-b6a9-ead2955b8069 + bulkQuoteId: + title: CorrelationId + type: string + pattern: >- + ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + description: >- + Identifier that correlates all messages of the + same sequence. The API data type UUID (Universally + Unique Identifier) is a JSON String in canonical + format, conforming to [RFC + 4122](https://tools.ietf.org/html/rfc4122), that + is restricted by a regular expression for + interoperability reasons. A UUID is always 36 + characters long, 32 hexadecimal symbols and 4 + dashes (‘-‘). + example: b51ec534-ee48-4575-b6a9-ead2955b8069 + homeTransactionId: + type: string + description: >- + Transaction ID from the DFSP backend, used to + reconcile transactions between the Switch and DFSP + backend systems. + bulkTransferState: + title: TransferState + type: string + enum: *ref_27 + description: >- + Below are the allowed values for the enumeration. + + - RECEIVED - Next ledger has received the + transfer. + + - RESERVED - Next ledger has reserved the + transfer. + + - COMMITTED - Next ledger has successfully + performed the transfer. + + - ABORTED - Next ledger has aborted the transfer + due to a rejection or failure to perform the + transfer. + example: RESERVED + completedTimestamp: + title: DateTime + type: string + pattern: >- + ^(?:[1-9]\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\d|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-02-29)T(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:(\.\d{3}))(?:Z|[+-][01]\d:[0-5]\d)$ + description: >- + The API data type DateTime is a JSON String in a + lexical format that is restricted by a regular + expression for interoperability reasons. The + format is according to [ISO + 8601](https://www.iso.org/iso-8601-date-and-time-format.html), + expressed in a combined date, time and time zone + format. A more readable version of the format is + yyyy-MM-ddTHH:mm:ss.SSS[-HH:MM]. Examples are + "2016-05-24T08:38:08.699-04:00", + "2016-05-24T08:38:08.699Z" (where Z indicates Zulu + time zone, same as UTC). + example: '2016-05-24T08:38:08.699-04:00' + extensionList: + title: ExtensionList + type: object + description: >- + Data model for the complex type ExtensionList. An + optional list of extensions, specific to + deployment. + properties: *ref_10 + required: *ref_11 + currentState: + type: string + enum: &ref_43 + - ERROR_OCCURRED + - COMPLETED + individualTransferResults: + type: array + maxItems: 1000 + items: + type: object + required: &ref_90 + - transferId + properties: &ref_91 + transferId: + title: CorrelationId + type: string + pattern: >- + ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + description: >- + Identifier that correlates all messages of + the same sequence. The API data type UUID + (Universally Unique Identifier) is a JSON + String in canonical format, conforming to + [RFC + 4122](https://tools.ietf.org/html/rfc4122), + that is restricted by a regular expression + for interoperability reasons. A UUID is + always 36 characters long, 32 hexadecimal + symbols and 4 dashes (‘-‘). + example: b51ec534-ee48-4575-b6a9-ead2955b8069 + fulfilment: + description: >- + Fulfilment that must be attached to the + transfer by the Payee. + title: IlpFulfilment + type: string + pattern: ^[A-Za-z0-9-_]{43}$ + maxLength: 48 + example: WLctttbu2HvTsa1XWvUoGRcQozHsqeu9Ahl2JW9Bsu8 + extensionList: + description: >- + Data model for the complex type + ExtensionList. An optional list of + extensions, specific to deployment. + title: ExtensionList + type: object + properties: *ref_10 + required: *ref_11 + lastError: + type: object + description: >- + This object represents a Mojaloop API error + received at any time during the transfer + process + properties: *ref_26 + description: >- + List of individual transfer result in a bulk + transfer response. + '500': + description: Internal Server Error + content: &ref_42 + application/json: + schema: + type: object + properties: *ref_22 + /bulkTransactions/{bulkTransactionId}: + put: + summary: Amends the bulk transaction request + description: >- + The HTTP request `PUT /bulkTransactions/{bulkTransactionId}` is used to + amend information regarding a bulk transaction, i.e. when + autoAcceptParty or autoAcceptQuote is false then the payer need to + provide confirmation to proceed with further processing of the request. + The `{bulkTransactionId}` in the URI should contain the + `bulkTransactionId` that was used for the creation of the bulk transfer. + tags: + - BulkTransactions + parameters: + - name: bulkTransactionId + in: path + required: true + schema: &ref_159 + title: CorrelationId + type: string + pattern: >- + ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + description: >- + Identifier that correlates all messages of the same sequence. The + API data type UUID (Universally Unique Identifier) is a JSON + String in canonical format, conforming to [RFC + 4122](https://tools.ietf.org/html/rfc4122), that is restricted by + a regular expression for interoperability reasons. A UUID is + always 36 characters long, 32 hexadecimal symbols and 4 dashes + (‘-‘). + example: b51ec534-ee48-4575-b6a9-ead2955b8069 + description: >- + Identifier of the bulk transaction to continue as returned in the + response to a `POST /bulkTransaction` request. + requestBody: + description: Bulk transaction request body + content: + application/json: + schema: + oneOf: + - description: >- + The object sent back as confirmation of payee parties when + autoAcceptParty is false. + type: object + required: &ref_34 + - bulkHomeTransactionID + - individualTransfers + properties: &ref_35 + bulkHomeTransactionID: + type: string + description: >- + Transaction ID from the DFSP backend, used to reconcile + transactions between the Switch and DFSP backend + systems. + individualTransfers: + description: >- + List of individual transfers in a bulk transfer with + accept party information. + type: array + minItems: 1 + maxItems: 1000 + items: + allOf: + - type: object + description: >- + Data model for the 'individualTransfer' while + accepting party or quote. + properties: &ref_30 + homeTransactionId: + type: string + description: >- + Transaction ID from the DFSP backend, used to + reconcile transactions between the Switch and + DFSP backend systems. + transactionId: + title: CorrelationId + type: string + pattern: >- + ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + description: >- + Identifier that correlates all messages of the + same sequence. The API data type UUID + (Universally Unique Identifier) is a JSON + String in canonical format, conforming to [RFC + 4122](https://tools.ietf.org/html/rfc4122), + that is restricted by a regular expression for + interoperability reasons. A UUID is always 36 + characters long, 32 hexadecimal symbols and 4 + dashes (‘-‘). + example: b51ec534-ee48-4575-b6a9-ead2955b8069 + required: &ref_31 + - homeTransactionId + - transactionId + - type: object + required: *ref_28 + properties: *ref_29 + - description: >- + The object sent back as confirmation of quotes when + autoAcceptQuotes is false. + type: object + required: &ref_37 + - bulkHomeTransactionID + - individualTransfers + properties: &ref_38 + bulkHomeTransactionID: + type: string + description: >- + Transaction ID from the DFSP backend, used to reconcile + transactions between the Switch and DFSP backend + systems. + individualTransfers: + description: List of individual transfers in a bulk transfer. + type: array + minItems: 1 + maxItems: 1000 + items: + allOf: + - type: object + description: >- + Data model for the 'individualTransfer' while + accepting party or quote. + properties: *ref_30 + required: *ref_31 + - type: object + required: *ref_32 + properties: *ref_33 + required: true + responses: + '202': + description: Bulk transaction information successfully amended + '400': + description: Malformed or missing required body, headers or parameters + content: &ref_144 + application/json: + schema: + oneOf: + - allOf: &ref_94 + - type: object + properties: *ref_22 + - type: object + required: + - bulkTransferState + properties: + bulkTransferState: + allOf: + - description: >- + The object sent back as confirmation of payee + parties when autoAcceptParty is false. + type: object + required: *ref_34 + properties: *ref_35 + - type: object + description: >- + This object represents a Mojaloop API error + received at any time during the party + discovery process + properties: &ref_93 + httpStatusCode: + type: integer + description: >- + The HTTP status code returned to the + caller. This is the same as the actual + HTTP status code returned with the + response. + mojaloopError: + description: >- + If a transfer process results in an error + callback during the asynchronous Mojaloop + API exchange, this property will contain + the underlying Mojaloop API error object. + type: object + properties: *ref_36 + - allOf: &ref_95 + - type: object + properties: *ref_22 + - type: object + required: + - bulkTansferState + properties: + bulkTransferState: + allOf: + - description: >- + The object sent back as confirmation of quotes + when autoAcceptQuotes is false. + type: object + required: *ref_37 + properties: *ref_38 + - type: object + description: >- + This object represents a Mojaloop API error + received at any time during the quote process + properties: &ref_46 + httpStatusCode: + type: integer + description: >- + The HTTP status code returned to the + caller. This is the same as the actual + HTTP status code returned with the + response. + mojaloopError: + description: >- + If a quote process results in an error + callback during the asynchronous Mojaloop + API exchange, this property will contain + the underlying Mojaloop API error object. + type: object + properties: *ref_36 + '500': + description: An error occurred processing the bulk transaction + content: + application/json: + schema: + type: object + properties: *ref_22 + /bulkTransfers: + post: + summary: Sends money from one account to multiple accounts + description: > + The HTTP request `POST /bulkTransfers` is used to request the movement + of funds from payer DFSP to payees' DFSP. + tags: + - BulkTransfers + requestBody: + description: Bulk transfer request body + content: + application/json: + schema: + type: object + required: &ref_98 + - bulkTransferId + - homeTransactionId + - bulkQuoteId + - from + - individualTransfers + properties: &ref_99 + homeTransactionId: + type: string + description: >- + Transaction ID from the DFSP backend, used to reconcile + transactions between the Switch and DFSP backend systems. + bulkTransferId: + title: CorrelationId + type: string + pattern: >- + ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + description: >- + Identifier that correlates all messages of the same + sequence. The API data type UUID (Universally Unique + Identifier) is a JSON String in canonical format, conforming + to [RFC 4122](https://tools.ietf.org/html/rfc4122), that is + restricted by a regular expression for interoperability + reasons. A UUID is always 36 characters long, 32 hexadecimal + symbols and 4 dashes (‘-‘). + example: b51ec534-ee48-4575-b6a9-ead2955b8069 + bulkQuoteId: + title: CorrelationId + type: string + pattern: >- + ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + description: >- + Identifier that correlates all messages of the same + sequence. The API data type UUID (Universally Unique + Identifier) is a JSON String in canonical format, conforming + to [RFC 4122](https://tools.ietf.org/html/rfc4122), that is + restricted by a regular expression for interoperability + reasons. A UUID is always 36 characters long, 32 hexadecimal + symbols and 4 dashes (‘-‘). + example: b51ec534-ee48-4575-b6a9-ead2955b8069 + from: + type: object + required: *ref_0 + properties: *ref_1 + individualTransfers: + description: List of individual transfers in a bulk transfer. + type: array + minItems: 1 + maxItems: 1000 + items: + title: IndividualTransfer + type: object + description: Data model for the complex type 'individualTransfer'. + properties: &ref_96 + transferId: + title: CorrelationId + type: string + pattern: >- + ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + description: >- + Identifier that correlates all messages of the same + sequence. The API data type UUID (Universally Unique + Identifier) is a JSON String in canonical format, + conforming to [RFC + 4122](https://tools.ietf.org/html/rfc4122), that is + restricted by a regular expression for + interoperability reasons. A UUID is always 36 + characters long, 32 hexadecimal symbols and 4 dashes + (‘-‘). + example: b51ec534-ee48-4575-b6a9-ead2955b8069 + to: + type: object + required: *ref_0 + properties: *ref_1 + amountType: + title: AmountType + type: string + enum: *ref_3 + description: >- + Below are the allowed values for the enumeration + AmountType. + + - SEND - Amount the Payer would like to send, that is, + the amount that should be withdrawn from the Payer + account including any fees. + + - RECEIVE - Amount the Payer would like the Payee to + receive, that is, the amount that should be sent to + the receiver exclusive of any fees. + example: RECEIVE + currency: + title: Currency + description: >- + The currency codes defined in [ISO + 4217](https://www.iso.org/iso-4217-currency-codes.html) + as three-letter alphabetic codes are used as the + standard naming representation for currencies. + type: string + minLength: 3 + maxLength: 3 + enum: *ref_4 + amount: + title: Amount + type: string + pattern: ^([0]|([1-9][0-9]{0,17}))([.][0-9]{0,3}[1-9])?$ + description: >- + The API data type Amount is a JSON String in a + canonical format that is restricted by a regular + expression for interoperability reasons. This pattern + does not allow any trailing zeroes at all, but allows + an amount without a minor currency unit. It also only + allows four digits in the minor currency unit; a + negative value is not allowed. Using more than 18 + digits in the major currency unit is not allowed. + example: '123.45' + transactionType: + title: transferTransactionType + type: string + enum: *ref_5 + description: Type of transaction. + ilpPacket: + title: IlpPacket + type: string + pattern: ^[A-Za-z0-9-_]+[=]{0,2}$ + minLength: 1 + maxLength: 32768 + description: >- + Information for recipient (transport layer + information). + example: >- + AYIBgQAAAAAAAASwNGxldmVsb25lLmRmc3AxLm1lci45T2RTOF81MDdqUUZERmZlakgyOVc4bXFmNEpLMHlGTFGCAUBQU0svMS4wCk5vbmNlOiB1SXlweUYzY3pYSXBFdzVVc05TYWh3CkVuY3J5cHRpb246IG5vbmUKUGF5bWVudC1JZDogMTMyMzZhM2ItOGZhOC00MTYzLTg0NDctNGMzZWQzZGE5OGE3CgpDb250ZW50LUxlbmd0aDogMTM1CkNvbnRlbnQtVHlwZTogYXBwbGljYXRpb24vanNvbgpTZW5kZXItSWRlbnRpZmllcjogOTI4MDYzOTEKCiJ7XCJmZWVcIjowLFwidHJhbnNmZXJDb2RlXCI6XCJpbnZvaWNlXCIsXCJkZWJpdE5hbWVcIjpcImFsaWNlIGNvb3BlclwiLFwiY3JlZGl0TmFtZVwiOlwibWVyIGNoYW50XCIsXCJkZWJpdElkZW50aWZpZXJcIjpcIjkyODA2MzkxXCJ9IgA + condition: + title: IlpCondition + type: string + pattern: ^[A-Za-z0-9-_]{43}$ + maxLength: 48 + description: >- + Condition that must be attached to the transfer by the + Payer. + note: + title: Note + type: string + minLength: 1 + maxLength: 128 + description: Memo assigned to transaction. + example: Note sent to Payee. + extensions: + title: ExtensionList + type: object + description: >- + Data model for the complex type ExtensionList. An + optional list of extensions, specific to deployment. + properties: *ref_10 + required: *ref_11 + required: &ref_97 + - transferId + - to + - amountType + - currency + - amount + - ilpPacket + - condition + extensions: + title: ExtensionList + type: object + description: >- + Data model for the complex type ExtensionList. An optional + list of extensions, specific to deployment. + properties: *ref_10 + required: *ref_11 + required: true + responses: + '200': + description: Bulk transfer completed successfully + content: &ref_145 + application/json: + schema: + type: object + required: *ref_39 + properties: *ref_40 + '400': + description: Malformed or missing required body, headers or parameters + content: *ref_41 + '500': + description: Internal Server Error + content: *ref_42 + /bulkTransfers/{bulkTransferId}: + get: + summary: Retrieves information for a specific bulk transfer + description: >- + The HTTP request `GET /bulkTransfers/{bulkTransferId}` is used to get + information regarding a bulk transfer created or requested earlier. The + `{bulkTransferId}` in the URI should contain the `bulkTransferId` that + was used for the creation of the bulk transfer. + tags: + - BulkTransfers + parameters: + - name: bulkTransferId + in: path + required: true + schema: &ref_160 + title: CorrelationId + type: string + pattern: >- + ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + description: >- + Identifier that correlates all messages of the same sequence. The + API data type UUID (Universally Unique Identifier) is a JSON + String in canonical format, conforming to [RFC + 4122](https://tools.ietf.org/html/rfc4122), that is restricted by + a regular expression for interoperability reasons. A UUID is + always 36 characters long, 32 hexadecimal symbols and 4 dashes + (‘-‘). + example: b51ec534-ee48-4575-b6a9-ead2955b8069 + description: >- + Identifier of the bulk transfer to continue as returned in the + response to a `POST /bulkTransfers` request. + responses: + '200': + description: Bulk transfer information successfully retrieved + content: + application/json: + schema: + type: object + required: &ref_101 + - bulkTransferId + - currentState + - fulfils + properties: &ref_102 + bulkTransferId: + title: CorrelationId + type: string + pattern: >- + ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + description: >- + Identifier that correlates all messages of the same + sequence. The API data type UUID (Universally Unique + Identifier) is a JSON String in canonical format, + conforming to [RFC + 4122](https://tools.ietf.org/html/rfc4122), that is + restricted by a regular expression for interoperability + reasons. A UUID is always 36 characters long, 32 + hexadecimal symbols and 4 dashes (‘-‘). + example: b51ec534-ee48-4575-b6a9-ead2955b8069 + currentState: + type: string + enum: *ref_43 + fulfils: + type: array + minItems: 1 + maxItems: 1000 + items: + type: object + description: >- + A Mojaloop API transfer fulfilment for individual + transfers in a bulk transfer + properties: &ref_100 + fulfilment: + description: >- + Fulfilment that must be attached to the transfer by + the Payee. + title: IlpFulfilment + type: string + pattern: ^[A-Za-z0-9-_]{43}$ + maxLength: 48 + example: WLctttbu2HvTsa1XWvUoGRcQozHsqeu9Ahl2JW9Bsu8 + extensionList: + description: >- + Data model for the complex type ExtensionList. An + optional list of extensions, specific to deployment. + title: ExtensionList + type: object + properties: *ref_10 + required: *ref_11 + '500': + description: An error occurred processing the bulk transfer + content: + application/json: + schema: + type: object + properties: *ref_22 + /bulkQuotes: + post: + summary: Request bulk quotes for the provided financial transactions + description: > + The HTTP request `POST /bulkQuotes` is used to request a bulk quote to + fascilitate funds transfer from payer DFSP to payees' DFSP. + tags: + - BulkQuotes + requestBody: + description: Bulk quote request body + content: + application/json: + schema: + type: object + required: &ref_103 + - homeTransactionId + - from + - individualQuotes + properties: &ref_104 + homeTransactionId: + type: string + description: >- + Transaction ID from the DFSP backend, used to reconcile + transactions between the Switch and DFSP backend systems. + bulkQuoteId: + title: CorrelationId + type: string + pattern: >- + ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + description: >- + Identifier that correlates all messages of the same + sequence. The API data type UUID (Universally Unique + Identifier) is a JSON String in canonical format, conforming + to [RFC 4122](https://tools.ietf.org/html/rfc4122), that is + restricted by a regular expression for interoperability + reasons. A UUID is always 36 characters long, 32 hexadecimal + symbols and 4 dashes (‘-‘). + example: b51ec534-ee48-4575-b6a9-ead2955b8069 + from: + type: object + required: *ref_0 + properties: *ref_1 + individualQuotes: + description: List of individual quotes in a bulk quote. + type: array + minItems: 1 + maxItems: 1000 + items: + title: IndividualQuote + type: object + description: Data model for the complex type 'individualQuote'. + properties: &ref_50 + quoteId: + title: CorrelationId + type: string + pattern: >- + ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + description: >- + Identifier that correlates all messages of the same + sequence. The API data type UUID (Universally Unique + Identifier) is a JSON String in canonical format, + conforming to [RFC + 4122](https://tools.ietf.org/html/rfc4122), that is + restricted by a regular expression for + interoperability reasons. A UUID is always 36 + characters long, 32 hexadecimal symbols and 4 dashes + (‘-‘). + example: b51ec534-ee48-4575-b6a9-ead2955b8069 + to: + type: object + required: *ref_0 + properties: *ref_1 + amountType: + title: AmountType + type: string + enum: *ref_3 + description: >- + Below are the allowed values for the enumeration + AmountType. + + - SEND - Amount the Payer would like to send, that is, + the amount that should be withdrawn from the Payer + account including any fees. + + - RECEIVE - Amount the Payer would like the Payee to + receive, that is, the amount that should be sent to + the receiver exclusive of any fees. + example: RECEIVE + currency: + title: Currency + description: >- + The currency codes defined in [ISO + 4217](https://www.iso.org/iso-4217-currency-codes.html) + as three-letter alphabetic codes are used as the + standard naming representation for currencies. + type: string + minLength: 3 + maxLength: 3 + enum: *ref_4 + amount: + title: Amount + type: string + pattern: ^([0]|([1-9][0-9]{0,17}))([.][0-9]{0,3}[1-9])?$ + description: >- + The API data type Amount is a JSON String in a + canonical format that is restricted by a regular + expression for interoperability reasons. This pattern + does not allow any trailing zeroes at all, but allows + an amount without a minor currency unit. It also only + allows four digits in the minor currency unit; a + negative value is not allowed. Using more than 18 + digits in the major currency unit is not allowed. + example: '123.45' + transactionType: + title: transferTransactionType + type: string + enum: *ref_5 + description: Type of transaction. + note: + title: Note + type: string + minLength: 1 + maxLength: 128 + description: Memo assigned to transaction. + example: Note sent to Payee. + extensions: + title: ExtensionList + type: object + description: >- + Data model for the complex type ExtensionList. An + optional list of extensions, specific to deployment. + properties: *ref_10 + required: *ref_11 + required: &ref_51 + - quoteId + - to + - amountType + - currency + - transactionType + - amount + extensions: + title: ExtensionList + type: object + description: >- + Data model for the complex type ExtensionList. An optional + list of extensions, specific to deployment. + properties: *ref_10 + required: *ref_11 + required: true + responses: + '200': + description: Bulk quote completed successfully + content: &ref_146 + application/json: + schema: + type: object + required: &ref_47 + - bulkQuoteId + - individualQuoteResults + - currentState + - expiration + properties: &ref_48 + bulkQuoteId: + title: CorrelationId + type: string + pattern: >- + ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + description: >- + Identifier that correlates all messages of the same + sequence. The API data type UUID (Universally Unique + Identifier) is a JSON String in canonical format, + conforming to [RFC + 4122](https://tools.ietf.org/html/rfc4122), that is + restricted by a regular expression for interoperability + reasons. A UUID is always 36 characters long, 32 + hexadecimal symbols and 4 dashes (‘-‘). + example: b51ec534-ee48-4575-b6a9-ead2955b8069 + homeTransactionId: + type: string + description: >- + Transaction ID from the DFSP backend, used to reconcile + transactions between the Switch and DFSP backend systems. + expiration: + title: DateTime + type: string + pattern: >- + ^(?:[1-9]\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\d|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-02-29)T(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:(\.\d{3}))(?:Z|[+-][01]\d:[0-5]\d)$ + description: >- + The API data type DateTime is a JSON String in a lexical + format that is restricted by a regular expression for + interoperability reasons. The format is according to [ISO + 8601](https://www.iso.org/iso-8601-date-and-time-format.html), + expressed in a combined date, time and time zone format. A + more readable version of the format is + yyyy-MM-ddTHH:mm:ss.SSS[-HH:MM]. Examples are + "2016-05-24T08:38:08.699-04:00", + "2016-05-24T08:38:08.699Z" (where Z indicates Zulu time + zone, same as UTC). + example: '2016-05-24T08:38:08.699-04:00' + extensionList: + title: ExtensionList + type: object + description: >- + Data model for the complex type ExtensionList. An optional + list of extensions, specific to deployment. + properties: *ref_10 + required: *ref_11 + currentState: + type: string + enum: *ref_43 + individualQuoteResults: + type: array + maxItems: 1000 + items: + type: object + properties: &ref_105 + quoteId: + title: CorrelationId + type: string + pattern: >- + ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + description: >- + Identifier that correlates all messages of the same + sequence. The API data type UUID (Universally Unique + Identifier) is a JSON String in canonical format, + conforming to [RFC + 4122](https://tools.ietf.org/html/rfc4122), that is + restricted by a regular expression for + interoperability reasons. A UUID is always 36 + characters long, 32 hexadecimal symbols and 4 dashes + (‘-‘). + example: b51ec534-ee48-4575-b6a9-ead2955b8069 + transferAmount: + title: Money + type: object + description: Data model for the complex type Money. + properties: *ref_6 + required: *ref_7 + payeeReceiveAmount: + title: Money + type: object + description: Data model for the complex type Money. + properties: *ref_6 + required: *ref_7 + payeeFspFee: + title: Money + type: object + description: Data model for the complex type Money. + properties: *ref_6 + required: *ref_7 + payeeFspCommission: + title: Money + type: object + description: Data model for the complex type Money. + properties: *ref_6 + required: *ref_7 + geoCode: + title: GeoCode + type: object + description: >- + Data model for the complex type GeoCode. Indicates + the geographic location from where the transaction + was initiated. + properties: *ref_44 + required: *ref_45 + ilpPacket: + title: IlpPacket + type: string + pattern: ^[A-Za-z0-9-_]+[=]{0,2}$ + minLength: 1 + maxLength: 32768 + description: >- + Information for recipient (transport layer + information). + example: >- + AYIBgQAAAAAAAASwNGxldmVsb25lLmRmc3AxLm1lci45T2RTOF81MDdqUUZERmZlakgyOVc4bXFmNEpLMHlGTFGCAUBQU0svMS4wCk5vbmNlOiB1SXlweUYzY3pYSXBFdzVVc05TYWh3CkVuY3J5cHRpb246IG5vbmUKUGF5bWVudC1JZDogMTMyMzZhM2ItOGZhOC00MTYzLTg0NDctNGMzZWQzZGE5OGE3CgpDb250ZW50LUxlbmd0aDogMTM1CkNvbnRlbnQtVHlwZTogYXBwbGljYXRpb24vanNvbgpTZW5kZXItSWRlbnRpZmllcjogOTI4MDYzOTEKCiJ7XCJmZWVcIjowLFwidHJhbnNmZXJDb2RlXCI6XCJpbnZvaWNlXCIsXCJkZWJpdE5hbWVcIjpcImFsaWNlIGNvb3BlclwiLFwiY3JlZGl0TmFtZVwiOlwibWVyIGNoYW50XCIsXCJkZWJpdElkZW50aWZpZXJcIjpcIjkyODA2MzkxXCJ9IgA + condition: + title: IlpCondition + type: string + pattern: ^[A-Za-z0-9-_]{43}$ + maxLength: 48 + description: >- + Condition that must be attached to the transfer by + the Payer. + extensionList: + description: >- + Data model for the complex type ExtensionList. An + optional list of extensions, specific to deployment. + title: ExtensionList + type: object + properties: *ref_10 + required: *ref_11 + lastError: + description: >- + This object represents a Mojaloop API error received + at any time during the quote process + type: object + properties: *ref_46 + required: &ref_106 + - quoteId + - transferAmount + - ilpPacket + - condition + description: >- + List of individualQuoteResults in a bulk transfer + response. + '400': + description: Malformed or missing required body, headers or parameters + content: &ref_147 + application/json: + schema: + allOf: &ref_49 + - type: object + properties: *ref_22 + - type: object + required: + - bulkQuoteState + properties: + bulkQuoteState: + type: object + required: *ref_47 + properties: *ref_48 + '500': + description: An error occurred processing the bulk quote + content: &ref_148 + application/json: + schema: + allOf: *ref_49 + '504': + description: Timeout occurred processing the bulk quote + content: &ref_149 + application/json: + schema: + allOf: *ref_49 + /bulkQuotes/{bulkQuoteId}: + get: + summary: Retrieves information for a specific bulk quote + description: >- + The HTTP request `GET /bulkQuotes/{bulktQuoteId}` is used to get + information regarding a bulk quote created or requested earlier. The + `{bulkQuoteId}` in the URI should contain the `bulkQuoteId` that was + used for the creation of the bulk quote. + tags: + - BulkQuotes + parameters: + - name: bulkQuoteId + in: path + required: true + schema: &ref_161 + title: CorrelationId + type: string + pattern: >- + ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + description: >- + Identifier that correlates all messages of the same sequence. The + API data type UUID (Universally Unique Identifier) is a JSON + String in canonical format, conforming to [RFC + 4122](https://tools.ietf.org/html/rfc4122), that is restricted by + a regular expression for interoperability reasons. A UUID is + always 36 characters long, 32 hexadecimal symbols and 4 dashes + (‘-‘). + example: b51ec534-ee48-4575-b6a9-ead2955b8069 + description: >- + Identifier of the bulk transfer to continue as returned in the + response to a `POST /bulkTransfers` request. + responses: + '200': + description: Bulk quote information successfully retrieved + content: + application/json: + schema: + type: object + required: &ref_108 + - bulkQuoteId + - currentState + - individualQuotes + properties: &ref_109 + bulkQuoteId: + title: CorrelationId + type: string + pattern: >- + ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + description: >- + Identifier that correlates all messages of the same + sequence. The API data type UUID (Universally Unique + Identifier) is a JSON String in canonical format, + conforming to [RFC + 4122](https://tools.ietf.org/html/rfc4122), that is + restricted by a regular expression for interoperability + reasons. A UUID is always 36 characters long, 32 + hexadecimal symbols and 4 dashes (‘-‘). + example: b51ec534-ee48-4575-b6a9-ead2955b8069 + currentState: + type: string + enum: &ref_107 + - ERROR_OCCURRED + - COMPLETED + individualQuotes: + type: array + minItems: 1 + maxItems: 1000 + items: + title: IndividualQuote + type: object + description: Data model for the complex type 'individualQuote'. + properties: *ref_50 + required: *ref_51 + '500': + description: An error occurred processing the bulk quote + content: + application/json: + schema: + type: object + properties: *ref_22 + /requestToPay: + post: + summary: Receiver requesting funds from Sender + description: > + The HTTP request `POST /requestToPay` is used to support Pull Funds + pattern where in a receiver can request for funds from the Sender. + + The underlying API has two stages: + + 1. Party lookup. This facilitates a check by the sending party that the destination party is correct before proceeding with a money movement. + 2. Transaction Request. This request enables a Payee to request Payer to send electronic funds to the Payee. + tags: + - RequestToPay + requestBody: + description: RequestToPay request body + content: + application/json: + schema: + type: object + required: &ref_113 + - homeTransactionId + - from + - to + - amountType + - currency + - amount + - scenario + - initiator + - initiatorType + properties: &ref_114 + homeTransactionId: + type: string + description: >- + Transaction ID from the DFSP backend, used to reconcile + transactions between the Switch and DFSP backend systems. + from: + type: object + required: *ref_0 + properties: *ref_1 + to: + type: object + required: *ref_0 + properties: *ref_1 + amountType: + title: AmountType + type: string + enum: *ref_3 + description: >- + Below are the allowed values for the enumeration AmountType. + + - SEND - Amount the Payer would like to send, that is, the + amount that should be withdrawn from the Payer account + including any fees. + + - RECEIVE - Amount the Payer would like the Payee to + receive, that is, the amount that should be sent to the + receiver exclusive of any fees. + example: RECEIVE + currency: + title: Currency + description: >- + The currency codes defined in [ISO + 4217](https://www.iso.org/iso-4217-currency-codes.html) as + three-letter alphabetic codes are used as the standard + naming representation for currencies. + type: string + minLength: 3 + maxLength: 3 + enum: *ref_4 + amount: + title: Amount + type: string + pattern: ^([0]|([1-9][0-9]{0,17}))([.][0-9]{0,3}[1-9])?$ + description: >- + The API data type Amount is a JSON String in a canonical + format that is restricted by a regular expression for + interoperability reasons. This pattern does not allow any + trailing zeroes at all, but allows an amount without a minor + currency unit. It also only allows four digits in the minor + currency unit; a negative value is not allowed. Using more + than 18 digits in the major currency unit is not allowed. + example: '123.45' + scenario: + title: TransactionType + type: object + description: Data model for the complex type TransactionType. + properties: &ref_54 + scenario: + title: TransactionScenario + type: string + enum: &ref_110 + - DEPOSIT + - WITHDRAWAL + - TRANSFER + - PAYMENT + - REFUND + description: >- + Below are the allowed values for the enumeration. + + - DEPOSIT - Used for performing a Cash-In (deposit) + transaction. In a normal scenario, electronic funds are + transferred from a Business account to a Consumer + account, and physical cash is given from the Consumer to + the Business User. + + - WITHDRAWAL - Used for performing a Cash-Out + (withdrawal) transaction. In a normal scenario, + electronic funds are transferred from a Consumer’s + account to a Business account, and physical cash is + given from the Business User to the Consumer. + + - TRANSFER - Used for performing a P2P (Peer to Peer, or + Consumer to Consumer) transaction. + + - PAYMENT - Usually used for performing a transaction + from a Consumer to a Merchant or Organization, but could + also be for a B2B (Business to Business) payment. The + transaction could be online for a purchase in an + Internet store, in a physical store where both the + Consumer and Business User are present, a bill payment, + a donation, and so on. + + - REFUND - Used for performing a refund of transaction. + example: DEPOSIT + subScenario: + title: TransactionSubScenario + type: string + pattern: ^[A-Z_]{1,32}$ + description: >- + Possible sub-scenario, defined locally within the scheme + (UndefinedEnum Type). + example: LOCALLY_DEFINED_SUBSCENARIO + initiator: + title: TransactionInitiator + type: string + enum: &ref_53 + - PAYER + - PAYEE + description: >- + Below are the allowed values for the enumeration. + + - PAYER - Sender of funds is initiating the transaction. + The account to send from is either owned by the Payer or + is connected to the Payer in some way. + + - PAYEE - Recipient of the funds is initiating the + transaction by sending a transaction request. The Payer + must approve the transaction, either automatically by a + pre-generated OTP or by pre-approval of the Payee, or by + manually approving in his or her own Device. + example: PAYEE + initiatorType: + title: TransactionInitiatorType + type: string + enum: *ref_52 + description: >- + Below are the allowed values for the enumeration. + + - CONSUMER - Consumer is the initiator of the + transaction. + + - AGENT - Agent is the initiator of the transaction. + + - BUSINESS - Business is the initiator of the + transaction. + + - DEVICE - Device is the initiator of the transaction. + example: CONSUMER + refundInfo: + title: Refund + type: object + description: Data model for the complex type Refund. + properties: &ref_111 + originalTransactionId: + title: CorrelationId + type: string + pattern: >- + ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + description: >- + Identifier that correlates all messages of the same + sequence. The API data type UUID (Universally Unique + Identifier) is a JSON String in canonical format, + conforming to [RFC + 4122](https://tools.ietf.org/html/rfc4122), that is + restricted by a regular expression for + interoperability reasons. A UUID is always 36 + characters long, 32 hexadecimal symbols and 4 dashes + (‘-‘). + example: b51ec534-ee48-4575-b6a9-ead2955b8069 + refundReason: + title: RefundReason + type: string + minLength: 1 + maxLength: 128 + description: Reason for the refund. + example: Free text indicating reason for the refund. + required: &ref_112 + - originalTransactionId + balanceOfPayments: + title: BalanceOfPayments + type: string + pattern: ^[1-9]\d{2}$ + description: >- + (BopCode) The API data type + [BopCode](https://www.imf.org/external/np/sta/bopcode/) + is a JSON String of 3 characters, consisting of digits + only. Negative numbers are not allowed. A leading zero + is not allowed. + example: '123' + required: &ref_55 + - scenario + - initiator + - initiatorType + initiator: + title: TransactionInitiator + type: string + enum: *ref_53 + description: >- + Below are the allowed values for the enumeration. + + - PAYER - Sender of funds is initiating the transaction. The + account to send from is either owned by the Payer or is + connected to the Payer in some way. + + - PAYEE - Recipient of the funds is initiating the + transaction by sending a transaction request. The Payer must + approve the transaction, either automatically by a + pre-generated OTP or by pre-approval of the Payee, or by + manually approving in his or her own Device. + example: PAYEE + initiatorType: + title: TransactionInitiatorType + type: string + enum: *ref_52 + description: |- + Below are the allowed values for the enumeration. + - CONSUMER - Consumer is the initiator of the transaction. + - AGENT - Agent is the initiator of the transaction. + - BUSINESS - Business is the initiator of the transaction. + - DEVICE - Device is the initiator of the transaction. + example: CONSUMER + required: true + responses: + '200': + description: Request to Pay completed successfully + content: &ref_150 + application/json: + schema: + type: object + required: &ref_117 + - transactionRequestId + - from + - to + - amountType + - currency + - amount + - transactionType + - requestToPayState + properties: &ref_118 + transactionRequestId: + title: CorrelationId + type: string + pattern: >- + ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + description: >- + Identifier that correlates all messages of the same + sequence. The API data type UUID (Universally Unique + Identifier) is a JSON String in canonical format, + conforming to [RFC + 4122](https://tools.ietf.org/html/rfc4122), that is + restricted by a regular expression for interoperability + reasons. A UUID is always 36 characters long, 32 + hexadecimal symbols and 4 dashes (‘-‘). + example: b51ec534-ee48-4575-b6a9-ead2955b8069 + from: + type: object + required: *ref_0 + properties: *ref_1 + to: + type: object + required: *ref_0 + properties: *ref_1 + amountType: + title: AmountType + type: string + enum: *ref_3 + description: >- + Below are the allowed values for the enumeration + AmountType. + + - SEND - Amount the Payer would like to send, that is, the + amount that should be withdrawn from the Payer account + including any fees. + + - RECEIVE - Amount the Payer would like the Payee to + receive, that is, the amount that should be sent to the + receiver exclusive of any fees. + example: RECEIVE + currency: + title: Currency + description: >- + The currency codes defined in [ISO + 4217](https://www.iso.org/iso-4217-currency-codes.html) as + three-letter alphabetic codes are used as the standard + naming representation for currencies. + type: string + minLength: 3 + maxLength: 3 + enum: *ref_4 + amount: + title: Amount + type: string + pattern: ^([0]|([1-9][0-9]{0,17}))([.][0-9]{0,3}[1-9])?$ + description: >- + The API data type Amount is a JSON String in a canonical + format that is restricted by a regular expression for + interoperability reasons. This pattern does not allow any + trailing zeroes at all, but allows an amount without a + minor currency unit. It also only allows four digits in + the minor currency unit; a negative value is not allowed. + Using more than 18 digits in the major currency unit is + not allowed. + example: '123.45' + scenario: + title: TransactionType + type: object + description: Data model for the complex type TransactionType. + properties: *ref_54 + required: *ref_55 + initiator: + title: TransactionInitiator + type: string + enum: *ref_53 + description: >- + Below are the allowed values for the enumeration. + + - PAYER - Sender of funds is initiating the transaction. + The account to send from is either owned by the Payer or + is connected to the Payer in some way. + + - PAYEE - Recipient of the funds is initiating the + transaction by sending a transaction request. The Payer + must approve the transaction, either automatically by a + pre-generated OTP or by pre-approval of the Payee, or by + manually approving in his or her own Device. + example: PAYEE + initiatorType: + title: TransactionInitiatorType + type: string + enum: *ref_52 + description: |- + Below are the allowed values for the enumeration. + - CONSUMER - Consumer is the initiator of the transaction. + - AGENT - Agent is the initiator of the transaction. + - BUSINESS - Business is the initiator of the transaction. + - DEVICE - Device is the initiator of the transaction. + example: CONSUMER + authenticationType: + title: AuthenticationType + type: string + enum: &ref_115 + - OTP + - QRCODE + - U2F + description: >- + Below are the allowed values for the enumeration + AuthenticationType. + + - OTP - One-time password generated by the Payer FSP. + + - QRCODE - QR code used as One Time Password. + + - U2F - U2F is a new addition isolated to Thirdparty + stream. + example: OTP + requestToPayState: + title: TransactionRequestState + type: string + enum: &ref_116 + - RECEIVED + - PENDING + - ACCEPTED + - REJECTED + description: >- + Below are the allowed values for the enumeration. + + - RECEIVED - Payer FSP has received the transaction from + the Payee FSP. + + - PENDING - Payer FSP has sent the transaction request to + the Payer. + + - ACCEPTED - Payer has approved the transaction. + + - REJECTED - Payer has rejected the transaction. + example: RECEIVED + /requestToPayTransfer: + post: + summary: >- + Used to trigger funds from customer fsp account to merchant fsp account. + This is a follow-up request to requestToPay. + description: > + The HTTP request `POST /requestToPayTransfer` is used to request the + movement of funds from payer DFSP to payee DFSP. + + The underlying Mojaloop API has three stages for money transfer: + + 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. + 2. Authorization. This facilitates getting OTP from payee DFSP. + 3. Transfer. The enactment of the previously agreed "contract" + + This method has several modes of operation. + + - If the configuration variable `AUTO_ACCEPT_QUOTES` is set to `"false"` + this method will terminate and return the quotation when it has been + received from the payee DFSP. + 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. + The scheme adapter will then proceed with the transfer state. + + - If the configuration variable `AUTO_ACCEPT_OTP` is set to `"false"` + this method will terminate and return the otp when it has been received + from the payee DFSP. + 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. + The scheme adapter will then proceed with the transfer state. + + If the configuration variables `AUTO_ACCEPT_PARTIES` and + `AUTO_ACCEPT_QUOTES` are both set to `"true"` this method will block + until all three transfer stages are complete. Upon completion it will + return the entire set of transfer details received during the operation. + + + Combinations of settings for `AUTO_ACCEPT...` configuration variables + allow the scheme adapter user to decide which mode of operation best + suits their use cases. i.e. the scheme adapter can be configured to + "break" the three stage transfer at these points in order to execute + backend logic such as party verification, quoted fees assessments etc... + tags: + - RequestToPayTransfer + requestBody: + description: Request To Pay Transfer request body + content: + application/json: + schema: + type: object + required: &ref_119 + - requestToPayTransactionId + - from + - to + - amountType + - currency + - amount + - scenario + - initiator + - initiatorType + properties: &ref_120 + requestToPayTransactionId: + type: string + description: >- + Transaction ID from the DFSP backend, used to reconcile + transactions between the Switch and DFSP backend systems. + from: + type: object + required: *ref_0 + properties: *ref_1 + to: + type: object + required: *ref_0 + properties: *ref_1 + amountType: + title: AmountType + type: string + enum: *ref_3 + description: >- + Below are the allowed values for the enumeration AmountType. + + - SEND - Amount the Payer would like to send, that is, the + amount that should be withdrawn from the Payer account + including any fees. + + - RECEIVE - Amount the Payer would like the Payee to + receive, that is, the amount that should be sent to the + receiver exclusive of any fees. + example: RECEIVE + currency: + title: Currency + description: >- + The currency codes defined in [ISO + 4217](https://www.iso.org/iso-4217-currency-codes.html) as + three-letter alphabetic codes are used as the standard + naming representation for currencies. + type: string + minLength: 3 + maxLength: 3 + enum: *ref_4 + amount: + title: Amount + type: string + pattern: ^([0]|([1-9][0-9]{0,17}))([.][0-9]{0,3}[1-9])?$ + description: >- + The API data type Amount is a JSON String in a canonical + format that is restricted by a regular expression for + interoperability reasons. This pattern does not allow any + trailing zeroes at all, but allows an amount without a minor + currency unit. It also only allows four digits in the minor + currency unit; a negative value is not allowed. Using more + than 18 digits in the major currency unit is not allowed. + example: '123.45' + scenario: + title: TransactionType + type: object + description: Data model for the complex type TransactionType. + properties: *ref_54 + required: *ref_55 + initiator: + title: TransactionInitiator + type: string + enum: *ref_53 + description: >- + Below are the allowed values for the enumeration. + + - PAYER - Sender of funds is initiating the transaction. The + account to send from is either owned by the Payer or is + connected to the Payer in some way. + + - PAYEE - Recipient of the funds is initiating the + transaction by sending a transaction request. The Payer must + approve the transaction, either automatically by a + pre-generated OTP or by pre-approval of the Payee, or by + manually approving in his or her own Device. + example: PAYEE + initiatorType: + title: TransactionInitiatorType + type: string + enum: *ref_52 + description: |- + Below are the allowed values for the enumeration. + - CONSUMER - Consumer is the initiator of the transaction. + - AGENT - Agent is the initiator of the transaction. + - BUSINESS - Business is the initiator of the transaction. + - DEVICE - Device is the initiator of the transaction. + example: CONSUMER + note: + title: Note + type: string + minLength: 1 + maxLength: 128 + description: Memo assigned to transaction. + example: Note sent to Payee. + required: true + responses: + '200': + description: Transfer completed successfully + content: &ref_151 + application/json: + schema: + type: object + required: &ref_121 + - requestToPayTransactionId + - from + - to + - amountType + - currency + - amount + - transactionType + properties: &ref_122 + transferId: + title: CorrelationId + type: string + pattern: >- + ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + description: >- + Identifier that correlates all messages of the same + sequence. The API data type UUID (Universally Unique + Identifier) is a JSON String in canonical format, + conforming to [RFC + 4122](https://tools.ietf.org/html/rfc4122), that is + restricted by a regular expression for interoperability + reasons. A UUID is always 36 characters long, 32 + hexadecimal symbols and 4 dashes (‘-‘). + example: b51ec534-ee48-4575-b6a9-ead2955b8069 + requestToPayTransactionId: + type: string + description: >- + Transaction ID from the DFSP backend, used to reconcile + transactions between the Switch and DFSP backend systems. + from: + type: object + required: *ref_0 + properties: *ref_1 + to: + type: object + required: *ref_0 + properties: *ref_1 + amountType: + title: AmountType + type: string + enum: *ref_3 + description: >- + Below are the allowed values for the enumeration + AmountType. + + - SEND - Amount the Payer would like to send, that is, the + amount that should be withdrawn from the Payer account + including any fees. + + - RECEIVE - Amount the Payer would like the Payee to + receive, that is, the amount that should be sent to the + receiver exclusive of any fees. + example: RECEIVE + currency: + title: Currency + description: >- + The currency codes defined in [ISO + 4217](https://www.iso.org/iso-4217-currency-codes.html) as + three-letter alphabetic codes are used as the standard + naming representation for currencies. + type: string + minLength: 3 + maxLength: 3 + enum: *ref_4 + amount: + title: Amount + type: string + pattern: ^([0]|([1-9][0-9]{0,17}))([.][0-9]{0,3}[1-9])?$ + description: >- + The API data type Amount is a JSON String in a canonical + format that is restricted by a regular expression for + interoperability reasons. This pattern does not allow any + trailing zeroes at all, but allows an amount without a + minor currency unit. It also only allows four digits in + the minor currency unit; a negative value is not allowed. + Using more than 18 digits in the major currency unit is + not allowed. + example: '123.45' + transactionType: + title: transferTransactionType + type: string + enum: *ref_5 + description: Type of transaction. + note: + title: Note + type: string + minLength: 1 + maxLength: 128 + description: Memo assigned to transaction. + example: Note sent to Payee. + currentState: + type: string + enum: *ref_19 + quoteId: + title: CorrelationId + type: string + pattern: >- + ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + description: >- + Identifier that correlates all messages of the same + sequence. The API data type UUID (Universally Unique + Identifier) is a JSON String in canonical format, + conforming to [RFC + 4122](https://tools.ietf.org/html/rfc4122), that is + restricted by a regular expression for interoperability + reasons. A UUID is always 36 characters long, 32 + hexadecimal symbols and 4 dashes (‘-‘). + example: b51ec534-ee48-4575-b6a9-ead2955b8069 + quoteResponse: + title: QuotesIDPutResponse + type: object + description: The object sent in the PUT /quotes/{ID} callback. + properties: *ref_56 + required: *ref_57 + quoteResponseSource: + type: string + description: > + FSPID of the entity that supplied the quote response. This + may not be the same as the FSPID of the entity which owns + the end user account in the case of a FOREX transfer. i.e. + it may be a FOREX gateway. + fulfil: + title: TransfersIDPutResponse + type: object + description: The object sent in the PUT /transfers/{ID} callback. + properties: *ref_20 + required: *ref_21 + lastError: + description: >- + This object represents a Mojaloop API error received at + any time during the transfer process + type: object + properties: *ref_26 + '400': + description: Malformed or missing required body, headers or parameters + content: &ref_152 + application/json: + schema: + allOf: *ref_14 + '500': + description: An error occurred processing the transfer + content: *ref_16 + '504': + description: Timeout occurred processing the transfer + content: *ref_17 + /requestToPayTransfer/{requestToPayTransactionId}: + put: + summary: >- + Continues a transfer that has paused at the otp stage in order to accept + or reject quote + description: > + The HTTP request `PUT /transfers/{transferId}` is used to continue a + transfer initiated via the `POST /transfers` method that has halted + after party lookup and/or quotation stage. + + + The request body should contain either the "acceptOTP" or "acceptQuote" + property set to `true` as required to continue the transfer. + + + See the description of the `POST /requestToPayTransfer` HTTP method for + more information on modes of transfer. + tags: + - RequestToPayTransferID + requestBody: + content: + application/json: + schema: + oneOf: + - type: object + required: *ref_32 + properties: *ref_33 + - type: object + required: &ref_123 + - acceptOTP + properties: &ref_124 + acceptOTP: + type: boolean + enum: + - true + - false + parameters: + - name: requestToPayTransactionId + in: path + required: true + schema: &ref_162 + title: CorrelationId + type: string + pattern: >- + ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + description: >- + Identifier that correlates all messages of the same sequence. The + API data type UUID (Universally Unique Identifier) is a JSON + String in canonical format, conforming to [RFC + 4122](https://tools.ietf.org/html/rfc4122), that is restricted by + a regular expression for interoperability reasons. A UUID is + always 36 characters long, 32 hexadecimal symbols and 4 dashes + (‘-‘). + example: b51ec534-ee48-4575-b6a9-ead2955b8069 + description: >- + Identifier of the merchant request to pay transfer to continue as + returned in the response to a `POST /requestToPayTransfer` request. + responses: + '200': + description: Transfer completed successfully + content: *ref_15 + '500': + description: An error occurred processing the transfer + content: *ref_16 + '504': + description: Timeout occurred processing the transfer + content: *ref_17 + /accounts: + post: + summary: Create accounts on the Account Lookup Service + description: >- + The HTTP request `POST /accounts` is used to create account information + on the Account Lookup Service (ALS) regarding the provided list of + identities. + + + Caller DFSP is used as the account source FSP information + tags: + - Accounts + requestBody: + description: Identities list request body + content: + application/json: + schema: + type: array + items: &ref_58 + type: object + required: + - idType + - idValue + - currency + properties: + idType: + title: PartyIdType + type: string + enum: *ref_23 + description: >- + Below are the allowed values for the enumeration. + + - MSISDN - An MSISDN (Mobile Station International + Subscriber Directory Number, that is, the phone number) is + used as reference to a participant. The MSISDN identifier + should be in international format according to the [ITU-T + E.164 standard](https://www.itu.int/rec/T-REC-E.164/en). + Optionally, the MSISDN may be prefixed by a single plus + sign, indicating the international prefix. + + - EMAIL - An email is used as reference to a participant. + The format of the email should be according to the + informational [RFC + 3696](https://tools.ietf.org/html/rfc3696). + + - PERSONAL_ID - A personal identifier is used as reference + to a participant. Examples of personal identification are + passport number, birth certificate number, and national + registration number. The identifier number is added in the + PartyIdentifier element. The personal identifier type is + added in the PartySubIdOrType element. + + - BUSINESS - A specific Business (for example, an + organization or a company) is used as reference to a + participant. The BUSINESS identifier can be in any format. + To make a transaction connected to a specific username or + bill number in a Business, the PartySubIdOrType element + should be used. + + - DEVICE - A specific device (for example, a POS or ATM) + ID connected to a specific business or organization is + used as reference to a Party. For referencing a specific + device under a specific business or organization, use the + PartySubIdOrType element. + + - ACCOUNT_ID - A bank account number or FSP account ID + should be used as reference to a participant. The + ACCOUNT_ID identifier can be in any format, as formats can + greatly differ depending on country and FSP. + + - IBAN - A bank account number or FSP account ID is used + as reference to a participant. The IBAN identifier can + consist of up to 34 alphanumeric characters and should be + entered without whitespace. + + - ALIAS An alias is used as reference to a participant. + The alias should be created in the FSP as an alternative + reference to an account owner. Another example of an alias + is a username in the FSP system. The ALIAS identifier can + be in any format. It is also possible to use the + PartySubIdOrType element for identifying an account under + an Alias defined by the PartyIdentifier. + idValue: + title: PartyIdentifier + type: string + minLength: 1 + maxLength: 128 + description: Identifier of the Party. + example: '16135551212' + idSubValue: + title: PartySubIdOrType + type: string + minLength: 1 + maxLength: 128 + description: >- + Either a sub-identifier of a PartyIdentifier, or a + sub-type of the PartyIdType, normally a + PersonalIdentifierType. + currency: + title: Currency + description: >- + The currency codes defined in [ISO + 4217](https://www.iso.org/iso-4217-currency-codes.html) as + three-letter alphabetic codes are used as the standard + naming representation for currencies. + type: string + minLength: 3 + maxLength: 3 + enum: *ref_4 + required: true + responses: + '200': + description: Accounts creation completed + content: &ref_153 + application/json: + schema: + type: object + required: &ref_59 + - accounts + properties: &ref_60 + modelId: + title: CorrelationId + type: string + pattern: >- + ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + description: >- + Identifier that correlates all messages of the same + sequence. The API data type UUID (Universally Unique + Identifier) is a JSON String in canonical format, + conforming to [RFC + 4122](https://tools.ietf.org/html/rfc4122), that is + restricted by a regular expression for interoperability + reasons. A UUID is always 36 characters long, 32 + hexadecimal symbols and 4 dashes (‘-‘). + example: b51ec534-ee48-4575-b6a9-ead2955b8069 + accounts: + type: array + items: *ref_58 + response: + type: array + items: &ref_125 + type: object + required: + - idType + - idValue + properties: + idType: + title: PartyIdType + type: string + enum: *ref_23 + description: >- + Below are the allowed values for the enumeration. + + - MSISDN - An MSISDN (Mobile Station International + Subscriber Directory Number, that is, the phone + number) is used as reference to a participant. The + MSISDN identifier should be in international format + according to the [ITU-T E.164 + standard](https://www.itu.int/rec/T-REC-E.164/en). + Optionally, the MSISDN may be prefixed by a single + plus sign, indicating the international prefix. + + - EMAIL - An email is used as reference to a + participant. The format of the email should be + according to the informational [RFC + 3696](https://tools.ietf.org/html/rfc3696). + + - PERSONAL_ID - A personal identifier is used as + reference to a participant. Examples of personal + identification are passport number, birth + certificate number, and national registration + number. The identifier number is added in the + PartyIdentifier element. The personal identifier + type is added in the PartySubIdOrType element. + + - BUSINESS - A specific Business (for example, an + organization or a company) is used as reference to a + participant. The BUSINESS identifier can be in any + format. To make a transaction connected to a + specific username or bill number in a Business, the + PartySubIdOrType element should be used. + + - DEVICE - A specific device (for example, a POS or + ATM) ID connected to a specific business or + organization is used as reference to a Party. For + referencing a specific device under a specific + business or organization, use the PartySubIdOrType + element. + + - ACCOUNT_ID - A bank account number or FSP account + ID should be used as reference to a participant. The + ACCOUNT_ID identifier can be in any format, as + formats can greatly differ depending on country and + FSP. + + - IBAN - A bank account number or FSP account ID is + used as reference to a participant. The IBAN + identifier can consist of up to 34 alphanumeric + characters and should be entered without whitespace. + + - ALIAS An alias is used as reference to a + participant. The alias should be created in the FSP + as an alternative reference to an account owner. + Another example of an alias is a username in the FSP + system. The ALIAS identifier can be in any format. + It is also possible to use the PartySubIdOrType + element for identifying an account under an Alias + defined by the PartyIdentifier. + idValue: + title: PartyIdentifier + type: string + minLength: 1 + maxLength: 128 + description: Identifier of the Party. + example: '16135551212' + idSubValue: + title: PartySubIdOrType + type: string + minLength: 1 + maxLength: 128 + description: >- + Either a sub-identifier of a PartyIdentifier, or a + sub-type of the PartyIdType, normally a + PersonalIdentifierType. + error: + type: object + properties: *ref_22 + currentState: + type: string + enum: &ref_126 + - ERROR_OCCURRED + - COMPLETED + lastError: + type: object + description: >- + This object represents a Mojaloop API error received at + any time during the transfer process + properties: *ref_26 + postAccountsResponse: + type: object + required: + - body + properties: + body: + type: object + headers: + type: object + '400': + description: An error occurred creating accounts + content: &ref_61 + application/json: + schema: + allOf: &ref_62 + - type: object + properties: *ref_22 + - type: object + required: + - executionState + properties: + executionState: + type: object + required: *ref_59 + properties: *ref_60 + '500': + description: An error occurred creating accounts + content: *ref_61 + '504': + description: Timeout occurred creating accounts + content: &ref_154 + application/json: + schema: + allOf: *ref_62 + /parties/{Type}/{ID}: + parameters: + - name: Type + in: path + required: true + schema: &ref_65 + type: string + description: >- + The type of the party identifier. For example, `MSISDN`, + `PERSONAL_ID`. + - name: ID + in: path + required: true + schema: &ref_66 + type: string + description: The identifier value. + get: + description: >- + The HTTP request GET /parties// (or GET /parties///) is used to lookup + information regarding the requested Party, defined by , and optionally + (for example, GET /parties/MSISDN/123456789, or GET + /parties/BUSINESS/shoecompany/employee1). + summary: PartiesByTypeAndID + tags: + - parties + operationId: PartiesByTypeAndID + responses: + '200': + description: PartiesByIdSuccess + content: &ref_67 + application/json: + schema: + title: partiesByIdResponse + type: object + description: GET /parties/{Type}/{ID} response object + properties: &ref_127 + party: + properties: + body: + description: Data model for the complex type Party. + title: Party + type: object + properties: *ref_24 + required: *ref_25 + headers: + type: object + required: + - body + - headers + currentState: + type: string + enum: &ref_69 + - WAITING_FOR_ACTION + - COMPLETED + - ERROR_OCCURRED + required: &ref_128 + - party + - currentState + '404': + description: PartiesByIdError404 + content: &ref_68 + application/json: + schema: + type: object + properties: + errorInformation: + title: ErrorInformation + type: object + description: Data model for the complex type ErrorInformation. + properties: *ref_63 + required: *ref_64 + /parties/{Type}/{ID}/{SubId}: + parameters: + - name: Type + in: path + required: true + schema: *ref_65 + description: >- + The type of the party identifier. For example, `MSISDN`, + `PERSONAL_ID`. + - name: ID + in: path + required: true + schema: *ref_66 + description: The identifier value. + - name: SubId + in: path + required: true + schema: &ref_163 + type: string + description: >- + A sub-identifier of the party identifier, or a sub-type of the party + identifier's type. For example, `PASSPORT`, `DRIVING_LICENSE`. + get: + description: >- + The HTTP request GET /parties// (or GET /parties///) is used to lookup + information regarding the requested Party, defined by , and optionally + (for example, GET /parties/MSISDN/123456789, or GET + /parties/BUSINESS/shoecompany/employee1). + summary: PartiesSubIdByTypeAndID + tags: + - parties + operationId: PartiesSubIdByTypeAndID + responses: + '200': + description: PartiesByIdSuccess + content: *ref_67 + '404': + description: PartiesByIdError404 + content: *ref_68 + /quotes: + post: + summary: Quotes endpoint + description: is used to request quotes from other DFSP + tags: + - quotes + operationId: QuotesPost + requestBody: + description: Quotes request payload + content: + application/json: + schema: + title: simpleQuotesPostRequest + type: object + properties: &ref_131 + fspId: + title: FspId + type: string + minLength: 1 + maxLength: 32 + description: FSP identifier. + quotesPostRequest: + title: QuotesPostRequest + type: object + description: The object sent in the POST /quotes request. + properties: &ref_129 + quoteId: + title: CorrelationId + type: string + pattern: >- + ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + description: >- + Identifier that correlates all messages of the same + sequence. The API data type UUID (Universally Unique + Identifier) is a JSON String in canonical format, + conforming to [RFC + 4122](https://tools.ietf.org/html/rfc4122), that is + restricted by a regular expression for interoperability + reasons. A UUID is always 36 characters long, 32 + hexadecimal symbols and 4 dashes (‘-‘). + example: b51ec534-ee48-4575-b6a9-ead2955b8069 + transactionId: + title: CorrelationId + type: string + pattern: >- + ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + description: >- + Identifier that correlates all messages of the same + sequence. The API data type UUID (Universally Unique + Identifier) is a JSON String in canonical format, + conforming to [RFC + 4122](https://tools.ietf.org/html/rfc4122), that is + restricted by a regular expression for interoperability + reasons. A UUID is always 36 characters long, 32 + hexadecimal symbols and 4 dashes (‘-‘). + example: b51ec534-ee48-4575-b6a9-ead2955b8069 + transactionRequestId: + title: CorrelationId + type: string + pattern: >- + ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + description: >- + Identifier that correlates all messages of the same + sequence. The API data type UUID (Universally Unique + Identifier) is a JSON String in canonical format, + conforming to [RFC + 4122](https://tools.ietf.org/html/rfc4122), that is + restricted by a regular expression for interoperability + reasons. A UUID is always 36 characters long, 32 + hexadecimal symbols and 4 dashes (‘-‘). + example: b51ec534-ee48-4575-b6a9-ead2955b8069 + payee: + title: Party + type: object + description: Data model for the complex type Party. + properties: *ref_24 + required: *ref_25 + payer: + title: Party + type: object + description: Data model for the complex type Party. + properties: *ref_24 + required: *ref_25 + amountType: + title: AmountType + type: string + enum: *ref_3 + description: >- + Below are the allowed values for the enumeration + AmountType. + + - SEND - Amount the Payer would like to send, that is, + the amount that should be withdrawn from the Payer + account including any fees. + + - RECEIVE - Amount the Payer would like the Payee to + receive, that is, the amount that should be sent to the + receiver exclusive of any fees. + example: RECEIVE + amount: + title: Money + type: object + description: Data model for the complex type Money. + properties: *ref_6 + required: *ref_7 + fees: + title: Money + type: object + description: Data model for the complex type Money. + properties: *ref_6 + required: *ref_7 + transactionType: + title: TransactionType + type: object + description: Data model for the complex type TransactionType. + properties: *ref_54 + required: *ref_55 + geoCode: + title: GeoCode + type: object + description: >- + Data model for the complex type GeoCode. Indicates the + geographic location from where the transaction was + initiated. + properties: *ref_44 + required: *ref_45 + note: + title: Note + type: string + minLength: 1 + maxLength: 128 + description: Memo assigned to transaction. + example: Note sent to Payee. + expiration: + title: DateTime + type: string + pattern: >- + ^(?:[1-9]\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\d|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-02-29)T(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:(\.\d{3}))(?:Z|[+-][01]\d:[0-5]\d)$ + description: >- + The API data type DateTime is a JSON String in a lexical + format that is restricted by a regular expression for + interoperability reasons. The format is according to + [ISO + 8601](https://www.iso.org/iso-8601-date-and-time-format.html), + expressed in a combined date, time and time zone format. + A more readable version of the format is + yyyy-MM-ddTHH:mm:ss.SSS[-HH:MM]. Examples are + "2016-05-24T08:38:08.699-04:00", + "2016-05-24T08:38:08.699Z" (where Z indicates Zulu time + zone, same as UTC). + example: '2016-05-24T08:38:08.699-04:00' + extensionList: + title: ExtensionList + type: object + description: >- + Data model for the complex type ExtensionList. An + optional list of extensions, specific to deployment. + properties: *ref_10 + required: *ref_11 + required: &ref_130 + - quoteId + - transactionId + - payee + - payer + - amountType + - amount + - transactionType + required: &ref_132 + - fspId + - quotesPostRequest + required: true + responses: + '200': + description: sync response from POST /quotes + content: &ref_155 + application/json: + schema: + title: QuotesPostResponse + type: object + properties: &ref_133 + quotes: + title: QuotesIDPutResponse + type: object + description: The object sent in the PUT /quotes/{ID} callback. + properties: + body: + type: object + properties: + transferAmount: + title: Money + type: object + description: Data model for the complex type Money. + properties: *ref_6 + required: *ref_7 + payeeReceiveAmount: + title: Money + type: object + description: Data model for the complex type Money. + properties: *ref_6 + required: *ref_7 + payeeFspFee: + title: Money + type: object + description: Data model for the complex type Money. + properties: *ref_6 + required: *ref_7 + payeeFspCommission: + title: Money + type: object + description: Data model for the complex type Money. + properties: *ref_6 + required: *ref_7 + expiration: + type: string + description: >- + Date and time until when the quotation is valid + and can be honored when used in the subsequent + transaction. + example: '2016-05-24T08:38:08.699-04:00' + geoCode: + title: GeoCode + type: object + description: >- + Data model for the complex type GeoCode. Indicates + the geographic location from where the transaction + was initiated. + properties: *ref_44 + required: *ref_45 + ilpPacket: + title: IlpPacket + type: string + pattern: ^[A-Za-z0-9-_]+[=]{0,2}$ + minLength: 1 + maxLength: 32768 + description: >- + Information for recipient (transport layer + information). + example: >- + AYIBgQAAAAAAAASwNGxldmVsb25lLmRmc3AxLm1lci45T2RTOF81MDdqUUZERmZlakgyOVc4bXFmNEpLMHlGTFGCAUBQU0svMS4wCk5vbmNlOiB1SXlweUYzY3pYSXBFdzVVc05TYWh3CkVuY3J5cHRpb246IG5vbmUKUGF5bWVudC1JZDogMTMyMzZhM2ItOGZhOC00MTYzLTg0NDctNGMzZWQzZGE5OGE3CgpDb250ZW50LUxlbmd0aDogMTM1CkNvbnRlbnQtVHlwZTogYXBwbGljYXRpb24vanNvbgpTZW5kZXItSWRlbnRpZmllcjogOTI4MDYzOTEKCiJ7XCJmZWVcIjowLFwidHJhbnNmZXJDb2RlXCI6XCJpbnZvaWNlXCIsXCJkZWJpdE5hbWVcIjpcImFsaWNlIGNvb3BlclwiLFwiY3JlZGl0TmFtZVwiOlwibWVyIGNoYW50XCIsXCJkZWJpdElkZW50aWZpZXJcIjpcIjkyODA2MzkxXCJ9IgA + condition: + title: IlpCondition + type: string + pattern: ^[A-Za-z0-9-_]{43}$ + maxLength: 48 + description: >- + Condition that must be attached to the transfer by + the Payer. + extensionList: + title: ExtensionList + type: object + description: >- + Data model for the complex type ExtensionList. An + optional list of extensions, specific to + deployment. + properties: *ref_10 + required: *ref_11 + required: + - transferAmount + - expiration + - ilpPacket + - condition + headers: + type: object + required: + - body + - headers + currentState: + type: string + enum: *ref_69 + required: &ref_134 + - quotes + - currentState + '500': + description: An error occurred processing the quotes request + content: &ref_156 + application/json: + schema: + allOf: &ref_135 + - type: object + properties: *ref_22 + - type: object + /simpleTransfers: + post: + summary: Simple Transfers endpoint + description: is used to request a transfer + tags: + - transfers + operationId: SimpleTransfersPost + requestBody: + description: Simple Transfer request payload + content: + application/json: + schema: + title: SimpleTransfersPostRequest + type: object + properties: &ref_138 + fspId: + title: FspId + type: string + minLength: 1 + maxLength: 32 + description: FSP identifier. + transfersPostRequest: + title: TransfersPostRequest + type: object + description: The object sent in the POST /transfers request. + properties: &ref_136 + transferId: + title: CorrelationId + type: string + pattern: >- + ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + description: >- + Identifier that correlates all messages of the same + sequence. The API data type UUID (Universally Unique + Identifier) is a JSON String in canonical format, + conforming to [RFC + 4122](https://tools.ietf.org/html/rfc4122), that is + restricted by a regular expression for interoperability + reasons. A UUID is always 36 characters long, 32 + hexadecimal symbols and 4 dashes (‘-‘). + example: b51ec534-ee48-4575-b6a9-ead2955b8069 + payeeFsp: + title: FspId + type: string + minLength: 1 + maxLength: 32 + description: FSP identifier. + payerFsp: + title: FspId + type: string + minLength: 1 + maxLength: 32 + description: FSP identifier. + amount: + title: Money + type: object + description: Data model for the complex type Money. + properties: *ref_6 + required: *ref_7 + ilpPacket: + title: IlpPacket + type: string + pattern: ^[A-Za-z0-9-_]+[=]{0,2}$ + minLength: 1 + maxLength: 32768 + description: Information for recipient (transport layer information). + example: >- + AYIBgQAAAAAAAASwNGxldmVsb25lLmRmc3AxLm1lci45T2RTOF81MDdqUUZERmZlakgyOVc4bXFmNEpLMHlGTFGCAUBQU0svMS4wCk5vbmNlOiB1SXlweUYzY3pYSXBFdzVVc05TYWh3CkVuY3J5cHRpb246IG5vbmUKUGF5bWVudC1JZDogMTMyMzZhM2ItOGZhOC00MTYzLTg0NDctNGMzZWQzZGE5OGE3CgpDb250ZW50LUxlbmd0aDogMTM1CkNvbnRlbnQtVHlwZTogYXBwbGljYXRpb24vanNvbgpTZW5kZXItSWRlbnRpZmllcjogOTI4MDYzOTEKCiJ7XCJmZWVcIjowLFwidHJhbnNmZXJDb2RlXCI6XCJpbnZvaWNlXCIsXCJkZWJpdE5hbWVcIjpcImFsaWNlIGNvb3BlclwiLFwiY3JlZGl0TmFtZVwiOlwibWVyIGNoYW50XCIsXCJkZWJpdElkZW50aWZpZXJcIjpcIjkyODA2MzkxXCJ9IgA + condition: + title: IlpCondition + type: string + pattern: ^[A-Za-z0-9-_]{43}$ + maxLength: 48 + description: >- + Condition that must be attached to the transfer by the + Payer. + expiration: + title: DateTime + type: string + pattern: >- + ^(?:[1-9]\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\d|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-02-29)T(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:(\.\d{3}))(?:Z|[+-][01]\d:[0-5]\d)$ + description: >- + The API data type DateTime is a JSON String in a lexical + format that is restricted by a regular expression for + interoperability reasons. The format is according to + [ISO + 8601](https://www.iso.org/iso-8601-date-and-time-format.html), + expressed in a combined date, time and time zone format. + A more readable version of the format is + yyyy-MM-ddTHH:mm:ss.SSS[-HH:MM]. Examples are + "2016-05-24T08:38:08.699-04:00", + "2016-05-24T08:38:08.699Z" (where Z indicates Zulu time + zone, same as UTC). + example: '2016-05-24T08:38:08.699-04:00' + extensionList: + title: ExtensionList + type: object + description: >- + Data model for the complex type ExtensionList. An + optional list of extensions, specific to deployment. + properties: *ref_10 + required: *ref_11 + required: &ref_137 + - transferId + - payeeFsp + - payerFsp + - amount + - ilpPacket + - condition + - expiration + required: &ref_139 + - fspId + - transfersPostRequest + required: true + responses: + '200': + description: sync response from POST /simpleTransfers + content: &ref_157 + application/json: + schema: + title: SimpleTransfersPostResponse + type: object + properties: &ref_140 + transfer: + properties: + body: + title: TransfersIDPutResponse + type: object + description: The object sent in the PUT /transfers/{ID} callback. + properties: *ref_20 + required: *ref_21 + headers: + type: object + required: + - body + - headers + currentState: + type: string + enum: *ref_69 + required: &ref_141 + - transfer + - currentState + '500': + description: An error occurred processing the simple transfers request + content: &ref_158 + application/json: + schema: + allOf: &ref_142 + - type: object + properties: *ref_22 + - type: object +components: + schemas: + TransactionInitiatorType: + title: TransactionInitiatorType + type: string + enum: *ref_52 + description: |- + Below are the allowed values for the enumeration. + - CONSUMER - Consumer is the initiator of the transaction. + - AGENT - Agent is the initiator of the transaction. + - BUSINESS - Business is the initiator of the transaction. + - DEVICE - Device is the initiator of the transaction. + example: CONSUMER + PartyIdType: + title: PartyIdType + type: string + enum: *ref_23 + description: >- + Below are the allowed values for the enumeration. + + - MSISDN - An MSISDN (Mobile Station International Subscriber Directory + Number, that is, the phone number) is used as reference to a + participant. The MSISDN identifier should be in international format + according to the [ITU-T E.164 + standard](https://www.itu.int/rec/T-REC-E.164/en). Optionally, the + MSISDN may be prefixed by a single plus sign, indicating the + international prefix. + + - EMAIL - An email is used as reference to a participant. The format of + the email should be according to the informational [RFC + 3696](https://tools.ietf.org/html/rfc3696). + + - PERSONAL_ID - A personal identifier is used as reference to a + participant. Examples of personal identification are passport number, + birth certificate number, and national registration number. The + identifier number is added in the PartyIdentifier element. The personal + identifier type is added in the PartySubIdOrType element. + + - BUSINESS - A specific Business (for example, an organization or a + company) is used as reference to a participant. The BUSINESS identifier + can be in any format. To make a transaction connected to a specific + username or bill number in a Business, the PartySubIdOrType element + should be used. + + - DEVICE - A specific device (for example, a POS or ATM) ID connected to + a specific business or organization is used as reference to a Party. For + referencing a specific device under a specific business or organization, + use the PartySubIdOrType element. + + - ACCOUNT_ID - A bank account number or FSP account ID should be used as + reference to a participant. The ACCOUNT_ID identifier can be in any + format, as formats can greatly differ depending on country and FSP. + + - IBAN - A bank account number or FSP account ID is used as reference to + a participant. The IBAN identifier can consist of up to 34 alphanumeric + characters and should be entered without whitespace. + + - ALIAS An alias is used as reference to a participant. The alias should + be created in the FSP as an alternative reference to an account owner. + Another example of an alias is a username in the FSP system. The ALIAS + identifier can be in any format. It is also possible to use the + PartySubIdOrType element for identifying an account under an Alias + defined by the PartyIdentifier. + PartyIdentifier: + title: PartyIdentifier + type: string + minLength: 1 + maxLength: 128 + description: Identifier of the Party. + example: '16135551212' + PartySubIdOrType: + title: PartySubIdOrType + type: string + minLength: 1 + maxLength: 128 + description: >- + Either a sub-identifier of a PartyIdentifier, or a sub-type of the + PartyIdType, normally a PersonalIdentifierType. + Name: + title: Name + type: string + pattern: ^(?!\s*$)[\w .,'-]{1,128}$ + description: >- + The API data type Name is a JSON String, restricted by a regular + expression to avoid characters which are generally not used in a name. + + + Regular Expression - The regular expression for restricting the Name + type is "^(?!\s*$)[\w .,'-]{1,128}$". The restriction does not allow a + string consisting of whitespace only, all Unicode characters are + allowed, as well as the period (.) (apostrophe (‘), dash (-), comma (,) + and space characters ( ). + + + **Note:** In some programming languages, Unicode support must be + specifically enabled. For example, if Java is used, the flag + UNICODE_CHARACTER_CLASS must be enabled to allow Unicode characters. + FirstName: + title: FirstName + type: string + minLength: 1 + maxLength: 128 + pattern: >- + ^(?!\s*$)[\p{L}\p{gc=Mark}\p{digit}\p{gc=Connector_Punctuation}\p{Join_Control} + .,''-]{1,128}$ + description: First name of the Party (Name Type). + example: Henrik + MiddleName: + title: MiddleName + type: string + minLength: 1 + maxLength: 128 + pattern: >- + ^(?!\s*$)[\p{L}\p{gc=Mark}\p{digit}\p{gc=Connector_Punctuation}\p{Join_Control} + .,''-]{1,128}$ + description: Middle name of the Party (Name Type). + example: Johannes + LastName: + title: LastName + type: string + minLength: 1 + maxLength: 128 + pattern: >- + ^(?!\s*$)[\p{L}\p{gc=Mark}\p{digit}\p{gc=Connector_Punctuation}\p{Join_Control} + .,''-]{1,128}$ + description: Last name of the Party (Name Type). + example: Karlsson + DateOfBirth: + title: DateofBirth (type Date) + type: string + pattern: >- + ^(?:[1-9]\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\d|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-02-29)$ + description: Date of Birth of the Party. + example: '1966-06-16' + MerchantClassificationCode: + title: MerchantClassificationCode + type: string + pattern: ^[\d]{1,4}$ + description: >- + A limited set of pre-defined numbers. This list would be a limited set + of numbers identifying a set of popular merchant types like School Fees, + Pubs and Restaurants, Groceries, etc. + FspId: + title: FspId + type: string + minLength: 1 + maxLength: 32 + description: FSP identifier. + ExtensionKey: + title: ExtensionKey + type: string + minLength: 1 + maxLength: 32 + description: Extension key. + ExtensionValue: + title: ExtensionValue + type: string + minLength: 1 + maxLength: 128 + description: Extension value. + Extension: + title: Extension + type: object + description: Data model for the complex type Extension. + properties: *ref_8 + required: *ref_9 + extensionListEmptiable: + type: array + items: *ref_2 + minItems: 0 + maxItems: 16 + transferParty: + type: object + required: *ref_0 + properties: *ref_1 + AmountType: + title: AmountType + type: string + enum: *ref_3 + description: >- + Below are the allowed values for the enumeration AmountType. + + - SEND - Amount the Payer would like to send, that is, the amount that + should be withdrawn from the Payer account including any fees. + + - RECEIVE - Amount the Payer would like the Payee to receive, that is, + the amount that should be sent to the receiver exclusive of any fees. + example: RECEIVE + Currency: + title: Currency + description: >- + The currency codes defined in [ISO + 4217](https://www.iso.org/iso-4217-currency-codes.html) as three-letter + alphabetic codes are used as the standard naming representation for + currencies. + type: string + minLength: 3 + maxLength: 3 + enum: *ref_4 + Amount: + title: Amount + type: string + pattern: ^([0]|([1-9][0-9]{0,17}))([.][0-9]{0,3}[1-9])?$ + description: >- + The API data type Amount is a JSON String in a canonical format that is + restricted by a regular expression for interoperability reasons. This + pattern does not allow any trailing zeroes at all, but allows an amount + without a minor currency unit. It also only allows four digits in the + minor currency unit; a negative value is not allowed. Using more than 18 + digits in the major currency unit is not allowed. + example: '123.45' + transferTransactionType: + title: transferTransactionType + type: string + enum: *ref_5 + description: Type of transaction. + Note: + title: Note + type: string + minLength: 1 + maxLength: 128 + description: Memo assigned to transaction. + example: Note sent to Payee. + transferRequest: + type: object + required: *ref_70 + properties: *ref_71 + CorrelationId: + title: CorrelationId + type: string + pattern: >- + ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + description: >- + Identifier that correlates all messages of the same sequence. The API + data type UUID (Universally Unique Identifier) is a JSON String in + canonical format, conforming to [RFC + 4122](https://tools.ietf.org/html/rfc4122), that is restricted by a + regular expression for interoperability reasons. A UUID is always 36 + characters long, 32 hexadecimal symbols and 4 dashes (‘-‘). + example: b51ec534-ee48-4575-b6a9-ead2955b8069 + transferStatus: + type: string + enum: *ref_19 + Money: + title: Money + type: object + description: Data model for the complex type Money. + properties: *ref_6 + required: *ref_7 + DateTime: + title: DateTime + type: string + pattern: >- + ^(?:[1-9]\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\d|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-02-29)T(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:(\.\d{3}))(?:Z|[+-][01]\d:[0-5]\d)$ + description: >- + The API data type DateTime is a JSON String in a lexical format that is + restricted by a regular expression for interoperability reasons. The + format is according to [ISO + 8601](https://www.iso.org/iso-8601-date-and-time-format.html), expressed + in a combined date, time and time zone format. A more readable version + of the format is yyyy-MM-ddTHH:mm:ss.SSS[-HH:MM]. Examples are + "2016-05-24T08:38:08.699-04:00", "2016-05-24T08:38:08.699Z" (where Z + indicates Zulu time zone, same as UTC). + example: '2016-05-24T08:38:08.699-04:00' + Latitude: + title: Latitude + type: string + pattern: >- + ^(\+|-)?(?:90(?:(?:\.0{1,6})?)|(?:[0-9]|[1-8][0-9])(?:(?:\.[0-9]{1,6})?))$ + description: >- + The API data type Latitude is a JSON String in a lexical format that is + restricted by a regular expression for interoperability reasons. + example: '+45.4215' + Longitude: + title: Longitude + type: string + pattern: >- + ^(\+|-)?(?:180(?:(?:\.0{1,6})?)|(?:[0-9]|[1-9][0-9]|1[0-7][0-9])(?:(?:\.[0-9]{1,6})?))$ + description: >- + The API data type Longitude is a JSON String in a lexical format that is + restricted by a regular expression for interoperability reasons. + example: '+75.6972' + GeoCode: + title: GeoCode + type: object + description: >- + Data model for the complex type GeoCode. Indicates the geographic + location from where the transaction was initiated. + properties: *ref_44 + required: *ref_45 + IlpPacket: + title: IlpPacket + type: string + pattern: ^[A-Za-z0-9-_]+[=]{0,2}$ + minLength: 1 + maxLength: 32768 + description: Information for recipient (transport layer information). + example: >- + AYIBgQAAAAAAAASwNGxldmVsb25lLmRmc3AxLm1lci45T2RTOF81MDdqUUZERmZlakgyOVc4bXFmNEpLMHlGTFGCAUBQU0svMS4wCk5vbmNlOiB1SXlweUYzY3pYSXBFdzVVc05TYWh3CkVuY3J5cHRpb246IG5vbmUKUGF5bWVudC1JZDogMTMyMzZhM2ItOGZhOC00MTYzLTg0NDctNGMzZWQzZGE5OGE3CgpDb250ZW50LUxlbmd0aDogMTM1CkNvbnRlbnQtVHlwZTogYXBwbGljYXRpb24vanNvbgpTZW5kZXItSWRlbnRpZmllcjogOTI4MDYzOTEKCiJ7XCJmZWVcIjowLFwidHJhbnNmZXJDb2RlXCI6XCJpbnZvaWNlXCIsXCJkZWJpdE5hbWVcIjpcImFsaWNlIGNvb3BlclwiLFwiY3JlZGl0TmFtZVwiOlwibWVyIGNoYW50XCIsXCJkZWJpdElkZW50aWZpZXJcIjpcIjkyODA2MzkxXCJ9IgA + IlpCondition: + title: IlpCondition + type: string + pattern: ^[A-Za-z0-9-_]{43}$ + maxLength: 48 + description: Condition that must be attached to the transfer by the Payer. + ExtensionList: + title: ExtensionList + type: object + description: >- + Data model for the complex type ExtensionList. An optional list of + extensions, specific to deployment. + properties: *ref_10 + required: *ref_11 + QuotesIDPutResponse: + title: QuotesIDPutResponse + type: object + description: The object sent in the PUT /quotes/{ID} callback. + properties: *ref_56 + required: *ref_57 + IlpFulfilment: + title: IlpFulfilment + type: string + pattern: ^[A-Za-z0-9-_]{43}$ + maxLength: 48 + description: Fulfilment that must be attached to the transfer by the Payee. + example: WLctttbu2HvTsa1XWvUoGRcQozHsqeu9Ahl2JW9Bsu8 + TransferState: + title: TransferState + type: string + enum: *ref_27 + description: >- + Below are the allowed values for the enumeration. + + - RECEIVED - Next ledger has received the transfer. + + - RESERVED - Next ledger has reserved the transfer. + + - COMMITTED - Next ledger has successfully performed the transfer. + + - ABORTED - Next ledger has aborted the transfer due to a rejection or + failure to perform the transfer. + example: RESERVED + TransfersIDPutResponse: + title: TransfersIDPutResponse + type: object + description: The object sent in the PUT /transfers/{ID} callback. + properties: *ref_20 + required: *ref_21 + ErrorCode: + title: ErrorCode + type: string + pattern: ^[1-9]\d{3}$ + description: >- + The API data type ErrorCode is a JSON String of four characters, + consisting of digits only. Negative numbers are not allowed. A leading + zero is not allowed. Each error code in the API is a four-digit number, + for example, 1234, where the first number (1 in the example) represents + the high-level error category, the second number (2 in the example) + represents the low-level error category, and the last two numbers (34 in + the example) represent the specific error. + example: '5100' + ErrorDescription: + title: ErrorDescription + type: string + minLength: 1 + maxLength: 128 + description: Error description string. + ErrorInformation: + title: ErrorInformation + type: object + description: Data model for the complex type ErrorInformation. + properties: *ref_63 + required: *ref_64 + mojaloopError: + type: object + properties: *ref_36 + transferError: + type: object + description: >- + This object represents a Mojaloop API error received at any time during + the transfer process + properties: *ref_26 + transferResponse: + type: object + required: *ref_12 + properties: *ref_13 + errorResponse: + type: object + properties: *ref_22 + errorTransferResponse: + allOf: *ref_14 + transferStatusResponse: + type: object + required: *ref_72 + properties: *ref_73 + transferContinuationAcceptParty: + type: object + required: *ref_28 + properties: *ref_29 + transferContinuationAcceptQuote: + type: object + required: *ref_32 + properties: *ref_33 + autoAcceptPartyOption: + type: object + required: *ref_74 + properties: *ref_75 + bulkPerTransferFeeLimit: + type: object + required: *ref_76 + properties: *ref_77 + autoAcceptQuote: + type: object + required: *ref_78 + properties: *ref_79 + bulkTransactionOptions: + type: object + required: *ref_80 + properties: *ref_81 + PartyIdInfo: + title: PartyIdInfo + type: object + description: >- + Data model for the complex type PartyIdInfo. An ExtensionList element + has been added to this reqeust in version v1.1 + properties: *ref_82 + required: *ref_83 + PartyName: + title: PartyName + type: string + minLength: 1 + maxLength: 128 + description: Name of the Party. Could be a real name or a nickname. + PartyComplexName: + title: PartyComplexName + type: object + description: Data model for the complex type PartyComplexName. + properties: *ref_84 + PartyPersonalInfo: + title: PartyPersonalInfo + type: object + description: Data model for the complex type PartyPersonalInfo. + properties: *ref_85 + Party: + title: Party + type: object + description: Data model for the complex type Party. + properties: *ref_24 + required: *ref_25 + bulkTransactionIndividualTransfer: + title: BulkTransactionIndividualTransfer + type: object + description: Data model for the complex type 'bulkTransactionIndividualTransfer'. + properties: *ref_86 + required: *ref_87 + bulkTransactionRequest: + type: object + required: *ref_88 + properties: *ref_89 + bulkTransferStatus: + type: string + enum: *ref_43 + individualTransferResult: + type: object + required: *ref_90 + properties: *ref_91 + bulkTransferResponse: + type: object + required: *ref_39 + properties: *ref_40 + bulkTransferErrorResponse: + allOf: *ref_92 + bulkTransactionIndividualTransferAccept: + type: object + description: Data model for the 'individualTransfer' while accepting party or quote. + properties: *ref_30 + required: *ref_31 + bulkTransactionContinuationAcceptParty: + description: >- + The object sent back as confirmation of payee parties when + autoAcceptParty is false. + type: object + required: *ref_34 + properties: *ref_35 + bulkTransactionContinuationAcceptQuote: + description: >- + The object sent back as confirmation of quotes when autoAcceptQuotes is + false. + type: object + required: *ref_37 + properties: *ref_38 + partyError: + type: object + description: >- + This object represents a Mojaloop API error received at any time during + the party discovery process + properties: *ref_93 + bulkTransactionAcceptPartyErrorResponse: + allOf: *ref_94 + quoteError: + type: object + description: >- + This object represents a Mojaloop API error received at any time during + the quote process + properties: *ref_46 + bulkTransactionAcceptQuoteErrorResponse: + allOf: *ref_95 + individualTransfer: + title: IndividualTransfer + type: object + description: Data model for the complex type 'individualTransfer'. + properties: *ref_96 + required: *ref_97 + bulkTransferRequest: + type: object + required: *ref_98 + properties: *ref_99 + individualTransferFulfilment: + type: object + description: >- + A Mojaloop API transfer fulfilment for individual transfers in a bulk + transfer + properties: *ref_100 + bulkTransferStatusResponse: + type: object + required: *ref_101 + properties: *ref_102 + individualQuote: + title: IndividualQuote + type: object + description: Data model for the complex type 'individualQuote'. + properties: *ref_50 + required: *ref_51 + bulkQuoteRequest: + type: object + required: *ref_103 + properties: *ref_104 + individualQuoteResult: + type: object + properties: *ref_105 + required: *ref_106 + bulkQuoteResponse: + type: object + required: *ref_47 + properties: *ref_48 + bulkQuoteErrorResponse: + allOf: *ref_49 + bulkQuoteStatus: + type: string + enum: *ref_107 + bulkQuoteStatusResponse: + type: object + required: *ref_108 + properties: *ref_109 + TransactionScenario: + title: TransactionScenario + type: string + enum: *ref_110 + description: >- + Below are the allowed values for the enumeration. + + - DEPOSIT - Used for performing a Cash-In (deposit) transaction. In a + normal scenario, electronic funds are transferred from a Business + account to a Consumer account, and physical cash is given from the + Consumer to the Business User. + + - WITHDRAWAL - Used for performing a Cash-Out (withdrawal) transaction. + In a normal scenario, electronic funds are transferred from a Consumer’s + account to a Business account, and physical cash is given from the + Business User to the Consumer. + + - TRANSFER - Used for performing a P2P (Peer to Peer, or Consumer to + Consumer) transaction. + + - PAYMENT - Usually used for performing a transaction from a Consumer to + a Merchant or Organization, but could also be for a B2B (Business to + Business) payment. The transaction could be online for a purchase in an + Internet store, in a physical store where both the Consumer and Business + User are present, a bill payment, a donation, and so on. + + - REFUND - Used for performing a refund of transaction. + example: DEPOSIT + TransactionSubScenario: + title: TransactionSubScenario + type: string + pattern: ^[A-Z_]{1,32}$ + description: >- + Possible sub-scenario, defined locally within the scheme (UndefinedEnum + Type). + example: LOCALLY_DEFINED_SUBSCENARIO + TransactionInitiator: + title: TransactionInitiator + type: string + enum: *ref_53 + description: >- + Below are the allowed values for the enumeration. + + - PAYER - Sender of funds is initiating the transaction. The account to + send from is either owned by the Payer or is connected to the Payer in + some way. + + - PAYEE - Recipient of the funds is initiating the transaction by + sending a transaction request. The Payer must approve the transaction, + either automatically by a pre-generated OTP or by pre-approval of the + Payee, or by manually approving in his or her own Device. + example: PAYEE + RefundReason: + title: RefundReason + type: string + minLength: 1 + maxLength: 128 + description: Reason for the refund. + example: Free text indicating reason for the refund. + Refund: + title: Refund + type: object + description: Data model for the complex type Refund. + properties: *ref_111 + required: *ref_112 + BalanceOfPayments: + title: BalanceOfPayments + type: string + pattern: ^[1-9]\d{2}$ + description: >- + (BopCode) The API data type + [BopCode](https://www.imf.org/external/np/sta/bopcode/) is a JSON String + of 3 characters, consisting of digits only. Negative numbers are not + allowed. A leading zero is not allowed. + example: '123' + TransactionType: + title: TransactionType + type: object + description: Data model for the complex type TransactionType. + properties: *ref_54 + required: *ref_55 + requestToPayRequest: + type: object + required: *ref_113 + properties: *ref_114 + AuthenticationType: + title: AuthenticationType + type: string + enum: *ref_115 + description: |- + Below are the allowed values for the enumeration AuthenticationType. + - OTP - One-time password generated by the Payer FSP. + - QRCODE - QR code used as One Time Password. + - U2F - U2F is a new addition isolated to Thirdparty stream. + example: OTP + TransactionRequestState: + title: TransactionRequestState + type: string + enum: *ref_116 + description: |- + Below are the allowed values for the enumeration. + - RECEIVED - Payer FSP has received the transaction from the Payee FSP. + - PENDING - Payer FSP has sent the transaction request to the Payer. + - ACCEPTED - Payer has approved the transaction. + - REJECTED - Payer has rejected the transaction. + example: RECEIVED + requestToPayResponse: + type: object + required: *ref_117 + properties: *ref_118 + requestToPayTransferRequest: + type: object + required: *ref_119 + properties: *ref_120 + requestToPayTransferResponse: + type: object + required: *ref_121 + properties: *ref_122 + transferContinuationAcceptOTP: + type: object + required: *ref_123 + properties: *ref_124 + accountsRequest: + type: array + items: *ref_58 + accountCreationStatus: + type: array + items: *ref_125 + accountsCreationState: + type: string + enum: *ref_126 + accountsResponse: + type: object + required: *ref_59 + properties: *ref_60 + errorAccountsResponse: + allOf: *ref_62 + async2SyncCurrentState: + type: string + enum: *ref_69 + partiesByIdResponse: + title: partiesByIdResponse + type: object + description: GET /parties/{Type}/{ID} response object + properties: *ref_127 + required: *ref_128 + QuotesPostRequest: + title: QuotesPostRequest + type: object + description: The object sent in the POST /quotes request. + properties: *ref_129 + required: *ref_130 + simpleQuotesPostRequest: + title: simpleQuotesPostRequest + type: object + properties: *ref_131 + required: *ref_132 + quotesPostResponse: + title: QuotesPostResponse + type: object + properties: *ref_133 + required: *ref_134 + errorQuotesResponse: + allOf: *ref_135 + TransfersPostRequest: + title: TransfersPostRequest + type: object + description: The object sent in the POST /transfers request. + properties: *ref_136 + required: *ref_137 + simpleTransfersPostRequest: + title: SimpleTransfersPostRequest + type: object + properties: *ref_138 + required: *ref_139 + simpleTransfersPostResponse: + title: SimpleTransfersPostResponse + type: object + properties: *ref_140 + required: *ref_141 + errorSimpleTransfersResponse: + allOf: *ref_142 + responses: + transferSuccess: + description: Transfer completed successfully + content: *ref_15 + transferBadRequest: + description: Malformed or missing required body, headers or parameters + content: *ref_143 + transferServerError: + description: An error occurred processing the transfer + content: *ref_16 + transferTimeout: + description: Timeout occurred processing the transfer + content: *ref_17 + bulkTransactionAccepted: + description: Bulk transfer accepted successfully + bulkTransferBadRequest: + description: Malformed or missing required body, headers or parameters + content: *ref_41 + errorResponse: + description: Internal Server Error + content: *ref_42 + bulkTransactionPutBadRequest: + description: Malformed or missing required body, headers or parameters + content: *ref_144 + bulkTransferSuccess: + description: Bulk transfer completed successfully + content: *ref_145 + bulkQuoteSuccess: + description: Bulk quote completed successfully + content: *ref_146 + bulkQuoteBadRequest: + description: Malformed or missing required body, headers or parameters + content: *ref_147 + bulkQuoteServerError: + description: An error occurred processing the bulk quote + content: *ref_148 + bulkQuoteTimeout: + description: Timeout occurred processing the bulk quote + content: *ref_149 + requestToPaySuccess: + description: Request to Pay completed successfully + content: *ref_150 + requestToPayTransferSuccess: + description: Transfer completed successfully + content: *ref_151 + requestToPayTransferBadRequest: + description: Malformed or missing required body, headers or parameters + content: *ref_152 + accountsCreationCompleted: + description: Accounts creation completed + content: *ref_153 + accountsCreationError: + description: An error occurred creating accounts + content: *ref_61 + accountsCreationTimeout: + description: Timeout occurred creating accounts + content: *ref_154 + partiesByIdSuccess: + description: PartiesByIdSuccess + content: *ref_67 + partiesByIdError404: + description: PartiesByIdError404 + content: *ref_68 + quotesPostSuccess: + description: sync response from POST /quotes + content: *ref_155 + quotesServerError: + description: An error occurred processing the quotes request + content: *ref_156 + simpleTransfersPostSuccess: + description: sync response from POST /simpleTransfers + content: *ref_157 + simpleTransfersServerError: + description: An error occurred processing the simple transfers request + content: *ref_158 + parameters: + transferId: + name: transferId + in: path + required: true + schema: *ref_18 + description: >- + Identifier of the transfer to continue as returned in the response to a + `POST /transfers` request. + bulkTransactionId: + name: bulkTransactionId + in: path + required: true + schema: *ref_159 + description: >- + Identifier of the bulk transaction to continue as returned in the + response to a `POST /bulkTransaction` request. + bulkTransferId: + name: bulkTransferId + in: path + required: true + schema: *ref_160 + description: >- + Identifier of the bulk transfer to continue as returned in the response + to a `POST /bulkTransfers` request. + bulkQuoteId: + name: bulkQuoteId + in: path + required: true + schema: *ref_161 + description: >- + Identifier of the bulk transfer to continue as returned in the response + to a `POST /bulkTransfers` request. + requestToPayTransactionId: + name: requestToPayTransactionId + in: path + required: true + schema: *ref_162 + description: >- + Identifier of the merchant request to pay transfer to continue as + returned in the response to a `POST /requestToPayTransfer` request. + Type: + name: Type + in: path + required: true + schema: *ref_65 + description: The type of the party identifier. For example, `MSISDN`, `PERSONAL_ID`. + ID: + name: ID + in: path + required: true + schema: *ref_66 + description: The identifier value. + SubId: + name: SubId + in: path + required: true + schema: *ref_163 + description: >- + A sub-identifier of the party identifier, or a sub-type of the party + identifier's type. For example, `PASSPORT`, `DRIVING_LICENSE`. \ No newline at end of file diff --git a/test/func/config/ttk-ttksim3/spec_files/api_definitions/mojaloop_sdk_outbound_scheme_adapter_1.0/callback_map.json b/test/func/config/ttk-ttksim3/spec_files/api_definitions/mojaloop_sdk_outbound_scheme_adapter_1.0/callback_map.json new file mode 100644 index 000000000..ee8d0472f --- /dev/null +++ b/test/func/config/ttk-ttksim3/spec_files/api_definitions/mojaloop_sdk_outbound_scheme_adapter_1.0/callback_map.json @@ -0,0 +1,46 @@ +{ + "/bulkTransactions": { + "post": { + "fspid": "{$request.headers.fspiop-source}", + "successCallback": { + "method": "put", + "path": "/bulkTransactions/{bulkTransactionId}", + "pathPattern": "/bulkTransactions/{$request.body.bulkTransactionId}", + "headerOverride": { + "Date": "{$request.headers.date}" + }, + "bodyOverride": {} + }, + "errorCallback": { + "method": "put", + "path": "/bulkTransactions/{bulkTransactionId}/error", + "pathPattern": "/bulkTransactions/{$request.body.bulkTransactionId}/error", + "headerOverride": { + "Date": "{$request.headers.date}" + } + } + } + }, + "/bulkTransactions/{bulkTransactionId}": { + "put": { + "fspid": "{$request.headers.fspiop-source}", + "successCallback": { + "method": "put", + "path": "/bulkTransactions/{bulkTransactionId}", + "pathPattern": "/bulkTransactions/{$request.params.bulkTransactionId}", + "headerOverride": { + "Date": "{$request.headers.date}" + }, + "bodyOverride": {} + }, + "errorCallback": { + "method": "put", + "path": "/bulkTransactions/{bulkTransactionId}/error", + "pathPattern": "/bulkTransactions/{$request.params.bulkTransactionId}/error", + "headerOverride": { + "Date": "{$request.headers.date}" + } + } + } + } +} diff --git a/test/func/config/ttk-ttksim3/spec_files/api_definitions/mojaloop_sdk_outbound_scheme_adapter_1.0/mockRef.json b/test/func/config/ttk-ttksim3/spec_files/api_definitions/mojaloop_sdk_outbound_scheme_adapter_1.0/mockRef.json new file mode 100644 index 000000000..f0060c75d --- /dev/null +++ b/test/func/config/ttk-ttksim3/spec_files/api_definitions/mojaloop_sdk_outbound_scheme_adapter_1.0/mockRef.json @@ -0,0 +1,22 @@ +[ + { + "id": "party.personalInfo.dateOfBirth", + "pattern": "^(19)\\d\\d[-](0[1-9]|1[012])[-](0[1-9]|[12][0-9]|2[0-8])$" + }, + { + "id": "party.name", + "pattern": "Vijay Kumar Guthi" + }, + { + "id": "party.personalInfo.complexName.firstName", + "pattern": "Vijay" + }, + { + "id": "party.personalInfo.complexName.lastName", + "pattern": "Kumar" + }, + { + "id": "party.personalInfo.complexName.middleName", + "pattern": "Guthi" + } +] diff --git a/test/func/config/ttk-ttksim3/spec_files/api_definitions/mojaloop_sdk_outbound_scheme_adapter_1.0/response_map.json b/test/func/config/ttk-ttksim3/spec_files/api_definitions/mojaloop_sdk_outbound_scheme_adapter_1.0/response_map.json new file mode 100644 index 000000000..1ad829f38 --- /dev/null +++ b/test/func/config/ttk-ttksim3/spec_files/api_definitions/mojaloop_sdk_outbound_scheme_adapter_1.0/response_map.json @@ -0,0 +1,21 @@ +{ + "/parties/{Type}/{ID}": { + "get": { + "response": { + "bodyOverride": { + "party": { + "partyIdInfo": { + "partyIdType": "{$request.params.Type}", + "partyIdentifier": "{$request.params.ID}", + "fspId": "ttk", + "partySubIdOrType": null, + "extensionList": null + }, + "accounts": null, + "merchantClassificationCode": null + } + } + } + } + } +} \ No newline at end of file diff --git a/test/func/config/ttk-ttksim3/spec_files/api_definitions/mojaloop_simulator_sim_1.4/api_spec.yaml b/test/func/config/ttk-ttksim3/spec_files/api_definitions/mojaloop_simulator_sim_1.4/api_spec.yaml new file mode 100644 index 000000000..010ec3d13 --- /dev/null +++ b/test/func/config/ttk-ttksim3/spec_files/api_definitions/mojaloop_simulator_sim_1.4/api_spec.yaml @@ -0,0 +1,1205 @@ +openapi: 3.0.1 +info: + title: Mojaloop Simulator Inbound + description: Mojaloop Simulator Inbound - To be implemented by DFSP backend + license: + name: Open API for FSP Interoperability (FSPIOP) + url: http://www.majaloop.io + version: 1.1.1 + +paths: + /: + get: + summary: Health check endpoint. + operationId: healthCheck + responses: + 200: + description: Returns empty body if the service is running. + /participants/{idType}/{idValue}: + get: + summary: Asks for the FSPID of the scheme participant that can handle transfers for the specified identifier type and value + tags: + - Participants + operationId: ParticipantsGetByTypeAndID + parameters: + - name: idType + in: path + required: true + schema: + $ref: '#/components/schemas/idType' + - name: idValue + in: path + required: true + schema: + $ref: '#/components/schemas/idValue' + responses: + 200: + description: Response containing details of the requested party + content: + application/json: + schema: + $ref: '#/components/schemas/participantsResponse' + 404: + description: The party specified by the provided identifier type and value is not known to the server + 400: + description: Malformed or missing required headers or parameters + content: + application/json: + schema: + $ref: '#/components/schemas/errorResponse' + 500: + description: An error occured processing the request + content: + application/json: + schema: + $ref: '#/components/schemas/errorResponse' + + /participants/{idType}/{idValue}/{subIdValue}: + get: + summary: Asks for the FSPID of the scheme participant that can handle transfers for the specified identifier type, value and subId value + tags: + - Participants + operationId: ParticipantsGetByTypeIDAndSubId + parameters: + - name: idType + in: path + required: true + schema: + $ref: '#/components/schemas/idType' + - name: idValue + in: path + required: true + schema: + $ref: '#/components/schemas/idValue' + - name: subIdValue + in: path + required: true + schema: + $ref: '#/components/schemas/subIdValue' + responses: + 200: + description: Response containing details of the requested party + content: + application/json: + schema: + $ref: '#/components/schemas/participantsResponse' + 404: + description: The party specified by the provided identifier type and value/subId is not known to the server + 400: + description: Malformed or missing required headers or parameters + content: + application/json: + schema: + $ref: '#/components/schemas/errorResponse' + 500: + description: An error occured processing the request + content: + application/json: + schema: + $ref: '#/components/schemas/errorResponse' + + /parties/{idType}/{idValue}: + get: + summary: Requests information relating to a transfer party identified by the specified identifier type and value + tags: + - Parties + operationId: PartiesGetByTypeAndID + parameters: + - name: idType + in: path + required: true + schema: + $ref: '#/components/schemas/idType' + - name: idValue + in: path + required: true + schema: + $ref: '#/components/schemas/idValue' + responses: + 200: + description: Response containing details of the requested party + content: + application/json: + schema: + $ref: '#/components/schemas/transferParty' + 404: + description: The party specified by the provided identifier type and value is not known to the server + 400: + description: Malformed or missing required headers or parameters + content: + application/json: + schema: + $ref: '#/components/schemas/errorResponse' + 500: + description: An error occured processing the request + content: + application/json: + schema: + $ref: '#/components/schemas/errorResponse' + + /parties/{idType}/{idValue}/{subIdValue}: + get: + summary: Requests information relating to a transfer party identified by the specified identifier type, value and subId value + tags: + - Parties + operationId: PartiesGetByTypeIdAndSubId + parameters: + - name: idType + in: path + required: true + schema: + $ref: '#/components/schemas/idType' + - name: idValue + in: path + required: true + schema: + $ref: '#/components/schemas/idValue' + - name: subIdValue + in: path + required: true + schema: + $ref: '#/components/schemas/subIdValue' + responses: + 200: + description: Response containing details of the requested party + content: + application/json: + schema: + $ref: '#/components/schemas/transferParty' + 404: + description: The party specified by the provided identifier type and value is not known to the server + 400: + description: Malformed or missing required headers or parameters + content: + application/json: + schema: + $ref: '#/components/schemas/errorResponse' + 500: + description: An error occured processing the request + content: + application/json: + schema: + $ref: '#/components/schemas/errorResponse' + + /quoterequests: + post: + summary: Requests a quote for the specified transfer + tags: + - Quotes + operationId: QuoteRequest + requestBody: + description: Request for a transfer quotation + content: + application/json: + schema: + $ref: '#/components/schemas/quoteRequest' + responses: + 200: + description: A response to the transfer quotation request + content: + application/json: + schema: + $ref: '#/components/schemas/quoteResponse' + 400: + description: Malformed or missing required headers or parameters + content: + application/json: + schema: + $ref: '#/components/schemas/errorResponse' + 500: + description: An error occured processing the request + content: + application/json: + schema: + $ref: '#/components/schemas/errorResponse' + + /transactionrequests: + post: + summary: transaction request that supports pull based transfers + tags: + - TransactionRequest + operationId: TransactionRequest + requestBody: + description: Request for Transaction Request + content: + application/json: + schema: + $ref: '#/components/schemas/transactionRequest' + responses: + 200: + description: A response to the transfer transaction request + content: + application/json: + schema: + $ref: '#/components/schemas/transactionRequestResponse' + 400: + description: Malformed or missing required headers or parameters + content: + application/json: + schema: + $ref: '#/components/schemas/errorResponse' + 500: + description: An error occured processing the request + content: + application/json: + schema: + $ref: '#/components/schemas/errorResponse' + + /transfers: + post: + summary: Transfers funds from an external account to an internal account + tags: + - Transfers + operationId: TransfersPost + requestBody: + description: An incoming transfer request + content: + application/json: + schema: + $ref: '#/components/schemas/transferRequest' + responses: + 200: + description: The transfer was accepted + content: + application/json: + schema: + $ref: '#/components/schemas/transferResponse' + 400: + description: Malformed or missing required headers or parameters + content: + application/json: + schema: + $ref: '#/components/schemas/errorResponse' + 500: + description: An error occured processing the request + content: + application/json: + schema: + $ref: '#/components/schemas/errorResponse' + + /transfers/{transferId}: + put: + summary: Receive notification for a specific transfer + description: The HTTP request `PUT /transfers/{transferId}` is used to receive notification for transfer being fulfiled when the FSP is a Payee + parameters: + - name: transferId + in: path + required: true + schema: + $ref: '#/components/schemas/idValue' + tags: + - Transfers + operationId: TransfersPut + requestBody: + description: An incoming notification for fulfiled transfer + content: + application/json: + schema: + $ref: '#/components/schemas/fulfilNotification' + responses: + 200: + description: The notification was accepted + 500: + description: An error occured processing the request + content: + application/json: + schema: + $ref: '#/components/schemas/errorResponse' + + + /otp/{requestToPayId}: + get: + summary: Requests OTP + tags: + - OTP + operationId: OtpGet + parameters: + - name: requestToPayId + in: path + required: true + schema: + $ref: '#/components/schemas/idValue' + responses: + 200: + description: Response containing details of the OTP + content: + application/json: + schema: + $ref: '#/components/schemas/otpDetails' + 404: + description: The party specified by the provided identifier type and value is not known to the server + 400: + description: Malformed or missing required headers or parameters + content: + application/json: + schema: + $ref: '#/components/schemas/errorResponse' + 500: + description: An error occured processing the request + content: + application/json: + schema: + $ref: '#/components/schemas/errorResponse' + + /bulkQuotes: + post: + summary: Requests a bulk quote + tags: + - BulkQuotes + operationId: BulkQuotesPost + requestBody: + description: Incoming request for a bulk quotation + content: + application/json: + schema: + $ref: '#/components/schemas/bulkQuoteRequest' + responses: + 200: + description: A response to the bulk quote request + content: + application/json: + schema: + $ref: '#/components/schemas/bulkQuoteResponse' + 400: + description: Malformed or missing required headers or parameters + content: + application/json: + schema: + $ref: '#/components/schemas/errorResponse' + 500: + description: An error occured processing the request + content: + application/json: + schema: + $ref: '#/components/schemas/errorResponse' + + /bulkQuotes/{idValue}: + get: + summary: Requests information relating to a bulk quote identified by the specified identifier value + tags: + - BulkQuotes + operationId: BulkQuotesGet + parameters: + - name: idValue + in: path + required: true + schema: + $ref: '#/components/schemas/idValue' + responses: + 200: + description: Response containing details of the requested bulk quote + content: + application/json: + schema: + $ref: '#/components/schemas/bulkQuoteResponse' + 404: + description: The bulk quote specified by the provided identifier value is not known to the server + 400: + description: Malformed or missing required headers or parameters + content: + application/json: + schema: + $ref: '#/components/schemas/errorResponse' + 500: + description: An error occured processing the request + content: + application/json: + schema: + $ref: '#/components/schemas/errorResponse' + + /bulkTransactions/{bulkTransactionId}: + put: + summary: Callbacks for the bulk transaction request + operationId: BulkTransactionsPut + description: >- + The HTTP request `PUT /bulkTransactions/{bulkTransactionId}` is used to + amend information regarding a bulk transaction, i.e. when + autoAcceptParty or autoAcceptQuote is false then the payer need to + provide confirmation to proceed with further processing of the request. + The `{bulkTransactionId}` in the URI should contain the + `bulkTransactionId` that was used for the creation of the bulk transfer. + tags: + - BulkTransactionsPut + parameters: + - name: bulkTransactionId + in: path + required: true + schema: + title: CorrelationId + type: string + pattern: >- + ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + description: >- + Identifier that correlates all messages of the same sequence. The + API data type UUID (Universally Unique Identifier) is a JSON + String in canonical format, conforming to [RFC + 4122](https://tools.ietf.org/html/rfc4122), that is restricted by + a regular expression for interoperability reasons. A UUID is + always 36 characters long, 32 hexadecimal symbols and 4 dashes + (‘-‘). + example: b51ec534-ee48-4575-b6a9-ead2955b8069 + description: >- + Identifier of the bulk transaction to continue as returned in the + response to a `POST /bulkTransaction` request. + requestBody: + description: Bulk transaction request body + content: + application/json: + schema: + type: object + required: + - bulkHomeTransactionID + - individualTransferResults + properties: + bulkHomeTransactionID: + type: string + description: >- + Transaction ID from the DFSP backend, used to reconcile + transactions between the Switch and DFSP backend + systems. + individualTransferResults: + description: >- + List of individual transfers in a bulk transfer with + accept party information. + type: array + minItems: 1 + items: + type: object + description: >- + Data model for the 'individualTransfer' while + accepting party or quote. + properties: + homeTransactionId: + type: string + description: >- + Transaction ID from the DFSP backend, used to + reconcile transactions between the Switch and + DFSP backend systems. + transactionId: + title: CorrelationId + type: string + pattern: >- + ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + description: >- + Identifier that correlates all messages of the + same sequence. The API data type UUID + (Universally Unique Identifier) is a JSON + String in canonical format, conforming to [RFC + 4122](https://tools.ietf.org/html/rfc4122), + that is restricted by a regular expression for + interoperability reasons. A UUID is always 36 + characters long, 32 hexadecimal symbols and 4 + dashes (‘-‘). + example: b51ec534-ee48-4575-b6a9-ead2955b8069 + required: + - homeTransactionId + - transactionId + + required: true + responses: + '202': + description: Bulk transaction information successfully amended + '400': + description: Malformed or missing required body, headers or parameters + '500': + description: An error occurred processing the bulk transaction + + + /bulkTransfers: + post: + summary: Execute bulk transfer of funds from an external account to internal accounts + tags: + - BulkTransfers + operationId: BulkTransfersPost + requestBody: + description: An incoming bulk transfer request + content: + application/json: + schema: + $ref: '#/components/schemas/bulkTransferRequest' + responses: + 200: + description: The bulk transfer was accepted + content: + application/json: + schema: + $ref: '#/components/schemas/bulkTransferResponse' + 400: + description: Malformed or missing required headers or parameters + content: + application/json: + schema: + $ref: '#/components/schemas/errorResponse' + 500: + description: An error occured processing the request + content: + application/json: + schema: + $ref: '#/components/schemas/errorResponse' + + /bulkTransfers/{idValue}: + get: + summary: Requests information relating to a bulk transfer identified by the specified identifier value + tags: + - BulkTransfers + operationId: BulkTransfersGet + parameters: + - name: idValue + in: path + required: true + schema: + $ref: '#/components/schemas/idValue' + responses: + 200: + description: Response containing details of the requested bulk transfer + content: + application/json: + schema: + $ref: '#/components/schemas/bulkTransferResponse' + 404: + description: The bulk transfer specified by the provided identifier value is not known to the server + 400: + description: Malformed or missing required headers or parameters + content: + application/json: + schema: + $ref: '#/components/schemas/errorResponse' + 500: + description: An error occured processing the request + content: + application/json: + schema: + $ref: '#/components/schemas/errorResponse' + +components: + schemas: + quoteRequest: + type: object + description: A request for a quote for transfer from the DFSP backend + required: + - quoteId + - transactionId + - to + - from + - amountType + - amount + - currency + - transactionType + - initiator + - initiatorType + properties: + quoteId: + $ref: '#/components/schemas/quoteId' + transactionId: + $ref: '#/components/schemas/transactionId' + to: + $ref: '#/components/schemas/transferParty' + from: + $ref: '#/components/schemas/transferParty' + amountType: + $ref: '#/components/schemas/amountType' + amount: + $ref: '#/components/schemas/money' + currency: + $ref: '#/components/schemas/currency' + feesAmount: + $ref: '#/components/schemas/money' + feesCurrency: + $ref: '#/components/schemas/currency' + transactionType: + $ref: '#/components/schemas/transactionType' + initiator: + $ref: '#/components/schemas/initiator' + initiatorType: + $ref: '#/components/schemas/initiatorType' + geoCode: + $ref: '#/components/schemas/geoCode' + note: + type: string + minLength: 1 + maxLength: 128 + description: An optional note associated with the requested transfer + expiration: + $ref: '#/components/schemas/timestamp' + + transactionRequest: + type: object + description: A request for a pull based transfer + required: + - transactionRequestId + - to + - from + - amount + - currency + - transactionType + - initiator + - initiatorType + properties: + transactionRequestId: + $ref: '#/components/schemas/transactionRequestId' + to: + $ref: '#/components/schemas/transferParty' + from: + $ref: '#/components/schemas/transferParty' + amount: + $ref: '#/components/schemas/money' + currency: + $ref: '#/components/schemas/currency' + transactionType: + $ref: '#/components/schemas/transactionType' + initiator: + $ref: '#/components/schemas/initiator' + initiatorType: + $ref: '#/components/schemas/initiatorType' + geoCode: + $ref: '#/components/schemas/geoCode' + note: + type: string + minLength: 1 + maxLength: 128 + description: An optional note associated with the requested transfer + expiration: + $ref: '#/components/schemas/timestamp' + + timestamp: + type: string + description: An ISO-8601 formatted timestamp + pattern: ^(?:[1-9]\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\d|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-02-29)T(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:(\.\d{3}))(?:Z|[+-][01]\d:[0-5]\d)$ + + dateOfBirth: + type: string + description: Date of birth in the form YYYY-MM-DD + pattern: ^(?:[1-9]\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\d|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-02-29)$ + + initiator: + type: string + enum: + - PAYER + - PAYEE + + initiatorType: + type: string + enum: + - CONSUMER + - AGENT + - BUSINESS + - DEVICE + + quoteResponse: + type: object + description: A response to a request for a quote + required: + - quoteId + - transactionId + - transferAmount + - transferAmountCurrency + properties: + quoteId: + $ref: '#/components/schemas/quoteId' + transactionId: + $ref: '#/components/schemas/transactionId' + transferAmount: + $ref: '#/components/schemas/money' + transferAmountCurrency: + $ref: '#/components/schemas/currency' + payeeReceiveAmount: + $ref: '#/components/schemas/money' + payeeReceiveAmountCurrency: + $ref: '#/components/schemas/currency' + payeeFspFeeAmount: + $ref: '#/components/schemas/money' + payeeFspFeeAmountCurrency: + $ref: '#/components/schemas/currency' + payeeFspCommissionAmount: + $ref: '#/components/schemas/money' + payeeFspCommissionAmountCurrency: + $ref: '#/components/schemas/currency' + expiration: + $ref: '#/components/schemas/timestamp' + geoCode: + $ref: '#/components/schemas/geoCode' + extensionList: + $ref: '#/components/schemas/extensionList' + + transactionRequestResponse: + type: object + description: A response to a request for a quote + required: + - transactionId + - transactionRequestState + properties: + transactionId: + $ref: '#/components/schemas/transactionId' + transferAmount: + $ref: '#/components/schemas/transactionRequestState' + + participantsResponse: + type: object + properties: + fspId: + $ref: '#/components/schemas/fspId' + + fspId: + type: string + minLength: 1 + maxLength: 32 + + payerType: + type: string + enum: + - CONSUMER + - AGENT + - BUSINESS + - DEVICE + + amountType: + type: string + enum: + - SEND + - RECEIVE + + transactionType: + type: string + enum: + - TRANSFER + - DEPOSIT + - PAYMENT + + transactionRequestState: + type: string + enum: + - RECEIVED + - PENDING + - ACCEPTED + - REJECTED + + transferRequest: + type: object + required: + - transferId + - currency + - amount + properties: + transferId: + $ref: '#/components/schemas/transferId' + quote: + $ref: '#/components/schemas/quoteResponse' + from: + $ref: '#/components/schemas/transferParty' + to: + $ref: '#/components/schemas/transferParty' + amountType: + $ref: '#/components/schemas/amountType' + currency: + $ref: '#/components/schemas/currency' + amount: + $ref: '#/components/schemas/money' + transactionType: + $ref: '#/components/schemas/transactionType' + note: + maxLength: 128 + type: string + + otpDetails: + type: object + required: + - otpValue + properties: + otpValue: + type: string + description: OTP value + + idType: + type: string + enum: + - MSISDN + - ACCOUNT_NO + - EMAIL + - PERSONAL_ID + - BUSINESS + - DEVICE + - ACCOUNT_ID + - IBAN + - ALIAS + + idValue: + type: string + minLength: 1 + maxLength: 128 + + subIdValue: + type: string + minLength: 1 + maxLength: 128 + + money: + pattern: ^([0]|([1-9][0-9]{0,17}))([.][0-9]{0,3}[1-9])?$ + type: string + + transferResponse: + type: object + required: + - homeTransactionId + properties: + homeTransactionId: + type: string + description: Transaction ID from the DFSP backend, used to reconcile transactions between the switch and DFSP backend systems + + currency: + maxLength: 3 + minLength: 3 + type: string + + transferId: + pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + type: string + description: A Mojaloop API transfer identifier (UUID) + + quoteId: + pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + type: string + description: A Mojaloop API quote identifier (UUID) + + transactionRequestId: + pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + type: string + description: A Mojaloop API transaction request identifier (UUID) + + transactionId: + pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + type: string + description: ID of the transaction, the ID is decided by the Payer FSP during the creation of the quote + + transferParty: + type: object + required: + - idType + - idValue + properties: + type: + $ref: '#/components/schemas/payerType' + idType: + $ref: '#/components/schemas/idType' + idValue: + type: string + description: The identifier string used to identify the sender + subIdValue: + type: string + description: The sub identifier string used to identify the sender + displayName: + type: string + description: Display name of the sender if known + firstName: + type: string + description: Party first name + middleName: + type: string + description: Party moddle name + lastName: + type: string + description: Party last name + dateOfBirth: + $ref: '#/components/schemas/dateOfBirth' + merchantClassificationCode: + type: string + description: Up to 4 digits specifying the senders merchant classification, if known and applicable + + bulkQuoteRequest: + type: object + description: A request for a bulk quote + required: + - bulkQuoteId + - from + - individualQuotes + properties: + bulkQuoteId: + $ref: '#/components/schemas/bulkQuoteId' + from: + $ref: '#/components/schemas/transferParty' + geoCode: + $ref: '#/components/schemas/geoCode' + expiration: + $ref: '#/components/schemas/timestamp' + individualQuotes: + type: array + minItems: 1 + maxItems: 1000 + items: + $ref: '#/components/schemas/IndividualQuote' + + bulkQuoteResponse: + type: object + description: A response to a request for a bulk quote + required: + - bulkQuoteId + - individualQuoteResults + properties: + bulkQuoteId: + $ref: '#/components/schemas/bulkQuoteId' + expiration: + $ref: '#/components/schemas/timestamp' + individualQuoteResults: + type: array + minItems: 1 + maxItems: 1000 + items: + oneOf: + - $ref: '#/components/schemas/IndividualQuoteResultSuccess' + - $ref: '#/components/schemas/IndividualQuoteResultFailed' + description: Fees for each individual transaction, if any of them are charged per + transaction. + + IndividualQuote: + type: object + description: Data model for individual quote in a bulk quote request + required: + - quoteId + - transactionId + - to + - amountType + - amount + - currency + - transactionType + - initiator + - initiatorType + properties: + quoteId: + $ref: '#/components/schemas/quoteId' + transactionId: + $ref: '#/components/schemas/transactionId' + to: + $ref: '#/components/schemas/transferParty' + amountType: + $ref: '#/components/schemas/amountType' + amount: + $ref: '#/components/schemas/money' + currency: + $ref: '#/components/schemas/currency' + feesAmount: + $ref: '#/components/schemas/money' + feesCurrency: + $ref: '#/components/schemas/currency' + transactionType: + $ref: '#/components/schemas/transactionType' + initiator: + $ref: '#/components/schemas/initiator' + initiatorType: + $ref: '#/components/schemas/initiatorType' + note: + type: string + minLength: 1 + maxLength: 128 + description: An optional note associated with the quote + + IndividualQuoteResultSuccess: + type: object + description: Data model for successful individual quote in a bulk quote response + properties: + quoteId: + $ref: '#/components/schemas/quoteId' + transferAmount: + $ref: '#/components/schemas/money' + transferAmountCurrency: + $ref: '#/components/schemas/currency' + payeeReceiveAmount: + $ref: '#/components/schemas/money' + payeeReceiveAmountCurrency: + $ref: '#/components/schemas/currency' + payeeFspFeeAmount: + $ref: '#/components/schemas/money' + payeeFspFeeAmountCurrency: + $ref: '#/components/schemas/currency' + payeeFspCommissionAmount: + $ref: '#/components/schemas/money' + payeeFspCommissionAmountCurrency: + $ref: '#/components/schemas/currency' + required: + - quoteId + + IndividualQuoteResultFailed: + type: object + description: Data model for failed individual quote in a bulk quote response + properties: + quoteId: + $ref: '#/components/schemas/quoteId' + errorResponse: + $ref: '#/components/schemas/errorResponse' + required: + - quoteId + - errorResponse + + bulkQuoteId: + pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + type: string + description: A Mojaloop API bulk quote identifier (UUID) + + bulkTransferRequest: + type: object + required: + - bulkTransferId + - individualTransfers + properties: + bulkTransferId: + $ref: '#/components/schemas/bulkTransferId' + bulkQuote: + $ref: '#/components/schemas/bulkQuoteResponse' + from: + $ref: '#/components/schemas/transferParty' + individualTransfers: + type: array + minItems: 1 + maxItems: 1000 + items: + $ref: '#/components/schemas/IndividualTransfer' + + IndividualTransfer: + type: object + description: Data model for individual transfer in a bulk transfer request + required: + - transferId + - amount + - currency + properties: + transferId: + $ref: '#/components/schemas/transferId' + to: + $ref: '#/components/schemas/transferParty' + amountType: + $ref: '#/components/schemas/amountType' + amount: + $ref: '#/components/schemas/money' + currency: + $ref: '#/components/schemas/currency' + feesAmount: + $ref: '#/components/schemas/money' + feesCurrency: + $ref: '#/components/schemas/currency' + transactionType: + $ref: '#/components/schemas/transactionType' + initiator: + $ref: '#/components/schemas/initiator' + initiatorType: + $ref: '#/components/schemas/initiatorType' + note: + type: string + minLength: 1 + maxLength: 128 + description: An optional note associated with the quote + + IndividualTransferResult: + type: object + description: Data model for individual transfer in a bulk transfer response + required: + - transferId + properties: + transferId: + $ref: '#/components/schemas/transferId' + errorResponse: + $ref: '#components/schemes/errorResponse' + extensionList: + $ref: '#/components/schemas/extensionList' + + bulkTransferResponse: + type: object + required: + - homeTransactionId + properties: + bulkTransferId: + $ref: '#/components/schemas/bulkTransferId' + homeTransactionId: + type: string + description: Transaction ID from the DFSP backend, used to reconcile transactions between the switch and DFSP backend systems + individualTransferResults: + type: array + minItems: 1 + maxItems: 1000 + items: + $ref: '#/components/schemas/IndividualTransferResult' + + bulkTransferId: + pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + type: string + description: A Mojaloop API transfer identifier (UUID) + + geoCode: + type: object + description: Indicates the geographic location from where the transaction was initiated. + properties: + latitude: + $ref: '#/components/schemas/latitude' + longitude: + $ref: '#/components/schemas/longitude' + required: + - latitude + - longitude + + latitude: + type: string + pattern: ^(\+|-)?(?:90(?:(?:\.0{1,6})?)|(?:[0-9]|[1-8][0-9])(?:(?:\.[0-9]{1,6})?))$ + description: The API data type Latitude is a JSON String in a lexical format that is restricted by a regular expression for interoperability reasons. + + longitude: + type: string + pattern: ^(\+|-)?(?:180(?:(?:\.0{1,6})?)|(?:[0-9]|[1-9][0-9]|1[0-7][0-9])(?:(?:\.[0-9]{1,6})?))$ + description: The API data type Longitude is a JSON String in a lexical format that is restricted by a regular expression for interoperability reasons. + + errorResponse: + type: object + properties: + statusCode: + type: string + description: | + Backend error code from FSP. Ideally, statusCode is FSPIOP conforming. SDK will use status code to retrieve an FSPIOP error with the same code. + Otherwise, a suitable generic FSPIOP will be used with the errorResponse in the FSPIOP error message. + message: + type: string + description: Error message text + + extensionList: + type: array + items: + $ref: '#/components/schemas/extensionItem' + minItems: 0 + maxItems: 16 + + extensionItem: + type: object + properties: + key: + type: string + minLength: 1 + maxLength: 32 + value: + type: string + minLength: 1 + maxLength: 128 + + transferState: + type: string + enum: + - RECEIVED + - RESERVED + - COMMITTED + - ABORTED + description: > + Below are the allowed values for the enumeration + - RECEIVED DFSP has received the transfer. + - RESERVED DFSP has reserved the transfer. + - COMMITTED DFSP has successfully performed the transfer. + - ABORTED DFSP has aborted the transfer due a rejection or failure to perform the transfer. + + fulfilNotification: + title: TransfersIDPatchResponse + type: object + description: PUT /transfers/{transferId} object + properties: + completedTimestamp: + $ref: '#/components/schemas/timestamp' + transferState: + $ref: '#/components/schemas/transferState' + extensionList: + $ref: '#/components/schemas/extensionList' + required: + - completedTimestamp + - transferState + diff --git a/test/func/config/ttk-ttksim3/spec_files/api_definitions/mojaloop_simulator_sim_1.4/mockRef.json b/test/func/config/ttk-ttksim3/spec_files/api_definitions/mojaloop_simulator_sim_1.4/mockRef.json new file mode 100644 index 000000000..a3c81ce8c --- /dev/null +++ b/test/func/config/ttk-ttksim3/spec_files/api_definitions/mojaloop_simulator_sim_1.4/mockRef.json @@ -0,0 +1,75 @@ +[ + { + "id": "firstName", + "pattern": "John|David|Michael|Chris|Mike|Mark|Paul|Daniel|James|Maria" + }, + { + "id": "middleName", + "pattern": "G|P|N|S" + }, + { + "id": "lastName", + "pattern": "Smith|Jones|Johnson|Lee|Brown|Williams|Rodriguez|Garcia|Gonzalez|Lopez" + }, + { + "id": "dateOfBirth", + "pattern": "^(19)\\d\\d[-](0[1-9]|1[012])[-](0[1-9]|[12][0-9]|2[0-8])$" + }, + { + "id": "transferState", + "pattern": "COMMITTED|RESERVED|ABORTED|RECEIVED" + }, + { + "id": "fulfilment", + "pattern": "[A-Fa-f0-9]{64}" + }, + { + "id": "condition", + "pattern": "[A-Fa-f0-9]{64}" + }, + { + "id": "ilpPacket", + "pattern": "[A-Fa-f0-9]{256}" + }, + { + "id": "transferAmount.currency", + "pattern": "USD" + }, + { + "id": "transferAmount.amount", + "pattern": "123" + }, + { + "id": "payeeReceiveAmountCurrency", + "pattern": "USD" + }, + { + "id": "payeeReceiveAmount", + "pattern": "123" + }, + { + "id": "payeeFspFeeAmountCurrency", + "pattern": "USD" + }, + { + "id": "payeeFspFeeAmount", + "pattern": "2" + }, + { + "id": "payeeFspCommissionAmountCurrency", + "pattern": "USD" + }, + { + "id": "payeeFspCommissionAmount", + "pattern": "3" + }, + + { + "id": "errorInformation.errorCode", + "pattern": "600[1-9]" + }, + { + "id": "errorInformation.errorDescription", + "pattern": "This is a mock error description" + } +] \ No newline at end of file diff --git a/test/func/config/ttk-ttksim3/spec_files/api_definitions/mojaloop_simulator_sim_1.4/response_map.json b/test/func/config/ttk-ttksim3/spec_files/api_definitions/mojaloop_simulator_sim_1.4/response_map.json new file mode 100644 index 000000000..23d28b6fa --- /dev/null +++ b/test/func/config/ttk-ttksim3/spec_files/api_definitions/mojaloop_simulator_sim_1.4/response_map.json @@ -0,0 +1,60 @@ +{ + "/parties/{idType}/{idValue}": { + "get": { + "response": { + "bodyOverride": { + "idType": "{$request.params.idType}", + "idValue": "{$request.params.idValue}", + "merchantClassificationCode": null + } + } + } + }, + "/quoterequests": { + "post": { + "response": { + "bodyOverride": { + "quoteId": "{$request.body.quoteId}", + "transactionId": "{$request.body.transactionId}", + "transferAmount": "{$request.body.amount}", + "transferAmountCurrency": "{$request.body.currency}", + "expiration": "{$request.body.expiration}", + "geoCode": null, + "extensionList": null + } + } + } + }, + "/transfers": { + "post": { + "response": { + "bodyOverride": { + "homeTransactionId": "{$request.body.transferId}" + } + } + } + }, + "/bulkQuotes": { + "post": { + "response": { + "bodyOverride": { + "bulkQuoteId": "{$request.body.bulkQuoteId}" + } + } + } + }, + "/bulkTransfers": { + "post": { + "response": { + "bodyOverride": { + "bulkTransferId": "{$request.body.bulkTransferId}" + } + } + } + }, + "/bulkTransactions/{bulkTransactionId}": { + "put": { + "response": {} + } + } +} \ No newline at end of file diff --git a/test/func/config/ttk-ttksim3/spec_files/reports/templates/newman/html_template.html b/test/func/config/ttk-ttksim3/spec_files/reports/templates/newman/html_template.html new file mode 100644 index 000000000..e10fc0b1f --- /dev/null +++ b/test/func/config/ttk-ttksim3/spec_files/reports/templates/newman/html_template.html @@ -0,0 +1,1118 @@ + + {{!-- {{#each items}} + + + {{name}} + + + $ {{price}} + + + {{/each}} + + + + Total: ${{total items}} + + --}} + + + + + + + + + Testing Toolkit Assertions Report + + + + + + + + +
+
+ + + +
+
+
+ +
+
+
+
+

Testing Toolkit Report

+
{{runtimeInformation.completedTime}}
+
+
+
+
+
+ +
+
Total Assertions
+

{{totalAssertions test_cases}}

+
+
+
+
+
+
+
+ +
+
Total Passed Tests
+

{{totalPassedAssertions test_cases}}

+
+
+
+
+
+
+
+ +
+
Total Failed Tests
+

{{totalFailedAssertions test_cases}}

+
+
+
+
+
+
+
+
+
+
+
+
Runtime Information
+ Template Name: {{name}}
+ {{#if runtimeInformation}} + Total run duration: {{runtimeInformation.runDurationMs}} ms
+ Average response time: {{runtimeInformation.avgResponseTime}}
+ {{/if}} + {{#if extraRuntimeInformation}} + {{#each extraRuntimeInformation}} + {{key}}: {{value}}
+ {{/each}} + + {{/if}} +
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Summary ItemTotalFailed
Test Cases{{totalTestCases test_cases}}{{failedTestCases test_cases}}
Requests{{totalRequests test_cases}}{{failedRequests test_cases}}
Assertions{{totalAssertions test_cases}}{{totalFailedAssertions test_cases}}
+
+
+
+
+
+
+
+
+
+
+ +
+
+ + + +
+ + + + +
+ +
+ +
+
+ {{#each test_cases}} +
+ + +
+ {{#each requests}} +
+
+
+
+ {{#if (ifSkippedRequest status)}} +
+ {{else}} + {{#if (ifAllTestsPassedInRequest request)}} +
+ {{else}} +
+ {{/if}} + {{/if}} + +
+
+
+
+
+
+
+
+
Request Information
+ {{#if (ifSkippedRequest status)}} +
+
+
SKIPPED
+
+
+ {{/if}} + Request Method: {{request.method}}
+ Request URL: {{request.path}}
+
+
+
+
+
Response Information
+ Response Code: {{response.status}} - {{response.statusText}}
+ Mean time per request: NA
+ Mean size per request: NA
+
+
Test Pass Percentage
+
+
+ {{#if (ifSkippedRequest status)}} +
+ {{else}} + {{#if (ifAllTestsPassedInRequest request)}} +
+ {{else}} +
+ {{/if}} + {{/if}} +
{{testPassPercentage request.tests}} %
+
+
+
+
+
+
+
+
+ {{#if request.headers}} +
+
+
+
+
+
Request Headers
+
+ + + + {{#each request.headers}} + + + + + {{/each}} + +
Header NameHeader Value
{{@key}}{{this}}
+
+
+
+
+
+
+ {{/if}} + {{#if request.body}} +
+
+
+
+
+
Request Body
+
+
{{jsonStringify request.body}}
+
+ +
+
+
+
+
+ {{/if}} + {{#if additionalInfo.curlRequest}} +
+
+
+
+
+
CURL command
+
+
{{additionalInfo.curlRequest}}
+
+ +
+
+
+
+
+ {{/if}} + {{#if response.headers}} +
+
+
+
+
+
Response Headers
+
+
{{jsonStringify response.headers}}
+
+ +
+
+
+
+
+ {{/if}} + {{#if response.body}} +
+
+
+
+
+
Response Body
+
+
{{jsonStringify response.body}}
+
+ +
+
+
+
+
+ {{/if}} + {{#if callback.headers}} +
+
+
+
+
+
Callback Headers
+
+ + + + {{#each callback.headers}} + + + + + {{/each}} + +
Header NameHeader Value
{{@key}}{{this}}
+
+
+
+
+
+
+ {{/if}} + {{#if callback.body}} +
+
+
+
+
+
Callback Body
+
+
{{jsonStringify callback.body}}
+
+ +
+
+
+
+
+ {{/if}} + +
+
+
+
Test Information
+
+ + + + {{#each request.tests.assertions}} + + + {{#if (isAssertionSkipped resultStatus.status)}} + + {{else if (isAssertionPassed resultStatus.status)}} + + {{else}} + + + {{/if}} + + {{/each}} + + + + + + + +
NameResult
{{description}} + SKIPPED + + PASSED + + FAILED +
({{resultStatus.message}})
Total{{request.tests.passedAssertionsCount}} / {{request.tests.assertions.length}}
+
+
+
+
+
+
+
Test Failure
+
+ + + + +
Test NameAssertion Error
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{/each}} +
+ +
+ {{/each}} +
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/func/config/ttk-ttksim3/spec_files/reports/templates/newman/pdf_template.html b/test/func/config/ttk-ttksim3/spec_files/reports/templates/newman/pdf_template.html new file mode 100644 index 000000000..412779954 --- /dev/null +++ b/test/func/config/ttk-ttksim3/spec_files/reports/templates/newman/pdf_template.html @@ -0,0 +1,785 @@ + + {{!-- {{#each items}} + + + {{name}} + + + $ {{price}} + + + {{/each}} + + + + Total: ${{total items}} + + --}} + + + + + + + + + Testing Toolkit Assertions Report + + + + + + + + +
+
+
+ +
+
+
+
+


+

Testing Toolkit Report

+
{{runtimeInformation.completedTime}}
+


+
+
+
+
+
+ +
+
Total Assertions
+

{{totalAssertions test_cases}}

+
+
+
+
+
+
+
+ +
+
Total Passed Tests
+

{{totalPassedAssertions test_cases}}

+
+
+
+
+
+
+
+ +
+
Total Failed Tests
+

{{totalFailedAssertions test_cases}}

+
+
+
+
+
+
+
+


+
+
+
+
+
Runtime Information
+ Template Name: {{name}}
+ {{#if runtimeInformation}} + Total run duration: {{runtimeInformation.runDurationMs}} ms
+ Average response time: {{runtimeInformation.avgResponseTime}}
+ {{/if}} +
+
+
+
+


+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Summary ItemTotalFailed
Test Cases{{totalTestCases test_cases}}{{failedTestCases test_cases}}
Requests{{totalRequests test_cases}}{{failedRequests test_cases}}
Assertions{{totalAssertions test_cases}}{{totalFailedAssertions test_cases}}
+
+
+
+
+
+
+
+
+
+

















+


+
+ + +
+ +
+
+ {{#each test_cases}} +
+ + +
+ {{#each requests}} +
+
+
+
+ {{#if (ifAllTestsPassedInRequest request)}} +
+ {{else}} + +
+
+
+
+
+
+
+
Request Information
+ Request Method: {{request.method}}
+ Request URL: {{request.path}}
+
+
+
+
+
Response Information
+ Response Code: {{response.status}} - {{response.statusText}}
+ Mean time per request: NA
+ Mean size per request: NA
+
+
Test Pass Percentage
+
+
+ {{#if (ifAllTestsPassedInRequest request)}} +
+ {{else}} +
+ {{/if}} +
{{testPassPercentage request.tests}} %
+
+
+
+
+
+
+
+
+ {{#if request.headers}} +
+
+
+
+
+
Request Headers
+
+ + + + {{#each request.headers}} + + + + + {{/each}} + +
Header NameHeader Value
{{@key}}{{this}}
+
+
+
+
+
+
+ {{/if}} + {{#if request.body}} +
+
+
+
+
+
Request Body
+
+
{{jsonStringify request.body}}
+
+
+
+
+
+
+ {{/if}} + {{#if response.headers}} +
+
+
+
+
+
Response Headers
+
+
{{jsonStringify response.headers}}
+
+
+
+
+
+
+ {{/if}} + {{#if response.body}} +
+
+
+
+
+
Response Body
+
+
{{jsonStringify response.body}}
+
+
+
+
+
+
+ {{/if}} + {{#if callback.headers}} +
+
+
+
+
+
Callback Headers
+
+ + + + {{#each callback.headers}} + + + + + {{/each}} + +
Header NameHeader Value
{{@key}}{{this}}
+
+
+
+
+
+
+ {{/if}} + {{#if callback.body}} +
+
+
+
+
+
Callback Body
+
+
{{jsonStringify callback.body}}
+
+
+
+
+
+
+ {{/if}} + +
+
+
+
Test Information
+
+ + + + {{#each request.tests.assertions}} + + + {{#if (isAssertionSkipped resultStatus.status)}} + + {{else if (isAssertionPassed resultStatus.status)}} + + {{else}} + + + {{/if}} + + {{/each}} + + + + + + + +
NameResult
{{description}} + SKIPPED + + PASSED + + FAILED +
({{resultStatus.message}})
Total{{request.tests.passedAssertionsCount}} / {{request.tests.assertions.length}}
+
+
+
+
+
+
+
Test Failure
+
+ + + + +
Test NameAssertion Error
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{/each}} +
+ +
+ {{/each}} +
+
+
+
+
+ + + + + + + diff --git a/test/func/config/ttk-ttksim3/spec_files/reports/templates/testcase_definition/table_view.html b/test/func/config/ttk-ttksim3/spec_files/reports/templates/testcase_definition/table_view.html new file mode 100644 index 000000000..13c536bf0 --- /dev/null +++ b/test/func/config/ttk-ttksim3/spec_files/reports/templates/testcase_definition/table_view.html @@ -0,0 +1,133 @@ + + + + + + + + +
+ +
+
+
+ + +
+
+
+ +
+
+
+
Testcase
+
Request Description
+
Test Scenario
+
Expected Result
+
+
+
+ {{#each test_cases}} +
+
+
+
{{fileInfo.path}} + {{#if fileInfo.labels}} + - (Labels: {{fileInfo.labels}}) + {{/if}} +
+
+ + +
+
+ {{#each requests}} +
+
{{#if @first}}{{../meta.info}}{{/if}}
+
{{meta.info}}
+
{{description}}
({{method}} {{operationPath}})
+
+ {{#if tests.assertions}} +
    + {{#each tests.assertions}} +
  • {{description}}
  • + {{/each}} +
+ {{/if}} +
+
+ {{/each}} +
+
+
+
+ {{/each}} + +
+ + + + + + + + + + + \ No newline at end of file diff --git a/test/func/config/ttk-ttksim3/spec_files/rules_callback/config.json b/test/func/config/ttk-ttksim3/spec_files/rules_callback/config.json new file mode 100644 index 000000000..08320e433 --- /dev/null +++ b/test/func/config/ttk-ttksim3/spec_files/rules_callback/config.json @@ -0,0 +1,3 @@ +{ + "activeRulesFile": "default.json" +} diff --git a/test/func/config/ttk-ttksim3/spec_files/rules_callback/default.json b/test/func/config/ttk-ttksim3/spec_files/rules_callback/default.json new file mode 100644 index 000000000..0637a088a --- /dev/null +++ b/test/func/config/ttk-ttksim3/spec_files/rules_callback/default.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/test/func/config/ttk-ttksim3/spec_files/rules_response/config.json b/test/func/config/ttk-ttksim3/spec_files/rules_response/config.json new file mode 100644 index 000000000..599ca8fc6 --- /dev/null +++ b/test/func/config/ttk-ttksim3/spec_files/rules_response/config.json @@ -0,0 +1,3 @@ +{ + "activeRulesFile": "default.json" +} \ No newline at end of file diff --git a/test/func/config/ttk-ttksim3/spec_files/rules_response/default.json b/test/func/config/ttk-ttksim3/spec_files/rules_response/default.json new file mode 100644 index 000000000..afe16a5dd --- /dev/null +++ b/test/func/config/ttk-ttksim3/spec_files/rules_response/default.json @@ -0,0 +1,1949 @@ +[ + { + "ruleId": 1, + "priority": 1, + "description": "get /parties/{idType}/{idValue} - error case - receiver errors out", + "apiVersion": { + "minorVersion": 4, + "majorVersion": 1, + "type": "mojaloop_simulator_inbound", + "specFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/callback_map.json", + "responseMapFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/response_map.json", + "jsfRefFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/trigger_templates" + }, + "conditions": { + "all": [ + { + "fact": "pathParams", + "operator": "equal", + "value": "fsp2msisdnerrorsout", + "path": "idValue" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/parties/{idType}/{idValue}" + }, + { + "fact": "method", + "operator": "equal", + "value": "get" + } + ] + }, + "event": { + "method": null, + "path": null, + "params": { + "body": { + "statusCode": "4001", + "message": "ID Not Found" + }, + "statusCode": "404", + "scripts": { + "scriptingEngine": "postman" + } + }, + "type": "FIXED_RESPONSE" + }, + "type": "response", + "version": 1 + }, + { + "ruleId": 2, + "priority": 2, + "description": "get /parties/{idType}/{idValue} - error case - timeout", + "apiVersion": { + "minorVersion": 4, + "majorVersion": 1, + "type": "mojaloop_simulator_inbound", + "specFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/callback_map.json", + "responseMapFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/response_map.json", + "jsfRefFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/trigger_templates" + }, + "conditions": { + "all": [ + { + "fact": "pathParams", + "operator": "equal", + "value": "idtimesout", + "path": "idValue" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/parties/{idType}/{idValue}" + }, + { + "fact": "method", + "operator": "equal", + "value": "get" + } + ] + }, + "event": { + "method": null, + "path": null, + "params": { + "body": { + "idType": "MSISDN", + "idValue": "{$request.params.idValue}", + "displayName": "ReceiverFirst ReceiverLast", + "firstName": "ReceiverFirst", + "middleName": "ReceiverMiddle", + "lastName": "ReceiverLast", + "dateOfBirth": "1984-01-01", + "fspId": "ttkpm4mlreceiver" + }, + "statusCode": "200", + "scripts": { + "scriptingEngine": "postman" + }, + "delay": 300000 + }, + "type": "FIXED_RESPONSE" + }, + "type": "response", + "version": 1 + }, + { + "ruleId": 3, + "priority": 3, + "description": "get /parties/{idType}/{idValue} - default path", + "apiVersion": { + "minorVersion": 4, + "majorVersion": 1, + "type": "mojaloop_simulator_inbound", + "specFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/callback_map.json", + "responseMapFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/response_map.json", + "jsfRefFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/trigger_templates" + }, + "conditions": { + "all": [ + { + "fact": "operationPath", + "operator": "equal", + "value": "/parties/{idType}/{idValue}" + }, + { + "fact": "method", + "operator": "equal", + "value": "get" + } + ] + }, + "event": { + "method": null, + "path": null, + "params": { + "body": { + "idType": "MSISDN", + "idValue": "{$request.params.idValue}", + "displayName": "ReceiverFirst ReceiverLast", + "firstName": "ReceiverFirst", + "middleName": "ReceiverMiddle", + "lastName": "ReceiverLast", + "dateOfBirth": "1984-01-01", + "fspId": "ttkpm4mlreceiver" + }, + "statusCode": "200", + "scripts": { + "scriptingEngine": "postman" + } + }, + "type": "FIXED_RESPONSE" + }, + "type": "response", + "version": 1 + }, + { + "ruleId": 16, + "priority": 1, + "description": "post /bulkQuotes - receiver fails entire batch", + "apiVersion": { + "minorVersion": 4, + "majorVersion": 1, + "type": "mojaloop_simulator_inbound", + "specFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/callback_map.json", + "responseMapFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/response_map.json", + "jsfRefFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/trigger_templates" + }, + "conditions": { + "all": [ + { + "fact": "body", + "operator": "equal", + "value": "blkqtbatchfailure", + "path": "note" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/bulkQuotes" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": null, + "path": null, + "params": { + "body": { + "statusCode": "2001", + "message": "Error processing bulk quote" + }, + "statusCode": "500", + "scripts": { + "scriptingEngine": "postman" + } + }, + "type": "FIXED_RESPONSE" + }, + "type": "response", + "version": 1 + }, + { + "ruleId": 7, + "priority": 7, + "description": "post /bulkQuotes - bulk transfer test case - receiver fails the entire batch", + "apiVersion": { + "minorVersion": 4, + "majorVersion": 1, + "type": "mojaloop_simulator_inbound", + "specFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/callback_map.json", + "responseMapFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/response_map.json", + "jsfRefFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/trigger_templates" + }, + "conditions": { + "all": [ + { + "fact": "body", + "operator": "equal", + "value": "blktrbatchfailure", + "path": "note" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/bulkQuotes" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": null, + "path": null, + "params": { + "body": { + "bulkQuoteId": "{$request.body.bulkQuoteId}", + "expiration": "{$request.body.expiration}", + "individualQuoteResults": [ + { + "quoteId": "{$request.body.individualQuotes[0].quoteId}", + "transferAmount": "{$request.body.individualQuotes[0].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[0].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[0].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[0].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[0].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[0].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[1].quoteId}", + "transferAmount": "{$request.body.individualQuotes[1].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[1].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[1].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[1].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[1].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[1].currency}" + } + ] + }, + "statusCode": "200", + "scripts": { + "scriptingEngine": "postman" + } + }, + "type": "FIXED_RESPONSE" + }, + "type": "response", + "version": 1 + }, + { + "ruleId": 6, + "priority": 6, + "description": "post /bulkQuotes - receiver times out entire batch", + "apiVersion": { + "minorVersion": 4, + "majorVersion": 1, + "type": "mojaloop_simulator_inbound", + "specFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/callback_map.json", + "responseMapFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/response_map.json", + "jsfRefFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/trigger_templates" + }, + "conditions": { + "all": [ + { + "fact": "body", + "operator": "equal", + "value": "blkqtbatchtimesout", + "path": "note" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/bulkQuotes" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": null, + "path": null, + "params": { + "body": { + "quoteId": "{$request.body.individualQuotes[0].quoteId}", + "transferAmount": "{$request.body.individualQuotes[0].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[0].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[0].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[0].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[0].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[0].currency}" + }, + "statusCode": "200", + "scripts": { + "scriptingEngine": "postman" + }, + "delay": 300000 + }, + "type": "FIXED_RESPONSE" + }, + "type": "response", + "version": 1 + }, + { + "ruleId": 17, + "priority": 1, + "description": "post /bulkQuotes - bulk transfer test case - receiver times out entire batch", + "apiVersion": { + "minorVersion": 4, + "majorVersion": 1, + "type": "mojaloop_simulator_inbound", + "specFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/callback_map.json", + "responseMapFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/response_map.json", + "jsfRefFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/trigger_templates" + }, + "conditions": { + "all": [ + { + "fact": "body", + "operator": "equal", + "value": "blktrbatchtimesout", + "path": "note" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/bulkQuotes" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": null, + "path": null, + "params": { + "body": { + "bulkQuoteId": "{$request.body.bulkQuoteId}", + "expiration": "2040-01-01T00:00:00.000Z", + "individualQuoteResults": [ + { + "quoteId": "{$request.body.individualQuotes[0].quoteId}", + "transferAmount": "{$request.body.individualQuotes[0].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[0].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[0].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[0].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[0].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[0].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[1].quoteId}", + "transferAmount": "{$request.body.individualQuotes[1].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[1].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[1].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[1].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[1].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[1].currency}" + } + ] + }, + "statusCode": "200", + "scripts": { + "scriptingEngine": "postman" + } + }, + "type": "FIXED_RESPONSE" + }, + "type": "response", + "version": 1 + }, + { + "ruleId": 8, + "priority": 8, + "description": "post /bulkQuotes - receiver sends success response for one quote and failure for other", + "apiVersion": { + "minorVersion": 4, + "majorVersion": 1, + "type": "mojaloop_simulator_inbound", + "specFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/callback_map.json", + "responseMapFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/response_map.json", + "jsfRefFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/trigger_templates" + }, + "conditions": { + "all": [ + { + "fact": "body", + "operator": "equal", + "value": "blkqtbatchpartialsuccess", + "path": "note" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/bulkQuotes" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": null, + "path": null, + "params": { + "body": { + "bulkQuoteId": "{$request.body.bulkQuoteId}", + "expiration": "2040-01-01T00:00:00.000Z", + "individualQuoteResults": [ + { + "quoteId": "{$request.body.individualQuotes[0].quoteId}", + "transferAmount": "{$request.body.individualQuotes[0].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[0].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[0].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[0].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[0].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[0].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[1].quoteId}", + "errorResponse": { + "statusCode": "5101", + "message": "Payee Rejected Quote" + } + } + ] + }, + "statusCode": "200", + "scripts": { + "scriptingEngine": "postman" + } + }, + "type": "FIXED_RESPONSE" + }, + "type": "response", + "version": 1 + }, + { + "ruleId": 9, + "priority": 9, + "description": "post /bulkQuotes - bulk transfer test case - receiver sends success response for one transfer and failure for other", + "apiVersion": { + "minorVersion": 4, + "majorVersion": 1, + "type": "mojaloop_simulator_inbound", + "specFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/callback_map.json", + "responseMapFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/response_map.json", + "jsfRefFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/trigger_templates" + }, + "conditions": { + "all": [ + { + "fact": "body", + "operator": "equal", + "value": "blktrbatchpartialsuccess", + "path": "note" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/bulkQuotes" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": null, + "path": null, + "params": { + "body": { + "bulkQuoteId": "{$request.body.bulkQuoteId}", + "expiration": "2040-01-01T00:00:00.000Z", + "individualQuoteResults": [ + { + "quoteId": "{$request.body.individualQuotes[0].quoteId}", + "transferAmount": "{$request.body.individualQuotes[0].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[0].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[0].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[0].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[0].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[0].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[1].quoteId}", + "transferAmount": "{$request.body.individualQuotes[1].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[1].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[1].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[1].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[1].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[1].currency}" + } + ] + }, + "statusCode": "200", + "scripts": { + "scriptingEngine": "postman" + } + }, + "type": "FIXED_RESPONSE" + }, + "type": "response", + "version": 1 + }, + { + "ruleId": 10, + "priority": 10, + "description": "post /bulkQuotes - bulk transfer test case - quotes response for transfers scenario that has an error in the result", + "apiVersion": { + "minorVersion": 4, + "majorVersion": 1, + "type": "mojaloop_simulator_inbound", + "specFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/callback_map.json", + "responseMapFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/response_map.json", + "jsfRefFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/trigger_templates" + }, + "conditions": { + "all": [ + { + "fact": "body", + "operator": "equal", + "value": "bulktransferresponsehas1error", + "path": "from.idValue" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/bulkQuotes" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": null, + "path": null, + "params": { + "body": { + "bulkQuoteId": "{$request.body.bulkQuoteId}", + "expiration": "{$request.body.expiration}", + "individualQuoteResults": [ + { + "quoteId": "{$request.body.individualQuotes[0].quoteId}", + "transferAmount": "{$request.body.individualQuotes[0].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[0].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[0].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[0].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[0].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[0].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[1].quoteId}", + "transferAmount": "{$request.body.individualQuotes[1].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[1].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[1].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[1].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[1].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[1].currency}" + } + ] + }, + "statusCode": "200", + "scripts": { + "scriptingEngine": "postman" + } + }, + "type": "FIXED_RESPONSE" + }, + "type": "response", + "version": 1 + }, + { + "ruleId": 20, + "priority": 1, + "description": "post /bulkQuotes - bulk transfer test case -transaction with 1 transfer", + "apiVersion": { + "minorVersion": 4, + "majorVersion": 1, + "type": "mojaloop_simulator_inbound", + "specFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/callback_map.json", + "responseMapFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/response_map.json", + "jsfRefFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/trigger_templates" + }, + "conditions": { + "all": [ + { + "fact": "body", + "operator": "equal", + "value": "blktrrcvr1transfer", + "path": "individualQuotes[0].to.fspId" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/bulkQuotes" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": null, + "path": null, + "params": { + "body": { + "bulkQuoteId": "{$request.body.bulkQuoteId}", + "expiration": "{$request.body.expiration}", + "individualQuoteResults": [ + { + "quoteId": "{$request.body.individualQuotes[0].quoteId}", + "transferAmount": "{$request.body.individualQuotes[0].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[0].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[0].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[0].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[0].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[0].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[1].quoteId}", + "transferAmount": "{$request.body.individualQuotes[1].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[1].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[1].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[1].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[1].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[1].currency}" + } + ] + }, + "statusCode": "200", + "scripts": { + "scriptingEngine": "postman" + } + }, + "type": "FIXED_RESPONSE" + }, + "type": "response", + "version": 1 + }, + { + "ruleId": 5, + "priority": 5, + "description": "post /bulkQuotes - receiver responds with 1 quote result", + "apiVersion": { + "minorVersion": 4, + "majorVersion": 1, + "type": "mojaloop_simulator_inbound", + "specFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/callback_map.json", + "responseMapFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/response_map.json", + "jsfRefFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/trigger_templates" + }, + "conditions": { + "all": [ + { + "fact": "body", + "operator": "equal", + "value": "blkqtbatchwith1qtresponse", + "path": "note" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/bulkQuotes" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": null, + "path": null, + "params": { + "body": { + "bulkQuoteId": "{$request.body.bulkQuoteId}", + "expiration": "{$request.body.expiration}", + "individualQuoteResults": [ + { + "quoteId": "{$request.body.individualQuotes[0].quoteId}", + "transferAmount": "{$request.body.individualQuotes[0].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[0].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[0].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[0].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[0].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[0].currency}" + } + ] + }, + "statusCode": "200", + "scripts": { + "scriptingEngine": "postman" + } + }, + "type": "FIXED_RESPONSE" + }, + "type": "response", + "version": 1 + }, + { + "ruleId": 21, + "priority": 1, + "description": "post /bulkQuotes - receiver responds with 50 quote results", + "apiVersion": { + "minorVersion": 4, + "majorVersion": 1, + "type": "mojaloop_simulator_inbound", + "specFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/callback_map.json", + "responseMapFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/response_map.json", + "jsfRefFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/trigger_templates" + }, + "conditions": { + "all": [ + { + "fact": "body", + "operator": "equal", + "value": "receiverfspwith50responses", + "path": "note" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/bulkQuotes" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": null, + "path": null, + "params": { + "body": { + "bulkQuoteId": "{$request.body.bulkQuoteId}", + "expiration": "2040-01-01T00:00:00.000Z", + "individualQuoteResults": [ + { + "quoteId": "{$request.body.individualQuotes[0].quoteId}", + "transferAmount": "{$request.body.individualQuotes[0].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[0].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[0].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[0].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[0].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[0].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[1].quoteId}", + "transferAmount": "{$request.body.individualQuotes[1].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[1].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[1].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[1].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[1].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[1].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[2].quoteId}", + "transferAmount": "{$request.body.individualQuotes[2].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[2].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[2].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[2].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[2].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[2].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[3].quoteId}", + "transferAmount": "{$request.body.individualQuotes[3].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[3].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[3].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[3].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[3].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[3].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[4].quoteId}", + "transferAmount": "{$request.body.individualQuotes[4].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[4].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[4].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[4].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[4].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[4].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[5].quoteId}", + "transferAmount": "{$request.body.individualQuotes[5].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[5].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[5].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[5].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[5].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[5].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[6].quoteId}", + "transferAmount": "{$request.body.individualQuotes[6].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[6].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[6].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[6].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[6].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[6].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[7].quoteId}", + "transferAmount": "{$request.body.individualQuotes[7].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[7].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[7].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[7].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[7].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[7].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[8].quoteId}", + "transferAmount": "{$request.body.individualQuotes[8].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[8].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[8].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[8].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[8].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[8].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[9].quoteId}", + "transferAmount": "{$request.body.individualQuotes[9].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[9].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[9].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[9].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[9].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[9].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[10].quoteId}", + "transferAmount": "{$request.body.individualQuotes[10].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[10].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[10].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[10].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[10].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[10].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[11].quoteId}", + "transferAmount": "{$request.body.individualQuotes[11].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[11].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[11].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[11].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[11].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[11].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[12].quoteId}", + "transferAmount": "{$request.body.individualQuotes[12].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[12].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[12].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[12].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[12].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[12].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[13].quoteId}", + "transferAmount": "{$request.body.individualQuotes[13].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[13].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[13].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[13].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[13].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[13].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[14].quoteId}", + "transferAmount": "{$request.body.individualQuotes[14].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[14].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[14].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[14].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[14].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[14].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[15].quoteId}", + "transferAmount": "{$request.body.individualQuotes[15].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[15].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[15].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[15].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[15].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[15].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[16].quoteId}", + "transferAmount": "{$request.body.individualQuotes[16].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[16].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[16].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[16].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[16].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[16].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[17].quoteId}", + "transferAmount": "{$request.body.individualQuotes[17].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[17].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[17].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[17].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[17].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[17].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[18].quoteId}", + "transferAmount": "{$request.body.individualQuotes[18].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[18].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[18].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[18].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[18].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[18].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[19].quoteId}", + "transferAmount": "{$request.body.individualQuotes[19].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[19].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[19].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[19].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[19].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[19].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[20].quoteId}", + "transferAmount": "{$request.body.individualQuotes[20].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[20].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[20].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[20].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[20].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[20].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[21].quoteId}", + "transferAmount": "{$request.body.individualQuotes[21].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[21].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[21].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[21].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[21].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[21].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[22].quoteId}", + "transferAmount": "{$request.body.individualQuotes[22].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[22].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[22].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[22].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[22].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[22].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[23].quoteId}", + "transferAmount": "{$request.body.individualQuotes[23].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[23].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[23].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[23].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[23].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[23].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[24].quoteId}", + "transferAmount": "{$request.body.individualQuotes[24].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[24].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[24].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[24].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[24].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[24].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[25].quoteId}", + "transferAmount": "{$request.body.individualQuotes[25].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[25].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[25].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[25].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[25].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[25].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[26].quoteId}", + "transferAmount": "{$request.body.individualQuotes[26].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[26].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[26].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[26].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[26].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[26].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[27].quoteId}", + "transferAmount": "{$request.body.individualQuotes[27].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[27].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[27].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[27].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[27].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[27].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[28].quoteId}", + "transferAmount": "{$request.body.individualQuotes[28].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[28].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[28].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[28].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[28].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[28].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[29].quoteId}", + "transferAmount": "{$request.body.individualQuotes[29].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[29].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[29].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[29].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[29].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[29].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[30].quoteId}", + "transferAmount": "{$request.body.individualQuotes[30].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[30].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[30].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[30].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[30].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[30].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[31].quoteId}", + "transferAmount": "{$request.body.individualQuotes[31].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[31].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[31].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[31].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[31].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[31].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[32].quoteId}", + "transferAmount": "{$request.body.individualQuotes[32].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[32].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[32].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[32].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[32].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[32].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[33].quoteId}", + "transferAmount": "{$request.body.individualQuotes[33].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[33].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[33].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[33].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[33].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[33].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[34].quoteId}", + "transferAmount": "{$request.body.individualQuotes[34].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[34].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[34].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[34].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[34].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[34].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[35].quoteId}", + "transferAmount": "{$request.body.individualQuotes[35].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[35].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[35].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[35].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[35].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[35].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[36].quoteId}", + "transferAmount": "{$request.body.individualQuotes[36].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[36].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[36].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[36].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[36].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[36].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[37].quoteId}", + "transferAmount": "{$request.body.individualQuotes[37].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[37].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[37].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[37].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[37].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[37].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[38].quoteId}", + "transferAmount": "{$request.body.individualQuotes[38].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[38].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[38].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[38].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[38].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[38].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[39].quoteId}", + "transferAmount": "{$request.body.individualQuotes[39].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[39].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[39].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[39].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[39].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[39].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[40].quoteId}", + "transferAmount": "{$request.body.individualQuotes[40].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[40].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[40].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[40].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[40].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[40].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[41].quoteId}", + "transferAmount": "{$request.body.individualQuotes[41].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[41].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[41].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[41].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[41].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[41].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[42].quoteId}", + "transferAmount": "{$request.body.individualQuotes[42].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[42].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[42].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[42].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[42].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[42].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[43].quoteId}", + "transferAmount": "{$request.body.individualQuotes[43].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[43].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[43].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[43].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[43].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[43].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[44].quoteId}", + "transferAmount": "{$request.body.individualQuotes[44].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[44].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[44].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[44].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[44].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[44].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[45].quoteId}", + "transferAmount": "{$request.body.individualQuotes[45].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[45].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[45].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[45].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[45].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[45].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[46].quoteId}", + "transferAmount": "{$request.body.individualQuotes[46].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[46].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[46].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[46].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[46].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[46].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[47].quoteId}", + "transferAmount": "{$request.body.individualQuotes[47].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[47].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[47].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[47].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[47].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[47].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[48].quoteId}", + "transferAmount": "{$request.body.individualQuotes[48].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[48].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[48].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[48].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[48].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[48].currency}" + }, + { + "quoteId": "{$request.body.individualQuotes[49].quoteId}", + "transferAmount": "{$request.body.individualQuotes[49].amount}", + "transferAmountCurrency": "{$request.body.individualQuotes[49].currency}", + "payeeReceiveAmount": "{$request.body.individualQuotes[49].amount}", + "payeeReceiveAmountCurrency": "{$request.body.individualQuotes[49].currency}", + "payeeFspFeeAmount": "0", + "payeeFspFeeAmountCurrency": "{$request.body.individualQuotes[49].currency}", + "payeeFspCommissionAmount": "0", + "payeeFspCommissionAmountCurrency": "{$request.body.individualQuotes[49].currency}" + } + ] + }, + "statusCode": "200", + "scripts": { + "scriptingEngine": "postman" + } + }, + "type": "FIXED_RESPONSE" + }, + "type": "response", + "version": 1 + }, + { + "ruleId": 11, + "priority": 11, + "description": "post /bulkQuotes - default path", + "apiVersion": { + "minorVersion": 4, + "majorVersion": 1, + "type": "mojaloop_simulator_inbound", + "specFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/callback_map.json", + "responseMapFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/response_map.json", + "jsfRefFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/trigger_templates" + }, + "conditions": { + "all": [ + { + "fact": "operationPath", + "operator": "equal", + "value": "/bulkQuotes" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": null, + "path": null, + "params": { + "body": { + "bulkQuoteId": "{$request.body.bulkQuoteId}", + "expiration": "2040-01-01T00:00:00.000Z", + "individualQuoteResults": [] + }, + "statusCode": "200", + "scripts": { + "exec": [ + "const reqBody = JSON.parse(request.body)", + "const individualQuoteResults = reqBody.individualQuotes.map(quote => ({", + " payeeFspCommissionAmount: \"0\",", + " payeeFspCommissionAmountCurrency: quote.currency,", + " payeeFspFeeAmount: \"0\",", + " payeeFspFeeAmountCurrency: quote.currency,", + " payeeReceiveAmount: quote.amount,", + " payeeReceiveAmountCurrency: quote.currency,", + " quoteId: quote.quoteId,", + " transferAmount: quote.amount,", + " transferAmountCurrency: quote.currency", + "}))", + "", + "custom.appendEventBody({", + " individualQuoteResults", + "})" + ], + "scriptingEngine": "javascript" + } + }, + "type": "FIXED_RESPONSE" + }, + "type": "response", + "version": 1 + }, + { + "ruleId": 12, + "priority": 12, + "description": "put /bulkTransactions/{bulkTransactionId}", + "apiVersion": { + "minorVersion": 4, + "majorVersion": 1, + "type": "mojaloop_simulator_inbound", + "specFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/callback_map.json", + "responseMapFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/response_map.json", + "jsfRefFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/trigger_templates" + }, + "conditions": { + "all": [ + { + "fact": "operationPath", + "operator": "equal", + "value": "/bulkTransactions/{bulkTransactionId}" + }, + { + "fact": "method", + "operator": "equal", + "value": "put" + } + ] + }, + "event": { + "method": null, + "path": null, + "params": { + "scripts": { + "scriptingEngine": "postman" + }, + "statusCode": "202" + }, + "type": "FIXED_RESPONSE" + }, + "type": "response", + "version": 1 + }, + { + "ruleId": 13, + "priority": 13, + "description": "post /bulkTransfers - receiver fails the entire batch", + "apiVersion": { + "minorVersion": 4, + "majorVersion": 1, + "type": "mojaloop_simulator_inbound", + "specFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/callback_map.json", + "responseMapFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/response_map.json", + "jsfRefFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/trigger_templates" + }, + "conditions": { + "all": [ + { + "fact": "body", + "operator": "equal", + "value": "blktrbatchfailure", + "path": "individualTransfers[0].note" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/bulkTransfers" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": null, + "path": null, + "params": { + "body": { + "statusCode": "4001", + "message": "Cannot process the bulk transfer" + }, + "statusCode": "500", + "scripts": { + "scriptingEngine": "postman" + } + }, + "type": "FIXED_RESPONSE" + }, + "type": "response", + "version": 1 + }, + { + "ruleId": 18, + "priority": 1, + "description": "post /bulkTransfers - receiver times out entire batch", + "apiVersion": { + "minorVersion": 4, + "majorVersion": 1, + "type": "mojaloop_simulator_inbound", + "specFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/callback_map.json", + "responseMapFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/response_map.json", + "jsfRefFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/trigger_templates" + }, + "conditions": { + "all": [ + { + "fact": "body", + "operator": "equal", + "value": "blktrbatchtimesout", + "path": "individualTransfers[0].note" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/bulkTransfers" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": null, + "path": null, + "params": { + "body": { + "bulkTransferId": "{$request.body.bulkTransferId}", + "homeTransactionId": "{$request.body.homeTransactionId}", + "individualTransferResults": [ + { + "transferId": "{$request.body.individualTransfers[0].transferId}" + }, + { + "transferId": "{$request.body.individualTransfers[1].transferId}" + } + ] + }, + "statusCode": "200", + "scripts": { + "scriptingEngine": "postman" + }, + "delay": 300000 + }, + "type": "FIXED_RESPONSE" + }, + "type": "response", + "version": 1 + }, + { + "ruleId": 14, + "priority": 14, + "description": "post /bulkTransfers - receiver sends success response for one transfer and failure for other", + "apiVersion": { + "minorVersion": 4, + "majorVersion": 1, + "type": "mojaloop_simulator_inbound", + "hostnames": [ + "ttkpm4mlreceiver-ttk-backend" + ], + "specFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/callback_map.json", + "responseMapFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/response_map.json", + "jsfRefFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/trigger_templates" + }, + "conditions": { + "all": [ + { + "fact": "body", + "operator": "equal", + "value": "blktrbatchpartialsuccess", + "path": "individualTransfers[0].note" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/bulkTransfers" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": null, + "path": null, + "params": { + "body": { + "bulkTransferId": "{$request.body.bulkTransferId}", + "homeTransactionId": "{$request.body.homeTransactionId}", + "individualTransferResults": [ + { + "transferId": "{$request.body.individualTransfers[0].transferId}" + }, + { + "transferId": "{$request.body.individualTransfers[1].transferId}", + "errorResponse": { + "statusCode": "4001", + "message": "Cannot process the transfer" + } + } + ] + }, + "statusCode": "200", + "scripts": { + "scriptingEngine": "postman" + } + }, + "type": "FIXED_RESPONSE" + }, + "type": "response", + "version": 1 + }, + { + "ruleId": 22, + "priority": 1, + "description": "post /bulkTransfers - receiver responds with 50 transfer results", + "apiVersion": { + "minorVersion": 4, + "majorVersion": 1, + "type": "mojaloop_simulator_inbound", + "specFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/callback_map.json", + "responseMapFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/response_map.json", + "jsfRefFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/trigger_templates" + }, + "conditions": { + "all": [ + { + "fact": "body", + "operator": "equal", + "value": "receiverfspwith50responses", + "path": "individualTransfers[0].note" + }, + { + "fact": "operationPath", + "operator": "equal", + "value": "/bulkTransfers" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": null, + "path": null, + "params": { + "body": { + "bulkTransferId": "{$request.body.bulkTransferId}", + "homeTransactionId": "{$request.body.homeTransactionId}", + "individualTransferResults": [ + { + "transferId": "{$request.body.individualTransfers[0].transferId}" + }, + { + "transferId": "{$request.body.individualTransfers[1].transferId}" + }, + { + "transferId": "{$request.body.individualTransfers[2].transferId}" + }, + { + "transferId": "{$request.body.individualTransfers[3].transferId}" + }, + { + "transferId": "{$request.body.individualTransfers[4].transferId}" + }, + { + "transferId": "{$request.body.individualTransfers[5].transferId}" + }, + { + "transferId": "{$request.body.individualTransfers[6].transferId}" + }, + { + "transferId": "{$request.body.individualTransfers[7].transferId}" + }, + { + "transferId": "{$request.body.individualTransfers[8].transferId}" + }, + { + "transferId": "{$request.body.individualTransfers[9].transferId}" + }, + { + "transferId": "{$request.body.individualTransfers[10].transferId}" + }, + { + "transferId": "{$request.body.individualTransfers[11].transferId}" + }, + { + "transferId": "{$request.body.individualTransfers[12].transferId}" + }, + { + "transferId": "{$request.body.individualTransfers[13].transferId}" + }, + { + "transferId": "{$request.body.individualTransfers[14].transferId}" + }, + { + "transferId": "{$request.body.individualTransfers[15].transferId}" + }, + { + "transferId": "{$request.body.individualTransfers[16].transferId}" + }, + { + "transferId": "{$request.body.individualTransfers[17].transferId}" + }, + { + "transferId": "{$request.body.individualTransfers[18].transferId}" + }, + { + "transferId": "{$request.body.individualTransfers[19].transferId}" + }, + { + "transferId": "{$request.body.individualTransfers[20].transferId}" + }, + { + "transferId": "{$request.body.individualTransfers[21].transferId}" + }, + { + "transferId": "{$request.body.individualTransfers[22].transferId}" + }, + { + "transferId": "{$request.body.individualTransfers[23].transferId}" + }, + { + "transferId": "{$request.body.individualTransfers[24].transferId}" + }, + { + "transferId": "{$request.body.individualTransfers[25].transferId}" + }, + { + "transferId": "{$request.body.individualTransfers[26].transferId}" + }, + { + "transferId": "{$request.body.individualTransfers[27].transferId}" + }, + { + "transferId": "{$request.body.individualTransfers[28].transferId}" + }, + { + "transferId": "{$request.body.individualTransfers[29].transferId}" + }, + { + "transferId": "{$request.body.individualTransfers[30].transferId}" + }, + { + "transferId": "{$request.body.individualTransfers[31].transferId}" + }, + { + "transferId": "{$request.body.individualTransfers[32].transferId}" + }, + { + "transferId": "{$request.body.individualTransfers[33].transferId}" + }, + { + "transferId": "{$request.body.individualTransfers[34].transferId}" + }, + { + "transferId": "{$request.body.individualTransfers[35].transferId}" + }, + { + "transferId": "{$request.body.individualTransfers[36].transferId}" + }, + { + "transferId": "{$request.body.individualTransfers[37].transferId}" + }, + { + "transferId": "{$request.body.individualTransfers[38].transferId}" + }, + { + "transferId": "{$request.body.individualTransfers[39].transferId}" + }, + { + "transferId": "{$request.body.individualTransfers[40].transferId}" + }, + { + "transferId": "{$request.body.individualTransfers[41].transferId}" + }, + { + "transferId": "{$request.body.individualTransfers[42].transferId}" + }, + { + "transferId": "{$request.body.individualTransfers[43].transferId}" + }, + { + "transferId": "{$request.body.individualTransfers[44].transferId}" + }, + { + "transferId": "{$request.body.individualTransfers[45].transferId}" + }, + { + "transferId": "{$request.body.individualTransfers[46].transferId}" + }, + { + "transferId": "{$request.body.individualTransfers[47].transferId}" + }, + { + "transferId": "{$request.body.individualTransfers[48].transferId}" + }, + { + "transferId": "{$request.body.individualTransfers[49].transferId}" + } + ] + }, + "statusCode": "200", + "scripts": { + "scriptingEngine": "postman" + } + }, + "type": "FIXED_RESPONSE" + }, + "type": "response", + "version": 1 + }, + { + "ruleId": 15, + "priority": 15, + "description": "post /bulkTransfers - default path", + "apiVersion": { + "minorVersion": 4, + "majorVersion": 1, + "type": "mojaloop_simulator_inbound", + "hostnames": [ + "ttkpm4mlreceiver-ttk-backend" + ], + "specFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/callback_map.json", + "responseMapFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/response_map.json", + "jsfRefFile": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/mojaloop_simulator_sim_1.4/trigger_templates" + }, + "conditions": { + "all": [ + { + "fact": "operationPath", + "operator": "equal", + "value": "/bulkTransfers" + }, + { + "fact": "method", + "operator": "equal", + "value": "post" + } + ] + }, + "event": { + "method": null, + "path": null, + "params": { + "body": { + "bulkTransferId": "{$request.body.bulkTransferId}", + "homeTransactionId": "{$request.body.homeTransactionId}", + "individualTransferResults": [] + }, + "statusCode": "200", + "scripts": { + "exec": [ + "const reqBody = JSON.parse(request.body)", + "const individualTransferResults = reqBody.individualTransfers.map(transfer => ({", + " transferId: transfer.transferId", + "}))", + "", + "custom.appendEventBody({", + " individualTransferResults", + "})" + ], + "scriptingEngine": "javascript" + } + }, + "type": "FIXED_RESPONSE" + }, + "type": "response", + "version": 1 + } +] \ No newline at end of file diff --git a/test/func/config/ttk-ttksim3/spec_files/rules_validation/config.json b/test/func/config/ttk-ttksim3/spec_files/rules_validation/config.json new file mode 100644 index 000000000..08320e433 --- /dev/null +++ b/test/func/config/ttk-ttksim3/spec_files/rules_validation/config.json @@ -0,0 +1,3 @@ +{ + "activeRulesFile": "default.json" +} diff --git a/test/func/config/ttk-ttksim3/spec_files/rules_validation/default.json b/test/func/config/ttk-ttksim3/spec_files/rules_validation/default.json new file mode 100644 index 000000000..0637a088a --- /dev/null +++ b/test/func/config/ttk-ttksim3/spec_files/rules_validation/default.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/test/func/config/ttk-ttksim3/spec_files/system_config.json b/test/func/config/ttk-ttksim3/spec_files/system_config.json new file mode 100644 index 000000000..383734132 --- /dev/null +++ b/test/func/config/ttk-ttksim3/spec_files/system_config.json @@ -0,0 +1,78 @@ +{ + "API_PORT": 4040, + "HOSTING_ENABLED": false, + "REQUEST_PAYLOAD_MAX_BYTES": 200485760, + "INBOUND_MUTUAL_TLS_ENABLED": false, + "OUTBOUND_MUTUAL_TLS_ENABLED": false, + "CONFIG_VERSIONS": { + "response": 1, + "callback": 1, + "validation": 1, + "forward": 1, + "userSettings": 1 + }, + "DB": { + "URI": "mongodb://ttk:ttk@localhost:27017/ttk" + }, + "OAUTH": { + "AUTH_ENABLED": false, + "APP_OAUTH_CLIENT_KEY": "ttk", + "APP_OAUTH_CLIENT_SECRET": "secret", + "MTA_ROLE": "Application/MTA", + "PTA_ROLE": "Application/PTA", + "EVERYONE_ROLE": "Internal/everyone", + "OAUTH2_TOKEN_ISS": "http://mojaloop-testing-toolkit:5050/api/oauth2/token", + "OAUTH2_ISSUER": "http://mojaloop-testing-toolkit:5050/api/oauth2/token", + "EMBEDDED_CERTIFICATE": "CERTIFICATE" + }, + "CONNECTION_MANAGER": { + "ENABLED": false, + "API_URL": "http://connection-manager-api:5061", + "AUTH_ENABLED": false, + "HUB_USERNAME": "hub", + "HUB_PASSWORD": "hub" + }, + "KEYCLOAK": { + "ENABLED": false, + "API_URL": "http://localhost:8080", + "REALM": "testingtoolkit", + "ADMIN_REALM": "master", + "ADMIN_USERNAME": "admin", + "ADMIN_PASSWORD": "admin", + "ADMIN_CLIENT_ID": "admin-cli" + }, + "SERVER_LOGS": { + "ENABLED": true, + "RESULTS_PAGE_SIZE": 50, + "ADAPTER": { + "TYPE": "ELASTICSEARCH", + "INDEX": "moja*", + "API_URL": "http://dev1-elasticsearch.mojaloop.live/" + } + }, + "HTTP_CLIENT": { + "KEEP_ALIVE": true, + "MAX_SOCKETS": 50, + "UNUSED_AGENTS_EXPIRY_MS": 1800000, + "UNUSED_AGENTS_CHECK_TIMER_MS": 300000 + }, + "INIT_CONFIG": { + "objectStore": {} + }, + "API_DEFINITIONS": [ + { + "type": "mojaloop_simulator_inbound", + "version": "1.4", + "folderPath": "mojaloop_simulator_sim_1.4", + "asynchronous": true + }, + { + "type": "scheme_adapter_outbound", + "version": "1.0", + "folderPath": "mojaloop_sdk_outbound_scheme_adapter_1.0", + "hostnames": [], + "prefix": "/sdk-out", + "asynchronous": true + } + ] +} \ No newline at end of file diff --git a/test/func/config/ttk-ttksim3/spec_files/user_config.json b/test/func/config/ttk-ttksim3/spec_files/user_config.json new file mode 100644 index 000000000..c7f2b6615 --- /dev/null +++ b/test/func/config/ttk-ttksim3/spec_files/user_config.json @@ -0,0 +1,47 @@ +{ + "VERSION": 1, + "CALLBACK_ENDPOINT": "http://ttksim3-sdk-api-svc:4001", + "MONITORING_LOG_INCLUDE_PAYLOAD": false, + "CALLBACK_RESOURCE_ENDPOINTS": { + "enabled": false, + "endpoints": [] + }, + "HUB_ONLY_MODE": false, + "ENDPOINTS_DFSP_WISE": { + "dfsps": {} + }, + "SEND_CALLBACK_ENABLE": true, + "FSPID": "switch", + "DEFAULT_USER_FSPID": "userdfsp", + "TRANSFERS_VALIDATION_WITH_PREVIOUS_QUOTES": false, + "TRANSFERS_VALIDATION_ILP_PACKET": false, + "TRANSFERS_VALIDATION_CONDITION": false, + "ILP_SECRET": "secret", + "VERSIONING_SUPPORT_ENABLE": true, + "VALIDATE_INBOUND_JWS": false, + "VALIDATE_INBOUND_PUT_PARTIES_JWS": false, + "JWS_SIGN": false, + "JWS_SIGN_PUT_PARTIES": false, + "CLIENT_MUTUAL_TLS_ENABLED": false, + "ADVANCED_FEATURES_ENABLED": true, + "CALLBACK_TIMEOUT": 60000, + "DEFAULT_REQUEST_TIMEOUT": 60000, + "SCRIPT_TIMEOUT": 60000, + "LOG_SERVER_UI_URL": "http://url-here", + "UI_CONFIGURATION": { + "MOBILE_SIMULATOR": { + "HUB_CONSOLE_ENABLED": true + } + }, + "CLIENT_TLS_CREDS": [], + "GITHUB_CONFIG": { + "TEST_CASES_REPO_OWNER": "mojaloop", + "TEST_CASES_REPO_NAME": "testing-toolkit-test-cases", + "TEST_CASES_REPO_DEFAULT_RELEASE_TAG": "latest", + "TEST_CASES_REPO_BASE_PATH": "collections/dfsp", + "TEST_CASES_REPO_HUB_GP_PATH": "collections/hub/golden_path", + "TEST_CASES_REPO_HUB_PROVISIONING_PATH": "collections/hub/provisioning" + }, + "DEFAULT_ENVIRONMENT_FILE_NAME": "dfsp_local_environment.json", + "LABELS": [] +} \ No newline at end of file diff --git a/test/func/docker-compose.yml b/test/func/docker-compose.yml index aa1132a52..1d9c1abca 100644 --- a/test/func/docker-compose.yml +++ b/test/func/docker-compose.yml @@ -4,62 +4,68 @@ networks: name: mojaloop-net services: - payer-sdk-api-svc: + + redis: + networks: + - mojaloop-net + image: "redis:5.0.4-alpine" + ports: + - "6379:6379" + healthcheck: + test: ["CMD" ,"sh", "-c", "redis-cli","ping"] + timeout: 20s + retries: 10 + start_period: 40s + interval: 30s + + ttksim1-sdk-api-svc: extends: file: common-sdk.yml service: api-svc networks: - mojaloop-net - env_file: ./config/payer-sdk/api-svc.env + env_file: ./config/sdk-ttksim1/api-svc.env ports: - "14000:4000" - "14001:4001" - "14002:4002" depends_on: - - payer-redis + - redis - payer-sdk-outbound-command-event-handler: + ttksim1-sdk-outbound-command-event-handler: extends: file: common-sdk.yml service: outbound-command-event-handler - env_file: ./config/payer-sdk/outbound-command-event-handler.env + env_file: ./config/sdk-ttksim1/outbound-command-event-handler.env ports: - "18000:8000" networks: - mojaloop-net depends_on: - payer-redis: + redis: condition: service_started init-kafka: condition: service_completed_successfully - payer-sdk-outbound-domain-event-handler: + ttksim1-sdk-outbound-domain-event-handler: extends: file: common-sdk.yml service: outbound-domain-event-handler - env_file: ./config/payer-sdk/outbound-domain-event-handler.env + env_file: ./config/sdk-ttksim1/outbound-domain-event-handler.env networks: - mojaloop-net depends_on: - payer-redis: + redis: condition: service_started init-kafka: condition: service_completed_successfully - payer-redis: - extends: - file: common-sdk.yml - service: redis - networks: - - mojaloop-net - ports: - - "16379:6379" - payee-sdk-api-svc: + ttksim2-sdk-api-svc: extends: file: common-sdk.yml service: api-svc - env_file: ./config/payee-sdk/api-svc.env + env_file: ./config/sdk-ttksim2/api-svc.env networks: - mojaloop-net ports: @@ -67,40 +73,129 @@ services: - "24001:4001" - "24002:4002" depends_on: - - payee-redis + - redis - payee-redis: + ttksim3-sdk-api-svc: extends: file: common-sdk.yml - service: redis + service: api-svc + env_file: ./config/sdk-ttksim3/api-svc.env + networks: + - mojaloop-net + ports: + - "34000:4000" + - "34001:4001" + - "34002:4002" + depends_on: + - redis + + ttk-ttksim1: + networks: + - mojaloop-net + image: mojaloop/ml-testing-toolkit:v15.2.1 + container_name: ttk-ttksim1 + user: root + volumes: + - "./config/ttk-ttksim1/spec_files:/opt/app/spec_files" + ports: + - "14040:4040" + - "15050:5050" + environment: + - AUTH_ENABLED=FALSE + command: npm start + + ttk-ttksim1-ui: + image: mojaloop/ml-testing-toolkit-ui:v15.0.1 + ports: + - "16060:6060" + networks: + - mojaloop-net + environment: + - API_BASE_URL=http://localhost:15050 + - AUTH_ENABLED=FALSE + command: + - sh + - /usr/share/nginx/start.sh + + ttk-ttksim2: + networks: + - mojaloop-net + image: mojaloop/ml-testing-toolkit:v15.2.1 + container_name: ttk-ttksim2 + user: root + volumes: + - "./config/ttk-ttksim2/spec_files:/opt/app/spec_files" + ports: + - "24040:4040" + - "25050:5050" + environment: + - AUTH_ENABLED=FALSE + command: npm start + + ttk-ttksim2-ui: + image: mojaloop/ml-testing-toolkit-ui:v15.0.1 + ports: + - "26060:6060" networks: - mojaloop-net + environment: + - API_BASE_URL=http://localhost:25050 + - AUTH_ENABLED=FALSE + command: + - sh + - /usr/share/nginx/start.sh + + ttk-ttksim3: + networks: + - mojaloop-net + image: mojaloop/ml-testing-toolkit:v15.2.1 + container_name: ttk-ttksim4 + user: root + volumes: + - "./config/ttk-ttksim3/spec_files:/opt/app/spec_files" ports: - - "26379:6379" + - "34040:4040" + - "35050:5050" + environment: + - AUTH_ENABLED=FALSE + command: npm start - ml-testing-toolkit: + ttk-ttksim3-ui: + image: mojaloop/ml-testing-toolkit-ui:v15.0.1 + ports: + - "36060:6060" + networks: + - mojaloop-net + environment: + - API_BASE_URL=http://localhost:35050 + - AUTH_ENABLED=FALSE + command: + - sh + - /usr/share/nginx/start.sh + + ttk-hub: networks: - mojaloop-net - image: mojaloop/ml-testing-toolkit:v15.2.0 - container_name: ml-testing-toolkit + image: mojaloop/ml-testing-toolkit:v15.2.1 + container_name: ttk-hub user: root volumes: - - "./config/ml-testing-toolkit/spec_files:/opt/app/spec_files" + - "./config/ttk-hub/spec_files:/opt/app/spec_files" ports: - - "4040:4040" - - "5050:5050" + - "54040:4040" + - "55050:5050" environment: - AUTH_ENABLED=FALSE command: npm start - ml-testing-toolkit-ui: + ttk-hub-ui: image: mojaloop/ml-testing-toolkit-ui:v15.0.1 ports: - - "6060:6060" + - "56060:6060" networks: - mojaloop-net environment: - - API_BASE_URL=http://localhost:5050 + - API_BASE_URL=http://localhost:55050 - AUTH_ENABLED=FALSE command: - sh @@ -132,6 +227,7 @@ services: KAFKA_INTER_BROKER_LISTENER_NAME: LISTENER_INTERN KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1 KAFKA_CFG_ZOOKEEPER_CONNECT: zookeeper:2181 + KAFKA_CFG_MESSAGE_MAX_BYTES: 200000000 depends_on: - zookeeper healthcheck: @@ -154,10 +250,12 @@ services: kafka-topics.sh --bootstrap-server kafka:9093 --list echo -e 'Creating kafka topics' - kafka-topics.sh --bootstrap-server kafka:9093 --create --if-not-exists --topic payer-topic-sdk-outbound-command-events --replication-factor 1 --partitions 1 - kafka-topics.sh --bootstrap-server kafka:9093 --create --if-not-exists --topic payer-topic-sdk-outbound-domain-events --replication-factor 1 --partitions 1 - kafka-topics.sh --bootstrap-server kafka:9093 --create --if-not-exists --topic payee-topic-sdk-outbound-command-events --replication-factor 1 --partitions 1 - kafka-topics.sh --bootstrap-server kafka:9093 --create --if-not-exists --topic payee-topic-sdk-outbound-domain-events --replication-factor 1 --partitions 1 + kafka-topics.sh --bootstrap-server kafka:9093 --create --if-not-exists --topic ttksim1-topic-sdk-outbound-command-events --replication-factor 1 --partitions 1 + kafka-topics.sh --bootstrap-server kafka:9093 --create --if-not-exists --topic ttksim1-topic-sdk-outbound-domain-events --replication-factor 1 --partitions 1 + kafka-topics.sh --bootstrap-server kafka:9093 --create --if-not-exists --topic ttksim2-topic-sdk-outbound-command-events --replication-factor 1 --partitions 1 + kafka-topics.sh --bootstrap-server kafka:9093 --create --if-not-exists --topic ttksim2-topic-sdk-outbound-domain-events --replication-factor 1 --partitions 1 + kafka-topics.sh --bootstrap-server kafka:9093 --create --if-not-exists --topic ttksim3-topic-sdk-outbound-command-events --replication-factor 1 --partitions 1 + kafka-topics.sh --bootstrap-server kafka:9093 --create --if-not-exists --topic ttksim3-topic-sdk-outbound-domain-events --replication-factor 1 --partitions 1 echo -e 'Successfully created the following topics:' kafka-topics.sh --bootstrap-server kafka:9093 --list @@ -177,12 +275,12 @@ services: depends_on: - kafka - redisinsight: - image: redislabs/redisinsight - ports: - - "9001:8001" - networks: - - mojaloop-net - volumes: [] - restart: on-failure + # redisinsight: + # image: redislabs/redisinsight + # ports: + # - "9001:8001" + # networks: + # - mojaloop-net + # volumes: [] + # restart: on-failure diff --git a/test/func/ttk-testcases/bulk_happy_path_dynamic.json b/test/func/ttk-testcases/bulk_happy_path_dynamic.json new file mode 100644 index 000000000..08a70b416 --- /dev/null +++ b/test/func/ttk-testcases/bulk_happy_path_dynamic.json @@ -0,0 +1,410 @@ +{ + "name": "multi", + "test_cases": [ + { + "id": 1, + "name": "TC-BHPD. Happy Path Dynamic", + "fileInfo": { + "path": "ttk-testcases/bulk_happy_path_dynamic.json" + }, + "requests": [ + { + "id": 1, + "description": "Post /bulkTransaction", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "scheme_adapter_outbound", + "asynchronous": true, + "prefix": "/sdk-out", + "hostnames": [], + "specFile": "spec_files/api_definitions/mojaloop_sdk_outbound_scheme_adapter_1.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/mojaloop_sdk_outbound_scheme_adapter_1.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/mojaloop_sdk_outbound_scheme_adapter_1.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/mojaloop_sdk_outbound_scheme_adapter_1.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/mojaloop_sdk_outbound_scheme_adapter_1.0/trigger_templates" + }, + "operationPath": "/bulkTransactions", + "path": "/bulkTransactions", + "method": "post", + "body": { + "bulkHomeTransactionID": "abc123", + "bulkTransactionId": "{$function.generic.generateUUID}", + "options": { + "onlyValidateParty": true, + "autoAcceptParty": { + "enabled": false + }, + "autoAcceptQuote": { + "enabled": false + }, + "skipPartyLookup": false, + "synchronous": false, + "bulkExpiration": "{$requestVariables.bulkTimeout}" + }, + "from": { + "partyIdInfo": { + "partyIdType": "MSISDN", + "partyIdentifier": "16135551212" + } + }, + "individualTransfers": [] + }, + "scriptingEngine": "javascript", + "tests": { + "assertions": [ + { + "id": 1, + "description": "Check Return Status Code", + "exec": [ + "expect(response.status).to.equal(202)", + "" + ] + }, + { + "id": 2, + "description": "Check number of returned transfers", + "exec": [ + "expect(callback.body.individualTransferResults.length).to.equal(environment.totalIndividualTransfers)" + ] + }, + { + "id": 7, + "description": "Check current state is WAITING_FOR_PARTY_ACCEPTANCE", + "exec": [ + "expect(callback.body.currentState).to.equal('WAITING_FOR_PARTY_ACCEPTANCE')" + ] + }, + { + "id": 8, + "description": "Check all the responses have ilpPacket and condition", + "exec": [ + "expect(callback.body.individualTransferResults.filter(transfer => transfer.to.partyIdInfo.fspId)).to.not.be.empty;", + "" + ] + }, + { + "id": 9, + "description": "Check all the responses don't have lastError", + "exec": [ + "expect(callback.body.individualTransferResults.filter(transfer => transfer.lastError)).to.be.empty;", + "" + ] + } + ] + }, + "ignoreCallbacks": false, + "scripts": { + "preRequest": { + "exec": [ + "environment.totalIndividualTransfers = 100", + "", + "const individualTransfers = []", + "for(let i=1; i<=environment.totalIndividualTransfers/2; i++) {", + " individualTransfers.push({", + " homeTransactionId: 'abc' + i,", + " to: {", + " partyIdInfo: {", + " partyIdType: 'MSISDN',", + " partyIdentifier: (5678123400000 + i) + ''", + " }", + " },", + " amountType: 'SEND',", + " currency: 'TZS',", + " amount: '100',", + " note: 'fspsuccess'", + " })", + "}", + "for(let i=1; i<=environment.totalIndividualTransfers/2; i++) {", + " individualTransfers.push({", + " homeTransactionId: 'abcd' + i,", + " to: {", + " partyIdInfo: {", + " partyIdType: 'MSISDN',", + " partyIdentifier: (5678123500000 + i) + ''", + " }", + " },", + " amountType: 'SEND',", + " currency: 'TZS',", + " amount: '100',", + " note: 'fspsuccess'", + " })", + "}", + "", + "", + "", + "custom.appendRequestBody({", + " individualTransfers: individualTransfers", + "})", + "", + "requestVariables.bulkTimeout = (new Date(Date.now()+240000)).toISOString()", + "" + ] + }, + "postRequest": { + "exec": [ + "environment.acceptPartyCallback = callback" + ] + } + } + }, + { + "id": 2, + "description": "put bulk transaction for acceptParty", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "scheme_adapter_outbound", + "asynchronous": true, + "prefix": "/sdk-out", + "hostnames": [], + "specFile": "spec_files/api_definitions/mojaloop_sdk_outbound_scheme_adapter_1.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/mojaloop_sdk_outbound_scheme_adapter_1.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/mojaloop_sdk_outbound_scheme_adapter_1.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/mojaloop_sdk_outbound_scheme_adapter_1.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/mojaloop_sdk_outbound_scheme_adapter_1.0/trigger_templates" + }, + "operationPath": "/bulkTransactions/{bulkTransactionId}", + "path": "/bulkTransactions/{$prev.1.request.body.bulkTransactionId}", + "method": "put", + "params": { + "bulkTransactionId": "{$prev.1.request.body.bulkTransactionId}" + }, + "body": { + "bulkHomeTransactionID": "{$prev.1.request.body.bulkHomeTransactionID}", + "individualTransfers": [] + }, + "scriptingEngine": "javascript", + "tests": { + "assertions": [ + { + "id": 1, + "description": "Check Return Status Code", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Check response has quote result", + "exec": [ + "expect(callback.body.individualTransferResults[0].quoteResponse).to.exist;" + ] + }, + { + "id": 3, + "description": "Check response has ilpPacket and condition", + "exec": [ + "expect(callback.body.individualTransferResults[0].quoteResponse.ilpPacket).to.not.be.empty;", + "", + "expect(callback.body.individualTransferResults[0].quoteResponse.condition).to.not.be.empty;" + ] + }, + { + "id": 4, + "description": "Check state is WAITING_FOR_QUOTE_ACCEPTANCE", + "exec": [ + "expect(callback.body.currentState).to.equal('WAITING_FOR_QUOTE_ACCEPTANCE')" + ] + }, + { + "id": 5, + "description": "Check all the responses have ilpPacket and condition", + "exec": [ + "expect(callback.body.individualTransferResults.filter(transfer => transfer.quoteResponse.ilpPacket && transfer.quoteResponse.condition)).to.not.be.empty;", + "" + ] + }, + { + "id": 6, + "description": "Check all the responses don't have lastError", + "exec": [ + "expect(callback.body.individualTransferResults.filter(transfer => transfer.quoteResponse.lastError)).to.be.empty;", + "" + ] + } + ] + }, + "disabled": false, + "scripts": { + "preRequest": { + "exec": [ + "const individualTransfers = []", + "for(let i=1; i<=environment.totalIndividualTransfers; i++) {", + " individualTransfers.push({", + " transactionId: environment.acceptPartyCallback.body.individualTransferResults[i-1].transactionId,", + " acceptParty: true,", + " homeTransactionId: 'abc' + i,", + " })", + "}", + "", + "custom.appendRequestBody({", + " individualTransfers: individualTransfers", + "})", + "" + ] + }, + "postRequest": { + "exec": [ + "" + ] + } + } + }, + { + "id": 3, + "description": "put bulk transaction for acceptQuote", + "apiVersion": { + "minorVersion": 0, + "majorVersion": 1, + "type": "scheme_adapter_outbound", + "asynchronous": true, + "prefix": "/sdk-out", + "hostnames": [], + "specFile": "spec_files/api_definitions/mojaloop_sdk_outbound_scheme_adapter_1.0/api_spec.yaml", + "callbackMapFile": "spec_files/api_definitions/mojaloop_sdk_outbound_scheme_adapter_1.0/callback_map.json", + "responseMapFile": "spec_files/api_definitions/mojaloop_sdk_outbound_scheme_adapter_1.0/response_map.json", + "jsfRefFile": "spec_files/api_definitions/mojaloop_sdk_outbound_scheme_adapter_1.0/mockRef.json", + "triggerTemplatesFolder": "spec_files/api_definitions/mojaloop_sdk_outbound_scheme_adapter_1.0/trigger_templates" + }, + "operationPath": "/bulkTransactions/{bulkTransactionId}", + "path": "/bulkTransactions/{$prev.1.request.body.bulkTransactionId}", + "method": "put", + "params": { + "bulkTransactionId": "{$prev.1.request.body.bulkTransactionId}" + }, + "body": { + "bulkHomeTransactionID": "{$prev.1.request.body.bulkHomeTransactionID}", + "individualTransfers": [] + }, + "scriptingEngine": "javascript", + "tests": { + "assertions": [ + { + "id": 1, + "description": "Check Return Status Code", + "exec": [ + "expect(response.status).to.equal(202)" + ] + }, + { + "id": 2, + "description": "Check number of returned transfers", + "exec": [ + "expect(callback.body.individualTransferResults.length).to.equal(environment.totalIndividualTransfers)" + ] + }, + { + "id": 4, + "description": "Check response has the receiver fspid populated", + "exec": [ + "expect(callback.body.individualTransferResults[0].to.partyIdInfo.fspId).to.not.be.empty" + ] + }, + { + "id": 5, + "description": "Check response receiver first name is ReceiverFirst", + "exec": [ + "expect(callback.body.individualTransferResults[0].to.personalInfo.complexName.firstName).to.equal('ReceiverFirst')" + ] + }, + { + "id": 6, + "description": "Check response receiver last name is ReceiverLast", + "exec": [ + "expect(callback.body.individualTransferResults[0].to.personalInfo.complexName.lastName).to.equal('ReceiverLast')" + ] + }, + { + "id": 7, + "description": "Check response has quote result", + "exec": [ + "expect(callback.body.individualTransferResults[0].quoteResponse).to.exist;" + ] + }, + { + "id": 8, + "description": "Check response has ilpPacket and condition", + "exec": [ + "expect(callback.body.individualTransferResults[0].quoteResponse.ilpPacket).to.not.be.empty;", + "", + "expect(callback.body.individualTransferResults[0].quoteResponse.condition).to.not.be.empty;" + ] + }, + { + "id": 9, + "description": "Check response has fulfillment", + "exec": [ + "expect(callback.body.individualTransferResults[0].fulfil.fulfilment).to.exist;" + ] + }, + { + "id": 10, + "description": "Check response has COMPLETED state", + "exec": [ + "expect(callback.body.individualTransferResults[0].fulfil.transferState).to.equal('COMMITTED');" + ] + }, + { + "id": 11, + "description": "Check overall bulk transaction state is COMPLETED", + "exec": [ + "expect(callback.body.currentState).to.equal('COMPLETED')" + ] + }, + { + "id": 12, + "description": "Check all the responses have fulfilment and transferId", + "exec": [ + "expect(callback.body.individualTransferResults.filter(transfer => transfer.fulfil.fulfilment && transfer.fulfil.transferId)).to.not.be.empty;", + "" + ] + }, + { + "id": 13, + "description": "Check all the responses don't have lastError", + "exec": [ + "expect(callback.body.individualTransferResults.filter(transfer => transfer.fulfil.lastError)).to.be.empty;", + "" + ] + }, + { + "id": 14, + "description": "Check all the responses have transferState as COMMITTED", + "exec": [ + "expect(callback.body.individualTransferResults.filter(transfer => transfer.fulfil.transferState == 'COMMITTED')).to.not.be.empty;", + "" + ] + } + ] + }, + "disabled": false, + "scripts": { + "preRequest": { + "exec": [ + "const individualTransfers = []", + "for(let i=1; i<=environment.totalIndividualTransfers; i++) {", + " individualTransfers.push({", + " transactionId: environment.acceptPartyCallback.body.individualTransferResults[i-1].transactionId,", + " acceptQuote: true,", + " homeTransactionId: 'abc' + i,", + " })", + "}", + "", + "custom.appendRequestBody({", + " individualTransfers: individualTransfers", + "})", + "" + ] + }, + "postRequest": { + "exec": [ + "" + ] + } + } + } + ] + } + ] +} \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index 39b633a08..7a5c65393 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2148,7 +2148,18 @@ __metadata: languageName: node linkType: hard -"@mojaloop/platform-shared-lib-nodejs-kafka-client-lib@npm:^0.2.13, @mojaloop/platform-shared-lib-nodejs-kafka-client-lib@npm:~0.2.0": +"@mojaloop/platform-shared-lib-nodejs-kafka-client-lib@npm:^0.2.14-snapshot.0": + version: 0.2.14-snapshot.0 + resolution: "@mojaloop/platform-shared-lib-nodejs-kafka-client-lib@npm:0.2.14-snapshot.0" + dependencies: + "@mojaloop/logging-bc-public-types-lib": ^0.1.11 + "@mojaloop/platform-shared-lib-messaging-types-lib": ~0.2.0 + node-rdkafka: ~2.13.0 + checksum: bbf0757989594f6ec10d134cf9464da932317469f296c173ab899f7b6212f79dee6769e753a9611fccf577e5b131cfff349d13b251517918b6ed735f2859d417 + languageName: node + linkType: hard + +"@mojaloop/platform-shared-lib-nodejs-kafka-client-lib@npm:~0.2.0": version: 0.2.13 resolution: "@mojaloop/platform-shared-lib-nodejs-kafka-client-lib@npm:0.2.13" dependencies: @@ -2198,7 +2209,7 @@ __metadata: lodash: ^4.17.21 module-alias: ^2.2.2 nock: ^13.2.9 - npm-check-updates: ^16.3.16 + npm-check-updates: ^16.3.18 oauth2-server: ^4.0.0-dev.2 openapi-jsonschema-parameters: ^12.0.2 openapi-response-validator: ^12.0.2 @@ -2243,7 +2254,7 @@ __metadata: express: ^4.18.2 jest: ^29.3.0 nodemon: ^2.0.20 - npm-check-updates: ^16.3.16 + npm-check-updates: ^16.3.18 openapi-backend: ^5.5.0 redis: ^4.4.0 replace: ^1.2.2 @@ -2280,7 +2291,7 @@ __metadata: express: ^4.18.2 jest: ^29.3.0 nodemon: ^2.0.20 - npm-check-updates: ^16.3.16 + npm-check-updates: ^16.3.18 openapi-backend: ^5.5.0 redis: ^4.4.0 replace: ^1.2.2 @@ -2301,12 +2312,12 @@ __metadata: "@mojaloop/central-services-shared": ^17.3.1 "@mojaloop/logging-bc-public-types-lib": ^0.1.12 "@mojaloop/platform-shared-lib-messaging-types-lib": ^0.2.16 - "@mojaloop/platform-shared-lib-nodejs-kafka-client-lib": ^0.2.13 + "@mojaloop/platform-shared-lib-nodejs-kafka-client-lib": ^0.2.14-snapshot.0 "@types/node": ^18.11.9 ajv: ^8.11.0 eslint: ^8.27.0 jest: ^29.3.0 - npm-check-updates: ^16.3.16 + npm-check-updates: ^16.3.18 redis: ^4.4.0 replace: ^1.2.2 standard-version: ^9.5.0 @@ -2329,11 +2340,11 @@ __metadata: eslint: ^8.27.0 eslint-config-airbnb-typescript: ^17.0.0 eslint-plugin-import: latest - husky: ^8.0.1 + husky: ^8.0.2 jest: ^29.3.0 nodemon: ^2.0.20 - npm-check-updates: ^16.3.16 - nx: 15.0.10 + npm-check-updates: ^16.3.18 + nx: 15.0.12 replace: ^1.2.2 standard-version: ^9.5.0 ts-jest: ^29.0.3 @@ -2471,23 +2482,23 @@ __metadata: languageName: node linkType: hard -"@nrwl/cli@npm:15.0.10": - version: 15.0.10 - resolution: "@nrwl/cli@npm:15.0.10" +"@nrwl/cli@npm:15.0.12": + version: 15.0.12 + resolution: "@nrwl/cli@npm:15.0.12" dependencies: - nx: 15.0.10 - checksum: 4607ffffda998bb38dafd6af7acecbb8b9e87f6175450c28510ddc3f7c2b3f5de8fb39a244c4b67e9f926be00adeaf317ccea77d826aaf97a904f76b5906c4c9 + nx: 15.0.12 + checksum: ddd21122c954015e245b3198ff8ddd6d5deed45fe2992ac97221ba4f42295d3e361625de300c75680a7a1b3f4ff8d5558821995f328725c3001d21b11d78fd50 languageName: node linkType: hard -"@nrwl/tao@npm:15.0.10": - version: 15.0.10 - resolution: "@nrwl/tao@npm:15.0.10" +"@nrwl/tao@npm:15.0.12": + version: 15.0.12 + resolution: "@nrwl/tao@npm:15.0.12" dependencies: - nx: 15.0.10 + nx: 15.0.12 bin: tao: index.js - checksum: 66da1546a94b8c94378f20bd2fbdf9b89586ffe98e1abd6f7713b4e7f1e4c4215f1a9b3cdb5718bd83ebf341154cce19b95bfedcedeff9b2c527935f76f43f93 + checksum: 4a24b936bd14e91b7fda758c20a2796fd0f343aa3acd76c46b96426ed3ee618804fe5501678df5e7954202e8f13799413978f3a6d6ea634ce304c47479e8ddc8 languageName: node linkType: hard @@ -7630,12 +7641,12 @@ __metadata: languageName: node linkType: hard -"husky@npm:^8.0.1": - version: 8.0.1 - resolution: "husky@npm:8.0.1" +"husky@npm:^8.0.2": + version: 8.0.2 + resolution: "husky@npm:8.0.2" bin: husky: lib/bin.js - checksum: 943a73a13d0201318fd30e83d299bb81d866bd245b69e6277804c3b462638dc1921694cb94c2b8c920a4a187060f7d6058d3365152865406352e934c5fff70dc + checksum: e101656fcb56163d610488f186448c78b132626aa427094489d886ce9374955a90274912b0f3a34af3326eaa74977883b032e5f701d7aaf4554daa5a7931be43 languageName: node linkType: hard @@ -10275,9 +10286,9 @@ __metadata: languageName: node linkType: hard -"npm-check-updates@npm:^16.3.16": - version: 16.3.16 - resolution: "npm-check-updates@npm:16.3.16" +"npm-check-updates@npm:^16.3.18": + version: 16.3.18 + resolution: "npm-check-updates@npm:16.3.18" dependencies: chalk: ^5.1.2 cli-table: ^0.3.11 @@ -10311,7 +10322,7 @@ __metadata: bin: ncu: build/src/bin/cli.js npm-check-updates: build/src/bin/cli.js - checksum: af2ab721e745dcca892136be948cdb267f8de38b118b463dc122a7734ffaa9afbfd99c8672a0339b5de73a3c8a69e557f8f81f4d751fe0bbc8f9fe8f0f54c986 + checksum: 306556e2e272a1656989b4a97daee27aa6663c054e5baacb3662d5ac02be31ab956a2d3ebd34ec34c49bae4b10fc80fe10736173b1d263ca46cdeae1eecc0879 languageName: node linkType: hard @@ -10451,12 +10462,12 @@ __metadata: languageName: node linkType: hard -"nx@npm:15.0.10": - version: 15.0.10 - resolution: "nx@npm:15.0.10" +"nx@npm:15.0.12": + version: 15.0.12 + resolution: "nx@npm:15.0.12" dependencies: - "@nrwl/cli": 15.0.10 - "@nrwl/tao": 15.0.10 + "@nrwl/cli": 15.0.12 + "@nrwl/tao": 15.0.12 "@parcel/watcher": 2.0.4 "@yarnpkg/lockfile": ^1.1.0 "@yarnpkg/parsers": ^3.0.0-rc.18 @@ -10500,7 +10511,7 @@ __metadata: optional: true bin: nx: bin/nx.js - checksum: a383711a79ff257f18967b9ba3594d18e7daef499bf6f3584325360002cbe0bc78e1d53dbe76a0dad519261e3e9bd7bdcb9969c326e3fe3ed77a834926123500 + checksum: 51763600e2f67dc0bd2bfd400529a19ed9a214824cd4dd2d7804146ea5132e47d0f02fb283fd66cfad7f2aa208b52601564211549fadff058bbbb0a195541343 languageName: node linkType: hard