diff --git a/schemas/DisbursementRequest.json b/schemas/DisbursementRequest.json index c79f430..4d2886a 100644 --- a/schemas/DisbursementRequest.json +++ b/schemas/DisbursementRequest.json @@ -11,16 +11,16 @@ "description": "Unique country code. Please refer to Country Codes table", "example": "NGR" }, + "transactionId": { + "type": "string", + "description": "Unique identifier of transaction in Simbrella system", + "example": "Tr201712RK9232P115" + }, "debtId": { "type": "string", "description": "Unique identifier of a loan in Simbrella system that is going to be collected (it correlates with provision request)", "example": "273194670" }, - "transactionId": { - "type": "string", - "description": "Unique identifier of transaction in Simbrella system", - "example": "T001" - }, "customerId": { "type": "string", "description": "Unique identifier of a user", @@ -42,55 +42,83 @@ "description": "Amount of loan (including service fee) to be provided on a specific account of a user", "example": 100000.0 }, - "collectAmountInterest": { + "totalFees": { "type": "number", "format": "double", - "description": "Interest Amount to be collected immediately after loan is provided (Only for 30 days)", - "example": 5000.0 + "description": "Total amount of all fees combined", + "example": 7075 }, - "collectAmountMgtFee": { - "type": "number", - "format": "double", - "description": "Management Fee Amount to be collected immediately after loan is provided", - "example": 1000.0 - }, - "collectAmountInsurance": { - "type": "number", - "format": "double", - "description": "Insurance Amount to be collected immediately after loan is provided", - "example": 1000.0 - }, - "collectAmountVAT": { - "type": "number", - "format": "double", - "description": "VAT Amount to be collected immediately after loan is provided", - "example": 75.0 + "feesDetails": { + "type": "object", + "description": "Detailed breakdown of all fees", + "properties": { + "collectAmountInterest": { + "type": "number", + "format": "double", + "description": "Interest Amount to be collected immediately after loan is provided (Only for 30 days)", + "example": 5000 + }, + "collectAmountMgtFee": { + "type": "number", + "format": "double", + "description": "Management Fee Amount to be collected immediately after loan is provided", + "example": 1000 + }, + "collectAmountInsurance": { + "type": "number", + "format": "double", + "description": "Insurance Amount to be collected immediately after loan is provided", + "example": 1000 + }, + "collectAmountVAT": { + "type": "number", + "format": "double", + "description": "VAT Amount to be collected immediately after loan is provided", + "example": 75 + } + }, + "required": [ + "collectAmountInterest", + "collectAmountMgtFee", + "collectAmountInsurance", + "collectAmountVAT" + ] }, "countryId": { "type": "string", "description": "Set to static value '01'", "example": "01" - }, - "comment": { - "type": "string", - "description": "Any additional comment for provided loan operation", - "example": "Testing LoanRequest" } }, "required": [ "requestId", "countryCode", - "debtId", "transactionId", + "debtId", "customerId", "accountId", "productId", "provideAmount", - "collectAmountMgtFee", - "collectAmountInsurance", - "collectAmountVAT", - "countryId" + "totalFees", + "feesDetails" ], + "example": { + "requestId": "R02802", + "countryCode": "NGR", + "transactionId": "Tr201712RK9232P115", + "debtId": "273194670", + "customerId": "CN621868", + "accountId": "2017821799", + "productId": "101", + "provideAmount": 100000.0, + "totalFees": 7075, + "feesDetails": { + "collectAmountInterest": 5000, + "collectAmountMgtFee": 1000, + "collectAmountInsurance": 1000, + "collectAmountVAT": 75 + } + }, "xml": { "name": "DisbursementRequest" } diff --git a/schemas/DisbursementResponse.json b/schemas/DisbursementResponse.json index d7b8790..ad757f3 100644 --- a/schemas/DisbursementResponse.json +++ b/schemas/DisbursementResponse.json @@ -4,7 +4,7 @@ "requestId": { "type": "string", "description": "Unique identifier of request", - "example": "REQ12345" + "example": "R02802" }, "countryCode": { "type": "string", @@ -13,7 +13,7 @@ }, "transactionId": { "type": "string", - "description": "Unique identifier of transaction in Simbrella system", + "description": "Unique ID of customer’s USSD session. Must be consistent throughout whole USSD journey", "example": "Tr201712RK9232P115" }, "debtId": { @@ -42,34 +42,47 @@ "description": "Amount of loan (including service fee) to be provided on a specific account of a user", "example": 100000.0 }, - "collectAmountInterest": { + "totalFees": { "type": "number", "format": "double", - "description": "Interest Amount to be collected immediately after loan is provided (Only for 30 days)", - "example": 5000.0 + "description": "Total amount of all fees combined", + "example": 7075 }, - "collectAmountMgtFee": { - "type": "number", - "format": "double", - "description": "Management Fee Amount to be collected immediately after loan is provided", - "example": 1000.0 - }, - "collectAmountInsurance": { - "type": "number", - "format": "double", - "description": "Insurance Amount to be collected immediately after loan is provided", - "example": 1000.0 - }, - "collectAmountVAT": { - "type": "number", - "format": "double", - "description": "VAT Amount to be collected immediately after loan is provided", - "example": 75.0 - }, - "countryId": { - "type": "string", - "description": "Set to static value '01'", - "example": "01" + "feesDetails": { + "type": "object", + "description": "Detailed breakdown of all fees", + "properties": { + "collectAmountInterest": { + "type": "number", + "format": "double", + "description": "Interest Amount to be collected immediately after loan is provided (Only for 30 days)", + "example": 5000 + }, + "collectAmountMgtFee": { + "type": "number", + "format": "double", + "description": "Management Fee Amount to be collected immediately after loan is provided", + "example": 1000 + }, + "collectAmountInsurance": { + "type": "number", + "format": "double", + "description": "Insurance Amount to be collected immediately after loan is provided", + "example": 1000 + }, + "collectAmountVAT": { + "type": "number", + "format": "double", + "description": "VAT Amount to be collected immediately after loan is provided", + "example": 75 + } + }, + "required": [ + "collectAmountInterest", + "collectAmountMgtFee", + "collectAmountInsurance", + "collectAmountVAT" + ] }, "resultCode": { "type": "string", @@ -91,13 +104,30 @@ "accountId", "productId", "provideAmount", - "collectAmountMgtFee", - "collectAmountInsurance", - "collectAmountVAT", - "countryId", + "totalFees", + "feesDetails", "resultCode", "resultDescription" ], + "example": { + "requestId": "R02802", + "countryCode": "NGR", + "transactionId": "Tr201712RK9232P115", + "debtId": "273194670", + "customerId": "CN621868", + "accountId": "2017821799", + "productId": "101", + "provideAmount": 100000.0, + "totalFees": 7075, + "feesDetails": { + "collectAmountInterest": 5000, + "collectAmountMgtFee": 1000, + "collectAmountInsurance": 1000, + "collectAmountVAT": 75 + }, + "resultCode": "00", + "resultDescription": "Loan Request Completed Successfully!" + }, "xml": { "name": "DisbursementResponse" } diff --git a/schemas/ProvideLoanRequest.json b/schemas/ProvideLoanRequest.json index eb2bbdc..a44cd24 100644 --- a/schemas/ProvideLoanRequest.json +++ b/schemas/ProvideLoanRequest.json @@ -43,7 +43,7 @@ "enum": [0, 1], "example": 1 }, - "offerID": { + "offerId": { "type": "integer", "description": "Offer ID of the loan selected by Customer", "example": 1127 @@ -63,7 +63,7 @@ "productId", "requestedAmount", "collectionType", - "offerID", + "offerId", "channel" ], "xml": { diff --git a/schemas/RACCheckResponse.json b/schemas/RACCheckResponse.json index e0f0a32..6444982 100644 --- a/schemas/RACCheckResponse.json +++ b/schemas/RACCheckResponse.json @@ -30,7 +30,7 @@ "description": "BVN Ok (1 = Yes, 0 = No)", "example": "1" }, - "BVNAttachedtoAccount": { + "BVNAttachedToAccount": { "type": "string", "description": "BVN attached to account (1 = Yes, 0 = No)", "example": "1" @@ -78,7 +78,7 @@ }, "required": [ "Salary account", - "BVNAttachedtoAccount", + "BVNAttachedToAccount", "CRC", "CRMS", "AccountStatus", diff --git a/schemas/RepaymentRequest.json b/schemas/RepaymentRequest.json index 28b0e2f..3dc5139 100644 --- a/schemas/RepaymentRequest.json +++ b/schemas/RepaymentRequest.json @@ -1,44 +1,97 @@ { "type": "object", "required": [ + "requestId", + "countryCode", "transactionId", - "customerId", "debtId", + "customerId", + "accountId", "productId", - "channel" + "collectAmount", + "collectionMethod", + "lienAmount" ], "properties": { + "requestId": { + "type": "string", + "description": "Unique identifier of request", + "example": "R02802" + }, + "countryCode": { + "type": "string", + "description": "Unique country code. Please refer to Country Codes table", + "example": "NGR" + }, "transactionId": { "type": "string", - "description": "Unique identifier of transaction. This transaction Id must be consistent across all platforms", + "description": "Unique identifier of transaction in Simbrella system", "example": "Tr201712RK9232P115" }, - "msisdn": { - "type": "string", - "description": "User's mobile number in an international format", - "example": "3451342" - }, "debtId": { "type": "string", - "description": "Debt identifier provided in 'Current Loans' response", + "description": "Unique identifier of a loan in Simbrella system that is going to be collected (it correlates with provision request)", "example": "273194670" }, - "productId": { - "type": "string", - "description": "Identifier of a product that user is repaying for", - "example": "101" - }, "customerId": { "type": "string", - "description": "Unique identifier of a customer", + "description": "Unique identifier of a user", "example": "CN621868" }, - "channel": { + "accountId": { "type": "string", - "description": "Request channel: USSD or APP", - "example": "100" + "description": "Specific identifier of a user's account", + "example": "2017821799" + }, + "productId": { + "type": "string", + "description": "Identifier of a product for which collection to be made", + "example": "101" + }, + "collectAmount": { + "type": "number", + "format": "double", + "description": "Amount to be collected from user's account (penalCharge is not included)", + "example": 80000.00 + }, + "penalCharge": { + "type": "number", + "format": "double", + "description": "Amount of penalty to be collected from user's account. If there is no penalty, amount is '0'", + "example": 0 + }, + "collectionMethod": { + "type": "integer", + "description": "1 - on deposit of salary. the collection was triggered after a salary inflow to account, 2 - on due date. the collection was triggered on due date, 3 - initiated by user. the debtor initiated the collection from the request channel (USSD, Web or App)", + "enum": [1, 2, 3], + "example": 1 + }, + "lienAmount": { + "type": "number", + "format": "double", + "description": "Aggregated (summed up) lien amount", + "example": 80000.00 + }, + "comment": { + "type": "string", + "description": "Any additional comment for provided loan operation", + "example": "Testing CollectionLoanRequest" } }, + "example": { + "requestId": "R02802", + "countryCode": "NGR", + "transactionId": "Tr201712RK9232P115", + "debtId": "273194670", + "customerId": "CN621868", + "accountId": "2017821799", + "productId": "101", + "collectAmount": 80000.00, + "penalCharge": 0, + "collectionMethod": 1, + "lienAmount": 80000.00, + "comment": "Testing CollectionLoanRequest" + }, "xml": { "name": "RepaymentRequest" } diff --git a/schemas/RepaymentResponse.json b/schemas/RepaymentResponse.json index 94900cd..1bb1b76 100644 --- a/schemas/RepaymentResponse.json +++ b/schemas/RepaymentResponse.json @@ -1,33 +1,76 @@ { "type": "object", "required": [ - "customerId", + "requestId", + "countryCode", "transactionId", - "productId", "debtId", + "customerId", + "accountId", + "productId", + "collectAmount", + "lienAmount", "resultCode", "resultDescription" ], "properties": { + "requestId": { + "type": "string", + "description": "Unique identifier of request", + "example": "R02802" + }, + "countryCode": { + "type": "string", + "description": "Unique country code. Please refer to Country Codes table", + "example": "NGR" + }, + "transactionId": { + "type": "string", + "description": "Unique identifier of transaction in Simbrella system", + "example": "Tr201712RK9232P115" + }, + "debtId": { + "type": "string", + "description": "Unique identifier of a loan in Simbrella system that is going to be collected (it correlates with provision request)", + "example": "273194670" + }, "customerId": { "type": "string", "description": "Unique identifier of a user", "example": "CN621868" }, - "transactionId": { + "accountId": { "type": "string", - "description": "Unique identifier of transaction. This transaction Id must be consistent across all platforms", - "example": "Tr201712RK9232P115" + "description": "Specific identifier of a user's account", + "example": "2017821799" }, "productId": { "type": "string", - "description": "Identifier of a product that user is payed for", + "description": "Identifier of a product for which collection to be made", "example": "101" }, - "debtId": { + "collectAmount": { + "type": "number", + "format": "double", + "description": "Amount to be collected from user's account (penalCharge is not included)", + "example": 60000.00 + }, + "penalCharge": { + "type": "number", + "format": "double", + "description": "Amount of penalty to be collected from user's account. If there is no penalty, amount is '0'", + "example": 0 + }, + "lienAmount": { + "type": "number", + "format": "double", + "description": "Aggregated (summed up) lien amount", + "example": 20000 + }, + "comment": { "type": "string", - "description": "Unique identifier of an existing debt of a user", - "example": "273194670" + "description": "Any additional comment for provided loan operation", + "example": "Testing CollectionLoanRequest" }, "resultCode": { "type": "string", @@ -37,9 +80,24 @@ "resultDescription": { "type": "string", "description": "Description of provided result code", - "example": "Successful" + "example": "Loan Collection Successful" } }, + "example": { + "requestId": "R02802", + "countryCode": "NGR", + "transactionId": "Tr201712RK9232P115", + "debtId": "273194670", + "customerId": "CN621868", + "accountId": "2017821799", + "productId": "101", + "collectAmount": 60000.00, + "penalCharge": 0, + "lienAmount": 20000, + "comment": "Testing CollectionLoanRequest", + "resultCode": "00", + "resultDescription": "Loan Collection Successful" + }, "xml": { "name": "RepaymentResponse" }