project
project copied to clipboard
Agreement Phase: Changes in existing FSPIOP API (Quotes)
Changes in existing FSPIOP API (Quotes) To define who would undertake the currency conversion (Payer or Pyee), a new optional field was added to the POST /quotes data model. This field will allow the payer DFSP to specify which DFSP it wants to undertake currency conversion. This field will be a text enumeration whose name will be converter. It will be a value from the enumeration CurrencyConverter.
The modified form of the /quotes request object will be as given below:
Name | Type | Description |
---|---|---|
quoteId | CorrelationId | Common ID between the FSPs for the quote object, decided by the Payer FSP. The ID should be reused for resends of the same quote for a transaction. A new ID should be generated for each new quote for a transaction. |
transactionId | CorrelationId | Common ID (decided by the Payer FSP) between the FSPs for the future transaction object. The actual transaction will be created as part of a successful transfer process. The ID should be reused for resends of the same quote for a transaction. A new ID should be generated for each new quote for a transaction. |
transactionRequestId | CorrelationId | Identifies an optional previously-sent transaction request. |
payee | Party | Information about the Payee in the proposed financial transaction. |
payer | Party | Information about the Payer in the proposed financial transaction. |
amountType | AmountType | SEND for send amount, RECEIVE for receive amount. |
amount | Money | Depending on amountType:If SEND: The amount the Payer would like to send; that is, the amount that should be withdrawn from the Payer account including any fees. The amount is updated by each participating entity in the transaction. If RECEIVE: The amount the Payee should receive; that is, the amount that should be sent to the receiver exclusive any fees. The amount is not updated by any of the participating entities. |
converter | CurrencyConverter | PAYER if the payer DFSP intends to perform currency conversion; PAYEE if the payer DFSP wants the payee DFSP to perform currency conversion. If absent and the transfer requires currency conversion, then the converting institution will be inferred from the currency in which the quotation is requested: if the quotation is requested in the source currency, then the payee DFSP should perform currency conversion. If it is in the target currency, then the payer DFSP will perform currency conversion. |
conversionRate | FxRate | 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. |
fees | Money | Fees in the transaction. The fees element should be empty if fees should be non-disclosed. The fees element should be non-empty if fees should be disclosed. |
transactionType | TransactionType | Type of transaction for which the quote is requested. |
geoCode | GeoCode | Longitude and Latitude of the initiating Party. Can be used to detect fraud. |
note | note | A memo that will be attached to the transaction |
expiration | DateTime | Expiration is optional. It can be set to get a quick failure in case the peer FSP takes too long to respond. Also, it may be beneficial for Consumer, Agent, and Merchant to know that their request has a time limit. |
extensionList | ExtensionList | TOptional extension, specific to deployment |
Acceptance Criteria:
- [x] Verify that the conversion was done according to the converter instructions. (in this phase, it will be only PAYER)
- [x] Verify that the API resource is complies with FSPIOP 2.0 definition
- [ ] Verify a happy path functional test is in place to test the new functionionallity
- [ ] Verify that the new changes can be tested with TTK
@JulieG19, one of TW team members is working on this ticket already. As it can be done during Sprint 1, could you please add it the Sprint 1? Thank you.
Hello,
Thanks for your comment
Can I check the following please:
- which definition will need to be updated?/ have the definition documents been updated?
- @PaulMakinMojaloop , are you aware of this change and was it approved?
Hi @JulieG19,
We are implementing based on the latest FSPIOP specification (v2.0). https://github.com/mojaloop/api-snippets/blob/main/docs/fspiop-rest-v2.0-openapi3-snippets.yaml
@JulieG19 Yes it's part of the updated FSPIOP specs to support FX.
POST /quotes I sent a request with curl to FSPIOP with the following command
curl --location 'http://localhost:4000/quotes'
--header 'accept: application/vnd.interoperability.quotes+json;version=1.0'
--header 'content-type: application/vnd.interoperability.quotes+json;version=1.0'
--header 'date: 2024-05-03'
--header 'x-forwarded-for: string'
--header 'fspiop-source: demo-mfi-1'
--header 'fspiop-destination: demo-mfi-2'
--header 'fspiop-encryption;'
--header 'fspiop-signature;'
--header 'fspiop-uri;'
--header 'fspiop-http-method;'
--data '{
"quoteId": "cc257b7a-a79f-4f55-81f1-f80a6f9f5dff",
"transactionId": "9f5d9784-3a57-5865-9aa0-7dde77915481",
"payer": {
"partyIdInfo": {
"partyIdType": "MSISDN",
"partyIdentifier": "123",
"fspId": "demo-mfi-1"
},
"personalInfo": {
"complexName": {
"firstName": "Henrik",
"middleName": "Johannes",
"lastName": "Karlsson"
},
"dateOfBirth": "1966-06-16",
"kycInformation": "Sample KYC Info"
},
"supportedCurrencies": [
"EUR"
]
},
"payee": {
"partyIdInfo": {
"partyIdType": "MSISDN",
"partyIdentifier": "456",
"fspId": "demo-mfi-2"
},
"personalInfo": {
"complexName": {
"firstName": "Thomas",
"middleName": "Neo",
"lastName": "Anderson"
},
"dateOfBirth": "1991-03-12",
"kycInformation": "Sample KYC Info"
},
"supportedCurrencies": [
"USD"
]
},
"amountType": "RECEIVE",
"amount": {
"currency": "EUR",
"amount": "100"
},
"transactionType": {
"scenario": "DEPOSIT",
"initiator": "PAYER",
"initiatorType": "BUSINESS"
},
"converter": "demo-mfi-3",
"currencyConversion": {
"sourceAmount": {
"currency": "EUR",
"amount": "100"
},
"targetAmount": {
"currency": "USD",
"amount": "109.43"
}
}
}'
Post request is sent to the payee
PUT /quotes
Then the payee sent the callback request
PUT /quotes
Finally, the payer receives the callback