This is an automated email from the ASF dual-hosted git repository.

conradsp pushed a commit to branch marta-jankovics-mojaloop-fineract_1.0
in repository https://gitbox.apache.org/repos/asf/fineract.git

commit 066f9f5c049a008a80efe908d57c38277e30540e
Author: Marti <marta.jankov...@dpc.hu>
AuthorDate: Fri Mar 8 12:03:32 2019 +0100

    interoperable - config, build
---
 .../json/bulkTransactions_post_sync_response.json  |   7 +
 .../json/bulkTransactions_put_async_response.json  |  28 +++
 .../json/bulk_payer_post_request.json              |  60 +++++++
 .../json/merchant_payer_post_request.json          |  46 +++++
 .../specification/json/p2p_payee_post_request.json |  42 +++++
 .../specification/json/p2p_payer_post_request.json |  42 +++++
 .../payee_quote_notification_post_request.json     |  53 ++++++
 .../payer_quote_notification_post_request.json     |  57 ++++++
 .../payer_request_notification_post_request.json   |  39 ++++
 .../json/transactions_post_sync_response.json      |   7 +
 .../json/transactions_put_async_response.json      |  16 ++
 .../main/resources/META-INF/spring/appContext.xml  |  14 +-
 .../sql/migrations/core_db/V346__interop_init.sql  |  83 +++++++++
 .../list_db/V1__mifos-platform-shared-tenants.sql  |   2 +
 .../migrations/sample_data/interop_sample_data.sql | 200 +++++++++++++++++++++
 .../sample_data/tn03_interop_sample_data.sql       |  80 +++++++++
 .../sample_data/tn04_interop_sample_data.sql       |  80 +++++++++
 17 files changed, 848 insertions(+), 8 deletions(-)

diff --git 
a/docs/interoperation/specification/json/bulkTransactions_post_sync_response.json
 
b/docs/interoperation/specification/json/bulkTransactions_post_sync_response.json
new file mode 100644
index 0000000..1bb95ab
--- /dev/null
+++ 
b/docs/interoperation/specification/json/bulkTransactions_post_sync_response.json
@@ -0,0 +1,7 @@
+//Request URI:
+//POST paymenthub-schema:// 
payment-hub-domain:payment-hub-port/channel/bulkTransactions
+
+//Response Body:
+{
+  "bulkTransactionId": "11436b17-c690-4a30-8505-42a2c4eafb9d" // mandatory, 
UUID String(36) 
^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
+}
diff --git 
a/docs/interoperation/specification/json/bulkTransactions_put_async_response.json
 
b/docs/interoperation/specification/json/bulkTransactions_put_async_response.json
new file mode 100644
index 0000000..c6899d7
--- /dev/null
+++ 
b/docs/interoperation/specification/json/bulkTransactions_put_async_response.json
@@ -0,0 +1,28 @@
+//Request URI:
+//POST paymenthub-schema:// 
payment-hub-domain:payment-hub-port/channel/bulkTransactions
+//GET paymenthub-schema:// 
payment-hub-domain:payment-hub-port/channel/bulkTransactions/11436b17-c690-4a30-8505-42a2c4eafb9d
+
+//Response URI:
+//PUT 
<FSPIOP-Callback>/interoperation/bulkTransactions/11436b17-c690-4a30-8505-42a2c4eafb9d
+
+//Header:
+//X-Tenant-Identifier: T111
+
+//Response Body:
+{
+  "clientRefId": "0f4f8eb4-1d83-11e9-ab14-d663bd873d93", // String(1..36)
+  "completedTimestamp": "2017-11-16T04:15:35.513+01:00", // optional, ISO 8601
+  "bulkTransferState": "COMPLETED", // mandatory, Enum of String(1..32): 
RECEIVED, PENDING, ACCEPTED, PROCESSING, COMPLETED, REJECTED
+  "individualTransferResults": [ // mandatory, (1..1000)
+    {
+      "transferId": "11436b17-c690-4a30-8505-42a2c4eafb9d", // mandatory, UUID 
String(36) 
^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
+      "completedTimestamp": "2017-11-16T04:15:35.513+01:00", // optional, ISO 
8601
+      "transferState": "COMMITTED"// mandatory, Enum of String(1..32): 
RECEIVED, RESERVED, COMMITTED, ABORTED
+    },
+    {
+      "transferId": "11436b17-c690-4a30-8505-42a2c4eafb9d", // mandatory, UUID 
String(36) 
^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
+      "completedTimestamp": "2017-11-16T04:15:35.513+01:00", // optional, ISO 
8601
+      "transferState": "COMMITTED"// mandatory, Enum of String(1..32): 
RECEIVED, RESERVED, COMMITTED, ABORTED
+    }
+  ]
+}
diff --git 
a/docs/interoperation/specification/json/bulk_payer_post_request.json 
b/docs/interoperation/specification/json/bulk_payer_post_request.json
new file mode 100644
index 0000000..9cfcc9d
--- /dev/null
+++ b/docs/interoperation/specification/json/bulk_payer_post_request.json
@@ -0,0 +1,60 @@
+//Request URI:
+//POST paymenthub-schema:// 
payment-hub-domain:payment-hub-port/channel/bulkTransactions
+// HTTP/1.1
+
+//Request Header:
+//Accept: application/vnd.interoperability.quotes+json;version=1
+//Content-Type: application/vnd.interoperability.quotes+json;version=1.0
+//Content-Length: 975
+//Date: Tue, 15 Nov 2017 10: 13:40 GMT
+//Origin: http://www.example.com
+//X-Tenant-Identifier: T111
+
+//Request Body:
+{
+  "clientRefId": "0f4f8eb4-1d83-11e9-ab14-d663bd873d93", // String(1..36)
+  "payer": { // mandatory
+    "partyIdInfo": { // mandatory
+      "partyIdType": "IBAN", // mandatory, constant, type: Enum of 
String(1..32): MSISDN, EMAIL, PERSONAL_ID, BUSINESS, DEVICE, ACCOUNT_ID, IBAN, 
ALIAS
+      "partyIdentifier": "IN93116000060000000012345676", // mandatory, 
String(1..128)
+      "partySubIdOrType": "something" // optional, String(1..128)
+    }
+  },
+  "amountType": "RECEIVE", // mandatory, constant, type: Enum of 
String(1..32): SEND, RECEIVE
+  "individualTransfers": [ // mandatory, (1..1000)
+    {
+      "payee": { // mandatory
+        "partyIdInfo": { // mandatory
+          "partyIdType": "IBAN", // mandatory, constant, type: Enum of 
String(1..32): MSISDN, EMAIL, PERSONAL_ID, BUSINESS, DEVICE, ACCOUNT_ID, IBAN, 
ALIAS
+          "partyIdentifier": "IN93116000060000000012345671", // mandatory, 
String(1..128)
+          "partySubIdOrType": "nothing", // optional, String(1..128)
+        }
+      },
+      "amount": { // mandatory
+        "amount": "100", // mandatory, Number(22, 4) 
^([0]|([1-9][0-9]{0,17}))([.][0-9]{0,3}[1-9])?$
+        "currency": "IDR" // mandatory, ISO 4217 (Rupee)
+      }
+    },
+    {
+      "payee": { // mandatory
+        "partyIdInfo": { // mandatory
+          "partyIdType": "IBAN", // mandatory, constant, type: Enum of 
String(1..32): MSISDN, EMAIL, PERSONAL_ID, BUSINESS, DEVICE, ACCOUNT_ID, IBAN, 
ALIAS
+          "partyIdentifier": "IN93116000060000000012345672", // mandatory, 
String(1..128)
+          "partySubIdOrType": "nothing", // optional, String(1..128)
+        }
+      },
+      "amount": { // mandatory
+        "amount": "100", // mandatory, Number(22, 4) 
^([0]|([1-9][0-9]{0,17}))([.][0-9]{0,3}[1-9])?$
+        "currency": "IDR" // mandatory, ISO 4217 (Rupee)
+      }
+    }
+  ],
+  "transactionType": { // mandatory
+    "scenario": "TRANSFER", // mandatory, constant, type: Enum of 
String(1..32): DEPOSIT, WITHDRAWAL, TRANSFER, PAYMENT, REFUND
+    "initiator": "PAYER", // mandatory, constant, type: Enum of String(1..32): 
PAYER, PAYEE
+    "initiatorType": "CONSUMER" // mandatory, constant, type: Enum of 
String(1..32): CONSUMER, AGENT, BUSINESS, DEVICE
+  },
+  "note": "From Mats", // optional, String(1..128)
+  "expiration": "2017-11-15T22:17:28.985-01:00" // optional, ISO 8601
+}
+
diff --git 
a/docs/interoperation/specification/json/merchant_payer_post_request.json 
b/docs/interoperation/specification/json/merchant_payer_post_request.json
new file mode 100644
index 0000000..ce5c20b
--- /dev/null
+++ b/docs/interoperation/specification/json/merchant_payer_post_request.json
@@ -0,0 +1,46 @@
+//Request URI:
+//POST paymenthub-schema:// 
payment-hub-domain:payment-hub-port/channel/transactions
+// HTTP/1.1
+
+//Request Header:
+//Accept: application/vnd.interoperability.quotes+json;version=1
+//Content-Type: application/vnd.interoperability.quotes+json;version=1.0
+//Content-Length: 975
+//Date: Tue, 15 Nov 2017 10: 13:40 GMT
+//Origin: http://www.example.com
+//FSPIOP-Callback: http://www.client-server.com/demo
+//FSPIOP-Notification: http://www.client-server.com/demo
+//X-Tenant-Identifier: T111
+
+//Request Body:
+{
+  "clientRefId": "0f4f8eb4-1d83-11e9-ab14-d663bd873d93", // String(1..36)
+  "payee": { // mandatory
+    "partyIdInfo": { // mandatory
+      "partyIdType": "IBAN", // mandatory, constant, type: Enum of 
String(1..32): MSISDN, EMAIL, PERSONAL_ID, BUSINESS, DEVICE, ACCOUNT_ID, IBAN, 
ALIAS
+      "partyIdentifier": "IN93116000060000000012345676", // mandatory, 
String(1..128)
+      "partySubIdOrType": "something" // optional, String(1..128)
+    },
+    "merchantClassificationCode": "" // optional, String(1..4 digits)
+  },
+  "payer": { // mandatory
+    "partyIdInfo": { // mandatory
+      "partyIdType": "IBAN", // mandatory, constant, type: Enum of 
String(1..32): MSISDN, EMAIL, PERSONAL_ID, BUSINESS, DEVICE, ACCOUNT_ID, IBAN, 
ALIAS
+      "partyIdentifier": "IN4550000000058398257466", // mandatory, 
String(1..128)
+      "partySubIdOrType": "nothing", // optional, String(1..128)
+      "fspId": "BankNrOne" // optional, String(1..32)
+    }
+  },
+  "amountType": "RECEIVE", // mandatory, constant, type: Enum of 
String(1..32): SEND, RECEIVE
+  "amount": { // mandatory
+    "amount": "100", // mandatory, Number(22, 4) 
^([0]|([1-9][0-9]{0,17}))([.][0-9]{0,3}[1-9])?$
+    "currency": "IDR" // mandatory, ISO 4217 (Rupee)
+  },
+  "transactionType": { // mandatory
+    "scenario": "PAYMENT", // mandatory, constant, type: Enum of 
String(1..32): DEPOSIT, WITHDRAWAL, TRANSFER, PAYMENT, REFUND
+    "initiator": "PAYER", // mandatory, constant, type: Enum of String(1..32): 
PAYER, PAYEE
+    "initiatorType": "CONSUMER" // mandatory, constant, type: Enum of 
String(1..32): CONSUMER, AGENT, BUSINESS, DEVICE
+  },
+  "note": "From Mats", // optional, String(1..128)
+  "expiration": "2017-11-15T22:17:28.985-01:00" // optional, ISO 8601
+}
diff --git a/docs/interoperation/specification/json/p2p_payee_post_request.json 
b/docs/interoperation/specification/json/p2p_payee_post_request.json
new file mode 100644
index 0000000..84a96a7
--- /dev/null
+++ b/docs/interoperation/specification/json/p2p_payee_post_request.json
@@ -0,0 +1,42 @@
+//Request URI:
+//POST paymenthub-schema:// 
payment-hub-domain:payment-hub-port/channel/transactions
+// HTTP/1.1
+
+//Request Header:
+//Accept: application/vnd.interoperability.quotes+json;version=1
+//Content-Type: application/vnd.interoperability.quotes+json;version=1.0
+//Content-Length: 975
+//Date: Tue, 15 Nov 2017 10: 13:40 GMT
+//Origin: http://www.example.com
+//X-Tenant-Identifier: T111
+
+//Request Body:
+{
+  "clientRefId": "0f4f8eb4-1d83-11e9-ab14-d663bd873d93", // String(1..36)
+  "payee": { // mandatory
+    "partyIdInfo": { // mandatory
+      "partyIdType": "IBAN", // mandatory, constant, type: Enum of 
String(1..32): MSISDN, EMAIL, PERSONAL_ID, BUSINESS, DEVICE, ACCOUNT_ID, IBAN, 
ALIAS
+      "partyIdentifier": "IN93116000060000000012345676", // mandatory, 
String(1..128)
+      "partySubIdOrType": "something" // optional, String(1..128)
+    }
+  },
+  "payer": { // mandatory
+    "partyIdInfo": { // mandatory
+      "partyIdType": "MSISDN", // mandatory, constant, type: Enum of 
String(1..32): MSISDN, EMAIL, PERSONAL_ID, BUSINESS, DEVICE, ACCOUNT_ID, IBAN, 
ALIAS
+      "partyIdentifier": "+12345678901", // mandatory, String(1..128)
+      "partySubIdOrType": "nothing", // optional, String(1..128)
+    }
+  },
+  "amountType": "SEND", // mandatory, constant, type: Enum of String(1..32): 
SEND, RECEIVE
+  "amount": { // mandatory
+    "amount": "100", // mandatory, Number(22, 4) 
^([0]|([1-9][0-9]{0,17}))([.][0-9]{0,3}[1-9])?$
+    "currency": "IDR" // mandatory, ISO 4217 (Rupee)
+  },
+  "transactionType": { // mandatory
+    "scenario": "TRANSFER", // mandatory, constant, type: Enum of 
String(1..32): DEPOSIT, WITHDRAWAL, TRANSFER, PAYMENT, REFUND
+    "initiator": "PAYEE", // mandatory, constant, type: Enum of String(1..32): 
PAYER, PAYEE
+    "initiatorType": "CONSUMER" // mandatory, constant, type: Enum of 
String(1..32): CONSUMER, AGENT, BUSINESS, DEVICE
+  },
+  "note": "From Mats", // optional, String(1..128)
+  "expiration": "2017-11-15T22:17:28.985-01:00" // optional, ISO 8601
+}
diff --git a/docs/interoperation/specification/json/p2p_payer_post_request.json 
b/docs/interoperation/specification/json/p2p_payer_post_request.json
new file mode 100644
index 0000000..848211d
--- /dev/null
+++ b/docs/interoperation/specification/json/p2p_payer_post_request.json
@@ -0,0 +1,42 @@
+//Request URI:
+//POST paymenthub-schema:// 
payment-hub-domain:payment-hub-port/channel/transactions
+// HTTP/1.1
+
+//Request Header:
+//Accept: application/vnd.interoperability.quotes+json;version=1
+//Content-Type: application/vnd.interoperability.quotes+json;version=1.0
+//Content-Length: 975
+//Date: Tue, 15 Nov 2017 10: 13:40 GMT
+//Origin: http://www.example.com
+//X-Tenant-Identifier: T111
+
+//Request Body:
+{
+  "clientRefId": "0f4f8eb4-1d83-11e9-ab14-d663bd873d93", // String(1..36)
+  "payee": { // mandatory
+    "partyIdInfo": { // mandatory
+      "partyIdType": "MSISDN", // mandatory, constant, type: Enum of 
String(1..32): MSISDN, EMAIL, PERSONAL_ID, BUSINESS, DEVICE, ACCOUNT_ID, IBAN, 
ALIAS
+      "partyIdentifier": "+12345678901", // mandatory, String(1..128)
+      "partySubIdOrType": "nothing", // optional, String(1..128)
+    }
+  },
+  "payer": { // mandatory
+    "partyIdInfo": { // mandatory
+      "partyIdType": "IBAN", // mandatory, constant, type: Enum of 
String(1..32): MSISDN, EMAIL, PERSONAL_ID, BUSINESS, DEVICE, ACCOUNT_ID, IBAN, 
ALIAS
+      "partyIdentifier": "IN93116000060000000012345676", // mandatory, 
String(1..128)
+      "partySubIdOrType": "something" // optional, String(1..128)
+    }
+  },
+  "amountType": "SEND", // mandatory, constant, type: Enum of String(1..32): 
SEND, RECEIVE
+  "amount": { // mandatory
+    "amount": "100", // mandatory, Number(22, 4) 
^([0]|([1-9][0-9]{0,17}))([.][0-9]{0,3}[1-9])?$
+    "currency": "IDR" // mandatory, ISO 4217 (Rupee)
+  },
+  "transactionType": { // mandatory
+    "scenario": "TRANSFER", // mandatory, constant, type: Enum of 
String(1..32): DEPOSIT, WITHDRAWAL, TRANSFER, PAYMENT, REFUND
+    "initiator": "PAYER", // mandatory, constant, type: Enum of String(1..32): 
PAYER, PAYEE
+    "initiatorType": "CONSUMER" // mandatory, constant, type: Enum of 
String(1..32): CONSUMER, AGENT, BUSINESS, DEVICE
+  },
+  "note": "From Mats", // optional, String(1..128)
+  "expiration": "2017-11-15T22:17:28.985-01:00" // optional, ISO 8601
+}
diff --git 
a/docs/interoperation/specification/json/payee_quote_notification_post_request.json
 
b/docs/interoperation/specification/json/payee_quote_notification_post_request.json
new file mode 100644
index 0000000..142166a
--- /dev/null
+++ 
b/docs/interoperation/specification/json/payee_quote_notification_post_request.json
@@ -0,0 +1,53 @@
+//Request URI:
+//POST <FSPIOP-Notification>/channel/quotes/notification
+//HTTP/1.1
+//X-Tenant-Identifier: T111
+
+//Request Body:
+{
+  "clientRefId": "0f4f8eb4-1d83-11e9-ab14-d663bd873d93", // String(1..36)
+  "transactionId": "11436b17-c690-4a30-8505-42a2c4eafb9d", // mandatory, UUID 
String(36) 
^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
+  "requestId": "18e43330-187e-11e9-ab14-d663bd873d93", // optional, UUID 
String(36) 
^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
+  "quoteId": "61058cea-187e-11e9-ab14-d663bd873d93", // mandatory, UUID 
String(36) 
^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
+  "payee": { // mandatory
+    "partyIdInfo": { // mandatory
+      "partyIdType": "MSISDN", // mandatory, constant, type: Enum of 
String(1..32): MSISDN, EMAIL, PERSONAL_ID, BUSINESS, DEVICE, ACCOUNT_ID, IBAN, 
ALIAS
+      "partyIdentifier": "12345678901", // mandatory, String(1..128)
+      "partySubIdOrType": "nothing", // optional, String(1..128)
+      "fspId": "BankNrOne" // optional, String(1..32)
+    }
+  },
+  "payer": { // mandatory
+    "partyIdInfo": { // mandatory
+      "partyIdType": "IBAN", // mandatory, constant, type: Enum of 
String(1..32): MSISDN, EMAIL, PERSONAL_ID, BUSINESS, DEVICE, ACCOUNT_ID, IBAN, 
ALIAS
+      "partyIdentifier": "IN93116000060000000012345676", // mandatory, 
String(1..128)
+      "partySubIdOrType": "something" // optional, String(1..128)
+    },
+    "name": "" // optional, String(1..128) ^(?!\s*$)[\w .,'-]{1,128}$
+  },
+  "amountType": "SEND", // mandatory, constant, type: Enum of String(1..32): 
SEND, RECEIVE
+  "amount": {
+    "amount": "100",
+    "currency": "USD"
+  },
+  "transferAmount": {
+    "amount": "99",
+    "currency": "USD"
+  },
+  "fspFee": { // optional
+    "amount": "1", // mandatory, Number(22, 4) 
^([0]|([1-9][0-9]{0,17}))([.][0-9]{0,3}[1-9])?$
+    "currency": "IDR" // mandatory, ISO 4217 (Rupee)
+  },
+  "fspCommission": { // optional
+    "amount": "0", // mandatory, Number(22, 4) 
^([0]|([1-9][0-9]{0,17}))([.][0-9]{0,3}[1-9])?$
+    "currency": "IDR" // mandatory, ISO 4217 (Rupee)
+  },
+  "transactionRole": "PAYEE",
+  "transactionType": { // mandatory
+    "scenario": "TRANSFER", // mandatory, constant, type: Enum of 
String(1..32): DEPOSIT, WITHDRAWAL, TRANSFER, PAYMENT, REFUND
+    "initiator": "PAYER", // mandatory, constant, type: Enum of String(1..32): 
PAYER, PAYEE
+    "initiatorType": "CONSUMER" // mandatory, constant, type: Enum of 
String(1..32): CONSUMER, AGENT, BUSINESS, DEVICE
+  },
+  "note": "From Mats", // optional, String(1..128)
+  "expiration": "2017-11-15T22:17:28.985-01:00" // optional, ISO 8601
+}
diff --git 
a/docs/interoperation/specification/json/payer_quote_notification_post_request.json
 
b/docs/interoperation/specification/json/payer_quote_notification_post_request.json
new file mode 100644
index 0000000..6b02094
--- /dev/null
+++ 
b/docs/interoperation/specification/json/payer_quote_notification_post_request.json
@@ -0,0 +1,57 @@
+//Request URI:
+//POST <FSPIOP-Notification>/channel/quotes/notification
+// HTTP/1.1
+//X-Tenant-Identifier: T111
+
+//Request Body:
+{
+  "clientRefId": "0f4f8eb4-1d83-11e9-ab14-d663bd873d93", // String(1..36)
+  "transactionId": "11436b17-c690-4a30-8505-42a2c4eafb9d", // mandatory, UUID 
String(36) 
^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
+  "requestId": "18e43330-187e-11e9-ab14-d663bd873d93", // optional, UUID 
String(36) 
^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
+  "quoteId": "61058cea-187e-11e9-ab14-d663bd873d93", // mandatory, UUID 
String(36) 
^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
+  "payee": { // mandatory
+    "partyIdInfo": { // mandatory
+      "partyIdType": "MSISDN", // mandatory, constant, type: Enum of 
String(1..32): MSISDN, EMAIL, PERSONAL_ID, BUSINESS, DEVICE, ACCOUNT_ID, IBAN, 
ALIAS
+      "partyIdentifier": "+12345678901", // mandatory, String(1..128)
+      "partySubIdOrType": "nothing", // optional, String(1..128)
+      "fspId": "BankNrOne" // optional, String(1..32)
+    },
+    "name": "" // optional, String(1..128) ^(?!\s*$)[\w .,'-]{1,128}$
+  },
+  "payer": { // mandatory
+    "partyIdInfo": { // mandatory
+      "partyIdType": "IBAN", // mandatory, constant, type: Enum of 
String(1..32): MSISDN, EMAIL, PERSONAL_ID, BUSINESS, DEVICE, ACCOUNT_ID, IBAN, 
ALIAS
+      "partyIdentifier": "IN93116000060000000012345676", // mandatory, 
String(1..128)
+      "partySubIdOrType": "something" // optional, String(1..128)
+    }
+  },
+  "amountType": "SEND", // mandatory, constant, type: Enum of String(1..32): 
SEND, RECEIVE
+  "amount": { // mandatory
+    "amount": "100", // mandatory, Number(22, 4) 
^([0]|([1-9][0-9]{0,17}))([.][0-9]{0,3}[1-9])?$
+    "currency": "IDR" // mandatory, ISO 4217 (Rupee)
+  },
+  "transferAmount": {
+    "amount": "99",
+    "currency": "USD"
+  },
+  "payeeReceiveAmount": {
+    "amount": "100",
+    "currency": "USD"
+  },
+  "fspFee": { // optional
+    "amount": "1", // mandatory, Number(22, 4) 
^([0]|([1-9][0-9]{0,17}))([.][0-9]{0,3}[1-9])?$
+    "currency": "IDR" // mandatory, ISO 4217 (Rupee)
+  },
+  "fspCommission": { // optional
+    "amount": "0", // mandatory, Number(22, 4) 
^([0]|([1-9][0-9]{0,17}))([.][0-9]{0,3}[1-9])?$
+    "currency": "IDR" // mandatory, ISO 4217 (Rupee)
+  },
+  "transactionRole": "PAYER",
+  "transactionType": { // mandatory
+    "scenario": "TRANSFER", // mandatory, constant, type: Enum of 
String(1..32): DEPOSIT, WITHDRAWAL, TRANSFER, PAYMENT, REFUND
+    "initiator": "PAYEE", // mandatory, constant, type: Enum of String(1..32): 
PAYER, PAYEE
+    "initiatorType": "CONSUMER" // mandatory, constant, type: Enum of 
String(1..32): CONSUMER, AGENT, BUSINESS, DEVICE
+  },
+  "note": "From Mats", // optional, String(1..128)
+  "expiration": "2017-11-15T22:17:28.985-01:00" // optional, ISO 8601
+}
diff --git 
a/docs/interoperation/specification/json/payer_request_notification_post_request.json
 
b/docs/interoperation/specification/json/payer_request_notification_post_request.json
new file mode 100644
index 0000000..3a8d2ad
--- /dev/null
+++ 
b/docs/interoperation/specification/json/payer_request_notification_post_request.json
@@ -0,0 +1,39 @@
+//Request URI:
+//POST <FSPIOP-Notification>/channel/transactions/{transactionId}/notification
+// HTTP/1.1
+//X-Tenant-Identifier: T111
+
+//Request Body:
+{
+  "clientRefId": "0f4f8eb4-1d83-11e9-ab14-d663bd873d93", // String(1..36)
+  "transactionId": "11436b17-c690-4a30-8505-42a2c4eafb9d", // mandatory, UUID 
String(36) 
^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
+  "requestId": "18e43330-187e-11e9-ab14-d663bd873d93", // mandatory, UUID 
String(36) 
^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
+  "payee": { // mandatory
+    "partyIdInfo": { // mandatory
+      "partyIdType": "MSISDN", // mandatory, constant, type: Enum of 
String(1..32): MSISDN, EMAIL, PERSONAL_ID, BUSINESS, DEVICE, ACCOUNT_ID, IBAN, 
ALIAS
+      "partyIdentifier": "+12345678901", // mandatory, String(1..128)
+      "partySubIdOrType": "nothing", // optional, String(1..128)
+      "fspId": "BankNrOne" // optional, String(1..32)
+    },
+    "name": "" // optional, String(1..128) ^(?!\s*$)[\w .,'-]{1,128}$
+  },
+  "payer": { // mandatory
+    "partyIdInfo": { // mandatory
+      "partyIdType": "IBAN", // mandatory, constant, type: Enum of 
String(1..32): MSISDN, EMAIL, PERSONAL_ID, BUSINESS, DEVICE, ACCOUNT_ID, IBAN, 
ALIAS
+      "partyIdentifier": "IN93116000060000000012345676", // mandatory, 
String(1..128)
+      "partySubIdOrType": "something" // optional, String(1..128)
+    }
+  },
+  "amountType": "SEND", // mandatory, constant, type: Enum of String(1..32): 
SEND, RECEIVE
+  "amount": { // mandatory
+    "amount": "100", // mandatory, Number(22, 4) 
^([0]|([1-9][0-9]{0,17}))([.][0-9]{0,3}[1-9])?$
+    "currency": "IDR" // mandatory, ISO 4217 (Rupee)
+  },
+  "transactionType": { // mandatory
+    "scenario": "TRANSFER", // mandatory, constant, type: Enum of 
String(1..32): DEPOSIT, WITHDRAWAL, TRANSFER, PAYMENT, REFUND
+    "initiator": "PAYEE", // mandatory, constant, type: Enum of String(1..32): 
PAYER, PAYEE
+    "initiatorType": "CONSUMER" // mandatory, constant, type: Enum of 
String(1..32): CONSUMER, AGENT, BUSINESS, DEVICE
+  },
+  "note": "From Mats", // optional, String(1..128)
+  "expiration": "2017-11-15T22:17:28.985-01:00" // optional, ISO 8601
+}
diff --git 
a/docs/interoperation/specification/json/transactions_post_sync_response.json 
b/docs/interoperation/specification/json/transactions_post_sync_response.json
new file mode 100644
index 0000000..c9a89f9
--- /dev/null
+++ 
b/docs/interoperation/specification/json/transactions_post_sync_response.json
@@ -0,0 +1,7 @@
+//Request URI:
+//POST paymenthub-schema:// 
payment-hub-domain:payment-hub-port/channel/transactions
+
+//Response Body:
+{
+  "transactionId": "11436b17-c690-4a30-8505-42a2c4eafb9d" // mandatory, UUID 
String(36) 
^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
+}
diff --git 
a/docs/interoperation/specification/json/transactions_put_async_response.json 
b/docs/interoperation/specification/json/transactions_put_async_response.json
new file mode 100644
index 0000000..3ddc178
--- /dev/null
+++ 
b/docs/interoperation/specification/json/transactions_put_async_response.json
@@ -0,0 +1,16 @@
+//Request URI:
+//POST paymenthub-schema:// 
payment-hub-domain:payment-hub-port/channel/transactions
+//GET paymenthub-schema:// 
payment-hub-domain:payment-hub-port/channel/transactions/11436b17-c690-4a30-8505-42a2c4eafb9d
+
+//Response URI:
+//PUT 
<FSPIOP-Callback>/interoperation/transactions/11436b17-c690-4a30-8505-42a2c4eafb9d
+
+//Header:
+//X-Tenant-Identifier: T111
+
+//Response Body:
+{
+  "clientRefId": "0f4f8eb4-1d83-11e9-ab14-d663bd873d93", // String(1..36)
+  "completedTimestamp": "2017-11-16T04:15:35.513+01:00", // optional, ISO 8601
+  "transferState": "COMMITTED" // mandatory, Enum of String(1..32): RECEIVED, 
RESERVED, COMMITTED, ABORTED
+}
diff --git 
a/fineract-provider/src/main/resources/META-INF/spring/appContext.xml 
b/fineract-provider/src/main/resources/META-INF/spring/appContext.xml
index a2631aa..f3d0701 100644
--- a/fineract-provider/src/main/resources/META-INF/spring/appContext.xml
+++ b/fineract-provider/src/main/resources/META-INF/spring/appContext.xml
@@ -47,11 +47,12 @@
                                                                                
  org.apache.fineract.infrastructure.*,
                                                                                
  org.apache.fineract.scheduledjobs.*,
                                                                                
  org.apache.fineract.organisation.*,
+                                                                               
  org.apache.fineract.interoperation.*,
                                                                                
  org.apache.fineract.portfolio.loanaccount.*,
                                                                                
  org.apache.fineract.portfolio.savingsaccount.*,
                                                                                
  org.apache.fineract.portfolio.*,
                                                                                
  org.apache.fineract.useradministration.*,
-                                                                               
  org.apache.fineract.mix.*, 
+                                                                               
  org.apache.fineract.mix.*,
                                                                                
  org.apache.fineract.notification.*,
                                                                                
  org.apache.fineract.template.*,
                                                                                
  org.apache.fineract.template.service.*,
@@ -72,6 +73,7 @@
 
        <bean id="auditorAware"
                
class="org.apache.fineract.infrastructure.core.domain.AuditorAwareImpl" />
+
        <jpa:auditing auditor-aware-ref="auditorAware" />
        <jpa:repositories base-package="org.apache.fineract.commands.domain" />
        <jpa:repositories 
base-package="org.apache.fineract.infrastructure.*.domain" />
@@ -86,12 +88,11 @@
        <jpa:repositories base-package="org.apache.fineract.adhocquery.domain" 
/>
        <jpa:repositories 
base-package="org.apache.fineract.notification.domain"/>
        <jpa:repositories 
base-package="org.apache.fineract.infrastructure.campaigns.email.domain"/>
-       
-       
-       <import resource="infrastructure.xml" />
+       <jpa:repositories 
base-package="org.apache.fineract.interoperation.domain"/>
 
-       <import resource="securityContext.xml" />
 
+       <import resource="infrastructure.xml" />
+       <import resource="securityContext.xml" />
        <import resource="cache.xml" />
 
        <bean id="applicationEventMulticaster" 
class="org.springframework.context.event.SimpleApplicationEventMulticaster">
@@ -101,8 +102,5 @@
        </bean>
 
        <import resource="spmContext.xml"/>
-
        <import resource="swagger.xml"/>
-
-
 </beans>
diff --git 
a/fineract-provider/src/main/resources/sql/migrations/core_db/V346__interop_init.sql
 
b/fineract-provider/src/main/resources/sql/migrations/core_db/V346__interop_init.sql
new file mode 100644
index 0000000..c2b4e5f
--- /dev/null
+++ 
b/fineract-provider/src/main/resources/sql/migrations/core_db/V346__interop_init.sql
@@ -0,0 +1,83 @@
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements. See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership. The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License. You may obtain a copy of the License at
+--
+-- http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing,
+-- software distributed under the License is distributed on an
+-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+-- KIND, either express or implied. See the License for the
+-- specific language governing permissions and limitations
+-- under the License.
+--
+
+DROP TABLE IF EXISTS `interop_identifier`;
+CREATE TABLE `interop_identifier` (
+       `id`                BIGINT(20)   NOT NULL AUTO_INCREMENT,
+       `account_id`        BIGINT(20)   NOT NULL,
+       `type`              VARCHAR(32)  NOT NULL,
+       `a_value`           VARCHAR(128) NOT NULL,
+       `sub_value_or_type` VARCHAR(128) NULL,
+       `created_by`        VARCHAR(32)  NOT NULL,
+       `created_on`        TIMESTAMP    NOT NULL,
+       `modified_by`       VARCHAR(32)  NULL,
+       `modified_on`       TIMESTAMP    NULL,
+       PRIMARY KEY (`id`),
+       UNIQUE INDEX `uk_interop_identifier_account` (`account_id`, `type`),
+       UNIQUE INDEX `uk_interop_identifier_value` (`type`, `a_value`, 
`sub_value_or_type`),
+       INDEX `fk_interop_identifier_account` (`account_id`),
+       CONSTRAINT `fk_interop_identifier_account` FOREIGN KEY (`account_id`) 
REFERENCES `m_savings_account` (`id`)
+)
+       COLLATE = 'utf8_general_ci'
+       ENGINE = InnoDB;
+
+-- user+roles
+
+SET @interop_username = 'interopUser';
+INSERT INTO `m_appuser`
+VALUES (NULL, 0, 1, NULL, @interop_username, 'Interop', 'User', 
'5787039480429368bf94732aacc771cd0a3ea02bcf504ffe1185ab94213bc63a',
+                                                       'em...@email.com', 
b'0', b'1', b'1', b'1', b'1', CURDATE(), 0, b'0');
+
+INSERT INTO `m_appuser_role` VALUES ((SELECT id FROM m_appuser WHERE username 
= @interop_username), 1);
+
+-- Interoperation permissions
+
+INSERT INTO m_permission (grouping, code, entity_name, action_name, 
can_maker_checker)
+VALUES ('interop', 'READ_INTERID', 'INTERID', 'READ', 0);
+INSERT INTO m_permission (grouping, code, entity_name, action_name, 
can_maker_checker)
+VALUES ('interop', 'READ_INTERREQUEST', 'INTERREQUEST', 'READ', 0);
+INSERT INTO m_permission (grouping, code, entity_name, action_name, 
can_maker_checker)
+VALUES ('interop', 'READ_INTERQUOTE', 'INTERQUOTE', 'READ', 0);
+INSERT INTO m_permission (grouping, code, entity_name, action_name, 
can_maker_checker)
+VALUES ('interop', 'READ_INTERTRANSFER', 'INTERTRANSFER', 'READ', 0);
+
+INSERT INTO m_permission (grouping, code, entity_name, action_name, 
can_maker_checker)
+VALUES ('interop', 'PREPARE_INTERTRANSFER', 'INTERTRANSFER', 'PREPARE', 0);
+
+INSERT INTO m_permission (grouping, code, entity_name, action_name, 
can_maker_checker)
+VALUES ('interop', 'CREATE_INTERID', 'INTERID', 'CREATE', 0);
+INSERT INTO m_permission (grouping, code, entity_name, action_name, 
can_maker_checker)
+VALUES ('interop', 'CREATE_INTERREQUEST', 'INTERREQUEST', 'CREATE', 0);
+INSERT INTO m_permission (grouping, code, entity_name, action_name, 
can_maker_checker)
+VALUES ('interop', 'CREATE_INTERQUOTE', 'INTERQUOTE', 'CREATE', 0);
+INSERT INTO m_permission (grouping, code, entity_name, action_name, 
can_maker_checker)
+VALUES ('interop', 'CREATE_INTERTRANSFER', 'INTERTRANSFER', 'CREATE', 0);
+
+INSERT INTO m_permission (grouping, code, entity_name, action_name, 
can_maker_checker)
+VALUES ('interop', 'DELETE_INTERID', 'INTERID', 'DELETE', 0);
+
+
+INSERT IGNORE INTO m_code (code_name, is_system_defined) VALUES 
('PaymentType', 1);
+
+SET @code_id = -1;
+SELECT id INTO @code_id FROM m_code WHERE code_name = 'PaymentType';
+
+INSERT IGNORE INTO m_code_value (code_id, code_value, order_position) VALUES 
(@code_id, 'Money Transfer', 1);
+
+INSERT IGNORE INTO m_payment_type (value, description, order_position) VALUES 
('Money Transfer', 'Money Transfer', 1);
\ No newline at end of file
diff --git 
a/fineract-provider/src/main/resources/sql/migrations/list_db/V1__mifos-platform-shared-tenants.sql
 
b/fineract-provider/src/main/resources/sql/migrations/list_db/V1__mifos-platform-shared-tenants.sql
index eb7c9c2..e9e36f6 100644
--- 
a/fineract-provider/src/main/resources/sql/migrations/list_db/V1__mifos-platform-shared-tenants.sql
+++ 
b/fineract-provider/src/main/resources/sql/migrations/list_db/V1__mifos-platform-shared-tenants.sql
@@ -67,6 +67,8 @@ CREATE TABLE `tenants` (
 LOCK TABLES `tenants` WRITE;
 /*!40000 ALTER TABLE `tenants` DISABLE KEYS */;
 INSERT INTO `tenants` VALUES (1,'default','Default Demo 
Tenant','mifostenant-default','Asia/Kolkata',NULL,NULL,NULL,NULL,'localhost','3306','root','mysql',1);
+INSERT INTO `tenants` VALUES 
(2,'tn03','Rhino','tn03','Africa/Bujumbura',NULL,NULL,NULL,NULL,'localhost','3306','root','mysql',1);
+INSERT INTO `tenants` VALUES 
(3,'tn04','Elephant','tn04','Africa/Bujumbura',NULL,NULL,NULL,NULL,'localhost','3306','root','mysql',1);
 /*!40000 ALTER TABLE `tenants` ENABLE KEYS */;
 UNLOCK TABLES;
 
diff --git 
a/fineract-provider/src/main/resources/sql/migrations/sample_data/interop_sample_data.sql
 
b/fineract-provider/src/main/resources/sql/migrations/sample_data/interop_sample_data.sql
new file mode 100644
index 0000000..430b515
--- /dev/null
+++ 
b/fineract-provider/src/main/resources/sql/migrations/sample_data/interop_sample_data.sql
@@ -0,0 +1,200 @@
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements. See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership. The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License. You may obtain a copy of the License at
+--
+-- http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing,
+-- software distributed under the License is distributed on an
+-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+-- KIND, either express or implied. See the License for the
+-- specific language governing permissions and limitations
+-- under the License.
+--
+
+-- To use: Change saving_account_no before every run!
+-- !both tn03, tn04 tenants
+
+-- saving product, account
+SET @last_saving_prod_id = -1;
+SELECT COALESCE(max(id), 1) into @last_saving_prod_id from m_savings_product;
+
+SET @saving_prod_name = concat('Saving Product', @last_saving_prod_id);
+
+INSERT INTO `m_savings_product`
+(`name`, `short_name`, `description`, `deposit_type_enum`, `currency_code`, 
`currency_digits`,
+ `currency_multiplesof`, `nominal_annual_interest_rate`, 
`interest_compounding_period_enum`,
+ `interest_posting_period_enum`, `interest_calculation_type_enum`, 
`interest_calculation_days_in_year_type_enum`,
+ `min_required_opening_balance`, `accounting_type`, `withdrawal_fee_amount`, 
`withdrawal_fee_type_enum`,
+ `withdrawal_fee_for_transfer`, `allow_overdraft`, `min_required_balance`, 
`enforce_min_required_balance`,
+ `min_balance_for_interest_calculation`, `withhold_tax`, `tax_group_id`, 
`is_dormancy_tracking_active`)
+VALUES (@saving_prod_name, concat('SP', @last_saving_prod_id), 'Saving 
Product', 100, 'TZS', 2, NULL, 0.000000, 1,
+                           4, 1, 360, NULL, 2, NULL, NULL, 0, 0, 0.000000, 1, 
NULL, 0, NULL, 0);
+
+SET @saving_prod_id = -1;
+SELECT id INTO @saving_prod_id FROM m_savings_product WHERE name = 
@saving_prod_name;
+
+-- interop_identifier
+
+-- charge, mapping
+-- gl_account, mappings
+-- ASSET-1, LIABILITY-2, EQUITY-3, INCOME-4, EXPENSE-5
+
+SET @payment_type_id = -1;
+SELECT id INTO @payment_type_id FROM m_payment_type WHERE value = 'Money 
Transfer';
+
+SET @saving_gl_name = 'Interoperation Saving';
+INSERT INTO `acc_gl_account` (`name`, `parent_id`, `hierarchy`, `gl_code`, 
`disabled`, `manual_journal_entries_allowed`, `account_usage`, 
`classification_enum`, `description`)
+VALUES (@saving_gl_name, NULL, NULL, 'Interop_Saving', 0, 1, 1, 1, 
'Interoperation Saving Asset'); -- account_usage: DETAIL, classification_enum: 
ASSET
+
+INSERT INTO `acc_product_mapping` (`gl_account_id`, `product_id`, 
`product_type`, `payment_type`, `charge_id`, `financial_account_type`)
+VALUES ((SELECT id FROM acc_gl_account WHERE name = @saving_gl_name), 
@saving_prod_id, 2, @payment_type_id, NULL, 1); -- product_type: SAVING, 
financial_account_type: ASSET
+
+SET @nostro_gl_name = 'Interoperation NOSTRO';
+INSERT INTO `acc_gl_account` (`name`, `parent_id`, `hierarchy`, `gl_code`, 
`disabled`, `manual_journal_entries_allowed`, `account_usage`, 
`classification_enum`, `description`)
+VALUES (@nostro_gl_name, NULL, NULL, 'Interop_Nostro', 0, 0, 1, 2, 
'Interoperation NOSTRO Liability'); -- account_usage: DETAIL, 
classification_enum: LIABILITY
+
+INSERT INTO `acc_product_mapping` (`gl_account_id`, `product_id`, 
`product_type`, `payment_type`, `charge_id`, `financial_account_type`)
+VALUES ((SELECT id FROM acc_gl_account WHERE name = @nostro_gl_name), 
@saving_prod_id, 2, NULL, NULL, 2); -- product_type: SAVING, 
financial_account_type: LIABILITY
+
+SET @fee_gl_name = 'Interoperation Fee';
+INSERT INTO `acc_gl_account` (`name`, `parent_id`, `hierarchy`, `gl_code`, 
`disabled`, `manual_journal_entries_allowed`, `account_usage`, 
`classification_enum`, `description`)
+VALUES (@fee_gl_name, NULL, NULL, 'Interop_Fee', 0, 0, 1, 4, 'Interoperation 
Fee Income'); -- account_usage: DETAIL, classification_enum: INCOME
+
+SET @fee_gl_id = -1;
+SELECT id INTO @fee_gl_id FROM acc_gl_account WHERE name = @fee_gl_name;
+
+INSERT INTO `acc_product_mapping` (`gl_account_id`, `product_id`, 
`product_type`, `payment_type`, `charge_id`, `financial_account_type`)
+VALUES (@fee_gl_id, @saving_prod_id, 2, NULL, NULL, 4); -- product_type: 
SAVING, financial_account_type: INCOME
+
+SET @charge_name = 'Interoperation Withdraw Fee';
+INSERT INTO `m_charge`
+(`name`,`currency_code`,`charge_applies_to_enum`,`charge_time_enum`,`charge_calculation_enum`,`charge_payment_mode_enum`,
+ 
`amount`,`fee_on_day`,`fee_interval`,`fee_on_month`,`is_penalty`,`is_active`,`is_deleted`,`min_cap`,`max_cap`,`fee_frequency`,
+ `income_or_liability_account_id`,`tax_group_id`)
+VALUES (@charge_name, 'TZS', 2, 5, 1, NULL, 1.000000, NULL, NULL, NULL, 0, 0, 
0, NULL, NULL, NULL, @fee_gl_id, NULL);
+
+-- loan product
+/*
+SET @last_ext_id = -1;
+SELECT COALESCE(max(external_id), 1) INTO @last_ext_id FROM m_product_loan;
+
+INSERT INTO `m_product_loan`
+VALUES
+(CONCAT('IP', @last_product_id), 'EUR', 2, 1, 50000.000000, NULL, NULL, NULL, 
concat('Interoperation Customer Product', @last_product_id),
+  'Demo Interoperation Product', NULL, b'0', b'0', 1.000000, 1.000000, NULL, 
NULL, 3, 1.000000, 0, 1, 1, 1, 2, 1200, NULL,
+  NULL, NULL, NULL, NULL, 1, 1, 3, @last_ext_id + 1, 0, 
0,ADDDATE(curdate(),-100),ADDDATE(curdate(),100), 0, 0, NULL, NULL,
+  NULL, 1, 30, 0, 0, 0.00, 0, 1, 0, 0, 0);
+
+SET @product_id = -1;
+SELECT id INTO @product_id FROM m_product_loan WHERE name = 
concat('Interoperation Customer Product', @last_product_id);
+
+-- charge, mapping
+INSERT INTO `m_charge` VALUES (
+  NULL, concat('Loan Withdraw Fee_', @product_id), 'TZS', 1, 2,
+        1, 0, 1.000000, NULL, NULL,
+        NULL, 0, 1, 0, NULL,
+  NULL, NULL, NULL, NULL);
+
+INSERT INTO `m_product_loan_charge` VALUES
+  (@product_id, (SELECT id
+                 FROM m_charge
+                 WHERE name = concat('Loan Withdraw Fee_', @product_id)));
+
+-- gl_account, mappings
+-- ASSET-1, LIABILITY-2, EQUITY-3, INCOME-4, EXPENSE-5
+SET @liab_acc_name = concat('Loan Payable Liability_', @product_id);
+INSERT INTO `acc_gl_account` VALUES (
+  NULL, @liab_acc_name, NULL, NULL, concat('0360009420', @product_id),
+        0, 1, 1, 1, NULL, 'Loan Payable Liability');
+
+INSERT INTO `acc_product_mapping` VALUES (
+  NULL,
+  (SELECT id
+   FROM acc_gl_account
+   WHERE name = @liab_acc_name),
+  @product_id,
+  NULL, NULL, NULL, 2);
+
+SET @nostro_acc_name = concat('Loan NOSTRO_', @product_id);
+INSERT INTO `acc_gl_account` VALUES (
+  NULL, @nostro_acc_name, NULL, NULL, concat('0360009421', @product_id),
+        0, 1, 1, 1, NULL, 'Loan NOSTRO');
+
+INSERT INTO `acc_product_mapping` VALUES (
+  NULL,
+  (SELECT id
+   FROM acc_gl_account
+   WHERE name = @nostro_acc_name),
+  @product_id,
+  NULL, NULL, NULL, 1);
+
+SET @cash_acc_name = concat('Loan Product Cash_', @product_id);
+INSERT INTO `acc_gl_account` VALUES (
+  NULL, @cash_acc_name, NULL, NULL, concat('0360009422', @product_id),
+        0, 1, 1, 1, NULL, 'Loan Product Cash');
+
+INSERT INTO `acc_product_mapping` VALUES (
+  NULL,
+  (SELECT id
+   FROM acc_gl_account
+   WHERE name = @cash_acc_name),
+  @product_id,
+  NULL, NULL, NULL, 1);
+
+SET @expen_acc_name = concat('Loan Product Expenses_', @product_id);
+INSERT INTO `acc_gl_account` VALUES (
+  NULL, @expen_acc_name, NULL, NULL, concat('0360009423', @product_id),
+        0, 1, 1, 1, NULL, 'Loan Product Expenses');
+
+INSERT INTO `acc_product_mapping` VALUES (
+  NULL,
+  (SELECT id
+   FROM acc_gl_account
+   WHERE name = @expen_acc_name),
+  @product_id,
+  NULL, NULL, NULL, 5);
+
+SET @accrue_acc_name = concat('Loan Product Accrue Liability_', @product_id);
+INSERT INTO `acc_gl_account` VALUES (
+  NULL, @accrue_acc_name, NULL, NULL, concat('0360009424', @product_id),
+        0, 1, 1, 1, NULL, 'Loan Product Accrue Liability');
+
+INSERT INTO `acc_product_mapping` VALUES (
+  NULL,
+  (SELECT id
+   FROM acc_gl_account
+   WHERE name = @accrue_acc_name),
+  @product_id,
+  NULL, NULL, NULL, 2);
+
+SET @equ_acc_name = concat('Loan Product Equity_', @product_id);
+INSERT INTO `acc_gl_account` VALUES (
+  NULL, @equ_acc_name, NULL, NULL, concat('0360009425', @product_id),
+        0, 1, 1, 1, NULL, 'Loan Product Equity');
+
+INSERT INTO `acc_product_mapping` VALUES (
+  NULL,
+  (SELECT id
+   FROM acc_gl_account
+   WHERE name = @equ_acc_name),
+  @product_id,
+  NULL, NULL, NULL, 3);
+
+SET @feer_acc_name = concat('Loan Product Fees Revenue_', @product_id);
+INSERT INTO `acc_gl_account` VALUES (
+  NULL, @feer_acc_name, NULL, NULL, concat('0360009426', @product_id),
+        0, 1, 1, 1, NULL, 'Loan Product Fees Revenue');
+
+INSERT INTO `acc_product_mapping` VALUES (
+  NULL,
+  (SELECT id
+   FROM acc_gl_account
+   WHERE name = @feer_acc_name),
+  @product_id,
+  NULL, NULL, NULL, 4);*/
\ No newline at end of file
diff --git 
a/fineract-provider/src/main/resources/sql/migrations/sample_data/tn03_interop_sample_data.sql
 
b/fineract-provider/src/main/resources/sql/migrations/sample_data/tn03_interop_sample_data.sql
new file mode 100644
index 0000000..14f3fde
--- /dev/null
+++ 
b/fineract-provider/src/main/resources/sql/migrations/sample_data/tn03_interop_sample_data.sql
@@ -0,0 +1,80 @@
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements. See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership. The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License. You may obtain a copy of the License at
+--
+-- http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing,
+-- software distributed under the License is distributed on an
+-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+-- KIND, either express or implied. See the License for the
+-- specific language governing permissions and limitations
+-- under the License.
+--
+
+-- To use: Change saving_account_no before every run!
+
+USE `tn03`;
+
+-- data initialization
+-- user+roles
+
+-- client
+SET @saving_account_no = '9062b90de19b43989005';
+
+INSERT INTO `m_client` (`account_no`, `external_id`, `status_enum`, 
`sub_status`, `activation_date`, `office_joining_date`,
+                        `office_id`, `transfer_to_office_id`, `staff_id`, 
`firstname`, `middlename`, `lastname`, `fullname`,
+                        `display_name`, `mobile_no`, `gender_cv_id`, 
`date_of_birth`, `image_id`, `closure_reason_cv_id`,
+                        `closedon_date`, `updated_by`, `updated_on`, 
`submittedon_date`, `submittedon_userid`, `activatedon_userid`,
+                        `closedon_userid`, `default_savings_product`, 
`default_savings_account`, `client_type_cv_id`, `client_classification_cv_id`,
+                        `reject_reason_cv_id`, `rejectedon_date`, 
`rejectedon_userid`, `withdraw_reason_cv_id`, `withdrawn_on_date`,
+                        `withdraw_on_userid`, `reactivated_on_date`, 
`reactivated_on_userid`, `legal_form_enum`, `reopened_on_date`,
+                        `reopened_by_userid`)
+VALUES (@saving_account_no, NULL, 300, NULL, ADDDATE(curdate(), -100), NULL, 
1, NULL, NULL, NULL, NULL, NULL,
+        'InteropCustomer', 'InteropCustomer', NULL, NULL, NULL, NULL, NULL, 
NULL, NULL, NULL, NULL, ADDDATE(curdate(), -100),
+         NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 
NULL, NULL, NULL, NULL,NULL, NULL);
+
+-- saving product, account
+SET @saving_prod_name = concat('Saving Product', @last_saving_prod_id);
+SET @saving_prod_id = -1;
+SELECT id INTO @saving_prod_id FROM m_savings_product WHERE name = 
@saving_prod_name;
+
+SET @client_id = -1;
+SELECT id INTO @client_id FROM m_client WHERE fullname = 'InteropCustomer';
+
+INSERT INTO `m_savings_account`
+(`account_no`, `external_id`, `client_id`, `group_id`, `product_id`, 
`field_officer_id`, `status_enum`,
+ `sub_status_enum`, `account_type_enum`, `deposit_type_enum`, 
`submittedon_date`, `submittedon_userid`,
+ `approvedon_date`, `approvedon_userid`, `activatedon_date`, 
`activatedon_userid`,
+ `currency_code`, `currency_digits`, `currency_multiplesof`, 
`nominal_annual_interest_rate`,
+ `interest_compounding_period_enum`, `interest_posting_period_enum`, 
`interest_calculation_type_enum`,
+ `interest_calculation_days_in_year_type_enum`, 
`min_required_opening_balance`, `withdrawal_fee_for_transfer`,
+ `allow_overdraft`, `account_balance_derived`, `min_required_balance`, 
`enforce_min_required_balance`,
+ `version`, `withhold_tax`)
+VALUES (@saving_account_no, '9062b90de19b43989005d9', @client_id, NULL, 
@saving_prod_id, NULL, 300, 0, 1, 100, ADDDATE(curdate(), -100),
+  NULL, ADDDATE(curdate(), -100), NULL, ADDDATE(curdate(), -100), NULL, 'TZS', 
2, NULL, 1.000000, 1, 4, 1, -- 29. - 4
+  360, NULL, 1, 1, 100000000.000000, 0.000000, 1, 1, 0);
+
+-- interop_identifier
+SET @saving_acc_id = -1;
+SELECT id INTO @saving_acc_id FROM m_savings_account WHERE account_no = 
@saving_account_no;
+
+INSERT INTO interop_identifier (id, account_id, type, a_value, 
sub_value_or_type, created_by, created_on, modified_by, modified_on)
+VALUES (NULL, @saving_acc_id, 'IBAN', 'IC11in02tn039062b90de19b43989005d9', 
NULL, 'operator', CURDATE(), 'operator',
+        CURDATE());
+INSERT INTO interop_identifier (id, account_id, type, a_value, 
sub_value_or_type, created_by, created_on, modified_by, modified_on)
+VALUES (NULL, @saving_acc_id, 'MSISDN', '27710203999', NULL, 'operator', 
CURDATE(), 'operator', CURDATE());
+
+-- charge, mapping
+-- gl_account, mappings
+-- ASSET-1, LIABILITY-2, EQUITY-3, INCOME-4, EXPENSE-5
+SET @charge_name = 'Interoperation Withdraw Fee';
+
+INSERT INTO `m_savings_account_charge` (`savings_account_id`, `charge_id`, 
`is_penalty`, `charge_time_enum`, `charge_calculation_enum`,
+                                        `amount`, 
`amount_outstanding_derived`,`is_paid_derived`, `waived`, `is_active`)
+VALUES (@saving_acc_id, (SELECT id FROM m_charge WHERE name = @charge_name), 
0, 5, 1, 1.000000, 0.000000, 0, 0, 1);
diff --git 
a/fineract-provider/src/main/resources/sql/migrations/sample_data/tn04_interop_sample_data.sql
 
b/fineract-provider/src/main/resources/sql/migrations/sample_data/tn04_interop_sample_data.sql
new file mode 100644
index 0000000..4135d70
--- /dev/null
+++ 
b/fineract-provider/src/main/resources/sql/migrations/sample_data/tn04_interop_sample_data.sql
@@ -0,0 +1,80 @@
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements. See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership. The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License. You may obtain a copy of the License at
+--
+-- http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing,
+-- software distributed under the License is distributed on an
+-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+-- KIND, either express or implied. See the License for the
+-- specific language governing permissions and limitations
+-- under the License.
+--
+
+-- To use: Change saving_account_no before every run!
+
+USE `tn04`;
+
+-- data initialization
+-- user+roles
+
+-- client
+SET @saving_account_no = '9062b90de19b43989005';
+
+INSERT INTO `m_client` (`account_no`, `external_id`, `status_enum`, 
`sub_status`, `activation_date`, `office_joining_date`,
+                        `office_id`, `transfer_to_office_id`, `staff_id`, 
`firstname`, `middlename`, `lastname`, `fullname`,
+                        `display_name`, `mobile_no`, `gender_cv_id`, 
`date_of_birth`, `image_id`, `closure_reason_cv_id`,
+                        `closedon_date`, `updated_by`, `updated_on`, 
`submittedon_date`, `submittedon_userid`, `activatedon_userid`,
+                        `closedon_userid`, `default_savings_product`, 
`default_savings_account`, `client_type_cv_id`, `client_classification_cv_id`,
+                        `reject_reason_cv_id`, `rejectedon_date`, 
`rejectedon_userid`, `withdraw_reason_cv_id`, `withdrawn_on_date`,
+                        `withdraw_on_userid`, `reactivated_on_date`, 
`reactivated_on_userid`, `legal_form_enum`, `reopened_on_date`,
+                        `reopened_by_userid`)
+VALUES (@saving_account_no, NULL, 300, NULL, ADDDATE(curdate(), -100), NULL, 
1, NULL, NULL, NULL, NULL, NULL,
+ 'InteropMerchant', 'InteropMerchant', NULL, NULL, NULL, NULL, NULL, NULL, 
NULL, NULL, NULL, ADDDATE(curdate(), -100),
+  NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 
NULL, NULL, NULL,NULL, NULL);
+
+-- saving product, account
+SET @saving_prod_name = concat('Saving Product', @last_saving_prod_id);
+SET @saving_prod_id = -1;
+SELECT id INTO @saving_prod_id FROM m_savings_product WHERE name = 
@saving_prod_name;
+
+SET @client_id = -1;
+SELECT id INTO @client_id FROM m_client WHERE fullname = 'InteropMerchant';
+
+INSERT INTO `m_savings_account`
+(`account_no`, `external_id`, `client_id`, `group_id`, `product_id`, 
`field_officer_id`, `status_enum`,
+ `sub_status_enum`, `account_type_enum`, `deposit_type_enum`, 
`submittedon_date`, `submittedon_userid`,
+ `approvedon_date`, `approvedon_userid`, `activatedon_date`, 
`activatedon_userid`,
+ `currency_code`, `currency_digits`, `currency_multiplesof`, 
`nominal_annual_interest_rate`,
+ `interest_compounding_period_enum`, `interest_posting_period_enum`, 
`interest_calculation_type_enum`,
+ `interest_calculation_days_in_year_type_enum`, 
`min_required_opening_balance`, `withdrawal_fee_for_transfer`,
+ `allow_overdraft`, `account_balance_derived`, `min_required_balance`, 
`enforce_min_required_balance`,
+ `version`, `withhold_tax`)
+VALUES (@saving_account_no, '9062b90de19b43989005d9', @client_id, NULL, 
@saving_prod_id, NULL, 300, 0, 1, 100, ADDDATE(curdate(), -100),
+  NULL, ADDDATE(curdate(), -100), NULL, ADDDATE(curdate(), -100), NULL, 'TZS', 
2, NULL, 1.000000, 1, 4, 1, -- 29. - 4
+  360, NULL, 1, 1, 100000000.000000, 0.000000, 1, 1, 0);
+
+-- interop_identifier
+SET @saving_acc_id = -1;
+SELECT id INTO @saving_acc_id FROM m_savings_account WHERE account_no = 
@saving_account_no;
+
+INSERT INTO interop_identifier (id, account_id, type, a_value, 
sub_value_or_type, created_by, created_on, modified_by, modified_on)
+VALUES (NULL, @saving_acc_id, 'IBAN', 'IC11in02tn049062b90de19b43989005d9', 
NULL, 'operator', CURDATE(), 'operator',
+        CURDATE());
+INSERT INTO interop_identifier (id, account_id, type, a_value, 
sub_value_or_type, created_by, created_on, modified_by, modified_on)
+VALUES (NULL, @saving_acc_id, 'MSISDN', '27710204999', NULL, 'operator', 
CURDATE(), 'operator', CURDATE());
+
+-- charge, mapping
+-- gl_account, mappings
+-- ASSET-1, LIABILITY-2, EQUITY-3, INCOME-4, EXPENSE-5
+SET @charge_name = 'Interoperation Withdraw Fee';
+
+INSERT INTO `m_savings_account_charge` (`savings_account_id`, `charge_id`, 
`is_penalty`, `charge_time_enum`, `charge_calculation_enum`,
+                                        `amount`, 
`amount_outstanding_derived`,`is_paid_derived`, `waived`, `is_active`)
+VALUES (@saving_acc_id, (SELECT id FROM m_charge WHERE name = @charge_name), 
0, 5, 1, 1.000000, 0.000000, 0, 0, 1);

Reply via email to