Please read Onboarding first!!
Specification Doc
| Version | Date | Author | Description | Download file PDF |
|---|---|---|---|---|
| 1.0 | 24-12-2018 | Diep Nguyen | Created | |
| 1.1 | 19-03-2019 | Diep Nguyen | - "loanId" -> "momoLoanId" - Add "postCode" and "dueDate" in Get Loan Data API. - Update field "photos" in Get Loan Data API. - Add "reasonId" in Update Status API - Update Object "detail" in Disburse API and Update Status API |
|
| 1.2 | 20-03-2019 | Diep Nguyen | - "fullName" -> "firstName", "middleName", "lastName" in Get Loan Data API. | |
| 1.3 | 20-03-2019 | Diep Nguyen | - Add categories for "reasonId" in Update Status API | |
| 1.4 | 21-03-2019 | Diep Nguyen | - Add "ward" and "productCode" in Get Loan Data API. | click here |
| 1.5 | 28-05-2019 | Diep Nguyen | - Edit ErrorCode ,change field “feeDetail” to “feeDetails” in Disburse API, change type LONG to String of fields “momoLoanId”. | click here |
| 1.6 | 03-06-2019 | Diep Nguyen | - Add status (3: CUSTOMER CONFIRMED) in Update Status API. | click here |
| 1.7 | 10-06-2019 | Diep Nguyen | - Add CheckStatus API. | click here |
| 1.8 | 16-07-2019 | Diep Nguyen | - Update Get Data API. | |
| 1.9 | 20-08-2019 | Diep Nguyen | - Add status = 8 for Update Status API. | |
| 1.10 | 19-11-2019 | Phuc Dang | - Add status = 9 MANUAL_CHECKING - Add status = 10 FACIAL_APPCEPTED |
Flow
Create loan order on Momo App

- Using methods:
Pay loan on Momo App
Please see this
Methods
1. Get Loan Data
Allow partner get loan information
Request:
{
"requestId": "1511347353577",
"from": 1545666902332,
"to": 1545666902332,
"eventOffset": 1,
"numberOfEvents": 4
}
Response:
{
"requestId": "wqrwpo2343240xsad213",
"referenceId": "2313_e3w24_ddqwdq_dasdasda",
"resultCode": 0,
"message": "Success",
"eventOffset": 0,
"nextEventOffset": 4,
"totalEvents": 10,
"datas": [
{
"momoLoanId": "4657",
"createDate": 1545666902332,
"fullName": "Nguyen Van A",
"phoneNumber": "0987654321",
"personalId": "242354653",
"email": "mail@gmail.com.vn",
"dateOfBirth": "01/01/1980",
"gender": "MALE",
"salary": 20000000,
"fullAddress": "12- Tan trao, tan phu, quan 7, tp.HCM",
"amount": 5000000,
"loanTime": 12,
"dueDate": 3,
"rate" : 1.9.
"status": "PROCESSING"
},
]
}
- Host: MOMO
- Invoke: PARTNER
Request:
- Method: POST
-
Url: /api/loan/data
-
Payload:
Name Type Length Required Description requestId String 50 x Unique String for each request from number 50 x time in miliseconds. UNIX Time to number 50 x time in miliseconds. UNIX Time eventOffset number OPTIONAL: Return events starting at this offset. This should be set to the nextEventOffset if one was returned or left unspecified if this is the first request. If eventOffset is zero, events will be returned starting with the first event. If this is two, events will be returned starting with the third event. If unspecified, eventOffset will be assumed to be zero., Note: If eventOffset exceeds the total number of event(i.e. eventOffset >= totalEvents) then no events will be returned. numberOfEvents number OPTIONAL: Number of events to show per page. If unspecified or greater than 1000, this will be 1000.
Response:
| Name | Type | Length | Level | Description |
|---|---|---|---|---|
| requestId | String | 50 | L1 | Same with request |
| resultCode | Integer | 2 | L1 | Result Code of request |
| referenceId | String | 50 | L1 | Unique for each response |
| message | String | 200 | L1 | Result message |
| eventOffset | number | 2 | L1 | AREQUIRED: The event offset of this response. |
| nextEventOffset | number | 2 | L1 | OPTIONAL: The offset of the next event to return. If unspecified there are no more events to retrieve for this statement. |
| totalEvents | number | 4 | L1 | |
| datas | JsonArray | L1 | Array of JsonObject include these information | |
| momoLoanId | String | L2 | Loan id | |
| createDate | Number | L2 | time in miliseconds. UNIX Time | |
| fullName | String | 50 | L2 | fullName of the loan owner |
| phoneNumber | String | L2 | Phone number | |
| personalId | String | L2 | Personal Id | |
| String | L2 | |||
| dueDate | number | L2 | MonthlyPaymentAmount | |
| dateOfBirth | String | L2 | Format (dd/mm/yyyy) | |
| gender | String | L2 | Male/female/other | |
| salary | number | L2 | salary | |
| fullAddress | String | L2 | Address of the loan owner | |
| amount | Integer | L2 | Loan amount | |
| loanTime | Integer | L2 | loan time (month) | |
| rate | Number | L2 | rate of the loan | |
| status | String | L2 | status of the loan |
Error Code:
| Code | Description | Status |
|---|---|---|
| 0 | Success | Success |
| 2 | Decryption Fail | Fail |
| 9 | Invalid partner code | Fail |
| 11 | Other error | Fail |
| 900 | Range of time allows 3 days | Fail |
2. Update Status
Allow partner transfer money from their wallet to other wallet
Request:
{
"requestId": "1511347353577",
"momoLoanId": "5346",
"phoneNumber": "098987988",
"createdTime": 1545666902332,
"status": 5,
"description": "Khách hàng bị nợ xấu",
"reasonId": 1,
"detail": {
"tenor": 12,
"amount":15000000,
"EMI": 1334562,
"dueDate": 7,
"applicationId": "GD6243654",
"disbursementDate": "12/12/2018",
}
}
Response:
{
"requestId": "wqrwpo2343240xsad213",
"referenceId": "2313_e3w24_ddqwdq_dasdasda",
"resultCode": 0,
"message": "Success"
}
- Host: MOMO
- Invoke: PARTNER
Request
- Method: POST
-
Url: /api/loan/update
-
Payload:
Name Type Length Required Level Description requestId String 50 x L1 Unique String for each request momoLoanId String x L1 Got from get Data or Partner LoanId phoneNumber String x L1 Got from Get Data createdTime Long x L1 time in milisecond. UNIX time status int x L1 Loan status:
1: PROCESSING
2: APPROVED AND WAITING SMS
3: CUSTOMER CONFIRMED
4: DISBURSED
5: CANCELLED
6: REJECTED
7: LIQUIDATION
8: REVIEW_FAIL (occurs when the partner checks the loan information before calling for disbursement.)
9: MANUAL_CHECKING
10: FACIAL_ACCEPTEDdescription String L1 Required in case status equal CANCEL reasonId number x L1 Required in case status equal CANCEL or REJECTED.
1 Passed Eligible
2 Failed Auto Rejection
3 Failed Bad debt
4 Failed Cannot contact
5 Failed Customer cancel
6 Failed Document not qualified
7 Failed FV result
8 Failed Negative info
9 Failed Payment Capacity
10 Failed Product
11 Failed Ask more checks
12 Failed Other code
13 Failed Other (No code)
14 Note Free textdetail json object L1 Loan information if status is APPROVED or DISBURSED tenor Number L2 Loan duration (month) amount Number L2 Total loan amount EMI Number L2 MonthlyPaymentAmount dueDate Number L2 MonthlyPaymentDate applicationId String L2 loanID of TPFICO disbursementDate String L2 Format: dd/mm/yyyy
Response:
| Name | Type | Length | Required | Level | Description |
|---|---|---|---|---|---|
| requestId | String | 50 | x | L1 | Same with request |
| resultCode | Integer | 2 | x | L1 | Result Code of request |
| referenceId | String | 50 | x | L1 | Unique for each response |
| message | String | 200 | x | L1 | Result message |
Error Code:
Include ErrorCode in Onboarding/Common Response Code and ErrorCode below.
| Code | Description | Status |
|---|---|---|
| 0 | Success | Success |
| 8 | Duplicate request Id | Fail |
| 901 | Invalid loan id | Fail |
| 908 | Create time must be in range (+/- 1 min with currentMilis) | Fail |
| 909 | Invalid Status Loan | Fail |
3. Disburse
Allow partner transfer money from their wallet to customer wallet
Request:
{
"requestId": "wqrwpo2343240xsad213",
"momoLoanId": "43547",
"phoneNumber": "098987988",
"createDate": 1545302933339,
"totalAmount": 2000000,
"actualAmount": 1900000,
"feeDetails": [
{
"type": "Insurrance",
"amount":50000
},
{
"type": "Service",
"amount":50000
}
],
"detail": {
"loanId": "GD1235",
"tenor": 12,
"rate": 7.9,
"disbursementDate": "12/12/2018",
"maturityDate": "11/12/2019",
"dueDate": 11,
"EMI": 1200000,
"paymentBankAccount":"3545567687",
"firstInstallmentDate": "11/02/2018",
"firstInstallmentAmount": 1000000
},
"description": "Khách hàng được giải ngân"
}
Response:
{
"requestId": "wqrwpo2343240xsad213",
"referenceId": "2313_e3w24_ddqwdq_dasdasda",
"resultCode": 0,
"message": "Success",
"localMessage":"Thành công",
"paymentRef": "frghdfg434575",
"actualAmount": 1900000
}
- Host: MOMO
- Invoke: PARTNER
Request
- Method: POST
-
Url: /api/loan/disburse
-
Payload:
Name Type Length Required Level Description requestId String 50 x L1 Unique String for each request momoLoanId String x L1 Got from Get Data phoneNumber String x L1 Got from Get Data createDate Long x L1 created date (milisecond, UNIX Time) totalAmount Long x L1 total amount of this loan contract actualAmount Long x L1 actual amount that user can receive. Exclude all fees feeDetails JsonArray L1 Fee information. (JsonArray) type Number x L2 Type fee amount Number x L2 Fee amount. description String x L1 Short description for loan. detail json object x L1 loan information loanId Number x L2 Loan Id of partners tenor Number x L2 loan duration (month) rate Number x L2 rate disbursementDate String x L2 Format: dd/mm/yyyy maturityDate String x L2 Expired Date Format: dd/mm/yyyy firstInstallmentDate number L2 First Payment Date . Format: dd/mm/yyyy firstInstallmentAmount number L2 First Payment Amount. dueDate number L2 MonthlyPaymentDate EMI Number x L2 MonthlyPaymentAmount paymentBankAccount String L2 BankAccount number to payment
Response:
| Name | Type | Length | Description |
|---|---|---|---|
| requestId | String | Same with request | |
| resultCode | Integer | Result Code of request | |
| referenceId | String | Unique for each response | |
| message | String | 200 | Result message |
| localMessage | String | Result local message | |
| actualAmount | Long | Amount disbursed. | |
| paymentRef | Integer | Unique number for each payment request |
Error Code:
Include ErrorCode in Onboarding/Common Response Code and ErrorCode below.
| Code | Description | Status |
|---|---|---|
| 0 | Success | Success |
| 5 | Invalid password | Fail |
| 8 | Duplicate request Id | Fail |
| 9 | Invalid partner code | Fail |
| 901 | Invalid loan id | Fail |
| 903 | Loan Id and phoneNumber does not match | Fail |
| 904 | Amount too small | Fail |
| 905 | Amount too big | Fail |
| 906 | Loan is disbursed | Fail |
| 908 | Create time must be in range (+/- 1 min with currentMilis) | Fail |
| 910 | Invalid Total Amount | Fail |
| 911 | Invalid Acctual Amount | Fail |
| 912 | Invalid detail object | Fail |
| 913 | Wallet balance exceeded | |
| 914 | Wallet cap exceeded | |
| 915 | Retry exceeded |
4. Check status
Allow partner check status of request disbursement from partner.
- HOST: MOMO
- Invoke: PARTNER
Request:
{
"requestId": "2300699797",
"checkRequestId": "2300699797"
}
Response:
{
"requestId": "2300699797",
"referenceId": "MM_13200699797",
"resultCode": 0,
"message": "Success",
"data": {
"requestId": "wqrwpo2343240xsad213",
"referenceId": "2313_e3w24_ddqwdq_dasdasda",
"resultCode": 0,
"message": "Success",
"localMessage":"Thành công",
"paymentRef": "frghdfg434575",
"actualAmount": 1900000
}
}
Request
- Method: POST
-
URL: /api/loan/checkStatus
-
Payload:
| Name | Type | Length | Required | Description |
|---|---|---|---|---|
| requestId | String | 50 | x | Unique String for each request |
| checkRequestId | String | 50 | x | It depends on request disbursement of partner |
Response:
| Name | Type | Length | Required | Level | Description |
|---|---|---|---|---|---|
| requestId | String | 50 | x | L1 | Same with request |
| referenceId | String | 50 | x | L1 | Unique for each response |
| resultCode | String | 50 | x | L1 | Request's result code |
| message | String | 50 | x | L1 | Result message |
| data | Object | 50 | x | L1 | Object include below information |
| requestId | String | x | L2 | Same with request disbursement | |
| resultCode | Integer | x | L2 | Result Code of request disbursement | |
| referenceId | String | x | L2 | Unique for each response | |
| message | String | x | L2 | Result message | |
| localMessage | String | x | L2 | Result local message | |
| actualAmount | Long | x | L2 | Amount disbursed | |
| paymentRef | Integer | x | L2 | Unique number for each payment request disbursement |
Error Code:
Include ErrorCode in Onboarding/Common Response Code and ErrorCode below.
| Code | Description | Status |
|---|---|---|
| 907 | RequestId not found | Fail |
| 915 | System error | Fail |