Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change Request: Settlement API Participant Identifier is not compatible with FSPIOP Identifiers #91

Closed
mdebarros opened this issue Aug 23, 2021 · 1 comment
Assignees
Labels
settlement-api-change-request A change request made to the Settlement API

Comments

@mdebarros
Copy link
Member

mdebarros commented Aug 23, 2021

Open API for FSP Interoperability - Change Request

Table of Contents

1. Preface

1.1 Change Request Information

Info Details
Requested By Miguel de Barros, ModusBox
Change Request Status In review ☒ / Approved ☐ / Rejected ☐
Approved/Rejected Date

1.2 Document Version Information

Version Date Author Change Description
1.0 2021-08-23 Miguel de Barros Initial version of Change Request.

2. Problem Description

2.1 Background

The Settlement API currently returns the Participant Model with the Datastore Identifier.

This can be used to interact with the Settlement API, like acknowledge Settlement requests per Participant.

However, this means that there is no clear way from a Functional perspective to identify the Participant as Mojaloop uses the Participant Name as the identifier in the FSPIOP, and as such, it is difficult to correlate the Participant via the Datastore Identifier as there is no Functional link.

In addition, this Datastore Identifier is not compatible with other Mojaloop APIs. One such example being the Admin API uses the Participant Name and not the Datastore Identifier.

2.2 Current Behaviour

When calling the GET /settlements (getSettlementsByParams) operation, the following response is returned:

[
  {
    "id": 0,
    "state": "string",
    "settlementWindows": [
      [
        {
          "id": 0,
          ...
        }
      ]
    ],
    "participants": [
      {
        "id": 0, <-- This is the Datastore Identifier
        "accounts": [
          {
            "id": 0, <-- This is the ParticipantCurrenty (i.e. Account) Identifier
            "reason": "string",
            "state": "PENDING_SETTLEMENT",
            "netSettlementAmount": {
              "amount": 0,
              "currency": "string"
            }
          }
        ]
      }
    ]
  }
]

As per the background, it is not easy to identify the Participant from a functional perspective. It is also not possible to easily link a Participant from the Settlement API to the Participant operations on the other Mojaloop APIs, such as the Admin API which requires the Participant Name as the identifier.

2.3 Requested Behaviour

All Participant Entities returned by the Settlement API that includes the Datastore Identifier should also include the Participant Name as per the following example:

[
  {
    "id": 0,
    "state": "string",
    "settlementWindows": [
      [
        {
          "id": 0,
          ...
        }
      ]
    ],
    "participants": [
      {
        "id": 0, <-- This is the Datastore Identifier
        "accounts": [
          {
            "id": 0, <-- This is the ParticipantCurrenty (i.e. Account) Identifier
            "name": "DFSP1", <-- Unique Name identifier for the Participant
            "reason": "string",
            "state": "PENDING_SETTLEMENT",
            "netSettlementAmount": {
              "amount": 0,
              "currency": "string"
            }
          }
        ]
      }
    ]
  }
]

This is a minor update to the existing API, and it should have no "breaking" impact on the existing API Specification or the current consumers of the Settlements API.

Pull Request: central-settlement/pull/371

3. Proposed Solution Options

  1. All Participant Entities returned by the Settlement API that includes the Datastore Identifier should also include the Participant Name. <-- Non-breaking change, with minimal or no impact to existing API Consumers.
  2. Refactor the Settlement API to solely use the Participant Name for both API Operations and Participant Entities. <-- Breaking change. This is the most correct solution but will impact existing API Consumers. However, I believe switching identifiers from the Datastore ID to the Participant Name will not prove to be very difficult as the API and its interactions will function identically. As such this option could be easily adopted by existing API Consumers.
@mdebarros mdebarros added the settlement-api-change-request A change request made to the Settlement API label Aug 23, 2021
@mdebarros mdebarros changed the title Change Request: (WIP) Include Participant Name in Participant Model entities Change Request: Include Participant Name in Participant Model entities Aug 23, 2021
@mdebarros mdebarros changed the title Change Request: Include Participant Name in Participant Model entities Change Request: Settlement API Participant Identifier is not compatible with FSPIOP Identifiers Aug 23, 2021
mdebarros added a commit to mdebarros/central-settlement that referenced this issue Sep 7, 2021
…h-fspiop-identifiers

- Solution Proposal for [mojaloop-specification/change-request/91](mojaloop/mojaloop-specification#91)
- Included definition for fspId from the FSPIOP Specification
- Updated swagger to include participant name (i.e. fspId) in the Participant definition
@mdebarros
Copy link
Member Author

mdebarros commented Sep 22, 2021

Decision made to accept this CR and the following proposal: #94

Attendees:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
settlement-api-change-request A change request made to the Settlement API
Projects
None yet
Development

No branches or pull requests

5 participants