Open lewisdaly opened 4 years ago
So, looking at the POST: the Payer DFSP knows whether this is a PISP-initiated transfer or not, so it can fill in its own ID in any case and the PISP's if necessary. It doesn't have to do anything about the Payee DFSP, since it doesn't know whether the Payee DFSP wants an acknowledgement or not.
When the Payee DFSP responds with the PUT, it can decide whether it wants to add itself to the list of participants or not. Now the transactionParticipants object contains all the information the switch needs to know who to notify: the switch doesn't need to persist any information itself...
I think I'd like to replace the two distinct calls in the sequence diagram with a single loop that covers all the responses requested. The content of the message will be the same in each case, but the headers will be different and the HTTP command will vary too - PUT for the payer, PATCH for the payee, ? for the PISP. We could make that implicit (switch works out what to put from the role,) or we could add it as a field to the transactionParticipant entries. We could also add that as processing conditional on the presence of a transactionParticipant list to maintain backwards compatibility, so payee DFSPs could use either mode to request confirmations...
To recap last weeks discussion:
subscribers
to the transaction objectsubscribers
listPUT /quotes/{id}
and POST /transfers
reserve
step of the transfer, the central-ledger will store the transaction object in it's database (it needs to do this already in some form to verify the transfer hasn't been tampered with@MichaelJBRichards @jgeewax does this sound about right to you?
Since all parties see the transaction object when it is presented to the central-ledger as “prepared,” why does the payer need it returned during fulfill?
The central-ledger provides a service guarantee that the transaction object has not been tampered with, if the fulfillment covers the transaction object content. The transaction object does not need to be sent with notifications to anyone. The central ledger should not traffic in transaction details, but confine itself to the payment condition and fulfillment. The transaction object digest ensures integrity and should be included in the fulfillment calculation.
If a third party needs to see the quotation response details, it should receive them prior to submitting the prepared payment, to ensure the end-user can see the consequences of quotation (filtered through the third-party app). Once the payment is prepared with a payment condition, nothing can change and so duplicating and sending the transaction object to external parties is a huge burden on the central-ledger.
Is there a data flow detail here I’m missing?
— Miller
On Oct 4, 2020, at 11:12 PM, Lewis Daly notifications@github.com wrote:
To recap last weeks discussion:
We plan to use add a list of subscribers to the transaction object During the Quoting phase, both the Payer and Payee will have an opportunity to add themselves (and any other 3rd party they wish) to the subscribers list The transaction object will be also in plaintext in the request bodies of the PUT /quotes/{id} and POST /transfers During the reserve step of the transfer, the central-ledger will store the transaction object in it's database (it needs to do this already in some form to verify the transfer hasn't been tampered with When the central-ledger commits the transaction, it looks up the transaction object, and includes it in the Fulfil Notification it emits @MichaelJBRichards https://github.com/MichaelJBRichards @jgeewax https://github.com/jgeewax does this sound about right to you?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/mojaloop/pisp/issues/71#issuecomment-703419422, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB6OJ6B55OGJ3TL5QBDIJBLSJFPTJANCNFSM4RWSXQIQ.
Thanks for your comments @millerabel
Since all parties see the transaction object when it is presented to the central-ledger as “prepared,” why does the payer need it returned during fulfill?
I think I wasn't clear that I simply mean to include the Subscriptions object in the internal messaging that occurs between the central-ledger and ml-api-adapter and not a part of the external messaging between the switch and participants (i.e. the API Definition)
Indeed the transaction object does not need to be send along with notifications to everyone, but we do need a way to deliver those notifications. There are 2 options I forsee:
ml-api-adapter
to interpret this message and send one or more HTTP calls (be they PUT /transfers/{id}
or PATCH /transfers/{id}
or something else)Subsriptions
list, then it would emit 3 separate notifications.1 is the approach we have today as of v1.1 of the FSPIOP-API. The central-ledger emits a single fulfilment notification. If the message has event.action == 'reserve'
, then the ml-api-adapter will generate 2 HTTP calls, one to the Payer, and another to the Payee (this sequence diagram has more information)
In the future, we have other api-adapters for other APIs (e.g. the Thirdparty API), my proposal was to extend the existing functionality by including the subscriptions list in the fulfilment notification, so that the ml-api-adapter (or any other api adapter) can simply listen in for fulfilment notifications, and generate the appropriate HTTP calls for the relevant participants.
@adrianhopebailie I've got a PR for your PR here: https://github.com/adrianhopebailie/mojaloop-specification/pull/1
One of the challenges we face with the Thirdparty API is getting the notification back to a PISP to inform them of a transaction's outcome.
Our previous design relied on the switch to maintain state across a series of messages, which was a deal-breaker.
In this iteration, we will look at:
1. API Changes:
POST /transfers
When the PayerDFSP issues this request, it includes the following fields:
Fields:
transactionId
- the id of the transactiontransactionRequestId
- the transactionRequestId this transfer is fulfilling. This id was originally decided by the PISPtransactionParticipants
- an array of participantIds and their role in the transaction.PUT /transfers/{id}
2. Internal Processing
Perhaps this message can be changed to something along the following lines:
Known Issues with this design
The API messages are not backwards compatible for the PayeeFSP
We still need to keep some state in the central-ledger's database related to:
transactionId
transactionRequestId
transactionParticipants
There is somewhat redundant information between the FSPIOP-Headers (which are for routing messages), and the proposed
transactionParticipants
collection in the POST/PUT request bodies.FSPIOP-Initiator
header, perhaps that is a simpler approachWhen the thirdparty-api-adapter recieves the fulfilment notification, it must convert this to a
PATCH /thirdpartyRequests/transactions/{id}
transactionRequestId
(and maybe thetransactionId
) in the notification message