social-payments-account-registry
Introduction
This repository on Github contains source code of the SPAR.
Technical concepts
SPAR service
This table contains a description of the technical components of SPAR Service.
DFSP Provider
This is a table that contains metadata about Financial Service Providers.
Financial Service Providers need to be onboarded (or added) to this table.
Each DFSP Provider can attached with an "FA Construct Strategy", which will determine how the FA is constructed if this DFSP Provider is selected by the End-User.
ID Provider
This is a table that contains metadata about Identity Providers (ID Providers). For example, the National ID System of the Country, Driving License, etc.
ID Providers need to be onboarded (or added) to this table.
Each ID Provider is attached with an "FA Construct Strategy", which will determine how the ID is constructed if the End-User logs in to SPAR using this ID Provider.
FA Construct Strategy
This is a string that describes how the FA or ID gets constructed. Which is present in the form of "{type}:{value}@{provider}".
For example, if FA Construct Strategy is "account_no:{acc_no}@{dfsp_provider_name}", the resultant FA will be "account_no:12345@bank1". Whatever is given in curly braces "{x}" will be replaced by the relevant value.
For ID construction, the values will be taken from the Authentication response. The following are some of the fields that are usually available in Auth Response.
sub - Subject. Usually the ID/Token.
iss - Issuer URL.
name - Name of the End-User.
email - Email of the End-User.
phone_number - Phone Number of the End-User.
For FA construction, the values will be taken from the form submitted by the End-User. This is a list of key-value pairs for each DFSP Level filled by the End-User, the key being the code of each DFSP Level and the value being the value filled. Example [level1code: level1value, level2code: level2value].
DFSP Levels
This table contains information about different levels of inputs asked on the Update FA Request Form.
Each DFSP Level contains the following fields.
name - Name to be displayed on the UI.
code - Code for this level, which can be used in FA Construct Strategy.
level - Integer that describes the position of this level among all levels of inputs that the End-User is asked for.
If "level" is negative, it will considered as text input on the UI. Otherwise, it will considered as a dropdown where values are picked from DFSP Level Values.
DFSP Level Value
This table contains information about different values against each level of input asked on the Update FA Request Form.
Each DFSP Level Value contains the following fields.
name - Name to be displayed on the UI.
code - Code for this level, which can be used in FA Construct Strategy.
level_id - The DFSP Level Entry to which this is a value of.
next_level_id (Optional) - The DFSP Level that is to be asked next if this Value is selected.
parent_id (Optional) - The DFSP Level Value, which was selected in the previous Level Input, that led to the selection of this Level Value.
dfsp_provider_id (Optional) - Each Level Value can be associated with a DFSP Provider, and the FA Construct Strategy will be derived from the DFSP Provider. For example; if Bank is selected as "National Bank" in the form, then a DFSP Provider can be created for the National Bank and an FA Construct Strategy can be associated with this DFSP Provider.
Update FA Request
This is the form/box on the UI with which the End-User can update/link their Financial Address/Account details to the ID with which they logged in.
Get FA Request
This is the box on the UI that shows the currently mapped FA of the End-User, for the ID that is used to log in.
Configuration
TODO - Config parameters
Last updated