mojaloop / pisp-project

PISP - Payment Initiation Service Provider integration with Mojaloop
Other
9 stars 12 forks source link

How does PISP get a proper identifier and type for payer's DFSP account? #45

Open stevenwjy opened 4 years ago

stevenwjy commented 4 years ago

Problem

In the current design for account linking, PISP asks the Mojaloop switch about a particular payer account using an opaque identifier, i.e. PUT /parties/OPAQUE/{ID}. However, when initiating a transaction, PISP needs to pass partyIdInfo for the payer as defined in the API specification for POST /thirdpartyRequests/transactions.

How does the PISP get a proper identifier to be passed when initiating the transaction? Because, if I understand it correctly, OPAQUE is not a real identifier type and hence couldn't be used to initiate a transaction.

Proposed solution

One way that I feel could solve this problem is for the switch to return the proper identifier and type despite using an opaque type and identifier when calling GET /parties/{Type}/{ID}. For example:

GET /parties/OPAQUE/bob123

will have a callback like this:

PUT /parties/OPAQUE/bob123
 {
   "party": {
     "partyIdInfo": {
       "partyIdType": "MSISDN",
        "partyIdentifier": "+1-111-111-1111",
        "fspId": "fspb"
      },
      "name": "Bob Beaver",
      "personalInfo": {
        "complexName": {
          "firstName": "Bob",
          "middleName": "K",
          "lastName": "Beaver"
        },
        "dateOfBirth": "1971-12-25"
      }
    },
   "accounts": [
      {
        "id": "bob.fspb",
        "currency": "USD"
      }
    ]
  } 

Notes

This issue is intended to track and continue the discussion on this thread.

lewisdaly commented 4 years ago

Yeah I think that is the solution I see as well @stevenwjy, although it might break in a case where there are multiple identifiers or identifier types for a single account alias.

@jgeewax might have some other thoughts about this as well.