api-definition
Preface
This section contains information about how to use this document.
Conventions Used in This Document
The following conventions are used in this document to identify the specified types of information.
Elements of the API, such as resources
Boldface
/authorization
Variables
Italics with in angle brackets
{ID}
Glossary terms
Italics on first occurrence; defined in Glossary
The purpose of the API is to enable interoperable financial transactions between a Payer (a payer of electronic funds in a payment transaction) located in one FSP (an entity that provides a digital financial service to an end user) and a Payee (a recipient of electronic funds in a payment transaction) located in another FSP.
Library documents
Italics
User information should, in general, not be used by API deployments; the security measures detailed in API Signature and API Encryption should be used instead.
Document Version Information
1.0
2018-03-13
Initial version
1.1
2020-05-19
1. This version contains a new option for a Payee FSP to request a commit notification from the Switch. The Switch should then send out the commit notification using the new request PATCH /transfers/{ID}. The option to use commit notification replaces the previous option of using the ”Optional Additional Clearing Check”. The section describing this has been replaced with the new section ”Commit Notification”. As the transfers resource has been updated with the new PATCH request, this resource has been updated to version 1.1. As part of adding the possibility to use a commit notification, the following changes has been made: a. PATCH has been added as an allowed HTTP Method in Section 3.2.2. b. The call flow for PATCH is described in Section 3.2.3.5. c. Table 6 in Section 6.1.1 has been updated to include PATCH as a possible HTTP Method. d. Section 6.7.1 contains the new version of the transfers resource. e. Section 6.7.2.6 contains the process for using commit notifications f. Section 6.7.3.3 describes the new PATCH /transfers/{ID} request. 2. In addition to the changes mentioned above regarding the commit notification, the following non-API affecting changes has been made: a. Updated Figure 6 as it contained a copy-paste error. b. Added Section 6.1.2 to describe a comprehensive view of the current version for each resource. c. Added a section for each resource to be able to see the resource version history. d. Minor editorial fixes. 3. The descriptions for two of the HTTP Header fields in Table 1 have been updated to add more specificity and context a. The description for the FSPIOP-Destination header field has been updated to indicate that it should be left empty if the destination is not known to the original sender, but in all other cases should be added by the original sender of a request. b. The description for the FSPIOP-URI header field has been updated to be more specific. 4. The examples used in this document have been updated to use the correct interpretation of the Complex type ExtensionList which is defined in Table 84. This doesn’t imply any change as such. a. Listing 5 has been updated in this regard. 5. The data model is updated to add an optional ExtensionList element to the PartyIdInfo complex type based on the Change Request: https://github.com/mojaloop/mojaloop-specification/issues/30. Following this, the data model as specified in Table 103 has been updated. For consistency, the data model for the POST /participants/{Type}/{ID} and POST /participants/{Type}/{ID}/{SubId} calls in Table 10 has been updated to include the optional ExtensionList element as well. 6. A new Section 6.5.2.2 is added to describe the process involved in the rejection of a quote. 7. A note is added to Section 6.7.4.1 to clarify the usage of ABORTED state in PUT /transfers/{ID} callbacks.
1.1.1
2021-09-22
Introduction
This document introduces and describes the Open API (Application Programming Interface) for FSP (Financial Service Provider) Interoperability (hereafter cited as "the API"). The purpose of the API is to enable interoperable financial transactions between a Payer (a payer of electronic funds in a payment transaction) located in one FSP (an entity that provides a digital financial service to an end user) and a Payee (a recipient of electronic funds in a payment transaction) located in another FSP. The API does not specify any front-end services between a Payer or Payee and its own FSP; all services defined in the API are between FSPs. FSPs are connected either (a) directly to each other or (b) by a Switch placed between the FSPs to route financial transactions to the correct FSP.
The transfer of funds from a Payer to a Payee should be performed in near real-time. As soon as a financial transaction has been agreed to by both parties, it is deemed irrevocable. This means that a completed transaction cannot be reversed in the API. To reverse a transaction, a new negated refund transaction should be created from the Payee of the original transaction.
The API is designed to be sufficiently generic to support both a wide number of use cases and extensibility of those use cases. However, it should contain sufficient detail to enable implementation in an unambiguous fashion.
This document:
Defines an asynchronous REST binding of the logical API introduced in Generic Transaction Patterns.
Open API for FSP Interoperability Specification
The Open API for FSP Interoperability Specification includes the following documents.
Logical Documents
Asynchronous REST Binding Documents
Data Integrity, Confidentiality, and Non-Repudiation
General Documents
API Definition
This section introduces the technology used by the API, including:
General Characteristics
This section describes the general characteristics of the API.
Architectural Style
The API is based on the REST (REpresentational State Transfer1) architectural style. There are, however, some differences between a typical REST implementation and this one. These differences include:
Fully asynchronous API -- To be able to handle numerous concurrent long-running processes and to have a single mechanism for handling requests, all API services are asynchronous. Examples of long-running processes are:
Financial transactions done in bulk
A financial transaction in which user interaction is needed
Decentralized -- Services are decentralized, there is no central authority which drives a transaction.
Service-oriented -- The resources provided by the API are relatively service-oriented compared to a typical implementation of a REST-based API.
Not fully stateless -- Some state information must be kept in both client and server during the process of performing a financial transaction.
Client decides common ID -- In a typical REST implementation, in which there is a clear distinction between client and server, it is the server that generates the ID of an object when the object is created on the server. In this API, a quote or a financial transaction resides both in the Payer and Payee FSP as the services are decentralized. Therefore, there is a need for a common ID of the object. The reason for having the client decide the common ID is two-fold:
The common ID is used in the URI of the asynchronous callback to the client. The client therefore knows which URI to listen to for a callback regarding the request.
Application-Level Protocol
URI Syntax
The syntax of URIs follows RFC 39865 to identify resources and services provided by the API. This section introduces and notes implementation subjects specific to each syntax part.
Listing 1
Listing 1 -- Generic URI format
Scheme
Authority
The authority part consists of an optional authentication (User Information
) part, a mandatory host part, followed by an optional port number.
User Information
User information should in general not be used by API deployments; the security measures detailed in API Signature and API Encryption should be used instead.
Host
The host is the server's address. It can be either an IP address or a hostname. The host will (usually) differ for each deployment.
Port
The port number is optional; by default, the HTTP port is 80 and HTTPS is 443, but other ports could also be used. Which port to use might differ from deployment to deployment.
Path
The path points to an actual API resource or service. The resources in the API are:
participants
parties
quotes
transactionRequests
authorizations
transfers
transactions
bulkQuotes
bulkTransfers
Query
If more than one key-value pair is used in the query string, the pairs should be separated by an ampersand symbol ('&').
Listing 2
Listing 2 -- Example URI containing several key-value pairs in the query string
Fragment
The fragment is an optional part of a URI. It is not supported for use by any service in the API and therefore should be ignored if received.
URI Normalization and Comparison
Character Set
Data Exchange Format
The API uses JSON (JavaScript Object Notation), defined in RFC 71598, as its data exchange format. JSON is an open, lightweight, human-readable and platform-independent format, well-suited for interchanging data between systems.
HTTP Details
This section contains detailed information regarding the use of the application-level protocol HTTP in the API.
HTTP Header Fields
HTTP Headers are generally described in RFC 72309. The following two sections describes the HTTP header fields that should be expected and implemented in the API.
The API supports a maximum size of 65536 bytes (64 Kilobytes) in the HTTP header.
HTTP Request Header Fields
Table 1
Accept
application/vnd.interoperability.resource+json
Content-Length
3495
0..1
The Content-Length11 header field indicates the anticipated size of the payload body. Only sent if there is a body. Note: The API supports a maximum size of 5242880 bytes (5 Megabytes).
Content-Type
application/vnd.interoperability.resource+json;version=1.0
1
Date
Tue, 15 Nov 1994 08:12:31 GMT
1
The Date13 header field indicates the date when the request was sent.
X- Forwarded- For
X-Forwarded-For: 192.168.0.4, 136.225.27.13
1..0
The X-Forwarded-For14 header field is an unofficially accepted standard used to indicate the originating client IP address for informational purposes, as a request might pass multiple proxies, firewalls, and so on. Multiple X-Forwarded-For values as in the example shown here should be expected and supported by implementers of the API. Note: An alternative to X-Forwarded-For is defined in RFC 723915. However, as of 2018, RFC 7239 is less-used and supported than X-Forwarded-For.
FSPIOP- Source
FSP321
1
FSPIOP- Destination
FSP123
0..1
FSPIOP- Encryption
0..1
The FSPIOP-Encryption header field is a non-HTTP standard field used by the API for applying end-to-end encryption of the request. For more information, see API Encryption.
FSPIOP- Signature
0..1
The FSPIOP-Signature header field is a non-HTTP standard field used by the API for applying an end-to-end request signature. For more information, see API Signature.
FSPIOP-URI
/parties/msisdn/123456789
0..1
The FSPIOP-URI header field is a non- HTTP standard field used by the API for signature verification, should contain the service URI. Required if signature verification is used, for more information see API Signature. In the context of the Mojaloop FSPIOP API, the value for FSPIOP-URI starts with the service in the URI value. For example, if a URL is http://stg-simulator.moja.live/payerfsp/participants/MSISDN/123456789, then the FSPIOP-URI value is “/participants/MSISDN/123456789”.
FSPIOP- HTTP- Method
GET
0..1
The FSPIOP-HTTP-Method header field is a non-HTTP standard field used by the API for signature verification, should contain the service HTTP method. Required if signature verification is used, for more information see API Signature.
Table 1 -- HTTP request header fields that must be supported
Table 2
traceparent
00-91e502e28cd723686e9940bd3f378f85-b0f903d000944947-01
0..1
The traceparent header represents the incoming request in a tracing system in a common format. See Distributed Tracing Support for OpenAPI Interoperability for more information.
tracestate
banknrone=b0f903d0009449475
0..1
Provides optional vendor-specific trace information, and support for multiple distributed traces. See Distributed Tracing Support for OpenAPI Interoperability for more information.
Table 2 -- HTTP request header fields that are optional to support
HTTP Response Header Fields
Table 3
Content-Length
3495
0..1
The Content-Length16 header field indicates the anticipated size of the payload body. Only sent if there is a body.
Content-Type
application/vnd.interoperability.resource+json;version=1.0
1
Table 3 -- HTTP response header fields
HTTP Methods
The following HTTP methods, as defined in RFC 723118, are supported by the API:
GET -- The HTTP GET method is used from a client to request information about a previously-created object on a server. As all services in the API are asynchronous, the response to the GET method will not contain the requested object. The requested object will instead come as part of a callback using the HTTP PUT method.
PUT -- The HTTP PUT method is used as a callback to a previously sent HTTP GET, HTTP POST or HTTP DELETE method, sent from a server to its client. The callback will contain either:
Object information concerning a previously created object (HTTP POST) or sent information request (HTTP GET).
Acknowledgement that whether an object was deleted (HTTP DELETE).
Error information in case the HTTP POST or HTTP GET request failed to be processed on the server.
POST -- The HTTP POST method is used from a client to request an object to be created on the server. As all services in the API are asynchronous, the response to the POST method will not contain the created object. The created object will instead come as part of a callback using the HTTP PUT method.
DELETE -- The HTTP DELETE method is used from a client to request an object to be deleted on the server. The HTTP DELETE method should only be supported in a common Account Lookup System (ALS) for deleting information regarding a previously added Party (an account holder in an FSP), no other object types can be deleted. As all services in the API are asynchronous, the response to the HTTP DELETE method will not contain the final acknowledgement that the object was deleted or not; the final acknowledgement will come as a callback using the HTTP PUT method.
PATCH -- The HTTP PATCH method is used from a client to send a notification regarding an update of an existing object. As all services in the API are asynchronous, the response to the POST method will not contain the created object. This HTTP method does not result in a callback, as the PATCH request is used as a notification.
HTTP Sequence Flow
All the sequences and related services use an asynchronous call flow. No service supports a synchronous call flow.
HTTP POST Call Flow
Figure 1
Figure 1 -- HTTP POST call flow
HTTP GET Call Flow
Figure 2
Figure 2 -- HTTP GET call flow
HTTP DELETE Call Flow
Figure 3
Figure 3 -- HTTP DELETE call flow
Note: It is also possible that requests to the ALS be routed through a Switch, or that the ALS and the Switch are the same server.
HTTP PUT Call Flow**
The HTTP PUT is always used as a callback to either a POST service request, a GET service request, or a DELETE service request.
HTTP PATCH Call Flow
Figure 4
Figure 4 -- HTTP PATCH call flow
Note: It is also possible that requests to the ALS be routed through a Switch, or that the ALS and the Switch are the same server.
Call Flow Routing using FSPIOP-Destination and FSPIOP-Source
Figure 5
Figure 5 -- Using the customized HTTP header fields FSPIOP-Destination and FSPIOP-Source
Figure 6
Figure 6 -- Example scenario where FSPIOP-Destination is unknown to FSP
HTTP Response Status Codes
Table 4
200
OK
Standard response for a successful request. Used in the API by the client as a response on a callback to mark the completion of an asynchronous service.
202
Accepted
The request has been accepted for future processing at the server, but the server cannot guarantee that the outcome of the request will be successful. Used in the API to acknowledge that the server has received an asynchronous request.
400
Bad Request
The application cannot process the request; for example, due to malformed syntax or the payload exceeded size restrictions.
401
Unauthorized
The request requires authentication in order to be processed.
403
Forbidden
The request was denied and will be denied in the future.
404
Not Found
The resource specified in the URI was not found.
405
Method Not Allowed
An unsupported HTTP method for the request was used; see Table 6 for information on which HTTP methods are allowed in which services.
406
Not acceptable
The server is not capable of generating content according to the Accept headers sent in the request. Used in the API to indicate that the server does not support the version that the client is requesting.
501
Not Implemented
The server does not support the requested service. The client should not retry.
503
Service Unavailable
The server is currently unavailable to accept any new service requests. This should be a temporary state, and the client should retry within a reasonable time frame.
Table 4 -- HTTP response status codes supported in the API
Any HTTP status codes 3xx20 returned by the server should not be retried and require manual investigation.
An implementation of the API should also be capable of handling other errors not defined above as the request could potentially be routed through proxy servers.
Error Information in HTTP Response
Idempotent Services in Server
All services that support HTTP GET must be idempotent; that is, the same request can be sent from a client any number of times without changing the object on the server. The server is allowed to change the state of the object; for example, a transaction state can be changed, but the FSP sending the GET request cannot change the state.
Duplicate Analysis in Server on Receiving a HTTP POST Request
When a server receives a request from a client, the server should check to determine if there is an already-existing service object with the same ID; for example, if a client has previously sent the request POST /transfers with the identical transferId. If the object already exists, the server must check to determine if the parameters of the already-created object match the parameters from the new request.
If the previously-created object matches the parameter from the new request, the request should be assumed to be a resend from the client.
If the server has not finished processing the old request and therefore has not yet sent the callback to the client, this new request can be ignored, because a callback is about to be sent to the client.
If the server has finished processing the old request and a callback has already been sent, a new callback should be sent to the client, similar to if a HTTP GET request had been sent.
If the previously-created object does not match the parameters from the new request, an error callback should be sent to the client explaining that an object with the provided ID already exists with conflicting parameters.
To simplify duplicate analysis, it is recommended to create and store a hash value of all incoming POST requests on the server, so that it is easy to compare the hash value against later incoming POST requests.
API Versioning
The strategy of the development of the API is to maintain backwards compatibility between the API and its resources and services to the maximum extent possible; however, changes to the API should be expected by implementing parties. Versioning of the API is specific to the API resource (for example, /participants, /quotes, /transfers).
There are two types of API resource versions: Minor versions, which are backwards-compatible, and major versions, which are backwards-incompatible.
Whenever a change in this document defining the characteristics of the API is updated that in some way affects an API service, the affected resource will be updated to a new major or minor version (depending on whether the changes are backwards-compatible or not).
Whenever a change is made to a specific service in the API, a new version of the corresponding resource will be released.
The format of the resource version is x.y where x is the major version and y is the minor version. Both major and minor versions are sequentially numbered. When a new major version of a service is released, the minor version is reset to 0. The initial version of each resource in the API is 1.0.
Changes not Affecting the API Resource Version
Some changes will not affect the API resource version; for example, if the order of parameters within a request or callback were to be changed.
Minor API Resource Version
The following list describes the changes that are considered backwards compatible if the change affects any API service connected to a resource. API implementers should implement their client/server in such a way that the API services automatically support these changes without breaking any functionality.
Optional input parameters such as query strings added in a request
Optional parameters added in a request or a callback
Error codes added
These types of changes affect the minor API service version.
Major API Resource Versions
The following list describes the changes that are considered backwards-incompatible if the change affects any API service connected to a resource. API implementers do not need to implement their client/server in such a way that it automatically supports these changes.
Mandatory parameters removed or added to a request or callback
Optional parameters changed to mandatory in a request or callback
Parameters renamed
Data types changed
Business logic of API resource or connected services changed
API resource/service URIs changed
These types of changes affect the major API service version. Please note that the list is not comprehensive; there might be other changes as well that could affect the major API service version.
Version Negotiation between Client and Server
HTTP Accept Header
Listing 3
Listing 3 -- HTTP Accept header example, requesting version 1 or the latest supported version
The Accept header field is used to indicate the API resource version the client would like to use. If several versions are supported by the client, more than one version can be requested separated by a comma (,) as in the example above.
The application type is always application/vnd.interoperability.{resource}, where {resource} is the actual resource (for example, participants or quotes).
The only data exchange format currently supported is json.
If a client can use any minor version of a major version, only the major version should be sent; for example, version=1 or version=2.
If a client would like to use a specific minor version, this should be indicated by using the specific major.minor version; for example, version=1.2 or version=2.8. The use of a specific major.minor version in the request should generally be avoided, as minor versions should be backwards-compatible.
Acceptable Version Requested by Client
Listing 4
Listing 4 -- Content-Type HTTP header field example
Non-Acceptable Version Requested by Client
If the server does not support the version requested by the client in the Accept header, the server should reply with HTTP status 406, which indicates that the requested version is not supported.
Note: There is also a possibility that the information might be sent as part of an error callback to a client instead of directly in the response; for example, when the request is routed through a Switch which does support the requested version, but the destination FSP does not support the requested version.
Listing 5
Listing 5 -- Example error message when server does not support the requested version
Interledger Protocol
More Information
This document contains ILP information that is relevant to the API. For more information about the ILP protocol, see the Interledger project website25, the Interledger Whitepaper26, and the Interledger architecture specification27.
Introduction to Interledger
ILP is a standard for internetworking payment networks. In the same way that the Internet Protocol (IP) establishes a set of basic standards for the transmission and addressing of data packets between different data networks, ILP establishes a set of basic standards for the addressing of financial transactions and transfer of value between accounts on different payment networks.
ILP is not a scheme. It is a set of standards that, if implemented by multiple payment schemes, will allow those schemes to be interoperable. Therefore, implementing ILP involves adapting an existing scheme to conform to those standards. Conformance means ensuring that transfers between accounts within the scheme are done in two phases (reserve and commit) and defining a mapping between the accounts in the scheme and the global ILP Addressing scheme. This can be done by modifying the scheme itself, or by the entities that provide ILP-conformant access to the scheme using scheme adaptors.
ILP Addressing
A key component of the ILP standard is the ILP addressing28 scheme. It is a hierarchical scheme that defines one or more addresses for every account on a ledger.
Table 5
g.tz.fsp1.msisdn.1234567890
A mobile money account at FSP1 for the user with MSISDN 1234567890.
g.pk.fsp2.ac03396c-4dba-4743
A mobile money account at FSP2 identified by an opaque account id.
g.us.bank1.bob
A bank account at Bank1 for the user bob.
Table 5 -- ILP address examples
The primary purpose of an ILP addresses is to identify an account in order to route a financial transaction to that account.
It is useful to think of ILP addresses as analogous to IP addresses. They are seldom, if ever, be seen by end users but are used by the systems involved in a financial transaction to identify an account and route the ILP payment. The design of the addressing scheme means that a single account will often have many ILP addresses. The system on which the account is maintained may track these or, if they are all derived from a common prefix, may track a subset only.
Conditional Transfers
ILP depends on the concept of conditional transfers, in which all ledgers involved in a financial transaction from the Payer to the Payee can first reserve funds out of a Payer account and then later commit them to the Payee account. The transfer from the Payer to the Payee account is conditional on the presentation of a fulfilment that satisfies the condition attached to the original transfer request.
To support conditional transfers for ILP, a ledger must support a transfer API that attaches a condition and an expiry to the transfer. The ledger must prepare the transfer by reserving the funds from the Payer account, and then wait for one of the following events to occur:
The fulfilment of the condition is submitted to the ledger and the funds are committed to the Payee account.
The expiry timeout is reached, or the financial transaction is rejected by the Payee or Payee FSP. The transfer is then aborted and the funds that were reserved from the Payer account are returned.
When the fulfilment of a transfer is submitted to a ledger, the ledger must ensure that the fulfilment is valid for the condition that was attached to the original transfer request. If it is valid, the transfer is committed, otherwise it is rejected, and the transfer remains in a pending state until a valid fulfilment is submitted or the transfer expires.
ILP supports a variety of conditions for performing a conditional payment, but implementers of the API should use the SHA-256 hash of a 32-byte pre-image. The condition attached to the transfer is the SHA-256 hash and the fulfilment of that condition is the pre-image. Therefore, if the condition attached to a transfer is a SHA-256 hash, then when a fulfilment is submitted for that transaction, the ledger will validate it by calculating the SHA-256 hash of the fulfilment and ensuring that the hash is equal to the condition.
ILP Packet
The ILP Packet is the mechanism used to package end-to-end data that can be passed in a hop-by-hop service. It is included as a field in hop-by-hop service calls and should not be modified by any intermediaries. The integrity of the ILP Packet is tightly bound to the integrity of the funds transfer, as the commit trigger (the fulfilment) is generated using a hash of the ILP Packet.
The ILP Packet is the common thread that connects all the individual ledger transfers that make up an end-to-end ILP payment. The packet is parsed by the Payee of the first transfer and used to determine where to make the next transfer, and for how much. It is attached to that transfer and parsed by the Payee of the next transfer, who again determines where to make the next transfer, and for how much. This process is repeated until the Payee of the transfer is the Payee in the end-to-end financial transaction, who fulfils the condition, and the transfers are committed in sequence starting with the last and ending with the first.
Listing 6
Listing 6 -- The ILP Packet format in ASN.1 format
Note: The only mandatory data elements in the ILP Packet are the amount to be transferred to the account of the Payee and the ILP Address of the Payee.
Common API Functionality
This section describes the common functionality used by the API, including:
Quoting
Quoting is the process that determines any fees and any commission required to perform a financial transaction between two FSPs. It is always initiated by the Payer FSP to the Payee FSP, which means that the quote flows in the same way as a financial transaction.
Two different modes for quoting between FSPs are supported in the API: Non-disclosing of fees and Disclosing of fees.
Non-Disclosing of fees should be used when either the Payer FSP does not want to show the Payee FSP its fee structure, or when the Payer FSP would like to have more control of the fees paid by the Payer after quoting has been performed (the latter is only applicable for Receive amount; see next bullet list).
Disclosing of fees can be used for use cases in which the Payee FSP wants to subsidize the transaction in some use cases; for example, Cash-In at another FSP's agent.
The Non-Disclosing of fees mode should be the standard supported way of quoting in most schemes. Disclosing of fees might be used in some schemes; for example, a scheme in which a dynamic fee structure is used and an FSP wants the ability to subsidize the Cash-In use case based on the dynamic cost.
In addition, the Payer can decide if the amount should be Receive amount or Send amount.
Send amount should be interpreted as the actual amount that should be deducted from the Payer's account, including any fees.
Receive amount should be interpreted as the amount that should be added to the Payee's account, regardless of any interoperable transaction fees. The amount excludes possible internal Payee fees added by the Payee FSP.
The Payee FSP can choose if the actual receive amount for the Payee should be sent or not in the callback to the Payer FSP. The actual Payee receive amount should include any Payee FSP internal fees on the Payee.
Note: Dynamic fees implemented using a Switch, or any other intermediary, are not supported in this version of the API.
Non-Disclosing of Fees
Figure 7
Figure 7 -- Fees and commission related to interoperability when fees are not disclosed
Non-Disclosing Receive Amount
In this example, the Payee FSP decides to give commission to the Payer FSP since funds are flowing to the Payee FSP, which will later be spent in some way; this results in a future fee income for the Payee FSP. The Payer FSP can then decide how much in fees should be taken from the Payer for cost-plus pricing. In this example, the Payer FSP would like to have 1 USD from the Payer, which means that the Payer FSP will earn 2 USD in total, as the Payer FSP will also receive 1 USD in FSP commission from the Payee FSP.
Figure 8
Figure 8 -- Example of non-disclosing receive amount
Figure 9
Figure 9 -- Simplified view of money movement for non-disclosing receive amount example
Listing 7
Listing 7 -- Relation between transfer amount and quote amount for non-disclosing receive amount
Non-Disclosing Send Amount
In the example, the Payer FSP and the Payee FSP would like to have 1 USD each in fees so that the amount that will be received by the Payee is 98 USD. The actual amount that will be received by the Payee is in this example (not mandatory) returned in the callback to the Payer FSP, in the element payeeReceiveAmount.
Figure 10
Figure 10 -- Example of non-disclosing send amount
Figure 11
Figure 11 -- Simplified view of money movement for non-disclosing send amount example
Listing 8
Listing 8 -- Relation between transfer amount and quote amount for non-disclosing send amount
The reason for a Payee FSP fee to be absent in the equation is that the Payer would like to send a certain amount from their account. The Payee will receive less funds instead of a fee being added on top of the amount.
Disclosing of Fees
Figure 12
Figure 12 -- Fees and commission related to interoperability when fees are disclosed
Disclosing Receive Amount
Figure 13
Figure 13 -- Example of disclosing receive amount
Figure 14
Figure 14 -- Simplified view of money movement for disclosing receive amount example
Listing 9
Listing 9 -- Relation between transfer amount and quote amount for disclosing receive amount
Disclosing Send Amount
Figure 15
Figure 15 -- Example of disclosing send amount
Figure 16
Figure 16 -- Simplified view of money movement for disclosing send amount example
Listing 10
Listing 10 -- Relation between transfer amount and quote amount for disclosing send amount
The reason for a Payee FSP fee to be absent in the equation, is that the Payer would like to send a certain amount from their account. The Payee will receive less funds instead of a fee being added on top of the amount.
Excess FSP Commission Example
Figure 17
Figure 17 -- Example of disclosing send amount
Figure 18
Figure 18 -- Simplified view of money movement for excess commission using disclosing send amount example
Fee Types
FSPs:
Payee FSP fee -- A transaction fee that the Payee FSP would like to have for the handling of the transaction.
Quote Equations
This section contains useful equations for quoting that have not already been mentioned.
Payee Receive Amount Relation to Transfer Amount
Listing 11
Listing 11 -- Relation between transfer amount and Payee receive amount
Tax Information
Tax information is not sent in the API, as all taxes are assumed to be FSP-internal. The following sections contain details pertaining to common tax types related to the API.
Tax on Agent Commission
Tax on Agent Commission is tax for an Agent as a result of the Agent receiving commission as a kind of income. Either the Agent or its FSP has a relation with the tax authority, depending on how the FSP deployment is set up. As all Agent commissions are FSP-internal, no information is sent through the Interoperability API regarding Tax on Agent Commission.
Tax on FSP Internal Fee
FSPs could be taxed on FSP internal fees that they receive from the transactions; for example, Payer fees to Payer FSP or Payee fees to Payee FSP. This tax should be handled internally within the FSP and collected by the FSPs because they receive a fee.
Tax on Amount (Consumption tax)
Examples of tax on amount are VAT (Value Added Tax) and Sales Tax. These types of taxes are typically paid by a Consumer to the Merchant as part of the price of goods, services, or both. It is the Merchant who has a relationship with the tax authority, and forwards the collected taxes to the tax authority. If any VAT or Sales Tax is applicable, a Merchant should include these taxes in the requested amount from the Consumer. The received amount in the Payee FSP should then be taxed accordingly.
Tax on FSP Fee
In the API, there is a possibility for a Payee FSP to add a fee that the Payer or Payer FSP should pay to the Payee FSP. The Payee FSP should handle the tax internally as normal when receiving a fee (if local taxes apply). This means that the Payee FSP should consider the tax on the fee while rating the financial transaction as part of the quote. The tax is not sent as part of the API.
Tax on FSP Commission
In the API, there is a possibility for a Payee FSP to add a commission to either subsidize the transaction (if disclosing of fees) or incentivize the Payer FSP (if non-disclosing of fees).
Non-Disclosing of Fees
Disclosing of Fees
If the Payee FSP commission amount is less than or equal to the amount of transaction fees originating from the Payer FSP, then the Payee FSP commission should always be understood as being used for covering fees that the Payer would otherwise need to pay.
Examples for each Use Case
This section contains one or more examples for each use case.
P2P Transfer
Figure 19
Figure 19 -- P2P Transfer example with receive amount
Simplified View of Money Movement
Figure 20
Figure 20 -- Simplified view of the movement of money for the P2P Transfer example
#####Agent-Initiated Cash-In (Send amount)
Figure 21
Figure 21 -- Agent-Initiated Cash-In example with send amount
Simplified View of Money Movement
Figure 22
Figure 22 -- Simplified view of the movement of money for the Agent-initiated Cash-In with send amount example
Agent-Initiated Cash-In (Receive amount)
Figure 23
Figure 23 -- Agent-initiated Cash-In example with receive amount
Simplified View of Money Movement
Figure 24
Figure 24 -- Simplified view of the movement of money for the Agent-initiated Cash-In with receive amount example
Customer-Initiated Merchant Payment
Figure 25
Figure 25 -- Customer-Initiated Merchant Payment example
Simplified View of Money Movement
Figure 26
Figure 26 -- Simplified view of the movement of money for the Customer-Initiated Merchant Payment example
Customer-Initiated Cash-Out (Receive amount)
Figure 27
Figure 27 -- Customer-Initiated Cash-Out example (receive amount)
Simplified View of Money Movement
Figure 28
Figure 28 -- Simplified view of the movement of money for the Customer-Initiated Cash-Out with receive amount example
Customer-Initiated Cash-Out (Send amount)
Figure 29
Figure 29 -- Customer-Initiated Cash-Out example (send amount)
Simplified View of Money Movement
Figure 30
Figure 30 -- Simplified view of the movement of money for the Customer-Initiated Cash-Out with send amount example
Agent-Initiated Cash-Out
Figure 31
Figure 31 -- Agent-Initiated Cash-Out example
######1 Simplified View of Money Movement
Figure 32
Figure 32 -- Simplified view of the movement of money for the Agent-Initiated Cash-Out example
Merchant-Initiated Merchant Payment
Figure 33
Figure 33 -- Merchant-Initiated Merchant Payment example
Simplified View of Money Movement
Figure 34
Figure 34 -- Simplified view of the movement of money for the Merchant-Initiated Merchant Payment example
ATM-Initiated Cash-Out
Figure 35
Figure 35 -- ATM-Initiated Cash-Out example
Simplified View of Money Movement
Figure 36
Figure 36 -- Simplified view of the movement of money for the ATM-Initiated Cash-Out example
Merchant-Initiated Merchant Payment authorized on POS
Figure 37
Figure 37 -- Merchant-Initiated Merchant Payment authorized on POS example
Simplified View of Money Movement
Figure 38
Figure 38 -- Simplified view of the movement of money for the Merchant-Initiated Merchant Payment authorized on POS example
Refund
Figure 39
Figure 39 -- Refund example
5.1.6.11.1 Simplified View of Money Movement
Figure 40
Figure 40 -- Simplified view of the movement of money for the Refund example
Party Addressing
The following are basic examples of how the elements Party ID Type and Party ID can be used:
To use mobile phone number +123456789 as the counterparty in a financial transaction, set Party ID Type to MSISDN and Party ID to +123456789.
Example service to get FSP information:
GET /participants/MSISDN/+123456789
To use the email john@doe.com as the counterparty in a financial transaction, set Party ID Type to EMAIL, and Party ID to john@doe.com.
Example service to get FSP information:
GET /participants/EMAIL/john@doe.com
To use the IBAN account number SE45 5000 0000 0583 9825 7466 as counterparty in a financial transaction, set Party ID Type to IBAN, and Party ID to SE4550000000058398257466 (should be entered without any whitespace).
Example service to get FSP information:
GET /participants/IBAN/SE4550000000058398257466
The following are more advanced examples of how the elements Party ID Type, Party ID, and Party Sub ID or Type can be used:
To use the person who has passport number 12345678 as counterparty in a financial transaction, set Party ID Type to PERSONAL_ID, Party ID to 12345678, and Party Sub ID or Type to PASSPORT.
Example service to get FSP information:
GET /participants/PERSONAL_ID/123456789/PASSPORT
To use employeeId1 working in the company Shoe-company as counterparty in a financial transaction, set Party ID Type to BUSINESS, Party ID to Shoe-company, and Party Sub ID or Type to employeeId1.
Example service to get FSP information:
GET /participants/BUSINESS/Shoe-company/employeeId1
5.2.1 Restricted Characters in Party ID and Party Sub ID or Type
Mapping of Use Cases to Transaction Types
For more information regarding these use cases, see API Use Cases.
P2P Transfer
To perform a P2P Transfer, set elements as follows:
Agent-Initiated Cash In
To perform an Agent-Initiated Cash In, set elements as follows:
Agent-Initiated Cash Out
To perform an Agent-Initiated Cash Out, set elements as follows:
Agent-Initiated Cash Out Authorized on POS
To perform an Agent-Initiated Cash Out on POS, set elements as follows:
Customer-Initiated Cash Out
To perform a Customer-Initiated Cash Out, set elements as follows:
Customer-Initiated Merchant Payment
To perform a Customer-Initiated Merchant Payment, set elements as follows:
Merchant-Initiated Merchant Payment
To perform a Merchant-Initiated Merchant Payment, set elements as follows:
Merchant-Initiated Merchant Payment Authorized on POS
To perform a Merchant-Initiated Merchant Payment, set elements as follows:
ATM-Initiated Cash Out
To perform an ATM-Initiated Cash Out, set elements as follows:
Refund
To perform a Refund, set elements as follows:
API Services
High Level API Services
On a high level, the API can be used to perform the following actions:
Lookup Participant Information -- Find out in which FSP the counterparty in a financial transaction is located.
Use the services provided by the API resource /participants.
Lookup Party Information -- Get information about the counterparty in a financial transaction.
Use the services provided by the API resource /parties.
Perform Transaction Request -- Request that a Payer transfer electronic funds to the Payee, at the request of the Payee. The Payer can approve or reject the request from the Payee. An approval of the request will initiate the actual financial transaction.
Use the services provided by the API resource /transactionRequests.
Calculate Quote -- Calculate all parts of a transaction that will influence the transaction amount; that is, fees and FSP commission.
Use the services provided by the API resource /quotes for a single transaction quote; that is, one Payer to one Payee.
Use the services provided by the API resource /bulkQuotes for a bulk transaction quote; that is, one Payer to multiple Payees.
Perform Authorization -- Request the Payer to enter the applicable credentials when they have initiated the transaction from a POS, ATM, or similar device in the Payee FSP system.
Use the services provided by the API resource /authorizations.
Perform Transfer -- Perform the actual financial transaction by transferring the electronic funds from the Payer to the Payee, possibly through intermediary ledgers.
Use the services provided by the API resource /transfers for single transaction; that is, one Payer to one Payee.
Use the services provided by the API resource /bulkTransfers for bulk transaction; that is, one Payer to multiple Payees.
Retrieve Transaction Information -- Get information related to the financial transaction; for example, a possible created token on successful financial transaction.
Use the services provided by the API resource /transactions.
Supported API services
Table 6
/participants
Not supported
Not supported
Request that an ALS create FSP information regarding the parties provided in the body or, if the information already exists, request that the ALS update it
Not supported
Not Supported
/participants/{ID}
Not supported
Callback to inform a Peer FSP about a previously-created list of parties.
Not supported
Not Supported
Not Supported
/participants/{Type}/{ID} Alternative: /participants/{Type}/{ID}/{SubId}
Get FSP information regarding a Party from either a Peer FSP or an ALS.
Callback to inform a Peer FSP about the requested or created FSP information.
Request an ALS to create FSP information regarding a Party or, if the information already exists, request that the ALS update it
Request that an ALS delete FSP information regarding a Party.
Not Supported
/parties/{Type}/{ID} Alternative: /parties/{Type}/{ID}/{SubId}
Get information regarding a Party from a Peer FSP.
Callback to inform a Peer FSP about the requested information about the Party.
Not supported
Not support
Not Supported
/transactionRequests
Not supported
Not supported
Request a Peer FSP to ask a Payer for approval to transfer funds to a Payee. The Payer can either reject or approve the request.
Not supported
Not Supported
/transactionRequests/{ID}
Get information about a previously-sent transaction request.
Callback to inform a Peer FSP about a previously-sent transaction request.
Not supported
Not supported
Not Supported
/quotes
Not supported
Not supported
Request that a Peer FSP create a new quote for performing a transaction.
Not supported
Not Supported
/quotes/{ID}
Get information about a previously-requested quote.
Callback to inform a Peer FSP about a previously- requested quote.
Not supported
Not supported
Not Supported
/authorizations/{ID}
Get authorization for a transaction from the Payer whom is interacting with the Payee FSP system.
Callback to inform Payer FSP regarding authorization information.
Not supported
Not supported
Not Supported
/transfers
Not supported
Not supported
Request a Peer FSP to perform the transfer of funds related to a transaction.
Not supported
Not Supported
/transfers/{ID}
Get information about a previously-performed transfer.
Callback to inform a Peer FSP about a previously-performed transfer.
Not supported
Not supported
Commit notification to Payee FSP
/transactions/{ID}
Get information about a previously-performed transaction.
Callback to inform a Peer FSP about a previously-performed transaction.
Not supported
Not supported
Not Supported
/bulkQuotes
Not supported
Not supported
Request that a Peer FSP create a new quote for performing a bulk transaction.
Not supported
Not Supported
/bulkQuotes/{ID}
Get information about a previously-requested bulk transaction quote.
Callback to inform a Peer FSP about a previously-requested bulk transaction quote.
Not supported
Not supported
Not Supported
/bulkTransfers
Not supported
Not supported
Request that a Peer FSP create a bulk transfer.
Not supported
Not Supported
/bulkTransfers/{ID}
Get information about a previously-sent bulk transfer.
Callback to inform a Peer FSP about a previously-sent bulk transfer.
Not supported
Not supported
Not supported
Table 6 – API-supported services
Current Resource Versions
Table 7
/participants
1.1
The data model is updated to add an optional ExtensionList element to the PartyIdInfo complex type based on the Change Request: https://github.com/mojaloop/mojaloop-specification/issues/30. Following this, the data model as specified in Table 93 has been updated.
/parties
1.1
The data model is updated to add an optional ExtensionList element to the PartyIdInfo complex type based on the Change Request: https://github.com/mojaloop/mojaloop-specification/issues/30. Following this, the data model as specified in Table 93 has been updated.
/transactionRequests
1.1
The data model is updated to add an optional ExtensionList element to the PartyIdInfo complex type based on the Change Request: https://github.com/mojaloop/mojaloop-specification/issues/30. Following this, the data model as specified in Table 93 has been updated.
/quotes
1.1
The data model is updated to add an optional ExtensionList element to the PartyIdInfo complex type based on the Change Request: https://github.com/mojaloop/mojaloop-specification/issues/30. Following this, the data model as specified in Table 93 has been updated.
/authorizations
1.0
The data model is updated to add an optional ExtensionList element to the PartyIdInfo complex type based on the Change Request: https://github.com/mojaloop/mojaloop-specification/issues/30. Following this, the data model as specified in Table 93 has been updated.
/transfers
1.1
Added possible commit notification using PATCH /transfers/<ID>
. The process of using commit notifications is described in Section 6.7.2.6. The data model is updated to add an optional ExtensionList element to the PartyIdInfo complex type based on the Change Request: https://github.com/mojaloop/mojaloop-specification/issues/30. Following this, the data model as specified in Table 93 has been updated.
/transactions
1.0
The data model is updated to add an optional ExtensionList element to the PartyIdInfo complex type based on the Change Request: https://github.com/mojaloop/mojaloop-specification/issues/30. Following this, the data model as specified in Table 93 has been updated.
/bulkQuotes
1.1
The data model is updated to add an optional ExtensionList element to the PartyIdInfo complex type based on the Change Request: https://github.com/mojaloop/mojaloop-specification/issues/30. Following this, the data model as specified in Table 93 has been updated.
/bulkTransfers
1.1
The data model is updated to add an optional ExtensionList element to the PartyIdInfo complex type based on the Change Request: https://github.com/mojaloop/mojaloop-specification/issues/30. Following this, the data model as specified in Table 93 has been updated.
Table 7 – Current resource versions
API Resource /participants
The services provided by the resource /participants are primarily used for determining in which FSP a counterparty in a financial transaction is located. Depending on the scheme, the services should be supported, at a minimum, by either the individual FSPs or a common service.
If a common service (for example, an ALS) is supported in the scheme, the services provided by the resource /participants can also be used by the FSPs for adding and deleting information in that system.
Resource Version History
Table 8
1.0
2018-03-13
Initial version
1.1
2020-05-19
The data model is updated to add an optional ExtensionList element to the PartyIdInfo complex type based on the Change Request: https://github.com/mojaloop/mojaloop-specification/issues/30. Following this, the data model as specified in Table 93 has been updated.
For consistency, the data model for the POST /participants/{Type}/{ID} and POST /participants/{Type}/{ID}/{SubId} calls in Table 10 has been updated to include the optional ExtensionList element as well.
Table 8 – Version history for resource /participants
Service Details
Different models are used for account lookup, depending on whether an ALS exists. The following sections describe each model in turn.
No Common Account Lookup System
If this model is used, all FSPs should support being both client and server of the different HTTP GET services under the /participants resource. The HTTP POST or HTTP DELETE services under the /participants resource should not be used, as the FSPs are directly used for retrieving the information (instead of a common ALS).
Figure 41
Figure 41 -- How to use the services provided by /participants if there is no common Account Lookup System
Common Account Lookup System
Figure 42
Figure 42 -- How to use the services provided by /participants if there is a common Account Lookup System
Requests
This section describes the services that can be requested by a client on the resource /participants.
GET /participants/{Type}/{ID}
Alternative URI: GET /participants/{Type}/{ID}/{SubId}
Callback and data model information for GET /participants/{Type}/{ID} (alternative GET /participants/{Type}/{ID}/{SubId}):
Data Model -- Empty body
POST /participants
Alternative URI: N/A
The HTTP request POST /participants is used to create information on the server regarding the provided list of identities. This request should be used for bulk creation of FSP information for more than one Party. The optional currency parameter should indicate that each provided Party supports the currency.
Callback and data model information for POST /participants:
Table 9
requestId
1
CorrelationId
The ID of the request, decided by the client. Used for identification of the callback from the server.
partyList
1..10000
PartyIdInfo
List of PartyIdInfo elements that the client would like to update or create FSP information about.
currency
0..1
Currency
Indicate that the provided Currency is supported by each PartyIdInfo in the list.
Table 9 - POST /participants data model
POST /participants/{Type}/{ID}
Alternative URI: POST /participants/{Type}/{ID}/{SubId}
Callback and data model information for POST /participants/{Type}/{ID} (alternative POST /participants/{Type}/{ID}/{SubId}):
Table 10
fspId
1
FspId
FSP Identifier that the Party belongs to.
currency
0..1
Currency
Indicate that the provided Currency is supported by the Party.
extensionList
0..1
ExtensionList
Optional extension, specific to deployment.
Table 10 -- POST /participants/{Type}/{ID} (alternative POST /participants/{Type}/{ID}/{SubId}) data model
DELETE /participants/{Type}/{ID}
Alternative URI: DELETE /participants/{Type}/{ID}/{SubId}
Note: The ALS should verify that it is the Party's current FSP that is deleting the FSP information.
Callback and data model information for DELETE /participants/{Type}/{ID} (alternative GET /participants/{Type}/{ID}/{SubId}):
Data Model -- Empty body
Callbacks
This section describes the callbacks used by the server for services provided by the resource /participants.
PUT /participants/{Type}/{ID}
Alternative URI: PUT /participants/{Type}/{ID}/{SubId}
The callback PUT /participants/{Type}/{ID} (or PUT /participants/{Type}/{ID}/{SubId}) is used to inform the client of a successful result of the lookup, creation, or deletion of the FSP information related to the Party. If the FSP information is deleted, the fspId element should be empty; otherwise the element should include the FSP information for the Party.
Table 11
fspId
0..1
FspId
FSP Identifier that the Party belongs to.
Table 11 -- PUT /participants/{Type}/{ID} (alternative PUT /participants/{Type}/{ID}/{SubId}) data model
PUT /participants/{ID}
Alternative URI: N/A
The callback PUT /participants/{ID} is used to inform the client of the result of the creation of the provided list of identities.
Table 12
partyList
1..10000
PartyResults
List of PartyResult elements that were either created or failed to be created.
currency
0..1
Currency
Indicate that the provided Currency was set to be supported by each successfully added PartyIdInfo.
Table 12 -- PUT /participants/{ID} data model
####Error Callbacks
This section describes the error callbacks that are used by the server under the resource /participants.
PUT /participants/{Type}/{ID}/error
Alternative URI: PUT /participants/{Type}/{ID}/{SubId}/error
Table 13
errorInformation
1
ErrorInformation
Error code, category description.
Table 13 -- PUT /participants/{Type}/{ID}/error (alternative PUT /participants/{Type}/{ID}/{SubId}/error) data model
PUT /participants/{ID}/error
Alternative URI: N/A
Table 14
Name
Cardinality
Type
Description
error Information
1
ErrorInformation
Error code, category description.
Table 14 -- PUT /participants/{ID}/error data model
States
There are no states defined for the /participants resource; either the server has FSP information regarding the requested identity or it does not.
API Resource /parties
The services provided by the resource /parties is used for finding out information regarding a Party in a Peer FSP.
Resource Version History
Table 15
1.0
2018-03-13
Initial version
1.1
2020-05-19
The data model is updated to add an optional ExtensioinList element to the PartyIdInfo complex type based on the Change Request: https://github.com/mojaloop/mojaloop-specification/issues/30. Following this, the data model as specified in Table 93 has been updated.
Table 15 – Version history for resource /parties
Service Details
Figure 43
Figure 43 -- Example process for /parties resource
Requests
This section describes the services that can be requested by a client in the API on the resource /parties.
GET /parties/{Type}/{ID}
Alternative URI: GET /parties/{Type}/{ID}/{SubId}
Callback and data model information for GET /parties/{Type}/{ID} (alternative GET /parties/{Type}/{ID}/{SubId}):
Data Model -- Empty body
Callbacks
This section describes the callbacks that are used by the server for services provided by the resource /parties.
PUT /parties/{Type}/{ID}
Alternative URI: PUT /parties/{Type}/{ID}/{SubId}
Table 16
Name
Cardinal
Type
Description
party
1
Party
Information regarding the requested Party.
Table 16 -- PUT /parties/{Type}/{ID} (alternative PUT /parties/{Type}/{ID}/{SubId}) data model
Error Callbacks
This section describes the error callbacks that are used by the server under the resource /parties.
PUT /parties/{Type}/{ID}/error
Alternative URI: PUT /parties/{Type}/{ID}/{SubId}/error
Table 17
Name
Cardinality
Type
Description
errorInformation
1
ErrorInformation
Error code, category description.
Table 17 -- PUT /parties/{Type}/{ID}/error (alternative PUT /parties/{Type}/{ID}/{SubId}/error) data model
States
There are no states defined for the /parties resource; either an FSP has information regarding the requested identity or it does not.
API Resource /transactionRequests
The primary service that the API resource /transactionRequests enables is for a Payee to request a Payer to transfer electronic funds to the Payee. The Payer can either approve or reject the request from the Payee. The decision by the Payer could be made programmatically if:
The Payee is trusted (that is, the Payer has pre-approved the Payee in the Payer FSP), or
Alternatively, the Payer could make the decision manually.
Resource Version History
Table 18
1.0
2018-03-13
Initial version
1.1
2020-05-19
The data model is updated to add an optional ExtensioinList element to the PartyIdInfo complex type based on the Change Request: https://github.com/mojaloop/mojaloop-specification/issues/30. Following this, the data model as specified in Table 93 has been updated.
Table 18 – Version history for resource /transactionRequests
Service Details
Figure 44
Figure 44 -- How to use the /transactionRequests service
Payer Rejected Transaction Request
The Payer rejected the request manually.
An automatic limit was exceeded.
The Payer entered an OTP incorrectly more than the allowed number of times.
Figure 45
Figure 45 -- Example process in which a transaction request is rejected
Requests
This section describes the services that a client can request on the resource /transactionRequests.
GET /transactionRequests/{ID}
Alternative URI: N/A
Callback and data model information for GET /transactionRequests/{ID}:
Data Model -- Empty body
POST /transactionRequests
Alternative URI: N/A
The HTTP request POST /transactionRequests is used to request the creation of a transaction request for the provided financial transaction on the server.
Callback and data model information for POST /transactionRequests:
Table 19
Name
Cardinality
Type
Description
transactionRequestId
1
CorrelationId
Common ID between the FSPs for the transaction request object, decided by the Payee FSP. The ID should be reused for resends of the same transaction request. A new ID should be generated for each new transaction request.
payee
1
Party
Information about the Payee in the proposed financial transaction.
payer
1
PartyInfo
Information about the Payer type, id, sub-type/id, FSP Id in the proposed financial transaction.
amount
1
Money
Requested amount to be transferred from the Payer to Payee.
transactionType
1
TransactionType
Type of transaction.
note
0..1
Note
Reason for the transaction request, intended to the Payer.
geoCode
0..1
GeoCode
Longitude and Latitude of the initiating Party. Can be used to detect fraud.
authenticationType
0.11
AuthenticationType
OTP or QR Code, otherwise empty.
expiration
0..1
DateTime
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, Merchant to know that their request has a time limit.
extensionList
0..1
ExtensionList
Optional extension, specific to deployment.
Table 19 -- POST /transactionRequests data model
####Callbacks
This section describes the callbacks that are used by the server under the resource /transactionRequests.
PUT /transactionRequests/{ID}
Alternative URI: N/A
Logical API service: Return Transaction Request Information
Table 20
Name
Cardinality
Type
Description
transactionId
0..1
CorrelationId
Identifies a related transaction (if a transaction has been created).
transactionRequestState
1
TransactionRequestState
State of the transaction request.
extensionList
0..1
ExtensionList
Optional extension, specific to deployment.
Table 20 -- PUT /transactionRequests/{ID} data model
Error Callbacks
This section describes the error callbacks that are used by the server under the resource /transactionRequests.
PUT /transactionRequests/{ID}/error
Alternative URI: N/A
Table 21
Name
Cardinality
Type
Description
errorInformation
1
ErrorInformation
Error code, category description.
Table 21 -- PUT /transactionRequests/{ID}/error data model
6.4.6 States
Note: A server does not need to keep transaction request objects that have been rejected in their database. This means that a client should expect that an error callback could be received for a rejected transaction request.
Figure 46
Figure 46 -- Possible states of a transaction request
API Resource /quotes
The main service provided by the API resource /quotes is calculation of possible fees and FSP commission involved in performing an interoperable financial transaction. Both the Payer and Payee FSP should calculate their part of the quote to be able to get a total view of all the fees and FSP commission involved in the transaction.
A quote is irrevocable; it cannot be changed after it has been created. However, it can expire (all quotes are valid only until they reach expiration).
Note: A quote is not a guarantee that the financial transaction will succeed. The transaction can still fail later in the process. A quote only guarantees that the fees and FSP commission involved in performing the specified financial transaction are applicable until the quote expires.
Resource Version History
Table 22
1.0
2018-03-13
Initial version
1.1
2020-05-19
The data model is updated to add an optional ExtensioinList element to the PartyIdInfo complex type based on the Change Request: https://github.com/mojaloop/mojaloop-specification/issues/30. Following this, the data model as specified in Table 93 has been updated.
Table 22 – Version history for resource /quotes
Service Details
Figure 47
Figure 47 -- Example process for resource /quotes
Quote Expiry Details
The quote request from the Payer FSP can contain an expiry of the quote, if the Payer FSP would like to indicate when it is no longer useful for the Payee FSP to return a quote. For example, the transaction itself might otherwise time out, or if its quote might time out.
The Payee FSP should set an expiry of the quote in the callback to indicate when the quote is no longer valid for use by the Payer FSP.
Rejection of Quote
The Payee FSP can reject a quote request from the Payer FSP by sending the error callback PUT /quotes/{ID}/error instead of the callback PUT /quotes/{ID}. Depending on which generic transaction pattern (see Section 8 for more information) that is used, the Payer FSP can reject a quote using one of the following processes:
If the transaction is initiated by the Payer (see Section 8.1), the Payer FSP should not inform the Payee FSP regarding the rejection. The created quote at the Payee FSP should have an expiry time, at which time it is automatically deleted.
If the transaction is initiated by the Payee (see Section 8.2 and 8.3), the Payer FSP should inform the Payee FSP regarding the rejection using the callback PUT /transactionRequests/{ID} with a rejected state. The process is described in more detail in Section 6.4.2.1.
Interledger Payment Request
The fulfilment is a temporary secret that is generated for each financial transaction by the Payee FSP and used as the trigger to commit the transfers that make up an ILP payment.
The Payee FSP uses a local secret to generate a SHA-256 HMAC of the ILP Packet. The same secret may be used for all financial transactions or the Payee FSP may store a different secret per Payee or based on another segmentation.
Listing 12
Generation of the fulfilment and condition
Inputs:
Local secret (32-byte binary string)
ILP Packet
Algorithm:
Let the fulfilment be the result of executing the HMAC SHA-256 algorithm on the ILP Packet using the local secret as the key.
Let the condition be the result of executing the SHA-256 hash algorithm on the fulfilment.
Outputs:
Fulfilment (32-byte binary string)
Condition (32-byte binary string)
Listing 12 -- Algorithm to generate the fulfilment and the condition
Requests
This section describes the services that can be requested by a client in the API on the resource /quotes.
GET /quotes/{ID}
Alternative URI: N/A
Callback and data model information for GET /quotes/{ID}:
Data Model -- Empty body
POST /quotes
Alternative URI: N/A
The HTTP request POST /quotes is used to request the creation of a quote for the provided financial transaction on the server.
Callback and data model information for POST /quotes:
Table 23
Name
Cardinality
Type
Description
quoteId
1
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
1
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
0..1
CorrelationId
Identifies an optional previously-sent transaction request.
payee
1
Party
Information about the Payee in the proposed financial transaction.
payer
1
Party
Information about the Payer in the proposed financial transaction.
amountType
1
AmountType
SEND for send amount, RECEIVE for receive amount.
amount
1
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.
fees
0..1
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 fee should be disclosed.
transactionType
1
TransactionType
Type of transaction for which the quote is requested.
geoCode
0..1
GeoCode
Longitude and Latitude of the initiating Party. Can be used to detect fraud.
note
0..1
Note
A memo that will be attached to the transaction.
expiration
0..1
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
0..1
ExtensionList
Optional extension, specific to deployment.
Table 23 -- POST /quotes data model
Callbacks
This section describes the callbacks that are used by the server under the resource /quotes.
PUT /quotes/{ID}
Alternative URI: N/A
Table 24
Name
Cardinality
Type
Description
transferAmount
1
Money
The amount of Money that the Payer FSP should transfer to the Payee FSP.
payeeReceiveAmount
0..1
Money
The amount of Money that the Payee should receive in the end-to-end transaction. Optional as the Payee FSP might not want to disclose any optional Payee fees.
payeeFspFee
0..1
Money
Payee FSP’s part of the transaction fee.
payeeFspCommission
0..1
Money
Transaction commission from the Payee FSP.
expiration
1
DateTime
Date and time until when the quotation is valid and can be honored when used in the subsequent transaction.
geoCode
0..1
GeoCode
Longitude and Latitude of the Payee. Can be used to detect fraud.
ilpPacket
1
IlpPacket
The ILP Packet that must be attached to the transfer by the Payer.
condition
1
IlpCondition
The condition that must be attached to the transfer by the Payer.
extensionList
0..1
ExtensionList
Optional extension, specific to deployment
Table 24 -- PUT /quotes/{ID} data model
Error Callbacks
This section describes the error callbacks that are used by the server under the resource /quotes.
PUT /quotes/{ID}/error
Alternative URI: N/A
Table 25
Name
Cardinality
Type
Description
errorInformation
1
ErrorInformation
Error code, category description.
Table 25 -- PUT /quotes/{ID}/error data model
States
Figure 48
Note: A server does not need to keep quote objects that have been either rejected or expired in their database. This means that a client should expect that an error callback could be received for an expired or rejected quote.
Figure 48 -- Possible states of a quote
API Resource /authorizations
The API resource /authorizations is used to request the Payer to enter the applicable credentials in the Payee FSP system for approving the financial transaction, when the Payer has initiated the transaction from a POS, ATM, or similar, in the Payee FSP system and would like to authorize by an OTP.
Resource Version History
Table 26
1.0
2018-03-13
Initial version
Table 26 – Version history for resource /authorizations
Service Details
Figure 49
Figure 49 -- Example process for resource /authorizations
Resend Authorization Value
Figure 50
Figure 50 -- Payer requests resend of authorization value (OTP)
Retry Authorization Value
Figure 51
Figure 51 -- Payer enters incorrect authorization value (OTP)
Failed OTP authorization
Requests
This section describes the services that can be requested by a client in the API on the resource /authorizations.
GET /authorizations/{ID}
Alternative URI: N/A
An example URI containing all the required key-value pairs in the query string is the following:
GET /authorization/3d492671-b7af-4f3f-88de-76169b1bdf88?authenticationType=OTP&retriesLeft=2&amount=102¤cy=USD
Callback and data model information for GET /authorization/{ID}:
Data Model -- Empty body
6.6.4 Callbacks
This section describes the callbacks that are used by the server under the resource /authorizations.
6.6.4.1 PUT /authorizations/{ID}
Alternative URI: N/A
Table 27
Name
Cardinality
Type
Description
authenticationInfo
0..1
AuthenticationInfo
OTP or QR Code if entered, otherwise empty.
responseType
1
AuthorizationResponse
Enum containing response information; if the customer entered the authentication value, rejected the transaction, or requested a resend of the authentication value.
Table 27 – PUT /authorizations/{ID} data model
Error Callbacks
This section describes the error callbacks that are used by the server under the resource /authorizations.
PUT /authorizations/{ID}/error
Alternative URI: N/A
Table 28
Name
Cardinality
Type
Description
errorInformation
1
ErrorInformation
Error code, category description
Table 28 -- PUT /authorizations/{ID}/error data model
States
There are no states defined for the /authorizations resource.
API Resource /transfers
The services provided by the API resource /transfers are used for performing the hop-by-hop ILP transfer or transfers, and to perform the end-to-end financial transaction by sending the transaction details from the Payer FSP to the Payee FSP. The transaction details are sent as part of the transfer data model in the ILP Packet.
An ILP transfer is exchanged between two account holders on either side of a common ledger. It is usually expressed in the form of a request to execute a transfer on the common ledger and a notification to the recipient of the transfer that the transfer has been reserved in their favor, including a condition that must be fulfilled to commit the transfer.
When the Payee FSP presents the fulfilment to the common ledger, the transfer is committed in the common ledger. At the same time, the Payer FSP is notified that the transfer has been committed along with the fulfilment.
Resource Version History
Table 29 contains a description of each different version of the /transfers resource.
1.0
2018-03-13
Initial version
1.1
2020-05-19
Table 29 –- Version history for resource /transfers
Service Details
This section provides details regarding hop-by-hop transfers and end-to-end financial transactions.
Process
Figure 52
Figure 52 -- How to use the POST /transfers service
Transaction Irrevocability
The API is designed to support irrevocable financial transactions only; this means that a financial transaction cannot be changed, cancelled, or reversed after it has been created. This is to simplify and reduce costs for FSPs using the API. A large percentage of the operating costs of a typical financial system is due to reversals of transactions.
Expired Quote
If a server receives a transaction that is using an expired quote, the server should reject the transfer or transaction.
Timeout and Expiry
The Payer FSP must always set a transfer expiry time to allow for use cases in which a swift completion or failure is needed. If the use case does not require a swift completion, a longer expiry time can be set. If the Payee FSP fails to respond before the expiry time, the transaction is cancelled in the Payer FSP. The Payer FSP should still expect a callback from the Payee FSP.
Short expiry times are often required in retail scenarios, in which a customer may be standing in front of a merchant; both parties need to know if the transaction was successful before the goods or services are given to the customer.
Note: It is possible that a successful callback might be received in the Payer FSP after the expiry time; for example, due to congestion in the network. The Payer FSP should allow for some extra time after the actual expiry time before cancelling the financial transaction in the system. If a successful callback is received after the financial transaction has been cancelled, the transaction should be marked for reconciliation and handled separately in a reconciliation process.
Client Receiving Expired Transfer
Figure 53
Figure 53 -- Client receiving an expired transfer
Commit Notification
If the transfer is reserved, the Switch must send a commit notification to the Payee FSP when the transfer is completed (committed or aborted).
Figure 54
Figure 54 -- Commit notification where commit of transfer was successful in Switch
Figure 55
Figure 55 -- Commit notification where commit of transfer in Switch failed
Refunds
Instead of supporting reversals, the API supports refunds. To refund a transaction using the API, a new transaction should be created by the Payee of the original transaction. The new transaction should revers the original transaction (either the full amount or a partial amount); for example, if customer X sent 100 USD to merchant Y in the original transaction, a new transaction where merchant Y sends 100 USD to customer X should be created. There is a specific transaction type to indicate a refund transaction; for example, if the quote of the transaction should be handled differently than any other type of transaction. The original transaction ID should be sent as part of the new transaction for informational and reconciliation purposes.
Interledger Payment Request
The end-to-end ILP payment is a chain of one or more conditional transfers that all depend on the same condition. The condition is provided by the Payer FSP when it initiates the transfer to the next ledger.
The receiver of that transfer parses the ILP Packet to get the Payee ILP Address and routes the ILP payment by performing another transfer on the next ledger, attaching the same ILP Packet and condition and a new expiry that is less than the expiry of the incoming transfer.
When the Payee FSP receives the final incoming transfer to the Payee account, it extracts the ILP Packet and performs the following steps:
Validates that the Payee ILP Address in the ILP Packet corresponds to the Payee account that is the destination of the transfer.
The fulfilment is submitted to the Payee FSP ledger to instruct the ledger to commit the reservation in favor of the Payee. The ledger will validate that the SHA-256 hash of the fulfilment matches the condition attached to the transfer. If it does, it commits the reservation of the transfer. If not, it rejects the transfer and the Payee FSP rejects the payment and cancels the previously-performed reservation.
The fulfilment is then passed back to the Payer FSP through the same ledgers in the callback of the transfer. As funds are committed on each ledger after a successful validation of the fulfilment, the entity that initiated the transfer will be notified that the funds it reserved have been committed and the fulfilment will be shared as part of that notification message.
The final transfer to be committed is the transfer on the Payer FSP's ledger where the reservation is committed from their account. At this point the Payer FSP notifies the Payer of the successful financial transaction.
Requests
This section describes the services that can be requested by a client in the API on the resource /transfers.
GET /transfers/{ID}
Alternative URI: N/A
Callback and data model information for GET /transfer/{ID}:
Data Model -- Empty body
POST /transfers
Alternative URI: N/A
The HTTP request POST /transfers is used to request the creation of a transfer for the next ledger, and a financial transaction for the Payee FSP.
Callback and data model information for POST /transfers:
Table 30
Name
Cardinality
Type
Description
transferId
1
CorrelationId
The common ID between the FSPs and the optional Switch for the transfer object, decided by the Payer FSP. The ID should be reused for resends of the same transfer. A new ID should be generated for each new transfer.
payeeFsp
1
FspId
Payee FSP in the proposed financial transaction.
payerFsp
1
FspId
Payer FSP in the proposed financial transaction.
amount
1
Money
The transfer amount to be sent.
ilpPacket
1
IlpPacket
The ILP Packet containing the amount delivered to the Payee and the ILP Address of the Payee and any other end-to-end data.
condition
1
IlpCondition
The condition that must be fulfilled to commit the transfer.
expiration
1
DateTime
Expiration can be set to get a quick failure expiration of the transfer. The transfer should be rolled back if no fulfilment is delivered before this time.
extensionList
0..1
ExtensionList
Optional extension, specific to deployment.
Table 30 – POST /transfers data model
PATCH /transfers/{ID}
Alternative URI: N/A
The HTTP request PATCH /transfers/{ID} is used by a Switch to update the state of an earlier reserved transfer, if the Payee FSP has requested a commit notification when the Switch has completed processing of the transfer. The {ID} in the URI should contain the transferId (see Table 30) that was used for the creation of the transfer. Please note that this request does not generate a callback. See Table 31 for data model.
Table 31
Name
Cardinality
Type
Description
completedTimestamp
1
DateTime
Time and date when the transaction was completed
transferState
1
TransferState
State of the transfer
extensionList
0..1
ExtensionList
Optional extension, specific to deployment.
Table 31 –- PATCH /transfers/{ID} data model
Callbacks
This section describes the callbacks that are used by the server under the resource /transfers.
PUT /transfers/{ID}
Alternative URI: N/A
Note: For PUT /transfers/{ID} callbacks, the state ABORTED is not a valid enumeration option as transferState in Table 32. If a transfer is to be rejected, then the FSP making the callback should use an error callback, i.e., a callback on the /error endpoint. At the same time, it should be noted that a transferState value ‘ABORTED’ is valid for a callback to a GET /transfers/{ID} call.
Table 32
Name
Cardinality
Type
Description
fulfilment
0..1
IlpFulfilment
Fulfilment of the condition specified with the transaction. Mandatory if transfer has completed successfully.
completedTimestamp
0..1
DateTime
Time and date when the transaction was completed
transferState
1
TransferState
State of the transfer
extensionList
0..1
ExtensionList
Optional extension, specific to deployment
Table 32 -- PUT /transfers/{ID} data model
Error Callbacks
This section describes the error callbacks that are used by the server under the resource /transfers.
PUT /transfers/{ID}/error
Alternative URI: N/A
If the server is unable to find or create a transfer, or another processing error occurs, the error callback PUT
Table 33
Name
Cardinality
Type
Description
errorInformation
1
ErrorInformation
Error code, category description.
Table 33 -- PUT /transfers/{ID}/error data model
6.7.6 States
Figure 56
Figure 56 -- Possible states of a transfer
API Resource /transactions
The services provided by the API resource /transactions are used for getting information about the performed end-to-end financial transaction; for example, to get information about a possible token that was created as part of the transaction.
Resource Version History
Table 34
1.0
2018-03-13
Initial version
Table 34 – Version history for resource /transactions
Service Details
Figure 57
Figure 57 -- Example transaction process
Requests
This section describes the services that can be requested by a client on the resource /transactions.
GET /transactions/{ID}
Alternative URI: N/A
Callback and data model information for GET /transactions/{ID}:
Data Model -- Empty body
Callbacks
This section describes the callbacks that are used by the server under the resource /transactions.
PUT /transactions/{ID}
Alternative URI: N/A
Table 35
Name
Cardinality
Type
Description
completedTimestamp
0..1
DateTime
Time and date when the transaction was completed.
transactionState
1
TransactionState
State of the transaction.
code
0..1
Code
Optional redemption information provided to Payer after transaction has been completed.
extensionList
0..1
ExtensionList
Optional extension, specific to deployment.
Table 35 -- PUT /transactions/{ID} data model
Error Callbacks
This section describes the error callbacks that are used by the server under the resource /transactions.
PUT /transactions/{ID}/error
Alternative URI: N/A
Table 36
Name
Cardinality
Type
Description
errorInformation
1
ErrorInformation
Error code, category description.
Table 36 -- PUT /transactions/{ID}/error data model
States
Figure 58
Note: For reconciliation purposes, a server must keep transaction objects that have been rejected in its database for a scheme-agreed time period. This means that a client should expect a proper callback about a transaction (if it has been received by the server) when requesting information regarding the same.
Figure 58 -- Possible states of a transaction
API Resource /bulkQuotes
A created bulk quote object contains a quote for each individual transaction in the bulk in a Peer FSP. A bulk quote is irrevocable; it cannot be changed after it has been created However, it can expire (all bulk quotes are valid only until they reach expiration).
Note: A bulk quote is not a guarantee that the financial transaction will succeed. The bulk transaction can still fail later in the process. A bulk quote only guarantees that the fees and FSP commission involved in performing the specified financial transaction are applicable until the bulk quote expires.
Resource Version History
Table 37 contains a description of each different version of the /bulkQuotes resource.
1.0
2018-03-13
Initial version
1.1
2020-05-19
The data model is updated to add an optional ExtensioinList element to the PartyIdInfo complex type based on the Change Request: https://github.com/mojaloop/mojaloop-specification/issues/30. Following this, the data model as specified in Table 93 has been updated.
Table 37 –- Version history for resource /bulkQuotes
Service Details
Figure 59
Figure 59 -- Example bulk quote process
Requests
This section describes the services that can be requested by a client in the API on the resource /bulkQuotes.
GET /bulkQuotes/{ID}
Alternative URI: N/A
The HTTP request GET /bulkQuotes/{ID} is used to get information regarding a previously-created or requested bulk quote.
Callback and data model information for GET /bulkQuotes/{ID}:
Data Model -- Empty body
POST /bulkQuotes
Alternative URI: N/A
Logical API service: Calculate Bulk Quote
The HTTP request POST /bulkQuotes is used to request the creation of a bulk quote for the provided financial transactions on the server.
Callback and data model information for POST /bulkQuotes:
Table 38
Name
Cardinality
Type
Description
bulkQuoteId
1
CorrelationId
Common ID between the FSPs for the bulk quote object, decided by the Payer FSP. The ID should be reused for resends of the same bulk quote. A new ID should be generated for each new bulk quote.
payer
1
Party
Information about the Payer in the proposed financial transaction.
geoCode
0..1
GeoCode
Longitude and Latitude of the initiating Party. Can be used to detect fraud.
expiration
0..1
DateTime
Expiration is optional to let the Payee FSP know when a quote no longer needs to be returned.
individualQuotes
1..1000
IndividualQuote
List of quotes elements.
extensionList
0..1
ExtensionList
Optional extension, specific to deployment.
Table 38 -- POST /bulkQuotes data model
Callbacks
This section describes the callbacks that are used by the server under the resource /bulkQuotes.
PUT /bulkQuotes/{ID}
Alternative URI: N/A
Table 39
Name
Cardinality
Type
Description
individualQuoteResults
0..1000
IndividualQuoteResult
Fees for each individual transaction, if any of them are charged per transaction.
expiration
1
DateTime
Date and time until when the quotation is valid and can be honored when used in the subsequent transaction request.
extensionList
0..1
ExtensionList
Optional extension, specific to deployment.
Table 39 -- PUT /bulkQuotes/{ID} data model
Error Callbacks
This section describes the error callbacks that are used by the server under the resource /bulkQuotes.
PUT /bulkQuotes/{ID}/error
Alternative URI: N/A
Table 40
Name
Cardinality
Type
Description
errorInformation
1
ErrorInformation
Error code, category description.
Table 40 -- PUT /bulkQuotes/{ID}/error data model
States
Figure 60
Note: A server does not need to keep bulk quote objects that have been either rejected or expired in their database. This means that a client should expect that an error callback could be received for a rejected or expired bulk quote.
Figure 60 -- Possible states of a bulk quote
API Resource /bulkTransfers
A bulk transfer is irrevocable; it cannot be changed, cancelled, or reversed after it has been sent from the Payer FSP.
Resource Version History
Table 41 contains a description of each different version of the /bulkTransfers resource.
1.0
2018-03-13
Initial version
1.1
2020-05-19
The data model is updated to add an optional ExtensioinList element to the PartyIdInfo complex type based on the Change Request: https://github.com/mojaloop/mojaloop-specification/issues/30. Following this, the data model as specified in Table 93 has been updated.
Table 41 –- Version history for resource /bulkTransfers
Service Details
Figure 61
Figure 61 -- Example bulk transfer process
Requests
This section describes the services that can a client can request on the resource /bulkTransfers.
GET /bulkTransfers/{ID}
Alternative URI: N/A
Callback and data model information for GET /bulkTransfers/{ID}:
Data Model -- Empty body
POST /bulkTransfers
Alternative URI: N/A
The HTTP request POST /bulkTransfers is used to request the creation of a bulk transfer on the server.
Table 42
Name
Cardinality
Type
Description
bulkTransferId
1
CorrelationId
Common ID between the FSPs and the optional Switch for the bulk transfer object, decided by the Payer FSP. The ID should be reused for resends of the same bulk transfer. A new ID should be generated for each new bulk transfer.
bulkQuoteId
1
CorrelationId
ID of the related bulk quote
payeeFsp
1
FspId
Payee FSP identifier.
payerFsp
1
FspId
Payer FSP identifier.
individualTransfers
1..1000
IndividualTransfer
List of IndividualTransfer elements.
expiration
1
DateTime
Expiration time of the transfers.
extensionList
0..1
ExtensionList
Optional extension, specific to deployment.
Table 42 -- POST /bulkTransfers data model
Callbacks
This section describes the callbacks that are used by the server under the resource /bulkTransfers.
PUT /bulkTransfers/{ID}
Alternative URI: N/A
Table 43
Name
Cardinality
Type
Description
completedTimestamp
0..1
DateTime
Time and date when the bulk transaction was completed.
individualTransferResults
0..1000
Error! Reference source not found.
List of Error! Reference source not found. elements.
bulkTransferState
1
BulkTransferState
The state of the bulk transfer.
extensionList
0..1
ExtensionList
Optional extension, specific to deployment.
Table 43 -- PUT /bulkTransfers/{ID} data model
Error Callbacks
This section describes the error callbacks that are used by the server under the resource /bulkTransfers.
PUT /bulkTransfers/{ID}/error
Alternative URI: N/A
Table 44
Name
Cardinality
Type
Description
errorInformation
1
ErrorInformation
Error code, category description.
Table 44 -- PUT /bulkTransfers/{ID}/error data model
States
Figure 62
Note: A server must keep bulk transfer objects that have been rejected in their database during a market agreed time-period for reconciliation purposes. This means that a client should expect a proper callback about a bulk transfer (if it has been received by the server) when requesting information regarding the same.
Figure 62 -- Possible states of a bulk transfer
API Supporting Data Models
This section provides information about additional supporting data models used by the API.
Format Introduction
This section introduces formats used for element data types used by the API.
All element data types have both a minimum and maximum length. These lengths are indicated by one of the following:
A minimum and maximum length
An exact length
A regular expression limiting the element such that only a specific length or lengths can be used.
Minimum and Maximum Length
If a minimum and maximum length is used, this will be indicated after the data type in parentheses: First the minimum value (inclusive value), followed by two period characters (..), and then the maximum value (inclusive value).
Examples:
String(1..32)
– A String that is minimum one character and maximum 32 characters long.Integer(3..10)
- An Integerr that is minimum 3 digits, but maximum 10 digits long.
Exact Length
If an exact length is used, this will be indicated after the data type in parentheses containing only one exact value. Other lengths are not allowed.
Examples:
String(3)
– A String that is exactly three characters long.Integer(4)
– An Integer that is exactly four digits long.
Regular Expressions
Element Data Type Formats
This section defines element data types used by the API.
String
Example Format I
String(1..32)
– A String that is minimum 1 character and maximum 32 characters long.
An example of String(1..32)
appears below:
This String is 28 characters
Example Format II
String(1..128)
– A String that is minimum 1 character and maximum 128 characters long.
An example of String(32..128)
appears below:
This String is longer than 32 characters, but less than 128
Enum
Example Format
Enum of String(1..32)
– A String that is minimum one character and maximum 32 characters long and restricted by the allowed list of values. The description of the element contains a link to the enumeration.
UndefinedEnum
The API data type UndefinedEnum is a JSON String consisting of 1 to 32 uppercase characters including an underscore character (_).
Regular Expression
Listing 13
Listing 13 -- Regular expression for data type UndefinedEnum
Name
The API data type Name
is a JSON String, restricted by a regular expression to avoid characters which are generally not used in a name.
Regular Expression
Note: In some programming languages, Unicode support needs to be specifically enabled. As an example, if Java is used the flag UNICODE_CHARACTER_CLASS
needs to be enabled to allow Unicode characters.
Listing 14
Listing 14 -- Regular expression for data type Name
Integer
The API data type Integer
is a JSON String consisting of digits only. Negative numbers and leading zeroes are not allowed. The data type is always limited by a number of digits.
7.2.5.1 Regular Expression
Listing 15
Listing 15 -- Regular expression for data type Integer
Example Format
Integer(1..6)
– An Integer
that is at minimum one digit long, maximum six digits.
An example of Integer(1..6)
appears below:
123456
OtpValue
The API data type OtpValue
is a JSON String of three to 10 characters, consisting of digits only. Negative numbers are not allowed. One or more leading zeros are allowed.
Regular Expression
Listing 16
Listing 16 -- Regular expression for data type OtpValue
BopCode
The API data type BopCode
is a JSON String of three characters, consisting of digits only. Negative numbers are not allowed. A leading zero is not allowed.
Regular Expression
Listing 17
Listing 17 -- Regular expression for data type BopCode
ErrorCode
The API data type ErrorCode
is a JSON String of four characters, consisting of digits only. Negative numbers are not allowed. A leading zero is not allowed.
Regular Expression
Listing 18
Listing 18 -- Regular expression for data type ErrorCode
TokenCode
The API data type TokenCode
is a JSON String between four and 32 characters. It can consist of either digits, uppercase characters from A to Z, lowercase characters from a to z, or a combination of the three.
7.2.9.1 Regular Expression
Listing 19
Listing 19 -- Regular expression for data type TokenCode
MerchantClassificationCode
The API data type MerchantClassificationCode
is a JSON String consisting of one to four digits.
7.2.10.1 Regular Expression
Listing 20
Listing 20 -- Regular expression for data type MerchantClassificationCode
Latitude
The API data type Latitude
is a JSON String in a lexical format that is restricted by a regular expression for interoperability reasons.
7.2.11.1 Regular Expression
Listing 21
Listing 21 -- Regular expression for data type Latitude
Longitude
The API data type Longitude
is a JSON String in a lexical format that is restricted by a regular expression for interoperability reasons.
7.2.12.1 Regular Expression
Listing 22
Listing 22 -- Regular expression for data type Longitude
Amount
The API data type Amount
is a JSON String in a canonical format that is restricted by a regular expression for interoperability reasons.
Regular Expression
Listing 23
Listing 23 -- Regular expression for data type Amount
Example Values
Table 45
Value
Validation result
5
Accepted
5.0
Rejected
5.
Rejected
5.00
Rejected
5.5
Accepted
5.50
Rejected
5.5555
Accepted
5.55555
Rejected
555555555555555555
Accepted
5555555555555555555
Rejected
-5.5
Rejected
0.5
Accepted
.5
Rejected
00.5
Rejected
0
Accepted
Table 45 -- Example results for different values for Amount type
DateTime
The API data type DateTime
is a JSON String in a lexical format that is restricted by a regular expression for interoperability reasons.
7.2.14.1 Regular Expression
yyyy-MM-ddTHH:mm:ss.SSS[-HH:MM]
Listing 24
Listing 24 -- Regular expression for data type DateTime
Examples
Two examples of the DateTime
type appear below:
2016-05-24T08:38:08.699-04:00
2016-05-24T08:38:08.699Z (where Z indicates Zulu time zone, which is the same as UTC).
Date
The API data type Date
is a JSON String in a lexical format that is restricted by a regular expression for interoperability reasons.
Regular Expression
Listing 25
Listing 25 -- Regular expression for data type Date
Examples
Two examples of the Date
type appear below:
1982-05-23
1987-08-05
UUID
The API data type UUID
(Universally Unique Identifier) is a JSON String in canonical format, conforming to RFC 412234, that is restricted by a regular expression for interoperability reasons. A UUID is always 36 characters long, 32 hexadecimal symbols and four dashes ('-').
7.2.16.1 Regular Expression
Listing 26
Listing 26 -- Regular expression for data type UUID
Example
An example of a UUID
type appears below:
a8323bc6-c228-4df2-ae82-e5a997baf898
BinaryString
The API data type BinaryString
is a JSON String. The string is a base64url35 encoding of a string of raw bytes, where a padding (character '=') is added at the end of the data if needed to ensure that the string is a multiple of four characters. The length restriction indicates the allowed number of characters.
Regular Expression
Listing 27
Listing 27 -- Regular expression for data type BinaryString
Example Format
BinaryString(32)
–32 bytes of data base64url encoded.
An example of a BinaryString(32..256)
appears below. Note that a padding character, '='
has been added to ensure that the string is a multiple of four characters.
QmlsbCAmIE1lbGluZGEgR2F0ZXMgRm91bmRhdGlvbiE=
BinaryString32
Regular Expression
Listing 28
Listing 28 -- Regular expression for data type BinaryString32
Example Format
BinaryString(32)
– 32 bytes of data base64url encoded.
Element Definitions
This section defines elements types used by the API.
AmountType element
Table 46
AmountType
1
Table 46 – Element AmountType
AuthenticationType element
Table 47
Authentication
1
Table 47 – Element AuthenticationType
AuthenticationValue element
Table 48
AuthenticationValue
1
Table 48 – Element AuthenticationValue
AuthorizationResponse element
Table 49
AuthorizationResponse
1
Table 49 – Element AuthorizationResponse
BalanceOfPayments element
Table 50
BalanceOfPayments
1
Table 50 – Element BalanceOfPayments
BulkTransferState element
Table 51
BulkTransferState
1
Table 51 – Element BulkTransferState
Code element
Table 52
Code
1
Any code/token returned by the Payee FSP.
Table 52 – Element Code
CorrelationId element
Table 53
CorrelationId
1
Identifier that correlates all messages of the same sequence.
Table 53 – Element CorrelationId
Currency element
Table 54
Currency
1
Table 54 – Element Currency
DateOfBirth element
Table 55
DateOfBirth
1
Examples
2016-05-24T08:38:08.699-04:00
2016-05-24T08:38:08.699Z (where Z indicates Zulu time zone, which is the same as UTC).
Date
Date of Birth of the Party.
Table 55 – Element DateOfBirth
ErrorCode element
Table 56
ErrorCode
1
Table 56 – Element ErrorCode
ErrorDescription element
[Table 57](#table-57] below contains the data model for the element ErrorDescription
.
Table 57
ErrorDescription
1
Error description string.
Table 57 – Element ErrorDescription
ExtensionKey element
Table 58
ExtensionKey
1
The extension key.
Table 58 – Element ExtensionKey
ExtensionValue element
Table 59
ExtensionValue
1
The extension value.
Table 59 – Element ExtensionValue
FirstName element
Table 60
FirstName
1
First name of the Party
Table 60 – Element FirstName
FspId element
Table 61
FspId
1
The FSP identifier.
Table 61 – Element FspId
IlpCondition element
Table 62
IlpCondition
1
The condition that must be attached to the transfer by the Payer.
Table 62 – Element IlpCondition
IlpFulfilment element
Table 63
IlpFulfilment
1
The fulfilment that must be attached to the transfer by the Payee.
Table 63 – Element IlpFulfilment
IlpPacket element
Table 64
IlpPacket
1
Example
a8323bc6-c228-4df2-ae82-e5a997baf898
Information for recipient (transport layer information).
Table 64 – Element IlpPacket
LastName element
Table 65
LastName
1
Last name of the Party (ISO 20022 definition).
Table 65 – Element LastName
MerchantClassificationCode element
Table 66
MerchantClassificationCode
1
A limited set of pre-defined numbers. This list would be a limited set of numbers identifying a set of popular merchant types like School Fees, Pubs and Restaurants, Groceries, and so on.
Table 66 – Element MerchantClassificationCode
MiddleName element
Table 67
MiddleName
1
Middle name of the Party (ISO 20022 definition).
Table 67 – Element MiddleName
Note element
Table 68
Note
1
Memo assigned to transaction.
Table 68 – Element Note
PartyIdentifier element
Table 69
PartyIdentifier
1
Identifier of the Party.
Table 69 – Element PartyIdentifier
PartyIdType element
Table 70
PartyIdType
1
Table 70 – Element PartyIdType
PartyName element
Table 71
PartyName
1
Name
Name of the Party. Could be a real name or a nickname.
Table 71 – Element PartyName
PartySubIdOrType element
Table 72
PartySubIdOrType
1
Table 72 – Element PartySubIdOrType
RefundReason element
Table 73
RefundReason
1
Reason for the refund.
Table 73 – Element RefundReason
TransactionInitiator element
Table 74
TransactionInitiator
1
Table 74 – Element TransactionInitiator
TransactionInitiatorType element
Table 75
TransactionInitiatorType
1
Table 75 – Element TransactionInitiatorType
TransactionRequestState element
Table 76
TransactionRequestState
1
Table 76 – Element TransactionRequestState
TransactionScenario element
Table 77
TransactionScenario
1
Table 77 – Element TransactionScenario
TransactionState element
Table 78
TransactionState
1
Table 78 – Element TransactionState
TransactionSubScenario element
Table 79
TransactionSubScenario
1
Possible sub-scenario, defined locally within the scheme.
Table 79 – Element TransactionSubScenario
TransferState element
Table 80
TransactionState
1
Table 80 – Element TransferState
Complex Types
This section describes complex types used by the API.
AuthenticationInfo
Table 81
Name
Cardinality
Format
Description
authentication
1
AuthenticationType
Type of authentication.
authenticationValue
1
AuthenticationValue
Authentication value.
Table 81 -- Complex type AuthenticationInfo
ErrorInformation
Table 82
Name
Cardinality
Format
Description
errorCode
1
Errorcode
Specific error number.
errorDescription
1
ErrorDescription
Error description string.
extensionList
1
ExtensionList
Optional list of extensions, specific to deployment.
Table 82 -- Complex type ErrorInformation
Extension
Table 83
Name
Cardinality
Format
Description
key
1
ExtensionKey
Extension key.
value
1
ExtensionValue
Extension value.
Table 83 -- Complex type Extension
ExtensionList
Table 84
Name
Cardinality
Format
Description
extension
1..16
Extension
Number of Extension elements.
Table 84 -- Complex type ExtensionList
IndividualQuote
Table 85
Name
Cardinality
Format
Description
quoteId
1
CorrelationId
Identifies quote message.
transactionId
1
CorrelationId
Identifies transaction message.
payee
1
Party
Information about the Payee in the proposed financial transaction.
amountType
1
AmountType
SEND for sendAmount, RECEIVE for receiveAmount.
amount
1
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.
fees
0..1
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
1
TransactionType
Type of transaction that the quote is requested for.
note
0..1
Note
Memo that will be attached to the transaction.
extensionList
0..1
ExtensionList
Optional extension, specific to deployment.
Table 85 -- Complex type IndividualQuote
IndividualQuoteResult
Table 86
Name
Cardinality
Format
Description
quoteId
1
CorrelationId
Identifies the quote message.
payee
0..1
Party
Information about the Payee in the proposed financial transaction.
transferAmount
0..1
Money
The amount of Money that the Payer FSP should transfer to the Payee FSP.
payeeReceiveAmount
0..1
Money
Amount that the Payee should receive in the end-to-end transaction. Optional as the Payee FSP might not want to disclose any optional Payee fees.
payeeFspFee
0..1
Money
Payee FSP’s part of the transaction fee.
payeeFspCommission
0..1
Money
Transaction commission from the Payee FSP.
ilpPacket
0..1
IlpPacket
ILP Packet that must be attached to the transfer by the Payer.
condition
0..1
IlpCondition
Condition that must be attached to the transfer by the Payer.
errorInformation
0..1
ErrorInformation
Error code, category description. Note: payee, transferAmount, payeeReceiveAmount, payeeFspFee, payeeFspCommission, ilpPacket, and condition should not be set if errorInformation is set.
extensionList
0..1
ExtensionList
Optional extension, specific to deployment
Table 86 -- Complex type IndividualQuoteResult
IndividualTransfer
Table 87
Name
Cardinality
Format
Description
transferId
1
CorrelationId
Identifies messages related to the same /transfers sequence.
transferAmount
1
Money
Transaction amount to be sent.
ilpPacket
1
IlpPacket
ILP Packet containing the amount delivered to the Payee and the ILP Address of the Payee and any other end-to-end data.
condition
1
IlpCondition
Condition that must be fulfilled to commit the transfer.
extensionList
0..1
ExtensionList
Optional extension, specific to deployment.
Table 87 -- Complex type IndividualTransfer
IndividualTransferResult
Table 88
Name
Cardinality
Format
Description
transferId
1
CorrelationId
Identifies messages related to the same /transfers sequence.
fulfilment
0..1
IlpFulfilment
Fulfilment of the condition specified with the transaction. Note: Either fulfilment or errorInformation should be set, not both.
errorInformation
0..1
ErrorInformation
If transfer is REJECTED, error information may be provided. Note: Either fulfilment or errorInformation should be set, not both.
extensionList
0..1
ExtensionList
Optional extension, specific to deployment.
Table 88 -- Complex type IndividualTransferResult
GeoCode
Table 89
Name
Cardinality
Format
Description
latitude
1
Latitude
Latitude of the Party.
longitude
1
Longitude
Longitude of the Party.
Table 89 -- Complex type GeoCode
Money
Table 90
Name
Cardinality
Format
Description
currency
1
Currency
Currency of the amount.
amount
1
Amount
Amount of money.
Table 90 -- Complex type Money
Party
Table 91
Name
Cardinality
Format
Description
partyIdInfo
1
PartyIdInfo
Party Id type, id, sub ID or type, and FSP Id.
merchantClassificationCode
0..1
MerchantClassificationCode
Used in the context of Payee Information, where the Payee happens to be a merchant accepting merchant payments.
name
0..1
PartyName
Display name of the Party, could be a real name or a nick name.
personalInfo
0..1
PartyPersonalInfo
Personal information used to verify identity of Party such as first, middle, last name and date of birth.
Table 91 -- Complex type Party
PartyComplexName
Table 92
Name
Cardinality
Format
Description
firstName
0..1
FirstName
Party's first name.
middleName
0..1
MiddleName
Party's middle name.
lastName
0..1
LastName
Party's last name.
Table 92 -- Complex type PartyComplexName
PartyIdInfo
Table 93
Name
Cardinality
Format
Description
partyIdType
1
PartyIdType
Type of the identifier.
partyIdentifier
1
PartyIdentifier
An identifier for the Party.
partySubIdOrType
0..1
PartySubIdOrType
A sub-identifier or sub-type for the Party.
fspId
0..1
FspId
FSP ID (if know)
extensionList
0..1
ExtensionList
Optional extension, specific to deployment.
Table 93 -- Complex type PartyIdInfo
PartyPersonalInfo
Table 94
Name
Cardinality
Format
Description
complexName
0..1
PartyComplexName
First, middle and last name for the Party.
dateOfBirth
0..1
DateOfBirth
Date of birth for the Party.
Table 94 -- Complex type PartyPersonalInfo
PartyResult
Table 95
Name
Cardinality
Format
Description
partyId
1
PartyIdInfo
Party Id type, id, sub ID or type, and FSP Id.
errorInformation
0..1
ErrorInformation
If the Party failed to be added, error information should be provided. Otherwise, this parameter should be empty to indicate success.
Table 95 -- Complex type PartyResult
Refund
Table 96
Name
Cardinality
Format
Description
originalTransactionId
1
CorrelationId
Reference to the original transaction ID that is requested to be refunded.
refundReason
0..1
RefundReason
Free text indicating the reason for the refund.
Table 96 -- Complex type Refund
Transaction
Table 97
Name
Cardinality
Format
Description
transactionId
1
CorrelationId
ID of the transaction, the ID is decided by the Payer FSP during the creation of the quote.
quoteId
1
CorrelationId
ID of the quote, the ID is decided by the Payer FSP during the creation of the quote.
payee
1
Party
Information about the Payee in the proposed financial transaction.
payer
1
Party
Information about the Payer in the proposed financial transaction.
amount
1
Money
Transaction amount to be sent.
transactionType
1
TransactionType
Type of the transaction.
note
0..1
Note
Memo associated to the transaction, intended to the Payee.
extensionList
0..1
ExtensionList
Optional extension, specific to deployment.
Table 97 -- Complex type Transaction
TransactionType
Table 98
Name
Cardinality
Format
Description
scenario
1
TransactionScenario
Deposit, withdrawal, refund, ...
subScenario
0..1
TransactionSubScenario
Possible sub-scenario, defined locally within the scheme.
initiator
1
TransactionInitiator
Who is initiating the transaction: Payer or Payee
initiatorType
1
TransactionInitiatorType
Consumer, agent, business, ...
refundInfo
0..1
Refund
Extra information specific to a refund scenario. Should only be populated if scenario is REFUND.
balanceOfPayments
0..1
BalanceOfPayments
Balance of Payments code.
Table 98 -- Complex type TransactionType
Enumerations
This section contains the enumerations that are used by the API.
AmountType enum
Table 99
Name
Description
SEND
Amount the Payer would like to send; that is, the amount that should be withdrawn from the Payer account including any fees.
RECEIVE
Amount the Payer would like the Payee to receive; that is, the amount that should be sent to the receiver exclusive fees.
Table 99 -- Enumeration AmountType
AuthenticationType enum
Table 100
Name
Description
OTP
One-time password generated by the Payer FSP.
QRCODE
QR code used as One Time Password.
Table 100 -- Enumeration AuthenticationType
AuthorizationResponse enum
Table 101
Name
Description
ENTERED
Consumer entered the authentication value.
REJECTED
Consumer rejected the transaction.
RESEND
Consumer requested to resend the authentication value.
Table 101 -- Enumeration AuthorizationResponse
BulkTransferState enum
Table 102
Name
Description
RECEIVED
Payee FSP has received the bulk transfer from the Payer FSP.
PENDING
Payee FSP has validated the bulk transfer.
ACCEPTED
Payee FSP has accepted the bulk transfer for processing.
PROCESSING
Payee FSP has started to transfer fund to the Payees.
COMPLETED
Payee FSP has completed transfer of funds to the Payees.
REJECTED
Payee FSP has rejected processing the bulk transfer.
Table 102 -- Enumeration BulkTransferState
CurrencyCode enum
The currency codes defined in ISO 421736 as three-letter alphabetic codes are used as the standard naming representation for currencies. The currency codes from ISO 4217 are not shown in this document, implementers are instead encouraged to use the information provided by the ISO 4217 standard directly.
PartyIdType enum
Table 103
Name
Description
MSISDN
An MSISDN (Mobile Station International Subscriber Directory Number; that is, a phone number) is used in reference to a Party. The MSISDN identifier should be in international format according to the ITU-T E.16437 standard. Optionally, the MSISDN may be prefixed by a single plus sign, indicating the international prefix.
An email is used in reference to a Party. The format of the email should be according to the informational RFC 369638.
PERSONAL_ID
BUSINESS
DEVICE
ACCOUNT_ID
A bank account number or FSP account ID should be used in reference to a participant. The ACCOUNT_ID identifier can be in any format, as formats can greatly differ depending on country and FSP.
IBAN
A bank account number or FSP account ID is used in reference to a participant. The IBAN identifier can consist of up to 34 alphanumeric characters and should be entered without whitespace.
ALIAS
Table 103 -- Enumeration PartyIdType
PersonalIdentifierType enum
Table 104
Name
Description
PASSPORT
A passport number is used in reference to a Party.
NATIONAL_REGISTRATION
A national registration number is used in reference to a Party.
DRIVING_LICENSE
A driving license is used in reference to a Party.
ALIEN_REGISTRATION
An alien registration number is used in reference to a Party.
NATIONAL_ID_CARD
A national ID card number is used in reference to a Party.
EMPLOYER_ID
A tax identification number is used in reference to a Party.
TAX_ID_NUMBER
A tax identification number is used in reference to a Party.
SENIOR_CITIZENS_CARD
A senior citizens card number is used in reference to a Party.
MARRIAGE_CERTIFICATE
A marriage certificate number is used in reference to a Party.
HEALTH_CARD
A health card number is used in reference to a Party.
VOTERS_ID
A voter’s identification number is used in reference to a Party.
UNITED_NATIONS
An UN (United Nations) number is used in reference to a Party.
OTHER_ID
Any other type of identification type number is used in reference to a Party.
Table 104 -- Enumeration PersonalIdentifierType
TransactionInitiator
Table 105
Name
Description
PAYER
Sender of funds is initiating the transaction. The account to send from is either owned by the Payer or is connected to the Payer in some way.
PAYEE
Recipient of the funds is initiating the transaction by sending a transaction request. The Payer must approve the transaction, either automatically by a pre-generated OTP or by pre-approval of the Payee, or manually by approving on their own Device.
Table 105 -- Enumeration TransactionInitiator
TransactionInitiatorType
Table 106
Name
Description
**CONSUMER **
Consumer is the initiator of the transaction.
AGENT
Agent is the initiator of the transaction.
BUSINESS
Business is the initiator of the transaction.
DEVICE
Device is the initiator of the transaction.
Table 106 -- Enumeration TransactionInitiatorType
TransactionRequestState
Table 107
Name
Description
RECEIVED
Payer FSP has received the transaction from the Payee FSP.
PENDING
Payer FSP has sent the transaction request to the Payer.
ACCEPTED
Payer has approved the transaction.
REJECTED
Payer has rejected the transaction.
Table 107 -- Enumeration TransactionRequestState
TransactionScenario
Table 108
Name
Description
DEPOSIT
Used for performing a Cash-In (deposit) transaction. In a normal scenario, electronic funds are transferred from a Business account to a Consumer account, and physical cash is given from the Consumer to the Business User.
WITHDRAWAL
Used for performing a Cash-Out (withdrawal) transaction. In a normal scenario, electronic funds are transferred from a Consumer’s account to a Business account, and physical cash is given from the Business User to the Consumer.
TRANSFER
Used for performing a P2P (Peer to Peer, or Consumer to Consumer) transaction.
PAYMENT
Usually used for performing a transaction from a Consumer to a Merchant or Organization, but could also be for a B2B (Business to Business) payment. The transaction could be online for a purchase in an Internet store, in a physical store where both the Consumer and Business User are present, a bill payment, a donation, and so on.
REFUND
Used for performing a refund of transaction.
Table 108 -- Enumeration TransactionScenario
TransactionState
Table 109
Name
Description
RECEIVED
Payee FSP has received the transaction from the Payer FSP.
PENDING
Payee FSP has validated the transaction.
COMPLETED
Payee FSP has successfully performed the transaction.
REJECTED
Payee FSP has failed to perform the transaction.
Table 109 -- Enumeration TransactionState
TransferState
Table 110
Name
Description
RECEIVED
Next ledger has received the transfer.
RESERVED
Next ledger has reserved the transfer.
COMMITTED
Next ledger has successfully performed the transfer.
ABORTED
Next ledger has aborted the transfer due a rejection or failure to perform the transfer.
Table 110 -- Enumeration TransferState
Error Codes
Figure 63
Figure 63 -- Error code structure
Each defined high- and low-level category combination contains a generic error (x0xx), which can be used if there is no specific error, or if the server would not like to return information which is considered private.
All specific errors below xx40; that is, xx00 to xx39, are reserved for future use by the API. All specific errors above and including xx40 can be used for scheme-specific errors. If a client receives an unknown scheme-specific error, the unknown scheme-specific error should be interpreted as a generic error for the high- and low-level category combination instead (xx00).
Communication Errors -- 1_xxx_
All possible communication or network errors that could arise that cannot be represented by an HTTP status code should use the high-level error code 1 (error codes 1xxx). Because all services in the API are asynchronous, these error codes should generally be used by a Switch in the Callback to the client FSP if the Peer FSP cannot be reached, or when a callback is not received from the Peer FSP within an agreed timeout.
Low level categories defined under Communication Errors:
Generic Communication Error -- 10xx
Table 111
Error Code
Name
Description
/participants
/parties
/transactionRequests
/quotes
/authorizations
/transfers
/transactions
/bulkQuotes
/bulkTransfers
1000
Communication error
Generic communication error.
X
X
X
X
X
X
X
X
X
1001
Destination communication error
Destination of the request failed to be reached. This usually indicates that a Peer FSP failed to respond from an intermediate entity.
X
X
X
X
X
X
X
X
X
Table 111 -- Communication errors -- 1_xxx_
Server Errors -- 2_xxx_
All possible errors occurring on the server in which it failed to fulfil an apparently valid request from the client should use the high-level error code 2 (error codes 2xxx). These error codes should indicate that the server is aware that it has encountered an error or is otherwise incapable of performing the requested service.
Low-level categories defined under server errors:
Generic server error -- 20xx
Table 112
Error Code
Name
Description
/participants
/parties
/transactionRequests
/quotes
/authorizations
/transfers
/transactions
/bulkQuotes
/bulkTransfers
2000
Generic server error
Generic server error to be used in order not to disclose information that may be considered private.
X
X
X
X
X
X
X
X
X
2001
Internal server error
Generic unexpected exception. This usually indicates a bug or unhandled error case.
X
X
X
X
X
X
X
X
X
2002
Not implemented
Service requested is not supported by the server.
X
X
X
X
X
X
X
X
X
2003
Service currently unavailable
Service requested is currently unavailable on the server. This could be because maintenance is taking place, or because of a temporary failure.
X
X
X
X
X
X
X
X
X
2004
Server timed out
Timeout has occurred, meaning the next Party in the chain did not send a callback in time. This could be because a timeout is set too low or because something took longer than expected.
X
X
X
X
X
X
X
X
X
2005
Server busy
Server is rejecting requests due to overloading. Try again later.
X
X
X
X
X
X
X
X
X
Table 112 -- Server errors -- 2_xxx_
Client Errors -- 3_xxx_
All possible errors occurring on the server in which the server reports that the client has sent one or more erroneous parameters should use the high-level error code 3 (error codes 3xxx). These error codes should indicate that the server could not perform the service according to the request from the client. The server should provide an explanation why the service could not be performed.
Low level categories defined under client Errors:
Generic Client Error -- 30xx
Validation Error -- 31xx
Identifier Error -- 32xx
Expired Error -- 33xx
Table 113
Error Code
Name
Description
/participants
/parties
/transactionRequests
/quotes
/authorizations
/transfers
/transactions
/bulkQuotes
/bulkTransfers
3000
Generic client error
Generic client error, used in order not to disclose information that may be considered private.
X
X
X
X
X
X
X
X
X
3001
Unacceptable version requested
Client requested to use a protocol version which is not supported by the server.
X
X
X
X
X
X
X
X
X
3002
Unknown URI
Provided URI was unknown to the server.
X
X
X
X
X
X
X
X
X
3003
Add Party information error
Error occurred while adding or updating information regarding a Party.
X
X
X
X
X
X
X
X
X
Table 113 -- Generic client errors -- 30_xx_
Table 114
Error Code
Name
Description
/participants
/parties
/transactionRequests
/quotes
/authorizations
/transfers
/transactions
/bulkQuotes
/bulkTransfers
3100
Generic validation error
Generic validation error to be used in order not to disclose information that may be considered private.
X
X
X
X
X
X
X
X
X
3101
Malformed syntax
Format of the parameter is not valid. For example, amount set to 5.ABC. The error description field should specify which information element is erroneous.
X
X
X
X
X
X
X
X
X
3102
Missing mandatory element
Mandatory element in the data model was missing.
X
X
X
X
X
X
X
X
X
3103
Too many elements
Number of elements of an array exceeds the maximum number allowed.
X
X
X
X
X
X
X
X
X
3104
Too large payload
Size of the payload exceeds the maximum size.
X
X
X
X
X
X
X
X
X
3105
Invalid signature
Some parameters have changed in the message, making the signature invalid. This may indicate that the message may have been modified maliciously.
X
X
X
X
X
X
X
X
X
3106
Modified request
Request with the same ID has previously been processed in which the parameters are not the same.
X
X
X
X
X
X
X
3107
Missing mandatory extension parameter
Scheme-mandatory extension parameter was missing.
X
X
X
X
X
X
X
Table 114 -- Validation errors -- 31_xx_
Table 115
Error Code
Name
Description
/participants
/parties
/transactionRequests
/quotes
/authorizations
/transfers
/transactions
/bulkQuotes
/bulkTransfers
3200
Generic ID not found
Generic ID error provided by the client.
X
X
X
X
X
X
X
X
X
3201
Destination FSP Error
Destination FSP does not exist or cannot be found.
X
X
X
X
X
X
X
X
X
3202
Payer FSP ID not found
Provided Payer FSP ID not found.
X
X
3203
Payee FSP ID not found
Provided Payee FSP ID not found.
X
X
3204
Party not found
Party with the provided identifier, identifier type, and optional sub id or type was not found.
X
X
X
X
3205
Quote ID not found
Provided Quote ID was not found on the server.
X
X
3206
Transaction request ID not found
Provided Transaction Request ID was not found on the server.
X
X
3207
Transaction ID not found
Provided Transaction ID was not found on the server.
X
3208
Transfer ID not found
Provided Transfer ID was not found on the server.
X
3209
Bulk quote ID not found
Provided Bulk Quote ID was not found on the server.
X
X
3210
Bulk transfer ID not found
Provided Bulk Transfer ID was not found on the server.
X
Table 115 -- Identifier errors -- 32_xx_
Table 116
Error Code
Name
Description
/participants
/parties
/transactionRequests
/quotes
/authorizations
/transfers
/transactions
/bulkQuotes
/bulkTransfers
3300
Generic expired error
Generic expired object error, to be used in order not to disclose information that may be considered private.
X
X
X
X
X
X
X
X
X
3301
Transaction request expired
Client requested to use a transaction request that has already expired.
X
3302
Quote expired
Client requested to use a quote that has already expired.
X
X
X
3303
Transfer expired
Client requested to use a transfer that has already expired.
X
X
X
X
X
X
X
X
X
Table 116 -- Expired errors -- 33_xx_
Payer Errors -- 4_xxx_
All errors occurring on the server for which the Payer or the Payer FSP is the cause of the error should use the high-level error code 4 (error codes 4xxx). These error codes indicate that there was no error on the server or in the request from the client, but the request failed for a reason related to the Payer or the Payer FSP. The server should provide an explanation why the service could not be performed.
Low level categories defined under Payer Errors:
Generic Payer Error -- 40xx
Payer Rejection Error -- 41xx
Payer Limit Error -- 42xx
Payer Permission Error -- 43xx
Payer Blocked Error -- 44xx
Table 117
Error Code
Name
Description
/participants
/parties
/transactionRequests
/quotes
/authorizations
/transfers
/transactions
/bulkQuotes
/bulkTransfers
4000
Generic Payer error
Generic error related to the Payer or Payer FSP. Used for protecting information that may be considered private.
X
X
X
X
X
X
X
4001
Payer FSP insufficient liquidity
Payer FSP has insufficient liquidity to perform the transfer.
X
4100
Generic Payer rejection
Payer or Payer FSP rejected the request.
X
X
X
X
X
X
X
4101
Payer rejected transaction request
Payer rejected the transaction request from the Payee.
X
4102
Payer FSP unsupported transaction type
Payer FSP does not support or rejected the requested transaction type
X
4103
Payer unsupported currency
Payer does not have an account which supports the requested currency.
X
4200
Payer limit error
Generic limit error, for example, the Payer is making more payments per day or per month than they are allowed to, or is making a payment which is larger than the allowed maximum per transaction.
X
X
X
X
X
4300
Payer permission error
Generic permission error, the Payer or Payer FSP does not have the access rights to perform the service.
X
X
X
X
X
X
X
4400
Generic Payer blocked error
Generic Payer blocked error; the Payer is blocked or has failed regulatory screenings.
X
X
X
X
X
X
X
Table 117 -- Payer errors -- 4_xxx_
Payee Errors -- 5_xxx_
All errors occurring on the server for which the Payee or the Payee FSP is the cause of an error use the high-level error code 5 (error codes 5xxx). These error codes indicate that there was no error on the server or in the request from the client, but the request failed for a reason related to the Payee or the Payee FSP. The server should provide an explanation why the service could not be performed.
Low level categories defined under Payee Errors:
Generic Payee Error -- 50xx
Payee Rejection Error -- 51xx
Payee Limit Error -- 52xx
Payee Permission Error -- 53xx
Payee Blocked Error -- 54xx
Table 118
Error Code
Name
Description
/participants
/parties
/transactionRequests
/quotes
/authorizations
/transfers
/transactions
/bulkQuotes
/bulkTransfers
5000
Generic Payee error
Generic error due to the Payer or Payer FSP, to be used in order not to disclose information that may be considered private.
X
X
X
X
X
X
X
5001
Payee FSP insufficient liquidity
Payee FSP has insufficient liquidity to perform the transfer.
X
5100
Generic Payee rejection
Payee or Payee FSP rejected the request.
X
X
X
X
X
X
X
5101
Payee rejected quote
Payee does not want to proceed with the financial transaction after receiving a quote.
X
X
5102
Payee FSP unsupported transaction type
Payee FSP does not support or has rejected the requested transaction type
X
X
5103
Payee FSP rejected quote
Payee FSP does not want to proceed with the financial transaction after receiving a quote.
X
X
5104
Payee rejected transaction
Payee rejected the financial transaction.
X
X
5105
Payee FSP rejected transaction
Payee FSP rejected the financial transaction.
X
X
5106
Payee unsupported currency
Payee does not have an account that supports the requested currency.
X
X
X
X
5200
Payee limit error
Generic limit error, for example, the Payee is receiving more payments per day or per month than they are allowed to, or is receiving a payment that is larger than the allowed maximum per transaction.
X
X
X
X
X
5300
Payee permission error
Generic permission error, the Payee or Payee FSP does not have the access rights to perform the service.
X
X
X
X
X
X
X
5400
Generic Payee blocked error
Generic Payee Blocked error, the Payee is blocked or has failed regulatory screenings.
X
X
X
X
X
X
X
Table 118 -- Payee errors -- 5_xxx_
Generic Transaction Patterns Binding
Payer Initiated Transaction
Figure 64
Figure 64 -- Payer Initiated Transaction pattern using the asynchronous REST binding
Payee Initiated Transaction
Figure 65
Figure 65 -- Payee Initiated Transaction pattern using the asynchronous REST binding
Payee Initiated Transaction using OTP
Figure 66
Figure 66 -- Payee Initiated Transaction using OTP pattern using the asynchronous REST binding
Bulk Transactions
Figure 67
Figure 67 -- Bulk Transactions pattern using the asynchronous REST binding
API Error Handling
This section describes how to handle missing responses or callbacks, as well as how to handle errors in a server during processing of a request.
Erroneous Request
Error in Server During Processing of Request
Figure 68
Figure 68 -- Error on server during processing of request
Internal Processing Steps
The client would like the server to create a new service object and thus uses a POST request.
The client receives the error callback and immediately responds with OK. The client then handles the error.
The server receives the OK response and the process is completed.
Client Handling on Error Callback
The following sections explain how a client handles error callbacks from a server.
API Resource /participants
The typical error from the /participants service is that the requested Party could not be found. The client could either try another server, or notify the end user that the requested Party could not be found.
API Resource /parties
The typical error from the /parties service is that the requested Party could not be found. The client could either try another server, or notify the end user that information regarding the requested Party could not be found.
API Resource /quotes
The typical error from the /quotes service is that a quote could not be calculated for the requested transaction. The client should notify the end user that the requested transaction could not be performed.
API Resource /transactionRequests
The typical error from the /transactionRequests service is that the Payer rejected the transaction or that an automatic validation failed. The client should notify the Payee that the transaction request failed.
API Resource /authorizations
The typical error from the /authorizations service is that the transaction request could not be found. The client should notify the Payer that the transaction request has been cancelled.
API Resource /transfers
Figure 69
Figure 69 -- Handling of error callback from POST /transfers
Internal Processing Steps
API Resource /transactions
The normal error case from the /transactions service is that the transaction could not be found in the Peer FSP.
API Resource /bulkQuotes
The typical error from the /bulkQuotes service is that a quote could not be calculated for the requested transaction. The client should notify the end user that the requested transaction could not be performed.
API Resource /bulkTransfers
Figure 70
Figure 70 -- Handling of error callback from API Service /bulkTransfers
Internal Processing Steps
Client Missing Response from Server - Using Resend of Request
Figure 71
Figure 71 -- Error handling from client using resend of request
Internal Processing Steps
The client would like the server to create a new service object. The HTTP request is lost somewhere on the way to the server.
The client notes that no response has been received from the server within a specified timeout. The client resends the service request.
The server receives the resent request. It immediately sends an accepted response to the client, and then creates the object in accordance with the service request.
The accepted HTTP response from the server is lost on the way to the client, and the client notes that no response has been received from the server within a specified timeout. The client resends the service request.
The client receives the callback regarding the created object. The client sends an OK HTTP response to the server to complete the process.
The server receives the OK HTTP response from the client, completing the process.
Server Missing Response from Client
A server using the API is not responsible for making sure that a callback is properly delivered to a client. However, it is considered good practice to retry if the server does not receive an OK response from the client.
Client Missing Callback - Using GET request
Figure 72
Figure 72 -- Error handling from client using GET request
Internal Processing Steps
The client would like the server to create a new service object; a service request is sent.
The server receives the service request. It immediately sends an accepted response to the client, and then creates the object based on the service request. The object creation is a long running process; for example, a bulk transfer consisting of numerous financial transactions.
The server notes that no callback has been received from the client within a reasonable time. The client uses a GET service request with the ID that was provided in the original service request.
The server receives the GET service request. The server sends an accepted HTTP response to the client to notify that the request will be handled.
The client receives the accepted HTTP response and waits for the callback, which arrives sometime later; the client sends an OK HTTP response and the process is completed.
The server sends the callback to the client containing the requested information, and an OK HTTP response is received from the client, which completes the process.
End-to-End Example
Example Setup
This section explains the setup of the example.
Nodes
Figure 73
Figure 73 -- Nodes in end-to-end example
Account Holders
The account holders in the example are:
One account holder in the FSP BankNrOne named Mats Hagman. Mats Hagman has a bank account with IBAN number SE4550000000058398257466. The currency of the account is USD.
One account holder in the FSP MobileMoney named Henrik Karlsson. Henrik Karlsson has a mobile money account that is identified by his phone number 123456789. The currency of the account is USD.
Scenario
Other Notes
The JSON messages used in the examples are formatted with color coding, indentations, and line breaks for very long lines to simplify the read of the examples.
Both FSPs are assumed to have a pre-funded Switch account in their respective FSPs.
End-to-End Flow
Figure 74
Figure 74 -- End-to-end flow, from provision of account holder FSP information to a successful transaction
Provision Account Holder
FSP MobileMoney Provisions Henrik Karlsson: Step 1 in End-to-End Flow
Listing 29
Listing 29 -- Provision FSP information for account holder Henrik Karlsson
Listing 30
Listing 30 -- Synchronous response on provision request
Switch Handles Provision: Step 2 in End-to-End Flow
After the Switch has verified the request correctly, the information that the account holder identified by MSISDN and 123456789 is located in FSP MobileMoney should be stored in the Switch's database.
Switch Sends Successful Callback: Step 3 in End-to-End Flow
Listing 31
Listing 31 -- Callback for the earlier requested provision service
Listing 32
Listing 32 -- Synchronous response for the callback
P2P Transfer
Initiate Use Case: Step 4 in End-to-End Flow
Mats Hagman knows that Henrik Karlsson has phone number 123456789, so he inputs that number on his device as recipient and 100 USD as amount. The actual communication between Mats' device and his bank BankNrOne is out of scope for this API.
Request Party Information from Switch: Step 5 in End-to-End Flow
Listing 33
Listing 33 -- Get Party information for account identified by MSISDN and 123456789 from FSP BankNrOne
Listing 34
Listing 34 -- Synchronous response on the request for Party information
Request Party Information from FSP: Step 6 in End-to-End Flow
Listing 35
Listing 35 -- Get Party information for account identified by MSISDN and 123456789 from Switch
Listing 36
Listing 36 -- Synchronous response on request for Party information
Lookup Party Information in FSP MobileMoney: Step 7 in End-to-End Flow
Listing 37
Listing 37 -- Callback to the request for Party information
Listing 38
Listing 38 -- Synchronous response for the Party information callback
Send Callback to FSP BankNrOne: Step 8 in End-to-End Flow
Send Quote Request from FSP BankNrOne: Step 9 in End-to-End Flow
Listing 39
Listing 39 -- Request quote for transaction of 100 USD
Listing 40
Listing 40 -- Synchronous response on quote request
Send Quote Request from Switch: Step 10 in End-to-End Flow**
Determine fees and FSP commission in FSP MobileMoney: Step 11 in End-to-End Flow
Listing 41
Listing 41 -- The Transaction JSON object
Listing 42
Listing 42 -- Generated secret, encoded in base64url
Listing 43
Listing 43 -- Calculated fulfilment from the ILP Packet and secret, encoded in base64url
Listing 44
Listing 44 -- Calculated condition from the fulfilment, encoded in base64url
Listing 45
Listing 45 -- Quote callback
Listing 46
Listing 46 -- Synchronous response on the quote callback
Send Callback to FSP BankNrOne: Step 12 in End-to-End Flow
Determine fees in FSP BankNrOne: Step 13 in End-to-End Flow
The FSP BankNrOne then notifies Mats Hagman that the transaction to transfer 100 USD to Henrik Karlsson will cost 0 USD in fees. How Mats Hagman is notified is out of scope of this API.
Payer Accepts Transaction: Step 14 in End-to-End Flow
In this example, Mats Hagman accepts to perform the transaction. How the acceptance is sent is outside the scope of this API.
Send Transfer Request from FSP BankNrOne: Step 15 in End-to-End Flow
Listing 47
Listing 47 -- Request to transfer from FSP BankNrOne to FSP MobileMoney
Listing 48
Listing 48 -- Synchronous response on transfer request
Send Transfer Request from Switch: Step 16 in End-to-End Flow
Listing 49
Listing 49 -- Request to transfer from FSP BankNrOne to FSP MobileMoney with decreased expiration
Perform Transfer in FSP MobileMoney: Step 17 in End-to-End Flow
At the same time, a notification is sent to the Payee Henrik Karlsson to say that he has received 100 USD from Mats Hagman.
How the notification is sent is out of scope for this API.
Listing 50
Listing 50 -- Callback for the transfer request
Listing 51
Listing 51 -- Synchronous response on the transfers callback
Payee Receives Transaction Notification: Step 18 in End-to-End Flow
The Payee Henrik Karlsson receives the transaction notification, and is thereby informed of the successful transaction.
Perform Transfer in Switch: Step 19 in End-to-End Flow
The validation of the fulfilment is done by calculating the SHA-256 hash of the fulfilment and ensuring that the hash is equal to the condition from the transfer request.
Perform Transfer in FSP BankNrOne: Step 20 in End-to-End Flow
After the reserved transfer has been performed, the Payer Mats Hagman should be notified of the successful transaction. How the notification is sent is outside the scope of this API.
Payer Receives Transaction Notification: Step 21 in End-to-End Flow
The Payer Mats Hagman receives the transaction notification and is thereby informed of the successful transaction.
Last updated
Was this helpful?