diff --git a/README.md b/README.md index 2a36158..58bb029 100644 --- a/README.md +++ b/README.md @@ -452,7 +452,20 @@ Struct: `usecase.LoaFormRequest` (`internal/interfaces/usecase/loa.go:20`) "cc_image_slim": "http://.../card/jcb_platinum_slim.png", "minimum_loan": 1000000, "maximum_loan": 20000000, - "loan_multiplier": 100000 + "loan_multiplier": 100000, + "simulation": [ + { + "simulation_code": "...", + "term_code": "123", + "monthly_payment": 1700000, + "monthly_payment_string": "Rp1.700.000", + "admin_fee": 200000, + "admin_fee_string": "Rp200.000", + "term": 3, + "term_string": "3 Bulan", + "interest_rate": 0.5 + } + ] } } ``` @@ -463,6 +476,8 @@ Struct: `usecase.LoaFormRequest` (`internal/interfaces/usecase/loa.go:20`) > **Frontend validation:** the user-entered `amount` must be a multiple of `loan_multiplier` (e.g. if `100000`, only values like `100000`, `200000`, `1500000`, … are accepted). +> **`simulation` field:** the `/form` response now also includes a pre-fetched list of simulations (same shape as `usecase.LoaTermResponse.simulation`). The simulations are calculated using the card's `maximum_loan` so the frontend can render a sample of available tenors before the user finishes entering an amount. The full per-amount simulation is still returned by `/term`. + ### Error Codes | Code | When |