Project : MoMo Recommendation
1- SEQUENCE DIAGRAM

2 - GET LOAN SUGGESTION
- Method: POST
- Url: /api/momorecommendation/check
- Authentication and Header: Please read Onboarding
MoMo returns the HTTP Status 200 to signal that MoMo received user info.
Sample Request
{
"requestId": "1605540256024osUd0ZCBag",
"walletId": "0987654321",
"personalId": "3123",
"client": "webinapp",
"merchantId" : "ABC",
"clientIp" : "10.10.10.1",
"callbackUrl" : "https://momo.vn/",
"totalAmount": 0,
"promotionCode":""
}
Sample response
{
"requestId": "REQUEST_ID_1511347353577",
"responseId": "dsfd5346578568679",
"resultCode": 0,
"message": "SUCCESS",
"registerUrl" : "",
"items":[
{
"packageName" : "paylater1",
"packageCode" : "GOLD",
"loanAmount" : 2000000,
"dueDay": "5",
"description" : "",
"sourceId":""
}
]
}
Payload
Request Params
| Name |
Type |
R |
L |
Description |
| requestId |
String |
x |
L1 |
unique for each request |
| walletId |
String |
x |
L1 |
phone number |
| personalId |
String |
x |
L1 |
Personal ID |
| client |
String(20) |
x |
L1 |
webinapp open web by mobile (default value), webinPC open web by PC, android_app open web by Android App ,ios_app open web by iOS App |
| merchantId |
String |
|
L1 |
Merchant Id |
| clientIp |
String |
x |
L1 |
Client Ip |
| callbackUrl |
String |
x |
L1 |
Momo will redirect to it from MoMo App after user finish using MOMO app |
| totalAmount |
Number |
|
L1 |
amount of product detail/ add to card |
| promotionCode |
String |
|
L1 |
|
Response Params
| Name |
Type |
R |
L |
Description |
| requestId |
String |
x |
L1 |
Same with request |
| responseId |
String |
x |
L1 |
Unique number for each payment response |
| resultCode |
Number |
x |
L1 |
Result code |
| message |
String(100) |
x |
L1 |
Result message |
| registerUrl |
String |
|
L1 |
URL to open the MOMO application when MOMO returns the result Code 1301. If the user opens the web on a PC, MoMo will send a notification to the user in the MOMO application to register. |
| items |
JsonArray |
x |
L1 |
Arrays of loan package. Detail of each jsonObject is defined below |
| packageName |
String(100) |
x |
L2 |
Package Name |
| packageCode |
String(100) |
x |
L2 |
Package Code |
| maxAmount |
Number |
x |
L2 |
|
| dueDay |
String |
x |
L2 |
Payment date in the next month |
| description |
String |
|
L2 |
Loan description. |
| sourceId |
String |
|
L2 |
|
Result Code
| Code |
Result message |
Description |
| 0 |
Success |
User actived. MoMo will return the data package. |
| 1301 |
Success |
Inactive users. MoMo will return the data package. |
| 1302 |
Invalid data |
walletId not have MoMo wallet. User personalID not match. |
| 1303 |
User not be eligible for paylater |
|
| 1304 |
too many request from the same client IP |
|
| 1305 |
too many request with the same walletId |
|
| 1006 |
System Error |
|
| 11 |
Other Error |
|