Update README

This commit is contained in:
Achmad Setyabudi Susilo
2026-06-26 11:23:39 +07:00
parent 094efce7b1
commit 732bc020e8
+7 -123
View File
@@ -182,8 +182,6 @@ Struct: `usecase.OnboardingRequest` (`internal/interfaces/usecase/loa.go:51`)
"image_path": "http://asset-host/example.png"
}
],
"processing": {
"count": 1,
"list": [
{
"ticket_no": "TKT001",
@@ -220,12 +218,7 @@ Struct: `usecase.OnboardingRequest` (`internal/interfaces/usecase/loa.go:51`)
"current": false
}
]
}
]
},
"rejected": {
"count": 1,
"list": [
{
"ticket_no": "TKT002",
"card_no": "2003 **** **** 4302",
@@ -261,12 +254,7 @@ Struct: `usecase.OnboardingRequest` (`internal/interfaces/usecase/loa.go:51`)
"current": true
}
]
}
]
},
"approved": {
"count": 1,
"list": [
{
"ticket_no": "TKT003",
"card_no": "2003 **** **** 4302",
@@ -306,7 +294,6 @@ Struct: `usecase.OnboardingRequest` (`internal/interfaces/usecase/loa.go:51`)
]
}
}
}
```
</details>
@@ -317,7 +304,7 @@ Struct: `usecase.OnboardingRequest` (`internal/interfaces/usecase/loa.go:51`)
Each `scheme` item now only contains `tenor` and `bunga` (removed `nominal_transaksi` and `subtitle_transaksi`).
Each item in `processing`/`rejected`/`approved.list` is `usecase.Application`:
Each item in `list` is `usecase.Application`:
<details>
<summary>Application item schema</summary>
@@ -383,110 +370,7 @@ Each item in `processing`/`rejected`/`approved.list` is `usecase.Application`:
---
## 2. `POST /api/v1/cc-loan-on-app/list`
**Erangel route:** `POST /v3-cc-loan-on-app-card-list``erangel/application/controllers/api/v3/loan_on_app/List_loa.php`
**Doom library call:** `Doom::list($refnum, $username, $device)``Doom.php:148`
**Handler:** `loaHandler.List``loauc.List` (`internal/usecase/loa/list.go`)
Lists all the credit cards the user owns that are eligible for loan-on-app.
### Request Body
| Field | Source | Required |
|---|---|---|
| _no body fields_ | | |
The frontend sends **no body fields** to erangel for this endpoint. All common fields below are injected by erangel.
<details>
<summary>Request Body JSON</summary>
```json
{
"client": "BRIMON", // [EG]
"request_refnum": "123456789154", // [EG]
"username": "acctest009", // [EG]
"timestamp": "1652034352767", // [EG]
"channel_id": "NBMB", // [EG]
"request_id": "f6eb58d24d6842f59ddb40f40d2a7992" // [DM] (overwritten)
}
```
</details>
Struct: `usecase.LoaListRequest` (`internal/interfaces/usecase/loa.go:186`)
### Response Body (200)
<details>
<summary>Response Body JSON</summary>
```json
{
"code": "00",
"refnum": "123456789154",
"id": "<process_id>",
"desc": "success",
"data": {
"loan": [
{
"ticket_no": "TKT001",
"card_no": "2003 **** **** 4302",
"card_name": "Agung Harsono",
"card_product_type": "Easy Card",
"card_image_name": "bri_easy_card",
"card_image_path": "http://asset-host/card/bri_easy_card.png",
"account_no": "029012345678901",
"account_string": "0290 **** **** 112",
"account_name": "BRItama Bisnis",
"account_image_name": "britama_bisnis",
"account_image_path": "http://asset-host/account/britama_bisnis.png",
"request_time": "09 February 2026, 09:41:02 WIB",
"amount": "Rp3.200.000",
"monthly_payment": "Rp1.015.000",
"admin_fee": "Rp200.000",
"interest_rate": "0%",
"term": "3 Bulan",
"sla_note": "Proses pengajuan 1x24 jam kerja. Kamu akan diberi notifikasi saat pencairan disetujui.",
"status": "PROCESSING|APPROVED|REJECTED",
"status_string": "Pengajuan Diproses|Pengajuan Disetujui|Pengajuan Ditolak",
"progress": [
{
"status_title": "Pengajuan dalam Analisis",
"status_time": "09 Feb 2026, 09:41 WIB",
"order": 1,
"current": true
},
{
"status_title": "Pengajuan Disetujui|Pengajuan Ditolak",
"status_time": "",
"order": 2,
"current": false
}
]
}
]
}
}
```
</details>
`data` is `usecase.LoaListResponse`. When the user has no eligible cards, `code` is `01` and `loan` is an empty array (see `list.go:83-86`).
### Error Codes
| Code | When |
|---|---|
| `00` | Success (cards found) |
| `01` | Empty list / no credit card found |
| `NA`, `TV` | Eredar call failed |
| `TB` | Vikendi / DB read failure |
---
## 3. `POST /api/v1/cc-loan-on-app/form`
## 2. `POST /api/v1/cc-loan-on-app/form`
**Erangel route:** `POST /v3-cc-loan-on-app-form``erangel/application/controllers/api/v3/loan_on_app/Form.php`
**Doom library call:** `Doom::loanform($refnum, $username, $device, $card_token)``Doom.php:81`
@@ -590,7 +474,7 @@ Struct: `usecase.LoaFormRequest` (`internal/interfaces/usecase/loa.go:20`)
---
## 4. `POST /api/v1/cc-loan-on-app/term`
## 3. `POST /api/v1/cc-loan-on-app/term`
**Erangel route:** `POST /v3-cc-loan-on-app-term``erangel/application/controllers/api/v3/loan_on_app/Term.php`
**Doom library call:** `Doom::loanterm($refnum, $username, $device, $card_token, $amount)``Doom.php:95`
@@ -685,7 +569,7 @@ Struct: `usecase.LoaTermRequest` (`internal/interfaces/usecase/loa.go:104`)
---
## 5. `POST /api/v1/cc-loan-on-app/send-otp`
## 4. `POST /api/v1/cc-loan-on-app/send-otp`
**Erangel route:** `POST /v3-cc-loan-on-app-send-otp``erangel/application/controllers/api/v3/loan_on_app/Send_otp.php`
**Doom library call:** `Doom::loansendotp($refnum, $username, $device, $otp_type)``Doom.php:134`
@@ -791,7 +675,7 @@ Doom fetches the user's phone number from **Vikendi** (via `username`), then pro
---
## 6. `POST /api/v1/cc-loan-on-app/submit-otp`
## 5. `POST /api/v1/cc-loan-on-app/submit-otp`
**Erangel route:** `POST /v3-cc-loan-on-app-submit-otp``erangel/application/controllers/api/v3/loan_on_app/Submit_otp.php`
**Doom library call:** `Doom::loansubmitotp($refnum, $username, $device, $server_id, $otp, $otp_type)``Doom.php:TBD`
@@ -903,7 +787,7 @@ A failed validate returns immediately — cipher's `code`/`desc` forwarded 1:1 t
---
## 7. `POST /api/v1/cc-loan-on-app/submit`
## 6. `POST /api/v1/cc-loan-on-app/submit`
**Erangel route:** `POST /v3-cc-loan-on-app-submit``erangel/application/controllers/api/v3/loan_on_app/Submit.php`
**Doom library call:** `Doom::loansubmit($refnum, $username, $device, $card_token, $amount, $simulation_code, $account_no, $account_name, $term, $interest_rate, $monthly_payment, $admin_fee, $pin)``Doom.php:110`
@@ -1046,7 +930,7 @@ Struct: `usecase.LoaSubmitRequest` (`internal/interfaces/usecase/loa.go:131`)
---
## 8. `GET /healthz`
## 7. `GET /healthz`
Health check. Defined in `internal/delivery/http/http.go:47`. Returns literal `"ok"`.