Update README
This commit is contained in:
@@ -182,129 +182,116 @@ Struct: `usecase.OnboardingRequest` (`internal/interfaces/usecase/loa.go:51`)
|
|||||||
"image_path": "http://asset-host/example.png"
|
"image_path": "http://asset-host/example.png"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"processing": {
|
"list": [
|
||||||
"count": 1,
|
{
|
||||||
"list": [
|
"ticket_no": "TKT001",
|
||||||
{
|
"card_no": "2003 **** **** 4302",
|
||||||
"ticket_no": "TKT001",
|
"card_name": "Agung Harsono",
|
||||||
"card_no": "2003 **** **** 4302",
|
"card_product_type": "Easy Card",
|
||||||
"card_name": "Agung Harsono",
|
"card_image_name": "bri_easy_card",
|
||||||
"card_product_type": "Easy Card",
|
"card_image_path": "http://asset-host/card/bri_easy_card.png",
|
||||||
"card_image_name": "bri_easy_card",
|
"account_no": "029012345678901",
|
||||||
"card_image_path": "http://asset-host/card/bri_easy_card.png",
|
"account_string": "0290 **** **** 112",
|
||||||
"account_no": "029012345678901",
|
"account_name": "BRItama Bisnis",
|
||||||
"account_string": "0290 **** **** 112",
|
"account_image_name": "britama_bisnis",
|
||||||
"account_name": "BRItama Bisnis",
|
"account_image_path": "http://asset-host/account/britama_bisnis.png",
|
||||||
"account_image_name": "britama_bisnis",
|
"status": "PROCESSING",
|
||||||
"account_image_path": "http://asset-host/account/britama_bisnis.png",
|
"status_string": "Pengajuan Diproses",
|
||||||
"status": "PROCESSING",
|
"request_time": "09 February 2026, 09:41:02 WIB",
|
||||||
"status_string": "Pengajuan Diproses",
|
"amount": "Rp3.200.000",
|
||||||
"request_time": "09 February 2026, 09:41:02 WIB",
|
"monthly_payment": "Rp1.015.000",
|
||||||
"amount": "Rp3.200.000",
|
"admin_fee": "Rp200.000",
|
||||||
"monthly_payment": "Rp1.015.000",
|
"interest_rate": "0%",
|
||||||
"admin_fee": "Rp200.000",
|
"term": "3 Bulan",
|
||||||
"interest_rate": "0%",
|
"seq_no": 1,
|
||||||
"term": "3 Bulan",
|
"progress": [
|
||||||
"seq_no": 1,
|
{
|
||||||
"progress": [
|
"status_title": "Pengajuan dalam Analisis",
|
||||||
{
|
"status_time": "09 Feb 2026, 09:41 WIB",
|
||||||
"status_title": "Pengajuan dalam Analisis",
|
"order": 1,
|
||||||
"status_time": "09 Feb 2026, 09:41 WIB",
|
"current": true
|
||||||
"order": 1,
|
},
|
||||||
"current": true
|
{
|
||||||
},
|
"status_title": "Pengajuan Disetujui",
|
||||||
{
|
"status_time": "",
|
||||||
"status_title": "Pengajuan Disetujui",
|
"order": 2,
|
||||||
"status_time": "",
|
"current": false
|
||||||
"order": 2,
|
}
|
||||||
"current": false
|
]
|
||||||
}
|
},
|
||||||
]
|
{
|
||||||
}
|
"ticket_no": "TKT002",
|
||||||
]
|
"card_no": "2003 **** **** 4302",
|
||||||
},
|
"card_name": "Agung Harsono",
|
||||||
"rejected": {
|
"card_product_type": "Easy Card",
|
||||||
"count": 1,
|
"card_image_name": "bri_easy_card",
|
||||||
"list": [
|
"card_image_path": "http://asset-host/card/bri_easy_card.png",
|
||||||
{
|
"account_no": "029012345678901",
|
||||||
"ticket_no": "TKT002",
|
"account_string": "0290 **** **** 112",
|
||||||
"card_no": "2003 **** **** 4302",
|
"account_name": "BRItama Bisnis",
|
||||||
"card_name": "Agung Harsono",
|
"account_image_name": "britama_bisnis",
|
||||||
"card_product_type": "Easy Card",
|
"account_image_path": "http://asset-host/account/britama_bisnis.png",
|
||||||
"card_image_name": "bri_easy_card",
|
"status": "REJECTED",
|
||||||
"card_image_path": "http://asset-host/card/bri_easy_card.png",
|
"status_string": "Pengajuan Ditolak",
|
||||||
"account_no": "029012345678901",
|
"request_time": "09 February 2026, 09:41:02 WIB",
|
||||||
"account_string": "0290 **** **** 112",
|
"amount": "Rp3.200.000",
|
||||||
"account_name": "BRItama Bisnis",
|
"monthly_payment": "Rp1.015.000",
|
||||||
"account_image_name": "britama_bisnis",
|
"admin_fee": "Rp200.000",
|
||||||
"account_image_path": "http://asset-host/account/britama_bisnis.png",
|
"interest_rate": "0%",
|
||||||
"status": "REJECTED",
|
"term": "3 Bulan",
|
||||||
"status_string": "Pengajuan Ditolak",
|
"seq_no": 2,
|
||||||
"request_time": "09 February 2026, 09:41:02 WIB",
|
"progress": [
|
||||||
"amount": "Rp3.200.000",
|
{
|
||||||
"monthly_payment": "Rp1.015.000",
|
"status_title": "Pengajuan dalam Analisis",
|
||||||
"admin_fee": "Rp200.000",
|
"status_time": "09 Feb 2026, 09:41 WIB",
|
||||||
"interest_rate": "0%",
|
"order": 1,
|
||||||
"term": "3 Bulan",
|
"current": false
|
||||||
"seq_no": 2,
|
},
|
||||||
"progress": [
|
{
|
||||||
{
|
"status_title": "Pengajuan Ditolak",
|
||||||
"status_title": "Pengajuan dalam Analisis",
|
"status_time": "10 Feb 2026, 06:30 WIB",
|
||||||
"status_time": "09 Feb 2026, 09:41 WIB",
|
"order": 2,
|
||||||
"order": 1,
|
"current": true
|
||||||
"current": false
|
}
|
||||||
},
|
]
|
||||||
{
|
},
|
||||||
"status_title": "Pengajuan Ditolak",
|
{
|
||||||
"status_time": "10 Feb 2026, 06:30 WIB",
|
"ticket_no": "TKT003",
|
||||||
"order": 2,
|
"card_no": "2003 **** **** 4302",
|
||||||
"current": true
|
"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",
|
||||||
"approved": {
|
"account_name": "BRItama Bisnis",
|
||||||
"count": 1,
|
"account_image_name": "britama_bisnis",
|
||||||
"list": [
|
"account_image_path": "http://asset-host/account/britama_bisnis.png",
|
||||||
{
|
"status": "APPROVED",
|
||||||
"ticket_no": "TKT003",
|
"status_string": "Pengajuan Disetujui",
|
||||||
"card_no": "2003 **** **** 4302",
|
"request_time": "09 February 2026, 09:41:02 WIB",
|
||||||
"card_name": "Agung Harsono",
|
"amount": "Rp3.200.000",
|
||||||
"card_product_type": "Easy Card",
|
"monthly_payment": "Rp1.015.000",
|
||||||
"card_image_name": "bri_easy_card",
|
"admin_fee": "Rp200.000",
|
||||||
"card_image_path": "http://asset-host/card/bri_easy_card.png",
|
"interest_rate": "0%",
|
||||||
"account_no": "029012345678901",
|
"term": "3 Bulan",
|
||||||
"account_string": "0290 **** **** 112",
|
"seq_no": 3,
|
||||||
"account_name": "BRItama Bisnis",
|
"progress": [
|
||||||
"account_image_name": "britama_bisnis",
|
{
|
||||||
"account_image_path": "http://asset-host/account/britama_bisnis.png",
|
"status_title": "Pengajuan dalam Analisis",
|
||||||
"status": "APPROVED",
|
"status_time": "09 Feb 2026, 09:41 WIB",
|
||||||
"status_string": "Pengajuan Disetujui",
|
"order": 1,
|
||||||
"request_time": "09 February 2026, 09:41:02 WIB",
|
"current": false
|
||||||
"amount": "Rp3.200.000",
|
},
|
||||||
"monthly_payment": "Rp1.015.000",
|
{
|
||||||
"admin_fee": "Rp200.000",
|
"status_title": "Pengajuan Disetujui",
|
||||||
"interest_rate": "0%",
|
"status_time": "10 Feb 2026, 06:30 WIB",
|
||||||
"term": "3 Bulan",
|
"order": 2,
|
||||||
"seq_no": 3,
|
"current": true
|
||||||
"progress": [
|
}
|
||||||
{
|
]
|
||||||
"status_title": "Pengajuan dalam Analisis",
|
}
|
||||||
"status_time": "09 Feb 2026, 09:41 WIB",
|
]
|
||||||
"order": 1,
|
|
||||||
"current": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"status_title": "Pengajuan Disetujui",
|
|
||||||
"status_time": "10 Feb 2026, 06:30 WIB",
|
|
||||||
"order": 2,
|
|
||||||
"current": true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -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 `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>
|
<details>
|
||||||
<summary>Application item schema</summary>
|
<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`
|
## 2. `POST /api/v1/cc-loan-on-app/form`
|
||||||
|
|
||||||
**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`
|
|
||||||
|
|
||||||
**Erangel route:** `POST /v3-cc-loan-on-app-form` → `erangel/application/controllers/api/v3/loan_on_app/Form.php`
|
**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`
|
**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`
|
**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`
|
**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`
|
**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`
|
**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`
|
**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`
|
**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`
|
**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`
|
**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"`.
|
Health check. Defined in `internal/delivery/http/http.go:47`. Returns literal `"ok"`.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user