diff --git a/package-lock.json b/package-lock.json index d384628d..660e626a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,7 +20,7 @@ "@mojaloop/central-services-metrics": "12.6.0", "@mojaloop/ml-schema-transformer-lib": "2.7.7", "@mojaloop/ml-testing-toolkit-shared-lib": "14.2.0", - "@mojaloop/sdk-standard-components": "19.16.4", + "@mojaloop/sdk-standard-components": "19.16.5", "@now-ims/hapi-now-auth": "2.1.0", "@types/socket.io": "3.0.2", "adm-zip": "0.5.16", @@ -2437,9 +2437,9 @@ } }, "node_modules/@mojaloop/sdk-standard-components": { - "version": "19.16.4", - "resolved": "https://registry.npmjs.org/@mojaloop/sdk-standard-components/-/sdk-standard-components-19.16.4.tgz", - "integrity": "sha512-QbnUVLW7T10TnEdO2sRdux19bG5xRo2T5t6HV+EjCdH87ozVYDGKmWBfZbCqdUeq6FpAPG9hcOto0n7OE0ntNA==", + "version": "19.16.5", + "resolved": "https://registry.npmjs.org/@mojaloop/sdk-standard-components/-/sdk-standard-components-19.16.5.tgz", + "integrity": "sha512-vuzih+lomZOphmhW9TnZzDkepTUF49nShG+DCy0YxtYuf5zRCg/aeQuxpCDkkJZkjrSU4m1US/hudlNYezgeug==", "license": "Apache-2.0", "dependencies": { "@mojaloop/central-services-logger": "11.9.0", diff --git a/package.json b/package.json index d522ec0b..98efd7a3 100644 --- a/package.json +++ b/package.json @@ -82,7 +82,7 @@ "@mojaloop/central-services-metrics": "12.6.0", "@mojaloop/ml-schema-transformer-lib": "2.7.7", "@mojaloop/ml-testing-toolkit-shared-lib": "14.2.0", - "@mojaloop/sdk-standard-components": "19.16.4", + "@mojaloop/sdk-standard-components": "19.16.5", "@now-ims/hapi-now-auth": "2.1.0", "@types/socket.io": "3.0.2", "adm-zip": "0.5.16", diff --git a/spec_files/api_definitions/mojaloop_sdk_outbound_scheme_adapter_2.1/api_spec.yaml b/spec_files/api_definitions/mojaloop_sdk_outbound_scheme_adapter_2.1/api_spec.yaml new file mode 100644 index 00000000..ffd2f29f --- /dev/null +++ b/spec_files/api_definitions/mojaloop_sdk_outbound_scheme_adapter_2.1/api_spec.yaml @@ -0,0 +1,3451 @@ +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/main/LICENSE.md + version: 2.1.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. + /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' + /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' + /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: + $ref: '#/components/schemas/bulkTransactionRequest' + required: true + responses: + '202': + $ref: '#/components/responses/bulkTransactionAccepted' + '400': + $ref: '#/components/responses/bulkTransferBadRequest' + '500': + $ref: '#/components/responses/errorResponse' + /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: + - $ref: '#/components/parameters/bulkTransactionId' + requestBody: + description: Bulk transaction request body + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/bulkTransactionContinuationAcceptParty' + - $ref: '#/components/schemas/bulkTransactionContinuationAcceptQuote' + required: true + responses: + '202': + description: Bulk transaction information successfully amended + '400': + $ref: '#/components/responses/bulkTransactionPutBadRequest' + '500': + description: An error occurred processing the bulk transaction + 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/errorResponse' + /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: + - $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' + /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/simpleQuotesPostRequest' + required: true + responses: + '200': + $ref: '#/components/responses/quotesPostSuccess' + '500': + $ref: '#/components/responses/quotesServerError' + /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' + /requestToPay/{transactionRequestId}: + put: + summary: >- + Continues a request funds from sender that has paused at the party + resolution stage in order to accept or reject party information + description: > + The HTTP request `PUT /requestToPay/{transactionRequestId}` is used to + continue a transfer initiated via the `POST /requestToPay` method that + has halted after party lookup stage. + + The request body should contain the "acceptParty" property set to `true` + as required to continue the transfer. + + See the description of the `POST /requestToPay` HTTP method for more + information on modes of transfer. + tags: + - RequestToPay + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/transferContinuationAcceptParty' + parameters: + - $ref: '#/components/parameters/transactionRequestId' + responses: + '200': + $ref: '#/components/responses/requestToPaySuccess' + '500': + $ref: '#/components/responses/transferServerError' + '504': + $ref: '#/components/responses/transferTimeout' + /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/{transactionRequestId}: + put: + summary: >- + Continues a transfer that has paused at the otp stage in order to accept + or reject quote + description: > + This request is used to continue a requestToPayTransfer initiated via + the `POST /requestToPayTransfer` method that has halted after quotation + stage and/or otp 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/transactionRequestId' + responses: + '200': + $ref: '#/components/responses/transferSuccess' + '500': + $ref: '#/components/responses/transferServerError' + '504': + $ref: '#/components/responses/transferTimeout' + /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' + /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 and/or conversion + 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 and/or currency conversion + stage. + + + The request body should contain either the "acceptParty" or + "acceptQuote" or "acceptConversion" 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' + - $ref: '#/components/schemas/transferContinuationAcceptConversion' + 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' + /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: Obtain a list of the DFSPs in the scheme who provide FXP service + tags: + - servicesFXP + operationId: ServicesFXPGet + responses: + '200': + $ref: '#/components/responses/servicesFXPSucess' + '400': + $ref: '#/components/responses/400' + '500': + $ref: '#/components/responses/500' + /services/FXP/{SourceCurrency}/{TargetCurrency}: + get: + description: >- + The HTTP request `GET /services/FXP/{SourceCurrency}/{TargetCurrency}` + is used to request information about the participants in a scheme who + offer currency conversion services in a particular currency corridor. + The required corridor is specified by giving the ISO 4217 currency code + for the SourceCurrency and the TargetCurrency. + summary: Obtain a list of the DFSPs in the scheme who provide FXP service + tags: + - servicesFXP + operationId: ServicesFXPSourceCurrencyTargetCurrencyGet + parameters: + - $ref: '#/components/parameters/SourceCurrency' + - $ref: '#/components/parameters/TargetCurrency' + responses: + '200': + $ref: '#/components/responses/servicesFXPSucess' + '400': + $ref: '#/components/responses/400' + '500': + $ref: '#/components/responses/500' + /fxQuotes: + post: + description: >- + The HTTP request `POST /fxQuotes` is used to ask to provide a quotation + for a currency conversion. + summary: Calculate FX quote + tags: + - Fx + operationId: FxQuotesPost + requestBody: + description: Details of the FX quote request. + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/FxQuotesPostOutboundRequest' + responses: + '200': + description: Successful response. + content: + application/json: + schema: + $ref: '#/components/schemas/FxQuotesPostOutboundResponse' + '400': + $ref: '#/components/responses/400' + '500': + $ref: '#/components/responses/500' + /fxTransfers: + post: + description: >- + The HTTP request `POST /fxTransfers` is used to ask to confirm the + execution of an agreed currency conversion. + summary: Perform FX transfer + tags: + - Fx + operationId: FxTransfersPost + requestBody: + description: Details of the FX transfer request. + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/FxTransfersPostOutboundRequest' + responses: + '200': + description: Successful response. + content: + application/json: + schema: + $ref: '#/components/schemas/FxTransfersPostOutboundResponse' + '400': + $ref: '#/components/responses/400' + '500': + $ref: '#/components/responses/500' +components: + schemas: + 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. + 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. + 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 + 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' + CorrelationId: + title: CorrelationId + type: string + pattern: >- + ^[0-9a-f]{8}-[0-9a-f]{4}-[1-7][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$|^[0-9A-HJKMNP-TV-Z]{26}$ + 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 + 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. + 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 + 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 + 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' + 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' + postAccountsResponse: + type: object + required: + - body + properties: + body: + type: object + headers: + type: object + errorAccountsResponse: + allOf: + - $ref: '#/components/schemas/errorResponse' + - type: object + required: + - executionState + properties: + executionState: + $ref: '#/components/schemas/accountsResponse' + 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 + 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. + KYCInformation: + title: KYCInformation + type: string + minLength: 1 + maxLength: 2048 + description: >- + KYC information for the party in a form mandated by an individual + scheme. + example: |- + { + "metadata": { + "format": "JSON", + "version": "1.0", + "description": "Data containing KYC Information" + }, + "data": { + "name": "John Doe", + "dob": "1980-05-15", + "gender": "Male", + "address": "123 Main Street, Anytown, USA", + "email": "johndoe@example.com", + "phone": "+1 555-123-4567", + "nationality": "US", + "passport_number": "AB1234567", + "issue_date": "2010-02-20", + "expiry_date": "2025-02-20", + "bank_account_number": "1234567890", + "bank_name": "Example Bank", + "employer": "ABC Company", + "occupation": "Software Engineer", + "income": "$80,000 per year", + "marital_status": "Single", + "dependents": 0, + "risk_level": "Low" + } + } + 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' + supportedCurrencies: + type: array + description: Currencies in which the party can receive funds. + items: + $ref: '#/components/schemas/Currency' + minItems: 0 + maxItems: 16 + kycInformation: + $ref: '#/components/schemas/KYCInformation' + 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. + example: RECEIVE + 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: + - TRANSFER + description: Type of transaction. + 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 + Note: + title: Note + type: string + minLength: 1 + maxLength: 128 + description: Memo assigned to transaction. + example: Note sent to Payee. + 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/transferTransactionType' + subScenario: + $ref: '#/components/schemas/TransactionSubScenario' + note: + $ref: '#/components/schemas/Note' + extensions: + $ref: '#/components/schemas/ExtensionList' + required: + - quoteId + - to + - amountType + - currency + - transactionType + - amount + 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' + 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' + bulkTransferStatus: + type: string + enum: + - ERROR_OCCURRED + - 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 + 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: + 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). + 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. + 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' + transferAmount: + $ref: '#/components/schemas/Money' + payeeReceiveAmount: + $ref: '#/components/schemas/Money' + payeeFspFee: + $ref: '#/components/schemas/Money' + payeeFspCommission: + $ref: '#/components/schemas/Money' + geoCode: + $ref: '#/components/schemas/GeoCode' + ilpPacket: + $ref: '#/components/schemas/IlpPacket' + condition: + $ref: '#/components/schemas/IlpCondition' + extensionList: + $ref: '#/components/schemas/ExtensionList' + lastError: + $ref: '#/components/schemas/quoteError' + required: + - quoteId + bulkQuoteResponse: + type: object + required: + - bulkQuoteId + - individualQuoteResults + - currentState + - expiration + properties: + bulkQuoteId: + $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. + expiration: + $ref: '#/components/schemas/DateTime' + extensionList: + $ref: '#/components/schemas/ExtensionList' + currentState: + $ref: '#/components/schemas/bulkTransferStatus' + 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: + - bulkQuoteState + 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' + autoAcceptPartyOption: + type: object + required: + - enabled + properties: + enabled: + type: boolean + enum: + - false + - true + bulkPerTransferFeeLimit: + type: object + required: + - currency + - amount + properties: + currency: + $ref: '#/components/schemas/Currency' + amount: + $ref: '#/components/schemas/Amount' + autoAcceptQuote: + type: object + required: + - enabled + properties: + enabled: + type: boolean + enum: + - true + - false + perTransferFeeLimits: + type: array + minItems: 0 + items: + $ref: '#/components/schemas/bulkPerTransferFeeLimit' + bulkTransactionOptions: + type: object + required: + - autoAcceptParty + - autoAcceptQuote + - bulkExpiration + properties: + 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: + $ref: '#/components/schemas/autoAcceptPartyOption' + 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: + - $ref: '#/components/schemas/autoAcceptQuote' + 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: + $ref: '#/components/schemas/DateTime' + 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: + $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' + kycInformation: + $ref: '#/components/schemas/KYCInformation' + 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' + supportedCurrencies: + type: array + description: Currencies in which the party can receive funds. + items: + $ref: '#/components/schemas/Currency' + minItems: 0 + maxItems: 16 + required: + - partyIdInfo + bulkTransactionIndividualTransfer: + title: BulkTransactionIndividualTransfer + type: object + description: Data model for the complex type 'bulkTransactionIndividualTransfer'. + properties: + homeTransactionId: + type: string + description: >- + Transaction ID from the DFSP backend, used to reconcile transactions + between the Switch and DFSP backend systems. + to: + $ref: '#/components/schemas/Party' + reference: + description: Payer Loan reference + type: string + amountType: + $ref: '#/components/schemas/AmountType' + currency: + $ref: '#/components/schemas/Currency' + amount: + $ref: '#/components/schemas/Amount' + note: + $ref: '#/components/schemas/Note' + quoteExtensions: + $ref: '#/components/schemas/ExtensionList' + transferExtensions: + $ref: '#/components/schemas/ExtensionList' + lastError: + $ref: '#/components/schemas/transferError' + required: + - homeTransactionId + - to + - amountType + - currency + - amount + bulkTransactionRequest: + type: object + required: + - bulkTransactionId + - bulkHomeTransactionID + - options + - from + - individualTransfers + properties: + bulkHomeTransactionID: + type: string + description: >- + Transaction ID from the DFSP backend, used to reconcile transactions + between the Switch and DFSP backend systems. + bulkTransactionId: + $ref: '#/components/schemas/CorrelationId' + options: + $ref: '#/components/schemas/bulkTransactionOptions' + from: + $ref: '#/components/schemas/Party' + individualTransfers: + description: List of individual transfers in a bulk transfer. + type: array + minItems: 1 + items: + $ref: '#/components/schemas/bulkTransactionIndividualTransfer' + extensions: + $ref: '#/components/schemas/ExtensionList' + 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. + example: RESERVED + 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 + individualTransferResult: + type: object + required: + - transferId + properties: + transferId: + $ref: '#/components/schemas/CorrelationId' + fulfilment: + $ref: '#/components/schemas/IlpFulfilment' + extensionList: + $ref: '#/components/schemas/ExtensionList' + transferState: + $ref: '#/components/schemas/TransferState' + lastError: + $ref: '#/components/schemas/transferError' + bulkTransferResponse: + type: object + required: + - bulkTransferId + - individualTransferResults + - currentState + properties: + bulkTransferId: + $ref: '#/components/schemas/CorrelationId' + bulkQuoteId: + $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. + bulkTransferState: + $ref: '#/components/schemas/TransferState' + completedTimestamp: + $ref: '#/components/schemas/DateTime' + extensionList: + $ref: '#/components/schemas/ExtensionList' + currentState: + $ref: '#/components/schemas/bulkTransferStatus' + 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: + - bulkTransferState + properties: + bulkTransferState: + $ref: '#/components/schemas/bulkTransferResponse' + bulkTransactionIndividualTransferAccept: + type: object + description: Data model for the 'individualTransfer' while accepting party or quote. + properties: + transferId: + $ref: '#/components/schemas/CorrelationId' + required: + - transferId + transferContinuationAcceptParty: + type: object + required: + - acceptParty + properties: + acceptParty: + type: boolean + enum: + - true + - false + bulkTransactionContinuationAcceptParty: + description: >- + The object sent back as confirmation of payee parties when + autoAcceptParty is false. + type: object + required: + - individualTransfers + properties: + individualTransfers: + description: >- + List of individual transfers in a bulk transfer with accept party + information. + type: array + minItems: 1 + items: + allOf: + - $ref: '#/components/schemas/bulkTransactionIndividualTransferAccept' + - $ref: '#/components/schemas/transferContinuationAcceptParty' + transferContinuationAcceptQuote: + type: object + required: + - acceptQuote + properties: + acceptQuote: + type: boolean + enum: + - true + - false + bulkTransactionContinuationAcceptQuote: + description: >- + The object sent back as confirmation of quotes when autoAcceptQuotes is + false. + type: object + required: + - individualTransfers + properties: + individualTransfers: + description: List of individual transfers in a bulk transfer. + type: array + minItems: 1 + items: + allOf: + - $ref: '#/components/schemas/bulkTransactionIndividualTransferAccept' + - $ref: '#/components/schemas/transferContinuationAcceptQuote' + partyError: + type: object + description: >- + This object represents a Mojaloop API error received at any time during + the party discovery 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' + bulkTransactionAcceptPartyErrorResponse: + allOf: + - $ref: '#/components/schemas/errorResponse' + - type: object + required: + - bulkTransferState + properties: + bulkTransferState: + allOf: + - $ref: '#/components/schemas/bulkTransactionContinuationAcceptParty' + - $ref: '#/components/schemas/partyError' + bulkTransactionAcceptQuoteErrorResponse: + allOf: + - $ref: '#/components/schemas/errorResponse' + - type: object + required: + - bulkTansferState + properties: + bulkTransferState: + allOf: + - $ref: '#/components/schemas/bulkTransactionContinuationAcceptQuote' + - $ref: '#/components/schemas/quoteError' + 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/transferTransactionType' + subScenario: + $ref: '#/components/schemas/TransactionSubScenario' + ilpPacket: + $ref: '#/components/schemas/IlpPacket' + condition: + $ref: '#/components/schemas/IlpCondition' + note: + $ref: '#/components/schemas/Note' + extensions: + $ref: '#/components/schemas/ExtensionList' + required: + - transferId + - to + - amountType + - currency + - amount + - ilpPacket + - condition + bulkTransferRequest: + type: object + required: + - bulkTransferId + - homeTransactionId + - bulkQuoteId + - 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' + bulkQuoteId: + $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' + 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' + async2SyncCurrentState: + type: string + enum: + - WAITING_FOR_ACTION + - COMPLETED + - ERROR_OCCURRED + partiesByIdResponse: + title: partiesByIdResponse + type: object + description: GET /parties/{Type}/{ID} response object + properties: + party: + properties: + body: + $ref: '#/components/schemas/Party' + headers: + type: object + required: + - body + - headers + currentState: + $ref: '#/components/schemas/async2SyncCurrentState' + required: + - party + - currentState + 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 + 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 + 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 + CurrencyConverter: + title: CurrencyConverter + type: string + enum: + - PAYER + - PAYEE + description: >- + Below are the allowed values for the enumeration CurrencyConverter. - + PAYER - Currency conversion should be performed by the payer. - PAYEE - + Currency conversion should be performed by the payee. + FxRate: + title: FxRate + type: object + description: >- + The FxRate object contains information about a currency conversion in + the transfer. It can be used by parties to the transfer to exchange + information with each other about the exchange rate for the transfer, to + ensure that the best rate can be agreed on. + properties: + sourceAmount: + allOf: + - $ref: '#/components/schemas/Money' + - description: The amount of the transfer in the source currency. + targetAmount: + allOf: + - $ref: '#/components/schemas/Money' + - description: The amount of the transfer in the target currency. + required: + - sourceAmount + - targetAmount + 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' + converter: + allOf: + - $ref: '#/components/schemas/CurrencyConverter' + - description: >- + An optional field which will allow the payer DFSP to specify + which DFSP it wants to undertake currency conversion. This is + useful incase of if the sender wants the recipient to receive a + specified amount of the target currency, but the payer DFSP does + not want to undertake the currency conversion. In this case, the + amount of the transfer would be expressed in the target currency + and the amountType would be set to RECEIVE. + currencyConversion: + allOf: + - $ref: '#/components/schemas/FxRate' + - description: >- + Used by the debtor party if it wants to share information about + the currency conversion it proposes to make; or if it is + required by scheme rules to share this information. This object + contains the amount of the transfer in the source and target + currencies, but does not identify the FXP being used. + 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 + simpleQuotesPostRequest: + title: simpleQuotesPostRequest + 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: + body: + type: object + 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 + headers: + type: object + required: + - body + - headers + currentState: + $ref: '#/components/schemas/async2SyncCurrentState' + required: + - quotes + - currentState + errorQuotesResponse: + allOf: + - $ref: '#/components/schemas/errorResponse' + - type: object + 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. + example: OTP + requestToPayRequest: + type: object + required: + - homeR2PTransactionId + - from + - to + - amountType + - currency + - amount + - transactionType + properties: + homeR2PTransactionId: + 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/TransactionScenario' + subScenario: + $ref: '#/components/schemas/TransactionSubScenario' + authenticationType: + $ref: '#/components/schemas/AuthenticationType' + requestToPayStatus: + type: string + enum: + - ERROR_OCCURRED + - WAITING_FOR_PARTY_ACCEPTANCE + - COMPLETED + getPartiesResponse: + title: getPartiesResponse + type: object + description: The object sent in the GET /parties/{Type}/{ID} callback. + properties: + body: + $ref: '#/components/schemas/Party' + headers: + type: object + required: + - body + - headers + 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. + example: RECEIVED + TransactionRequestResponse: + title: TransactionRequestResponse + type: object + description: The object sent in the PUT /transactionRequests/{ID} callback. + properties: + body: + type: object + properties: + transactionId: + $ref: '#/components/schemas/CorrelationId' + transactionRequestState: + $ref: '#/components/schemas/TransactionRequestState' + extensionList: + $ref: '#/components/schemas/ExtensionList' + required: + - transactionRequestState + headers: + type: object + required: + - body + - headers + requestToPayResponse: + type: object + required: + - transactionRequestId + - from + - to + - amountType + - currency + - amount + - transactionType + - currentState + 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' + transactionType: + $ref: '#/components/schemas/TransactionScenario' + subScenario: + $ref: '#/components/schemas/TransactionSubScenario' + currentState: + $ref: '#/components/schemas/requestToPayStatus' + getPartiesResponse: + $ref: '#/components/schemas/getPartiesResponse' + transactionRequestResponse: + $ref: '#/components/schemas/TransactionRequestResponse' + lastError: + $ref: '#/components/schemas/transferError' + transferStatus: + type: string + enum: + - ERROR_OCCURRED + - WAITING_FOR_PARTY_ACCEPTANCE + - WAITING_FOR_QUOTE_ACCEPTANCE + - WAITING_FOR_CONVERSION_ACCEPTANCE + - COMPLETED + 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 + 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 + FxCharge: + title: FxCharge + type: object + description: >- + An FXP will be able to specify a charge which it proposes to levy on the + currency conversion operation using a FxCharge object. + properties: + chargeType: + type: string + minLength: 1 + maxLength: 32 + description: A description of the charge which is being levied. + sourceAmount: + allOf: + - $ref: '#/components/schemas/Money' + - description: >- + The amount of the charge which is being levied, expressed in the + source currency. + targetAmount: + allOf: + - $ref: '#/components/schemas/Money' + - description: >- + The amount of the charge which is being levied, expressed in the + target currency. + required: + - chargeType + FxConversion: + title: FxConversion + 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 + FxConversion object. + properties: + conversionId: + allOf: + - $ref: '#/components/schemas/CorrelationId' + - description: An end-to-end identifier for the conversion request. + determiningTransferId: + allOf: + - $ref: '#/components/schemas/CorrelationId' + - description: >- + The transaction ID of the transfer on whose success this + currency conversion depends. + initiatingFsp: + allOf: + - $ref: '#/components/schemas/FspId' + - description: >- + The id of the participant who is requesting a currency + conversion. + counterPartyFsp: + allOf: + - $ref: '#/components/schemas/FspId' + - description: The ID of the FXP performing the conversion. + 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. + sourceAmount: + allOf: + - $ref: '#/components/schemas/FxMoney' + - description: The amount to be converted, expressed in the source currency. + targetAmount: + allOf: + - $ref: '#/components/schemas/FxMoney' + - description: The converted amount, expressed in the target currency. + expiration: + allOf: + - $ref: '#/components/schemas/DateTime' + - description: >- + The end of the period for which the currency conversion is + required to remain valid. + charges: + type: array + 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. + items: + $ref: '#/components/schemas/FxCharge' + minItems: 0 + maxItems: 16 + extensionList: + allOf: + - $ref: '#/components/schemas/ExtensionList' + - description: The extension list for the currency conversion request. + required: + - conversionId + - initiatingFsp + - counterPartyFsp + - amountType + - sourceAmount + - targetAmount + - expiration + FxQuotesPostOutboundResponse: + title: FxQuotesPostOutboundResponse + type: object + description: >- + The object sent as a response for the POST /fxQuotes request. The terms + under which the FXP will undertake the currency conversion proposed by + the requester. + properties: + homeTransactionId: + description: >- + Transaction ID for the FXP backend, used to reconcile transactions + between the Switch and FXP backend systems. + type: string + condition: + allOf: + - $ref: '#/components/schemas/IlpCondition' + - description: The ILP condition for the conversion. + conversionTerms: + allOf: + - $ref: '#/components/schemas/FxConversion' + - description: >- + The terms under which the FXP will undertake the currency + conversion proposed by the requester. + required: + - conversionTerms + 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 + 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/transferTransactionType' + subScenario: + $ref: '#/components/schemas/TransactionSubScenario' + note: + $ref: '#/components/schemas/Note' + currentState: + $ref: '#/components/schemas/transferStatus' + quoteId: + $ref: '#/components/schemas/CorrelationId' + getPartiesResponse: + type: object + required: + - body + properties: + body: + type: object + headers: + type: object + quoteResponse: + type: object + required: + - body + properties: + body: + $ref: '#/components/schemas/QuotesIDPutResponse' + 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. + conversionRequestId: + $ref: '#/components/schemas/CorrelationId' + fxQuotesResponse: + type: object + required: + - body + properties: + body: + $ref: '#/components/schemas/FxQuotesPostOutboundResponse' + headers: + type: object + fxQuotesResponseSource: + type: string + description: | + FXPID of the entity that supplied the fxQuotes response. + fulfil: + type: object + required: + - body + properties: + body: + $ref: '#/components/schemas/TransfersIDPutResponse' + headers: + type: object + lastError: + $ref: '#/components/schemas/transferError' + 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 + errorTransferResponse: + allOf: + - $ref: '#/components/schemas/errorResponse' + - type: object + required: + - transferState + properties: + transferState: + $ref: '#/components/schemas/transferResponse' + requestToPayTransferRequest: + type: object + required: + - homeR2PTransactionId + - transactionRequestId + - from + - to + - amountType + - currency + - amount + - scenario + - initiator + - initiatorType + properties: + homeR2PTransactionId: + type: string + description: >- + Transaction ID from the DFSP backend, used to reconcile transactions + between the Switch and DFSP backend systems. + 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/TransactionScenario' + subScenario: + $ref: '#/components/schemas/TransactionSubScenario' + initiator: + $ref: '#/components/schemas/TransactionInitiator' + initiatorType: + $ref: '#/components/schemas/TransactionInitiatorType' + note: + $ref: '#/components/schemas/Note' + authenticationType: + $ref: '#/components/schemas/AuthenticationType' + AuthenticationValue: + title: AuthenticationValue + anyOf: + - 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. + - title: QRCODE + type: string + minLength: 1 + maxLength: 64 + description: QR code used as a One Time Password. + - 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: + 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. + counter: + title: Integer + type: string + pattern: ^[1-9]\d*$ + description: >- + Sequential counter used for cloning detection. Present only for + U2F authentication. + required: + - pinValue + - counter + 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 + 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. + example: ENTERED + AuthorizationIDPutResponse: + title: AuthorizationIDPutResponse + type: object + description: The object sent in the PUT /authorizations/{ID} callback. + properties: + authenticationInfo: + $ref: '#/components/schemas/AuthenticationInfo' + responseType: + $ref: '#/components/schemas/AuthorizationResponseType' + required: + - responseType + requestToPayTransferResponse: + type: object + required: + - transactionRequestId + - from + - to + - amountType + - currency + - amount + - transactionType + properties: + transferId: + $ref: '#/components/schemas/CorrelationId' + homeR2PTransactionId: + type: string + description: >- + Transaction ID from the DFSP backend, used to reconcile transactions + between the Switch and DFSP backend systems. + 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' + transactionType: + $ref: '#/components/schemas/transferTransactionType' + note: + $ref: '#/components/schemas/Note' + currentState: + $ref: '#/components/schemas/transferStatus' + quoteId: + $ref: '#/components/schemas/CorrelationId' + quoteResponse: + type: object + required: + - body + properties: + body: + $ref: '#/components/schemas/QuotesIDPutResponse' + 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. + authorizationResponse: + type: object + required: + - body + properties: + body: + $ref: '#/components/schemas/AuthorizationIDPutResponse' + headers: + type: object + fulfil: + type: object + required: + - body + properties: + body: + $ref: '#/components/schemas/TransfersIDPutResponse' + headers: + type: object + lastError: + $ref: '#/components/schemas/transferError' + transferContinuationAcceptOTP: + type: object + required: + - acceptOTP + properties: + acceptOTP: + type: boolean + enum: + - true + - false + 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: + properties: + body: + $ref: '#/components/schemas/TransfersIDPutResponse' + headers: + type: object + required: + - body + - headers + currentState: + $ref: '#/components/schemas/async2SyncCurrentState' + required: + - transfer + - currentState + errorSimpleTransfersResponse: + allOf: + - $ref: '#/components/schemas/errorResponse' + - type: object + 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/transferTransactionType' + subScenario: + $ref: '#/components/schemas/TransactionSubScenario' + note: + $ref: '#/components/schemas/Note' + quoteRequestExtensions: + $ref: '#/components/schemas/extensionListEmptiable' + transferRequestExtensions: + $ref: '#/components/schemas/extensionListEmptiable' + 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 + transferStatusResponse: + type: object + required: + - transferId + - currentState + - fulfil + properties: + transferId: + $ref: '#/components/schemas/CorrelationId' + currentState: + $ref: '#/components/schemas/transferStatus' + fulfil: + type: object + required: + - body + properties: + body: + $ref: '#/components/schemas/TransfersIDPutResponse' + headers: + type: object + transferContinuationAcceptConversion: + type: object + required: + - acceptConversion + properties: + acceptConversion: + type: boolean + enum: + - true + - false + ServicesFXPPutResponse: + title: ServicesFXPPutResponse + type: object + description: The object sent in the PUT /services/FXP callback. + properties: + providers: + type: array + description: >- + The FSP Id(s) of the participant(s) who offer currency conversion + services. + items: + $ref: '#/components/schemas/FspId' + minItems: 0 + maxItems: 16 + required: + - providers + FxQuotesPostOutboundRequest: + title: FxQuotesPostOutboundRequest + type: object + description: The object sent in the POST /fxQuotes request. + properties: + homeTransactionId: + description: >- + Transaction ID for the backend, used to reconcile transactions + between the Switch and backend systems. + type: string + conversionRequestId: + allOf: + - $ref: '#/components/schemas/CorrelationId' + - description: An end-to-end identifier for the conversion quotation request. + conversionTerms: + allOf: + - $ref: '#/components/schemas/FxConversion' + - description: >- + The terms of the currency conversion for which a quotation is + sought. + required: + - conversionRequestId + - conversionTerms + commitRequestId: + allOf: + - $ref: '#/components/schemas/CorrelationId' + - description: An end-to-end identifier for the confirmation request. + determiningTransferId: + allOf: + - $ref: '#/components/schemas/CorrelationId' + - description: >- + The transaction ID of the transfer to which this currency conversion + relates, if the conversion is part of a transfer. If the conversion + is a bulk currency purchase, this field should be omitted. + initiatingFsp: + allOf: + - $ref: '#/components/schemas/FspId' + - description: Identifier for the FSP who is requesting a currency conversion. + counterPartyFsp: + allOf: + - $ref: '#/components/schemas/FspId' + - description: Identifier for the FXP who is performing the currency conversion. + sourceAmount: + allOf: + - $ref: '#/components/schemas/Money' + - description: The amount being offered for conversion by the requesting FSP. + targetAmount: + allOf: + - $ref: '#/components/schemas/Money' + - description: >- + The amount which the FXP is to credit to the requesting FSP in the + target currency. + condition: + allOf: + - $ref: '#/components/schemas/IlpCondition' + - description: >- + ILP condition received by the requesting FSP when the quote was + approved. + FxTransfersPostOutboundRequest: + title: FxTransfersPostOutboundRequest + type: object + description: The object sent in the POST /fxTransfers request. + properties: + homeTransactionId: + description: >- + Transaction ID for the backend, used to reconcile transactions + between the Switch and backend systems. + type: string + commitRequestId: + $ref: '#/components/schemas/commitRequestId' + determiningTransferId: + $ref: '#/components/schemas/determiningTransferId' + initiatingFsp: + $ref: '#/components/schemas/initiatingFsp' + counterPartyFsp: + $ref: '#/components/schemas/counterPartyFsp' + sourceAmount: + $ref: '#/components/schemas/sourceAmount' + targetAmount: + $ref: '#/components/schemas/targetAmount' + condition: + $ref: '#/components/schemas/condition' + required: + - commitRequestId + - initiatingFsp + - counterPartyFsp + - sourceAmount + - targetAmount + 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. + completedTimestamp: + allOf: + - $ref: '#/components/schemas/DateTime' + - description: Time and date when the conversion was executed. + conversionState: + allOf: + - $ref: '#/components/schemas/TransferState' + - description: The current status of the conversion request. + FxTransfersPostOutboundResponse: + title: FxTransfersPostOutboundResponse + type: object + description: The object sent as a response for the POST /fxTransfers request. + properties: + homeTransactionId: + description: >- + Transaction ID for the backend, used to reconcile transactions + between the Switch and backend systems. + type: string + fulfilment: + $ref: '#/components/schemas/fulfilment' + completedTimestamp: + $ref: '#/components/schemas/completedTimestamp' + conversionState: + $ref: '#/components/schemas/conversionState' + extensionList: + $ref: '#/components/schemas/ExtensionList' + required: + - conversionState + responses: + '400': + description: Malformed or missing required headers or parameters. + content: + application/json: + schema: + $ref: '#/components/schemas/errorResponse' + '500': + description: An error occurred processing the request. + content: + application/json: + schema: + $ref: '#/components/schemas/errorResponse' + 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' + 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' + bulkTransactionAccepted: + description: Bulk transfer accepted successfully + bulkTransferBadRequest: + description: Malformed or missing required body, headers or parameters + content: + application/json: + schema: + $ref: '#/components/schemas/bulkTransferErrorResponse' + errorResponse: + description: Internal Server Error + content: + application/json: + schema: + $ref: '#/components/schemas/errorResponse' + bulkTransactionPutBadRequest: + description: Malformed or missing required body, headers or parameters + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/bulkTransactionAcceptPartyErrorResponse' + - $ref: '#/components/schemas/bulkTransactionAcceptQuoteErrorResponse' + bulkTransferSuccess: + description: Bulk transfer completed successfully + content: + application/json: + schema: + $ref: '#/components/schemas/bulkTransferResponse' + 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' + requestToPaySuccess: + description: Request to Pay completed successfully + content: + application/json: + schema: + $ref: '#/components/schemas/requestToPayResponse' + 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' + 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' + transferSuccess: + description: Transfer completed successfully + content: + application/json: + schema: + $ref: '#/components/schemas/transferResponse' + 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' + transferBadRequest: + description: Malformed or missing required body, headers or parameters + content: + application/json: + schema: + $ref: '#/components/schemas/errorTransferResponse' + servicesFXPSucess: + description: >- + The response contains participants in a scheme who offer currency + conversion services. If no participants offer these services, the return + object will be blank. + content: + application/json: + schema: + $ref: '#/components/schemas/ServicesFXPPutResponse' + parameters: + 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. + bulkTransactionId: + name: bulkTransactionId + in: path + required: true + schema: + $ref: '#/components/schemas/CorrelationId' + 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: '#/components/schemas/CorrelationId' + description: >- + Identifier of the bulk transfer to continue as returned in the response + to a `POST /bulkTransfers` 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`. + transactionRequestId: + name: transactionRequestId + in: path + required: true + schema: + $ref: '#/components/schemas/CorrelationId' + description: >- + Identifier of the merchant request to pay to continue as returned in the + response to a `POST /requestToPay` request. + 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. + SourceCurrency: + name: SourceCurrency + in: path + required: true + schema: + type: string + description: ISO 4217 currency code for the source currency. + TargetCurrency: + name: TargetCurrency + in: path + required: true + schema: + type: string + description: ISO 4217 currency code for the target currency. diff --git a/spec_files/api_definitions/mojaloop_sdk_outbound_scheme_adapter_2.1/callback_map.json b/spec_files/api_definitions/mojaloop_sdk_outbound_scheme_adapter_2.1/callback_map.json new file mode 100644 index 00000000..1c273a76 --- /dev/null +++ b/spec_files/api_definitions/mojaloop_sdk_outbound_scheme_adapter_2.1/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}" + } + } + } + } + } \ No newline at end of file diff --git a/spec_files/api_definitions/mojaloop_simulator_sim_2.1/api_spec.yaml b/spec_files/api_definitions/mojaloop_simulator_sim_2.1/api_spec.yaml new file mode 100644 index 00000000..0527a301 --- /dev/null +++ b/spec_files/api_definitions/mojaloop_simulator_sim_2.1/api_spec.yaml @@ -0,0 +1,2837 @@ +openapi: 3.0.1 +info: + title: Mojaloop SDK Backend API + description: > + API specification for the SDK Backend API. + + + To be implemented by the Digital Financial Service Provider (DFSP) to work + in tandem with the Mojaloop SDK (`mojaloop/sdk-scheme-adapter`). + + + This API is not to be confused with the Mojaloop SDK's Inbound or Outbound + API. + + + TODO: More explanation and links about the SDK adapter's Inbound and + Outbound API. + + + **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: 2.1.0 +paths: + /: + get: + operationId: BackendHealthCheck + responses: + '200': + description: Returns empty body if the service is running. + summary: Health check endpoint. + /bulkQuotes: + post: + operationId: BackendBulkQuotesPost + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/bulkQuoteRequest' + description: Incoming request for a bulk quotation. + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/bulkQuoteResponse' + description: A response to the bulk quote request. + '400': + $ref: '#/components/responses/400' + '500': + $ref: '#/components/responses/500' + summary: Requests a bulk quote. + tags: + - BulkQuotes + /bulkQuotes/{idValue}: + get: + operationId: BackendBulkQuotesGet + parameters: + - $ref: '#/components/parameters/idValue' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/bulkQuoteResponse' + description: Response containing details of the requested bulk quote. + '400': + $ref: '#/components/responses/400' + '404': + $ref: '#/components/responses/404' + '500': + $ref: '#/components/responses/500' + summary: >- + Requests information relating to a bulk quote identified by the + specified identifier value. + tags: + - BulkQuotes + /bulkTransactions/{bulkTransactionId}: + put: + 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. + operationId: BackendBulkTransactionsPut + parameters: + - $ref: '#/components/parameters/bulkTransactionId' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/bulkTransactionResponse' + responses: + '202': + description: Bulk transaction information successfully amended. + '400': + $ref: '#/components/responses/400' + '500': + $ref: '#/components/responses/500' + summary: Callbacks for the bulk transaction request. + tags: + - BulkTransactionsPut + /requestToPay/{transactionRequestId}: + put: + description: >- + It is used to notify the DFSP backend about the status of the + requestToPayTransfer. + operationId: RequestToPayPut + parameters: + - $ref: '#/components/parameters/transactionRequestId' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/requestToPayCallback' + responses: + '200': + description: OK + '400': + $ref: '#/components/responses/400' + '500': + $ref: '#/components/responses/500' + summary: Callback for the requestToPay request. + tags: + - RequestToPayPut + /bulkTransfers: + post: + operationId: BackendBulkTransfersPost + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/bulkTransferRequest' + description: An incoming bulk transfer request. + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/bulkTransferResponse' + description: The bulk transfer was accepted. + '400': + $ref: '#/components/responses/400' + '500': + $ref: '#/components/responses/500' + summary: >- + Execute bulk transfer of funds from an external account to internal + accounts. + tags: + - BulkTransfers + /bulkTransfers/{idValue}: + get: + operationId: BackendBulkTransfersGet + parameters: + - $ref: '#/components/parameters/idValue' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/bulkTransferResponse' + description: Response containing details of the requested bulk transfer. + '400': + $ref: '#/components/responses/400' + '404': + $ref: '#/components/responses/404' + '500': + $ref: '#/components/responses/500' + summary: >- + Requests information relating to a bulk transfer identified by the + specified identifier value. + tags: + - BulkTransfers + /otp/{transactionRequestId}: + get: + operationId: BackendOtpGet + parameters: + - $ref: '#/components/parameters/transactionRequestId' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/otpDetails' + description: Response containing details of the OTP. + '400': + $ref: '#/components/responses/400' + '404': + $ref: '#/components/responses/404' + '500': + $ref: '#/components/responses/500' + summary: Requests OTP. + tags: + - OTP + /participants/{idType}/{idValue}: + get: + description: >- + The HTTP request `GET /participants/{idType}/{idValue}` is used to find + out in which FSP the requested party, defined by `{idType}` and + `{idValue}`, is located. + operationId: BackendParticipantsGetByTypeAndID + parameters: + - $ref: '#/components/parameters/idType' + - $ref: '#/components/parameters/idValue' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/participantsResponse' + description: Response containing details of the requested party. + '400': + $ref: '#/components/responses/400' + '404': + $ref: '#/components/responses/404' + '500': + $ref: '#/components/responses/500' + summary: >- + Asks for the identifier (fspId) of the scheme participant (FSP) that can + handle transfers for the specified identifier type and value. + tags: + - Participants + /participants/{idType}/{idValue}/{idSubValue}: + get: + description: >- + The HTTP request `GET /participants/{idType}/{idValue}/{idSubValue}` is + used to find out in which FSP the requested party, defined by + `{idType}`, `{idValue}` and `{idSubValue}` is located. + operationId: BackendParticipantsGetByTypeIDAndSubId + parameters: + - $ref: '#/components/parameters/idType' + - $ref: '#/components/parameters/idValue' + - $ref: '#/components/parameters/idSubValue' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/participantsResponse' + description: Response containing details of the requested party. + '400': + $ref: '#/components/responses/400' + '404': + $ref: '#/components/responses/404' + '500': + $ref: '#/components/responses/500' + summary: >- + Asks for the identifier (fspId) of the scheme participant (FSP) that can + handle transfers for the specified identifier type and value. + tags: + - Participants + /parties/{idType}/{idValue}: + get: + description: >- + The HTTP request `GET /parties/{idType}/{idValue}` is used to look up + information regarding the requested transfer party, identified by + `{idType}` and `{idValue}`. + operationId: BackendPartiesGetByTypeAndID + parameters: + - $ref: '#/components/parameters/idType' + - $ref: '#/components/parameters/idValue' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/transferParty' + description: Response containing details of the requested party. + '400': + $ref: '#/components/responses/400' + '404': + $ref: '#/components/responses/404' + '500': + $ref: '#/components/responses/500' + summary: >- + Requests information relating to a transfer party identified by the + specified identifier type and value. + tags: + - Parties + /parties/{idType}/{idValue}/{idSubValue}: + get: + description: >- + The HTTP request `GET /parties/{idType}/{idValue}/{idSubValue}` is used + to look up information regarding the requested transfer party, + identified by `{idType}`, `{idValue}` and `{idSubValue}`. + operationId: BackendPartiesGetByTypeIdAndSubId + parameters: + - $ref: '#/components/parameters/idType' + - $ref: '#/components/parameters/idValue' + - $ref: '#/components/parameters/idSubValue' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/transferParty' + description: Response containing details of the requested party. + '400': + $ref: '#/components/responses/400' + '404': + $ref: '#/components/responses/404' + '500': + $ref: '#/components/responses/500' + summary: >- + Requests information relating to a transfer party identified by the + specified identifier type, value and subId value. + tags: + - Parties + /quoterequests: + post: + description: >- + The HTTP request `POST /quoterequests` is used to request the creation + of a quote for the provided financial transaction. + operationId: BackendQuoteRequest + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/quoteRequest' + description: Request for a transfer quotation. + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/quoteResponse' + description: A response to the transfer quotation request. + '400': + $ref: '#/components/responses/400' + '500': + $ref: '#/components/responses/500' + summary: Requests a quote for the specified transfer. + tags: + - Quotes + /transactionrequests: + post: + operationId: BackendTransactionRequest + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/transactionRequest' + description: Request for Transaction Request. + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/transactionRequestResponse' + description: A response to the transfer transaction request. + '400': + $ref: '#/components/responses/400' + '500': + $ref: '#/components/responses/500' + summary: Transaction request that supports pull based transfers. + tags: + - TransactionRequest + /transfers: + post: + description: >- + The HTTP request `POST /transfers` is used to request the creation of a + transfer for the transfer party. + operationId: BackendTransfersPost + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/transferRequest' + description: An incoming transfer request. + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/transferResponse' + description: The transfer was accepted. + '400': + $ref: '#/components/responses/400' + '500': + $ref: '#/components/responses/500' + summary: Transfers funds from an external account to an internal account. + tags: + - Transfers + /transfers/{transferId}: + get: + 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. + operationId: BackendTransfersGet + parameters: + - $ref: '#/components/parameters/transferId' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/transferDetailsResponse' + description: The transfer was accepted. + '500': + $ref: '#/components/responses/500' + summary: Retrieves information for a specific transfer. + tags: + - Transfers + put: + description: >- + The HTTP request `PUT /transfers/{transferId}` is used to receive + notification for transfer being fulfiled when the FSP is a Payee. + operationId: BackendTransfersPut + parameters: + - $ref: '#/components/parameters/transferId' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/fulfilNotification' + description: An incoming notification for fulfiled transfer. + responses: + '200': + description: The notification was accepted. + '500': + $ref: '#/components/responses/500' + summary: Receive notification for a specific transfer. + tags: + - Transfers + /fxQuotes: + post: + description: >- + The HTTP request `POST /fxQuotes` is used to ask an FXP backend to + provide a quotation for a currency conversion. + summary: Calculate FX quote + tags: + - Fx + operationId: FxQuotesPost + requestBody: + description: Details of the FX quote request. + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/FxQuotesPostBackendRequest' + responses: + '200': + description: Successful response. + content: + application/json: + schema: + $ref: '#/components/schemas/FxQuotesPostBackendResponse' + '400': + $ref: '#/components/responses/400' + '500': + $ref: '#/components/responses/500' + /fxTransfers: + post: + description: >- + The HTTP request `POST /fxTransfers` is used to ask an FXP backend to + confirm the execution of an agreed currency conversion. + summary: Perform FX transfer + tags: + - Fx + operationId: FxTransfersPost + requestBody: + description: Details of the FX transfer request. + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/FxTransfersPostBackendRequest' + responses: + '200': + description: Successful response. + content: + application/json: + schema: + $ref: '#/components/schemas/FxTransfersPostBackendResponse' + '400': + $ref: '#/components/responses/400' + '500': + $ref: '#/components/responses/500' + /fxTransfers/{commitRequestId}: + put: + description: >- + The HTTP request `PUT /fxTransfers/{commitRequestId}` is used to notify + an FXP backend about the status of currency conversion. + summary: FX Commit Notification + tags: + - Fx + operationId: FxTransfersById + requestBody: + description: Status of the FX transfer. + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/FxTransfersPutBackendRequest' + responses: + '200': + $ref: '#/components/responses/200' + '400': + $ref: '#/components/responses/400' + '500': + $ref: '#/components/responses/500' +components: + parameters: + idSubValue: + description: >- + A sub-identifier of the party identifier, or a sub-type of the party + identifier's type. For example, `PASSPORT`, `DRIVING_LICENSE`. + in: path + name: idSubValue + required: true + schema: + type: string + idType: + description: The type of the party identifier. For example, `MSISDN`, `PERSONAL_ID`. + in: path + name: idType + required: true + schema: + type: string + idValue: + description: The identifier value. + in: path + name: idValue + required: true + schema: + type: string + transactionRequestId: + in: path + name: transactionRequestId + required: true + schema: + $ref: '#/components/schemas/transactionRequestId' + transferId: + in: path + name: transferId + required: true + schema: + type: string + bulkTransactionId: + name: bulkTransactionId + in: path + required: true + schema: + $ref: '#/components/schemas/CorrelationId' + description: >- + Identifier of the bulk transaction to continue as returned in the + response to a `POST /bulkTransaction` request. + schemas: + 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' + 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 + FspId: + title: FspId + type: string + minLength: 1 + maxLength: 32 + description: FSP identifier. + IndividualQuote: + description: Data model for individual quote in a bulk quote request. + properties: + amount: + $ref: '#/components/schemas/money' + amountType: + $ref: '#/components/schemas/amountType' + currency: + $ref: '#/components/schemas/currency' + feesAmount: + $ref: '#/components/schemas/money' + feesCurrency: + $ref: '#/components/schemas/currency' + initiator: + $ref: '#/components/schemas/initiator' + initiatorType: + $ref: '#/components/schemas/initiatorType' + note: + description: An optional note associated with the quote. + maxLength: 128 + minLength: 1 + type: string + quoteId: + $ref: '#/components/schemas/quoteId' + subScenario: + $ref: '#/components/schemas/TransactionSubScenario' + to: + $ref: '#/components/schemas/transferParty' + transactionId: + $ref: '#/components/schemas/transactionId' + transactionType: + $ref: '#/components/schemas/transactionType' + required: + - quoteId + - transactionId + - to + - amountType + - amount + - currency + - transactionType + - initiator + - initiatorType + type: object + IndividualQuoteResultFailed: + description: Data model for failed individual quote in a bulk quote response. + properties: + errorResponse: + $ref: '#/components/schemas/errorResponse' + quoteId: + $ref: '#/components/schemas/quoteId' + required: + - quoteId + - errorResponse + type: object + IndividualQuoteResultSuccess: + description: Data model for successful individual quote in a bulk quote response. + properties: + payeeFspCommissionAmount: + $ref: '#/components/schemas/money' + payeeFspCommissionAmountCurrency: + $ref: '#/components/schemas/currency' + payeeFspFeeAmount: + $ref: '#/components/schemas/money' + payeeFspFeeAmountCurrency: + $ref: '#/components/schemas/currency' + payeeReceiveAmount: + $ref: '#/components/schemas/money' + payeeReceiveAmountCurrency: + $ref: '#/components/schemas/currency' + quoteId: + $ref: '#/components/schemas/quoteId' + transferAmount: + $ref: '#/components/schemas/money' + transferAmountCurrency: + $ref: '#/components/schemas/currency' + required: + - quoteId + type: object + IndividualTransfer: + description: Data model for individual transfer in a bulk transfer request. + properties: + amount: + $ref: '#/components/schemas/money' + amountType: + $ref: '#/components/schemas/amountType' + currency: + $ref: '#/components/schemas/currency' + feesAmount: + $ref: '#/components/schemas/money' + feesCurrency: + $ref: '#/components/schemas/currency' + initiator: + $ref: '#/components/schemas/initiator' + initiatorType: + $ref: '#/components/schemas/initiatorType' + note: + description: An optional note associated with the quote. + maxLength: 128 + minLength: 1 + type: string + subScenario: + $ref: '#/components/schemas/TransactionSubScenario' + to: + $ref: '#/components/schemas/transferParty' + transactionType: + $ref: '#/components/schemas/transactionType' + transferId: + $ref: '#/components/schemas/transferId' + required: + - transferId + - amount + - currency + type: object + IndividualTransferResult: + description: Data model for individual transfer in a bulk transfer response. + properties: + errorResponse: + $ref: '#/components/schemas/errorResponse' + extensionList: + $ref: '#/components/schemas/extensionList' + transferId: + $ref: '#/components/schemas/transferId' + required: + - transferId + type: object + 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 + 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). + example: Johannes + amountCurrency: + description: Object containing Amount and Currency of the transfer. + properties: + amount: + $ref: '#/components/schemas/money' + currency: + $ref: '#/components/schemas/currency' + required: + - amount + - currency + type: object + amountType: + enum: + - SEND + - RECEIVE + type: string + bulkQuoteId: + description: A Mojaloop API bulk quote identifier (UUID). + pattern: >- + ^[0-9a-f]{8}-[0-9a-f]{4}-[1-7][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$|^[0-9A-HJKMNP-TV-Z]{26}$ + type: string + bulkQuoteRequest: + description: A request for a bulk quote. + properties: + bulkQuoteId: + $ref: '#/components/schemas/bulkQuoteId' + expiration: + $ref: '#/components/schemas/timestamp' + from: + $ref: '#/components/schemas/transferParty' + geoCode: + $ref: '#/components/schemas/geoCode' + individualQuotes: + items: + $ref: '#/components/schemas/IndividualQuote' + maxItems: 1000 + minItems: 1 + type: array + required: + - bulkQuoteId + - from + - individualQuotes + type: object + bulkQuoteResponse: + description: A response to a request for a bulk quote. + properties: + bulkQuoteId: + $ref: '#/components/schemas/bulkQuoteId' + expiration: + $ref: '#/components/schemas/timestamp' + individualQuoteResults: + description: >- + Fees for each individual transaction, if any of them are charged per + transaction. + items: + oneOf: + - $ref: '#/components/schemas/IndividualQuoteResultSuccess' + - $ref: '#/components/schemas/IndividualQuoteResultFailed' + maxItems: 1000 + minItems: 1 + type: array + required: + - bulkQuoteId + - individualQuoteResults + type: object + bulkTransferId: + description: A Mojaloop API transfer identifier (UUID). + pattern: >- + ^[0-9a-f]{8}-[0-9a-f]{4}-[1-7][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$|^[0-9A-HJKMNP-TV-Z]{26}$ + type: string + bulkTransferRequest: + properties: + bulkQuote: + $ref: '#/components/schemas/bulkQuoteResponse' + bulkTransferId: + $ref: '#/components/schemas/bulkTransferId' + from: + $ref: '#/components/schemas/transferParty' + individualTransfers: + items: + $ref: '#/components/schemas/IndividualTransfer' + maxItems: 1000 + minItems: 1 + type: array + required: + - bulkTransferId + - individualTransfers + type: object + bulkTransferResponse: + properties: + bulkTransferId: + $ref: '#/components/schemas/bulkTransferId' + homeTransactionId: + description: >- + Transaction ID from the DFSP backend, used to reconcile transactions + between the switch and DFSP backend systems. + type: string + individualTransferResults: + items: + $ref: '#/components/schemas/IndividualTransferResult' + maxItems: 1000 + minItems: 1 + type: array + required: + - homeTransactionId + type: object + currency: + 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 + maxLength: 3 + minLength: 3 + type: string + dateOfBirth: + 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)$ + type: string + errorCode: + 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. + pattern: ^[1-9]\d{3}$ + title: ErrorCode + type: string + errorDescription: + description: Error description string. + maxLength: 128 + minLength: 1 + title: ErrorDescription + type: string + errorInformation: + 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 + title: ErrorInformation + type: object + extensionItem: + properties: + key: + maxLength: 32 + minLength: 1 + type: string + value: + maxLength: 128 + minLength: 1 + type: string + type: object + extensionList: + items: + $ref: '#/components/schemas/extensionItem' + maxItems: 16 + minItems: 0 + type: array + extensionListComplex: + description: Data model for the complex type ExtensionList. + properties: + extension: + description: Number of Extension elements. + items: + $ref: '#/components/schemas/extensionItem' + maxItems: 16 + minItems: 1 + type: array + required: + - extension + type: object + fspId: + description: FSP identifier. + maxLength: 32 + minLength: 1 + type: string + fulfilNotification: + description: PUT /transfers/{transferId} object. + properties: + currentState: + $ref: '#/components/schemas/transferStatus' + direction: + enum: + - INBOUND + type: string + finalNotification: + properties: + completedTimestamp: + $ref: '#/components/schemas/timestamp' + extensionList: + $ref: '#/components/schemas/extensionList' + transferState: + $ref: '#/components/schemas/transferState' + required: + - completedTimestamp + - transferState + type: object + fulfil: + properties: + body: + type: object + headers: + type: object + type: object + initiatedTimestamp: + $ref: '#/components/schemas/timestamp' + lastError: + $ref: '#/components/schemas/transferError' + prepare: + properties: + body: + type: object + headers: + type: object + type: object + quote: + properties: + fulfilment: + type: string + internalRequest: + type: object + mojaloopResponse: + type: object + request: + type: object + response: + type: object + type: object + quoteRequest: + properties: + body: + type: object + headers: + type: object + type: object + quoteResponse: + properties: + body: + type: object + headers: + type: object + type: object + transferId: + $ref: '#/components/schemas/transferId' + title: TransfersIDPatchResponse + type: object + generalError: + description: >- + This object may represent a number of different error object types and + so its properties may vary significantly. + type: object + geoCode: + 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 + type: object + idSubValue: + maxLength: 128 + minLength: 1 + type: string + idType: + enum: + - MSISDN + - ACCOUNT_NO + - EMAIL + - PERSONAL_ID + - BUSINESS + - DEVICE + - ACCOUNT_ID + - IBAN + - ALIAS + type: string + idValue: + description: Identifier of the party. + maxLength: 128 + minLength: 1 + type: string + ilpPacketData: + description: Object containing transfer object. + properties: + amount: + $ref: '#/components/schemas/amountCurrency' + payee: + $ref: '#/components/schemas/Party' + payer: + $ref: '#/components/schemas/Party' + quoteId: + $ref: '#/components/schemas/quoteId' + transactionId: + $ref: '#/components/schemas/transactionId' + transactionType: + $ref: '#/components/schemas/transactionTypeObject' + required: + - quoteId + - transactionId + - payer + - payee + - amount + - transactionType + type: object + initiator: + enum: + - PAYER + - PAYEE + type: string + initiatorType: + enum: + - CONSUMER + - AGENT + - BUSINESS + - DEVICE + type: string + latitude: + description: >- + The API data type Latitude is a JSON String in a lexical format that is + restricted by a regular expression for interoperability reasons. + pattern: >- + ^(\+|-)?(?:90(?:(?:\.0{1,6})?)|(?:[0-9]|[1-8][0-9])(?:(?:\.[0-9]{1,6})?))$ + type: string + longitude: + description: >- + The API data type Longitude is a JSON String in a lexical format that is + restricted by a regular expression for interoperability reasons. + pattern: >- + ^(\+|-)?(?:180(?:(?:\.0{1,6})?)|(?:[0-9]|[1-9][0-9]|1[0-7][0-9])(?:(?:\.[0-9]{1,6})?))$ + type: string + money: + pattern: ^([0]|([1-9][0-9]{0,17}))([.][0-9]{0,3}[1-9])?$ + type: string + otpDetails: + properties: + otpValue: + description: OTP value. + type: string + required: + - otpValue + type: object + participantsResponse: + properties: + fspId: + $ref: '#/components/schemas/fspId' + type: object + payerType: + enum: + - CONSUMER + - AGENT + - BUSINESS + - DEVICE + type: string + quoteId: + description: A Mojaloop API quote identifier (UUID). + pattern: >- + ^[0-9a-f]{8}-[0-9a-f]{4}-[1-7][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$|^[0-9A-HJKMNP-TV-Z]{26}$ + type: string + quoteRequest: + description: A request for a quote for transfer from the DFSP backend. + properties: + homeR2PTransactionId: + type: string + description: >- + Linked homeR2PTransactionId which was generated as part of POST + /requestToPay to SDK incase of requestToPay transfer. + amount: + $ref: '#/components/schemas/money' + amountType: + $ref: '#/components/schemas/amountType' + currency: + $ref: '#/components/schemas/currency' + expiration: + $ref: '#/components/schemas/timestamp' + extensionList: + $ref: '#/components/schemas/extensionList' + feesAmount: + $ref: '#/components/schemas/money' + feesCurrency: + $ref: '#/components/schemas/currency' + from: + $ref: '#/components/schemas/transferParty' + geoCode: + $ref: '#/components/schemas/geoCode' + initiator: + $ref: '#/components/schemas/initiator' + initiatorType: + $ref: '#/components/schemas/initiatorType' + note: + description: An optional note associated with the requested transfer. + maxLength: 128 + minLength: 1 + type: string + quoteId: + $ref: '#/components/schemas/quoteId' + subScenario: + $ref: '#/components/schemas/TransactionSubScenario' + to: + $ref: '#/components/schemas/transferParty' + transactionId: + $ref: '#/components/schemas/transactionId' + transactionType: + $ref: '#/components/schemas/transactionType' + transactionRequestId: + $ref: '#/components/schemas/transactionRequestId' + converter: + allOf: + - $ref: '#/components/schemas/CurrencyConverter' + - description: >- + An optional field which will allow the payer DFSP to specify + which DFSP it wants to undertake currency conversion. This is + useful incase of if the sender wants the recipient to receive a + specified amount of the target currency, but the payer DFSP does + not want to undertake the currency conversion. In this case, the + amount of the transfer would be expressed in the target currency + and the amountType would be set to RECEIVE. + currencyConversion: + allOf: + - $ref: '#/components/schemas/FxRate' + - description: >- + Used by the debtor party if it wants to share information about + the currency conversion it proposes to make; or if it is + required by scheme rules to share this information. This object + contains the amount of the transfer in the source and target + currencies, but does not identify the FXP being used. + required: + - quoteId + - transactionId + - to + - from + - amountType + - amount + - currency + - transactionType + - initiator + - initiatorType + type: object + quoteResponse: + description: A response to a request for a quote. + properties: + expiration: + $ref: '#/components/schemas/timestamp' + extensionList: + $ref: '#/components/schemas/extensionList' + geoCode: + $ref: '#/components/schemas/geoCode' + payeeFspCommissionAmount: + $ref: '#/components/schemas/money' + payeeFspCommissionAmountCurrency: + $ref: '#/components/schemas/currency' + payeeFspFeeAmount: + $ref: '#/components/schemas/money' + payeeFspFeeAmountCurrency: + $ref: '#/components/schemas/currency' + payeeReceiveAmount: + $ref: '#/components/schemas/money' + payeeReceiveAmountCurrency: + $ref: '#/components/schemas/currency' + quoteId: + $ref: '#/components/schemas/quoteId' + transactionId: + $ref: '#/components/schemas/transactionId' + transferAmount: + $ref: '#/components/schemas/money' + transferAmountCurrency: + $ref: '#/components/schemas/currency' + required: + - quoteId + - transactionId + - transferAmount + - transferAmountCurrency + type: object + scenario: + enum: + - TRANSFER + type: string + timestamp: + 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)$ + type: string + transactionId: + description: >- + ID of the transaction, the ID is decided by the Payer FSP during the + creation of the quote. + pattern: >- + ^[0-9a-f]{8}-[0-9a-f]{4}-[1-7][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$|^[0-9A-HJKMNP-TV-Z]{26}$ + type: string + transactionRequest: + description: A request for a pull based transfer. + properties: + amount: + $ref: '#/components/schemas/money' + currency: + $ref: '#/components/schemas/currency' + expiration: + $ref: '#/components/schemas/timestamp' + from: + $ref: '#/components/schemas/transferParty' + geoCode: + $ref: '#/components/schemas/geoCode' + initiator: + $ref: '#/components/schemas/initiator' + initiatorType: + $ref: '#/components/schemas/initiatorType' + note: + description: An optional note associated with the requested transfer. + maxLength: 128 + minLength: 1 + type: string + to: + $ref: '#/components/schemas/transferParty' + transactionRequestId: + $ref: '#/components/schemas/transactionRequestId' + transactionType: + $ref: '#/components/schemas/transactionType' + subScenario: + $ref: '#/components/schemas/TransactionSubScenario' + authenticationType: + $ref: '#/components/schemas/AuthenticationType' + required: + - transactionRequestId + - to + - from + - amount + - currency + - transactionType + - initiator + - initiatorType + type: object + transactionRequestId: + description: A Mojaloop API transaction request identifier (UUID). + pattern: >- + ^[0-9a-f]{8}-[0-9a-f]{4}-[1-7][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$|^[0-9A-HJKMNP-TV-Z]{26}$ + type: string + transactionRequestResponse: + description: A response to a request for a quote. + properties: + homeR2PTransactionId: + type: string + description: >- + Transaction ID from the DFSP backend, used to reconcile transactions + between the Switch and DFSP backend systems. + transactionId: + $ref: '#/components/schemas/transactionId' + transactionRequestState: + $ref: '#/components/schemas/transactionRequestState' + required: + - transactionId + - transactionRequestState + type: object + transactionRequestState: + enum: + - RECEIVED + - PENDING + - ACCEPTED + - REJECTED + type: string + transactionSubScenario: + description: >- + Possible sub-scenario, defined locally within the scheme (UndefinedEnum + Type). Based on FSPIOP TransactionSubScenario. + example: LOCALLY_DEFINED_SUBSCENARIO + pattern: ^[A-Z_]{1,32}$ + title: transactionSubScenario + type: string + transactionType: + enum: + - TRANSFER + - DEPOSIT + - PAYMENT + type: string + transactionTypeObject: + description: Object containing transfer object. + properties: + initiator: + $ref: '#/components/schemas/initiator' + initiatorType: + $ref: '#/components/schemas/initiatorType' + scenario: + $ref: '#/components/schemas/scenario' + subScenario: + $ref: '#/components/schemas/TransactionSubScenario' + required: + - scenario + - initiator + - initiatorType + type: object + transferDetailsResponse: + properties: + amount: + $ref: '#/components/schemas/money' + amountType: + $ref: '#/components/schemas/amountType' + currency: + $ref: '#/components/schemas/currency' + extensions: + $ref: '#/components/schemas/extensionList' + from: + $ref: '#/components/schemas/transferParty' + homeTransactionId: + description: >- + Transaction ID from the DFSP backend, used to reconcile transactions + between the Switch and DFSP backend systems. + type: string + note: + maxLength: 128 + type: string + subScenario: + $ref: '#/components/schemas/TransactionSubScenario' + timestamp: + $ref: '#/components/schemas/timestamp' + to: + $ref: '#/components/schemas/transferParty' + transactionType: + $ref: '#/components/schemas/transactionType' + transferState: + $ref: '#/components/schemas/transferState' + required: + - homeTransactionId + - from + - to + - amountType + - currency + - amount + - transferState + - transactionType + - timestamp + type: object + transferId: + description: A Mojaloop API transfer identifier (UUID). + pattern: >- + ^[0-9a-f]{8}-[0-9a-f]{4}-[1-7][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$|^[0-9A-HJKMNP-TV-Z]{26}$ + type: string + transferParty: + properties: + dateOfBirth: + $ref: '#/components/schemas/dateOfBirth' + displayName: + description: Display name of the sender, if known. + type: string + extensionList: + $ref: '#/components/schemas/extensionList' + firstName: + description: Party first name. + type: string + fspId: + description: Mojaloop scheme FSPID of the DFSP which owns the party account. + type: string + idSubValue: + $ref: '#/components/schemas/idSubValue' + idType: + $ref: '#/components/schemas/idType' + idValue: + description: The identifier string used to identify the sender. + type: string + lastName: + description: Party last name. + type: string + merchantClassificationCode: + description: >- + Up to 4 digits specifying the sender's merchant classification, if + known and applicable. + type: string + middleName: + description: Party middle name. + type: string + type: + $ref: '#/components/schemas/payerType' + supportedCurrencies: + type: array + description: Currencies in which the party can receive funds. + items: + $ref: '#/components/schemas/currency' + minItems: 0 + maxItems: 16 + kycInformation: + $ref: '#/components/schemas/KYCInformation' + required: + - idType + - idValue + type: object + transferRequest: + properties: + homeR2PTransactionId: + type: string + description: >- + Linked homeR2PTransactionId which was generated as part of POST + /requestToPay to SDK incase of requestToPay transfer. + amount: + $ref: '#/components/schemas/money' + amountType: + $ref: '#/components/schemas/amountType' + currency: + $ref: '#/components/schemas/currency' + from: + $ref: '#/components/schemas/transferParty' + ilpPacket: + properties: + data: + $ref: '#/components/schemas/ilpPacketData' + required: + - data + type: object + note: + maxLength: 128 + type: string + quote: + $ref: '#/components/schemas/quoteResponse' + quoteRequestExtensions: + $ref: '#/components/schemas/extensionList' + subScenario: + $ref: '#/components/schemas/TransactionSubScenario' + to: + $ref: '#/components/schemas/transferParty' + transactionType: + $ref: '#/components/schemas/transactionType' + transferId: + $ref: '#/components/schemas/transferId' + transactionRequestId: + $ref: '#/components/schemas/transactionRequestId' + required: + - transferId + - quote + - from + - to + - amountType + - currency + - amount + - transactionType + - ilpPacket + type: object + transferResponse: + properties: + completedTimestamp: + $ref: '#/components/schemas/timestamp' + fulfilment: + $ref: '#/components/schemas/IlpFulfilment' + homeTransactionId: + description: >- + Transaction ID from the DFSP backend, used to reconcile transactions + between the Switch and DFSP backend systems. + type: string + transferState: + $ref: '#/components/schemas/transferState' + required: + - homeTransactionId + type: object + transferState: + 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. + enum: + - RECEIVED + - RESERVED + - COMMITTED + - ABORTED + type: string + transferStatus: + enum: + - ERROR_OCCURRED + - WAITING_FOR_PARTY_ACCEPTANCE + - WAITING_FOR_QUOTE_ACCEPTANCE + - COMPLETED + type: string + requestToPayCallback: + description: Callback for requestToPay. + properties: + homeR2PTransactionId: + type: string + description: >- + Transaction ID from the DFSP backend, used to reconcile transactions + between the Switch and DFSP backend systems. + transactionRequestState: + $ref: '#/components/schemas/transactionRequestState' + required: + - transactionRequestState + KYCInformation: + title: KYCInformation + type: string + minLength: 1 + maxLength: 2048 + description: >- + KYC information for the party in a form mandated by an individual + scheme. + example: |- + { + "metadata": { + "format": "JSON", + "version": "1.0", + "description": "Data containing KYC Information" + }, + "data": { + "name": "John Doe", + "dob": "1980-05-15", + "gender": "Male", + "address": "123 Main Street, Anytown, USA", + "email": "johndoe@example.com", + "phone": "+1 555-123-4567", + "nationality": "US", + "passport_number": "AB1234567", + "issue_date": "2010-02-20", + "expiry_date": "2025-02-20", + "bank_account_number": "1234567890", + "bank_name": "Example Bank", + "employer": "ABC Company", + "occupation": "Software Engineer", + "income": "$80,000 per year", + "marital_status": "Single", + "dependents": 0, + "risk_level": "Low" + } + } + 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 + 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. + CorrelationId: + title: CorrelationId + type: string + pattern: >- + ^[0-9a-f]{8}-[0-9a-f]{4}-[1-7][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$|^[0-9A-HJKMNP-TV-Z]{26}$ + 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 + bulkTransactionStatus: + type: string + enum: + - ERROR_OCCURRED + - WAITING_FOR_PARTY_ACCEPTANCE + - WAITING_FOR_QUOTE_ACCEPTANCE + - COMPLETED + autoAcceptPartyOption: + type: object + required: + - enabled + properties: + enabled: + type: boolean + enum: + - false + - true + 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' + bulkPerTransferFeeLimit: + type: object + required: + - currency + - amount + properties: + currency: + $ref: '#/components/schemas/Currency' + amount: + $ref: '#/components/schemas/Amount' + autoAcceptQuote: + type: object + required: + - enabled + properties: + enabled: + type: boolean + enum: + - true + - false + perTransferFeeLimits: + type: array + minItems: 0 + items: + $ref: '#/components/schemas/bulkPerTransferFeeLimit' + 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' + bulkTransactionOptions: + type: object + required: + - autoAcceptParty + - autoAcceptQuote + - bulkExpiration + properties: + 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: + $ref: '#/components/schemas/autoAcceptPartyOption' + 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: + - $ref: '#/components/schemas/autoAcceptQuote' + 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: + $ref: '#/components/schemas/DateTime' + 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. + 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. + 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 + 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: + $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' + kycInformation: + $ref: '#/components/schemas/KYCInformation' + 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' + supportedCurrencies: + type: array + description: Currencies in which the party can receive funds. + items: + $ref: '#/components/schemas/Currency' + minItems: 0 + maxItems: 16 + required: + - partyIdInfo + 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 + Note: + title: Note + type: string + minLength: 1 + maxLength: 128 + description: Memo assigned to transaction. + example: Note sent to Payee. + 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 + 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: + 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). + 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. + 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: + 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' + 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' + transferAmount: + $ref: '#/components/schemas/Money' + payeeReceiveAmount: + $ref: '#/components/schemas/Money' + payeeFspFee: + $ref: '#/components/schemas/Money' + payeeFspCommission: + $ref: '#/components/schemas/Money' + geoCode: + $ref: '#/components/schemas/GeoCode' + ilpPacket: + $ref: '#/components/schemas/IlpPacket' + condition: + $ref: '#/components/schemas/IlpCondition' + extensionList: + $ref: '#/components/schemas/ExtensionList' + lastError: + $ref: '#/components/schemas/quoteError' + required: + - quoteId + 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: + - 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 + 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' + individualTransferResult: + type: object + required: + - transferId + properties: + transferId: + $ref: '#/components/schemas/CorrelationId' + fulfilment: + $ref: '#/components/schemas/IlpFulfilment' + extensionList: + $ref: '#/components/schemas/ExtensionList' + transferState: + $ref: '#/components/schemas/TransferState' + lastError: + $ref: '#/components/schemas/transferError' + bulkTransactionIndividualTransferResult: + type: object + required: + - homeTransactionId + 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. + transactionId: + $ref: '#/components/schemas/CorrelationId' + to: + $ref: '#/components/schemas/Party' + reference: + description: Payer Loan reference + type: string + amountType: + $ref: '#/components/schemas/AmountType' + currency: + $ref: '#/components/schemas/Currency' + amount: + $ref: '#/components/schemas/Amount' + note: + $ref: '#/components/schemas/Note' + quoteId: + $ref: '#/components/schemas/CorrelationId' + quoteResponse: + $ref: '#/components/schemas/individualQuoteResult' + fulfil: + $ref: '#/components/schemas/individualTransferResult' + quoteExtensions: + $ref: '#/components/schemas/ExtensionList' + transferExtensions: + $ref: '#/components/schemas/ExtensionList' + lastError: + $ref: '#/components/schemas/transferError' + bulkTransactionResponse: + title: BulkTransactionResponse + type: object + required: + - bulkHomeTransactionID + - bulkTransactionId + - currentState + - individualTransferResults + properties: + bulkHomeTransactionID: + type: string + description: >- + Transaction ID from the DFSP backend, used to reconcile transactions + between the Switch and DFSP backend systems. + bulkTransactionId: + $ref: '#/components/schemas/CorrelationId' + currentState: + $ref: '#/components/schemas/bulkTransactionStatus' + options: + $ref: '#/components/schemas/bulkTransactionOptions' + individualTransferResults: + description: List of individual transfer result in a bulk transfer response. + type: array + minItems: 1 + items: + $ref: '#/components/schemas/bulkTransactionIndividualTransferResult' + extensions: + $ref: '#/components/schemas/ExtensionList' + CurrencyConverter: + title: CurrencyConverter + type: string + enum: + - PAYER + - PAYEE + description: >- + Below are the allowed values for the enumeration CurrencyConverter. - + PAYER - Currency conversion should be performed by the payer. - PAYEE - + Currency conversion should be performed by the payee. + FxRate: + title: FxRate + type: object + description: >- + The FxRate object contains information about a currency conversion in + the transfer. It can be used by parties to the transfer to exchange + information with each other about the exchange rate for the transfer, to + ensure that the best rate can be agreed on. + properties: + sourceAmount: + allOf: + - $ref: '#/components/schemas/Money' + - description: The amount of the transfer in the source currency. + targetAmount: + allOf: + - $ref: '#/components/schemas/Money' + - description: The amount of the transfer in the target currency. + required: + - sourceAmount + - targetAmount + 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. + example: OTP + 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 + FxCharge: + title: FxCharge + type: object + description: >- + An FXP will be able to specify a charge which it proposes to levy on the + currency conversion operation using a FxCharge object. + properties: + chargeType: + type: string + minLength: 1 + maxLength: 32 + description: A description of the charge which is being levied. + sourceAmount: + allOf: + - $ref: '#/components/schemas/Money' + - description: >- + The amount of the charge which is being levied, expressed in the + source currency. + targetAmount: + allOf: + - $ref: '#/components/schemas/Money' + - description: >- + The amount of the charge which is being levied, expressed in the + target currency. + required: + - chargeType + FxConversion: + title: FxConversion + 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 + FxConversion object. + properties: + conversionId: + allOf: + - $ref: '#/components/schemas/CorrelationId' + - description: An end-to-end identifier for the conversion request. + determiningTransferId: + allOf: + - $ref: '#/components/schemas/CorrelationId' + - description: >- + The transaction ID of the transfer on whose success this + currency conversion depends. + initiatingFsp: + allOf: + - $ref: '#/components/schemas/FspId' + - description: >- + The id of the participant who is requesting a currency + conversion. + counterPartyFsp: + allOf: + - $ref: '#/components/schemas/FspId' + - description: The ID of the FXP performing the conversion. + 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. + sourceAmount: + allOf: + - $ref: '#/components/schemas/FxMoney' + - description: The amount to be converted, expressed in the source currency. + targetAmount: + allOf: + - $ref: '#/components/schemas/FxMoney' + - description: The converted amount, expressed in the target currency. + expiration: + allOf: + - $ref: '#/components/schemas/DateTime' + - description: >- + The end of the period for which the currency conversion is + required to remain valid. + charges: + type: array + 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. + items: + $ref: '#/components/schemas/FxCharge' + minItems: 0 + maxItems: 16 + extensionList: + allOf: + - $ref: '#/components/schemas/ExtensionList' + - description: The extension list for the currency conversion request. + required: + - conversionId + - initiatingFsp + - counterPartyFsp + - amountType + - sourceAmount + - targetAmount + - expiration + FxQuotesPostBackendRequest: + title: FxQuotesPostBackendRequest + type: object + description: The object sent in the POST /fxQuotes request. + properties: + conversionRequestId: + allOf: + - $ref: '#/components/schemas/CorrelationId' + - description: An end-to-end identifier for the conversion quotation request. + conversionTerms: + allOf: + - $ref: '#/components/schemas/FxConversion' + - description: >- + The terms of the currency conversion for which a quotation is + sought. + required: + - conversionRequestId + - conversionTerms + FxQuotesPostBackendResponse: + title: FxQuotesPostBackendResponse + type: object + description: >- + The object sent as a response for the POST /fxQuotes request. The terms + under which the FXP will undertake the currency conversion proposed by + the requester. + properties: + homeTransactionId: + description: >- + Transaction ID for the FXP backend, used to reconcile transactions + between the Switch and FXP backend systems. + type: string + conversionTerms: + allOf: + - $ref: '#/components/schemas/FxConversion' + - description: >- + The terms under which the FXP will undertake the currency + conversion proposed by the requester. + required: + - conversionTerms + commitRequestId: + allOf: + - $ref: '#/components/schemas/CorrelationId' + - description: An end-to-end identifier for the confirmation request. + determiningTransferId: + allOf: + - $ref: '#/components/schemas/CorrelationId' + - description: >- + The transaction ID of the transfer to which this currency conversion + relates, if the conversion is part of a transfer. If the conversion + is a bulk currency purchase, this field should be omitted. + initiatingFsp: + allOf: + - $ref: '#/components/schemas/FspId' + - description: Identifier for the FSP who is requesting a currency conversion. + counterPartyFsp: + allOf: + - $ref: '#/components/schemas/FspId' + - description: Identifier for the FXP who is performing the currency conversion. + sourceAmount: + allOf: + - $ref: '#/components/schemas/Money' + - description: The amount being offered for conversion by the requesting FSP. + targetAmount: + allOf: + - $ref: '#/components/schemas/Money' + - description: >- + The amount which the FXP is to credit to the requesting FSP in the + target currency. + condition: + allOf: + - $ref: '#/components/schemas/IlpCondition' + - description: >- + ILP condition received by the requesting FSP when the quote was + approved. + FxTransfersPostBackendRequest: + title: FxTransfersPostBackendRequest + type: object + description: The object sent in the POST /fxTransfers request. + properties: + homeTransactionId: + description: >- + Transaction ID for the FXP backend, used to reconcile transactions + between the Switch and FXP backend systems. + type: string + commitRequestId: + $ref: '#/components/schemas/commitRequestId' + determiningTransferId: + $ref: '#/components/schemas/determiningTransferId' + initiatingFsp: + $ref: '#/components/schemas/initiatingFsp' + counterPartyFsp: + $ref: '#/components/schemas/counterPartyFsp' + sourceAmount: + $ref: '#/components/schemas/sourceAmount' + targetAmount: + $ref: '#/components/schemas/targetAmount' + condition: + $ref: '#/components/schemas/condition' + required: + - commitRequestId + - initiatingFsp + - counterPartyFsp + - sourceAmount + - targetAmount + 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. + completedTimestamp: + allOf: + - $ref: '#/components/schemas/DateTime' + - description: Time and date when the conversion was executed. + conversionState: + allOf: + - $ref: '#/components/schemas/TransferState' + - description: The current status of the conversion request. + FxTransfersPostBackendResponse: + title: FxTransfersPostBackendResponse + type: object + description: The object sent as a response for the POST /fxTransfers request. + properties: + homeTransactionId: + description: >- + Transaction ID for the FXP backend, used to reconcile transactions + between the Switch and FXP backend systems. + type: string + fulfilment: + $ref: '#/components/schemas/fulfilment' + completedTimestamp: + $ref: '#/components/schemas/completedTimestamp' + conversionState: + $ref: '#/components/schemas/conversionState' + extensionList: + $ref: '#/components/schemas/ExtensionList' + required: + - conversionState + FxTransfersPutBackendRequest: + title: FxTransfersPutBackendRequest + type: object + description: PUT /fxTransfers/{commitRequestId} object + properties: + homeTransactionId: + description: >- + Transaction ID for the FXP backend, used to reconcile transactions + between the Switch and FXP backend systems. + type: string + fulfilment: + $ref: '#/components/schemas/fulfilment' + completedTimestamp: + $ref: '#/components/schemas/completedTimestamp' + conversionState: + $ref: '#/components/schemas/conversionState' + extensionList: + $ref: '#/components/schemas/ExtensionList' + required: + - conversionState + responses: + '200': + description: OK + '400': + description: Malformed or missing required headers or parameters. + content: + application/json: + schema: + $ref: '#/components/schemas/errorResponse' + '404': + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/errorResponse' + '500': + description: An error occurred processing the request. + content: + application/json: + schema: + $ref: '#/components/schemas/errorResponse' diff --git a/spec_files/api_definitions/mojaloop_simulator_sim_2.1/response_map.json b/spec_files/api_definitions/mojaloop_simulator_sim_2.1/response_map.json new file mode 100644 index 00000000..23d28b6f --- /dev/null +++ b/spec_files/api_definitions/mojaloop_simulator_sim_2.1/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