BC · Background checks
The first payment toward the admin fee, of any amount, opens two checks at once (D85): a virtual check, which can clear a driver the same day, and a visit check, which the checkers work in priority order. A driver may get a car on a passed virtual check while the visit is still open. Each check is one round, with its photos. Code BC.
Essential flows
Section titled “Essential flows”D61 names three flows that must not break on the first Monday after cutover: driver onboarding (the queue to an approved driver), vehicle onboarding (a new car to ready) and collection (an overdue driver to a call, a surat hutang and a payment). Their rules get the most tests, refusals included, and the hardest review. On this page:
- Driver onboarding: R-BC-01 to R-BC-05 and R-BC-07 to R-BC-20: every rule on this page but the retired R-BC-06.
Not yet a rule
Section titled “Not yet a rule”These questions are open in #81. Each gets a rule with a new ID once it is answered.
- BC open 1 · Clearance
- BC open 2 · Refund amount (P16)
- BC open 3 · require_visit_before_booking
- The alert a failed visit raises for a driver with a car (R-BC-10): what it holds and who closes it is on #156.
Answered questions
Section titled “Answered questions”- The visit check's due date (#161): due visit_due_days (3) after the first payment toward the admin fee, not after handover (R-BC-18). Nothing acts on it yet; the checkers work the visits in the queue's priority order (R-BC-13).
- v1's guarantee type, bc.jenis (1P / 3P) (#161): v2 doesn't keep it. guarantor_name stays as V13 has it, and the data phase doesn't carry bc.jenis over.
- A visit check without a decided virtual check (#161): it happens, and counts as P2 (R-BC-13).
- A rejected driver's open visit check (#161): it is cancelled (R-BC-19).
- Clearance reads the latest check of each kind (OQ7, #33): D54, R-BC-20.
- Who holds driver:reject (#157): background_check, admin_driver, admin and super_admin (D63, R-ACC-63).
R-BC-01 · Only a visit check has a due date
Section titled “R-BC-01 · Only a visit check has a due date”- Status: built
- Example: given a virtual check, when it is saved with due_by 2026-10-10, then it is refused; a visit check may have one.
- Refusal: none: check_violation (23514).
- Who: every writer.
- Source: [Ref] Data model V13: background_checks.
R-BC-02 · A passed, failed or waived check records when it was decided
Section titled “R-BC-02 · A passed, failed or waived check records when it was decided”- Status: built
- Example: given a scheduled check, when its status is set to passed with no decided_at, then it is refused.
- Refusal: none: check_violation (23514).
- Who: every writer.
- Source: [Ref] Data model V13: background_checks; D9 (S4).
R-BC-03 · Recording a check's result needs screening:approve at the driver's pool
Section titled “R-BC-03 · Recording a check's result needs screening:approve at the driver's pool”- Status: built
- Example: given a viewer at PML, when they mark a PML driver's check as passed, then nothing changes; a background_check user at PML may.
- Refusal: none: no effect without the permission.
- Who: super_admin, admin, admin_driver and background_check hold screening:approve.
- Source: [Ref] Roles, policy matrix (background checks: the result needs screening:approve).
R-BC-04 · Scheduling or editing a check needs screening:write at the driver's pool
Section titled “R-BC-04 · Scheduling or editing a check needs screening:write at the driver's pool”- Status: built
- Example: given a checker at PML, when they schedule a visit check, then it is refused; an admin_driver at PML may.
- Refusal: none: insufficient_privilege (42501) on insert; no effect on update.
- Who: super_admin, admin, admin_driver and background_check hold screening:write.
- Source: [Ref] Roles, policy matrix.
R-BC-05 · Reading checks needs screening:read at the driver's pool
Section titled “R-BC-05 · Reading checks needs screening:read at the driver's pool”- Status: built
- Example: given a finance user at PML, when they read background_checks, then nothing comes back; a viewer at PML sees them.
- Refusal: none: hidden.
- Who: super_admin, admin, admin_driver, background_check and viewer hold screening:read.
- Source: [Ref] Roles, policy matrix.
R-BC-06 · A handover schedules a visit check, due visit_due_days after the handover
Section titled “R-BC-06 · A handover schedules a visit check, due visit_due_days after the handover”- Status: retired (replaced by R-BC-14)
- Example: given visit_due_days is 3, when a driver's car is handed over on 2026-10-07, then a visit check is scheduled with due_by 2026-10-10.
- Refusal: none.
- Who: the handover function (M4).
- Source: [Ref] Data model V13: background_checks; [Ref] Database rules and conventions, Settings. Retired by D42: the visit check opens at payment, not at handover.
R-BC-07 · Deciding a check with refund_admin_fee creates one refund adjustment on the driver's admin fee charge, in the same transaction
Section titled “R-BC-07 · Deciding a check with refund_admin_fee creates one refund adjustment on the driver's admin fee charge, in the same transaction”- Status: planned
- Example: given a driver whose virtual check fails, when it is decided with refund_admin_fee, then one charge_adjustments row of kind refund is created on their admin fee charge; if the adjustment can't be created, the decision isn't saved either.
- Refusal: none.
- Who: the check decision function (M3).
- Source: D9 (P16).
R-BC-08 · One passed check, virtual or visit, is enough to approve a driver
Section titled “R-BC-08 · One passed check, virtual or visit, is enough to approve a driver”- Status: planned
- Example: given a driver whose virtual check passes, when it is decided, then they are approved without waiting for their visit check (DRV-12 → DRV-17); a driver whose virtual check failed but whose visit check passes, and who has no car yet, is approved too (DRV-15 → DRV-17).
- Refusal: none.
- Who: the check decision function (M3).
- Source: D42; General Flow DRV-12, DRV-15, DRV-17; #144 (hag: background check flow).
R-BC-09 · A driver approved on a passed virtual check can be booked and handed a car while their visit check is still open
Section titled “R-BC-09 · A driver approved on a passed virtual check can be booked and handed a car while their visit check is still open”- Status: planned
- Example: given a driver whose virtual check passed on 2026-10-16 and whose visit check is still scheduled, their admin fee only partly paid, when their car is handed over on 2026-10-20, then the handover goes through, whatever balance of the fee is left (R-BC-21), they are listed, and their visit check stays open at P0 (R-BC-13).
- Refusal: none.
- Who: the booking and handover functions (M4).
- Source: D42; General Flow DRV-12 → DRV-17 ("Lanjut tanpa tunggu visit"), DRV-13, DRV-18, DRV-20.
R-BC-10 · A visit check failed by a driver with a booked or active rental raises an alert for Collection and Vehicle Management and puts the driver to the return-or-repo question, without ending the rental
Section titled “R-BC-10 · A visit check failed by a driver with a booked or active rental raises an alert for Collection and Vehicle Management and puts the driver to the return-or-repo question, without ending the rental”- Status: planned
- Example: given a listed driver whose visit check fails, when it is decided, then an alert for Collection and Vehicle Management is open and the driver is on Collection's return-or-repo list (COL-12); their rental stays active and their car stays rented until Collection's answer starts a return or a repo.
- Refusal: none.
- Who: the check decision function (M3).
- Source: D42; General Flow DRV-14 → DRV-16 → COL-12, DRV-15 (has a booked or active rental), NOTE-2 (alert without unassigning). The alert record is on #156.
R-BC-11 · Rejecting a driver needs driver:reject at the driver's pool and a reason
Section titled “R-BC-11 · Rejecting a driver needs driver:reject at the driver's pool and a reason”- Status: planned
- Example: given a Screening Team user at PML whose driver failed their virtual check with no visit to follow, when they reject the driver with a reason, then it is saved; with no reason it is refused, and so is a checker's attempt. A finance user who finds the admin fee was paid with counterfeit money rejects the driver the same way, if they hold driver:reject.
- Refusal: a key named by BE in M3.
- Who: the holders of driver:reject: background_check (the Screening Team), admin_driver (the Driver Team), admin and super_admin (R-ACC-63, D63).
- Source: #144 (hag: background check flow; zuki's answer 15); D42; General Flow DRV-06 (rejection_reason required), DRV-11.
R-BC-12 · Deciding a check with refund_admin_fee also rejects the driver
Section titled “R-BC-12 · Deciding a check with refund_admin_fee also rejects the driver”- Status: planned
- Example: given a driver whose virtual check fails, when it is decided with refund_admin_fee, then the refund adjustment is made (R-BC-07) and their stage is rejected, in the same transaction.
- Refusal: none.
- Who: the check decision function (M3).
- Source: #144 (bc 07: apply the rejected status too); D42; General Flow DRV-06.
R-BC-13 · The visit queue is computed, in order: P0 a driver handed a car on a passed virtual check alone, then P1 a driver with no car whose virtual check passed, then P2 a driver whose virtual check failed and whose visit still goes ahead, or whose virtual check isn't decided yet
Section titled “R-BC-13 · The visit queue is computed, in order: P0 a driver handed a car on a passed virtual check alone, then P1 a driver with no car whose virtual check passed, then P2 a driver whose virtual check failed and whose visit still goes ahead, or whose virtual check isn't decided yet”- Status: planned
- Example: given four drivers with open visit checks, one handed a car on their virtual check, one whose virtual check passed and who waits for a car, one who failed virtually but whose visit goes ahead (R-BC-16), and one whose virtual check is still being worked, when the visit queue is read, then the first is P0, the second P1, and the last two P2.
- Refusal: none.
- Who: the visit queue view (M3).
- Source: #144 (hag: background check flow; zuki's answer 15; P2 is the lowest priority, zuki, 2026-10-15); D42; #161 (zuki, 2026-10-16): a visit before the virtual check is decided is P2; General Flow DRV-08 → DRV-13 (every paid driver has an open visit check), DRV-11, DRV-12, DRV-20.
R-BC-14 · The first payment toward the admin fee, of any amount, opens a virtual check and a visit check for the driver, in the same transaction
Section titled “R-BC-14 · The first payment toward the admin fee, of any amount, opens a virtual check and a visit check for the driver, in the same transaction”- Status: planned
- Example: given a lead whose admin fee charge is open at Rp 300.000, when their first payment of Rp 100.000 is recorded, then they have one scheduled virtual check and one scheduled visit check, and a second payment opens none; if either check can't be created, the payment isn't saved either.
- Refusal: none.
- Who: the payment function (M3).
- Source: D42; D85 (zuki, 2026-11-02 on #236: the first payment, whatever its amount); General Flow DRV-08 → DRV-09 and DRV-08 → DRV-13 (connectors 9a and 9b; Automations, DRV-08). Replaces R-BC-06.
R-BC-15 · A visit check failed by a driver with no booked or active rental rejects the driver
Section titled “R-BC-15 · A visit check failed by a driver with no booked or active rental rejects the driver”- Status: planned
- Example: given a driver approved on their virtual check and still waiting for a car, when their visit check fails, then their stage is rejected, with the check's reason, and no alert is raised.
- Refusal: none.
- Who: the check decision function (M3).
- Source: D42 (a failed visit check rejects a driver who has no car); General Flow DRV-14, DRV-15, DRV-06; Open Issues (DRV-16 → COL-12: skip the return question when there is no rental).
R-BC-16 · A failed virtual check records whether the visit check still goes ahead
Section titled “R-BC-16 · A failed virtual check records whether the visit check still goes ahead”- Status: planned
- Example: given a driver whose virtual check fails, when it is decided without saying whether the visit still goes ahead, then it is refused; with "visit goes ahead" their visit check stays open at P2 (R-BC-13).
- Refusal: a key named by BE in M3.
- Who: the check decision function (M3).
- Source: D42; General Flow DRV-10 → DRV-11 (visit_required, Ya or Tidak, with notes).
R-BC-17 · A failed virtual check with no visit to follow rejects the driver
Section titled “R-BC-17 · A failed virtual check with no visit to follow rejects the driver”- Status: planned
- Example: given a driver whose virtual check fails, when it is decided with "no visit", then their stage is rejected (DRV-11 → DRV-06); decided with "visit goes ahead", they stay at screening until their visit check is decided.
- Refusal: none.
- Who: the check decision function (M3).
- Source: D42; General Flow DRV-11 → DRV-06.
R-BC-18 · A visit check is due visit_due_days after the first payment toward the admin fee
Section titled “R-BC-18 · A visit check is due visit_due_days after the first payment toward the admin fee”- Status: planned
- Example: given visit_due_days is 3, when a driver's first payment toward the admin fee is on 2026-10-16, then their visit check is due 2026-10-19, in the pool's date, whether or not they have a car by then. Nothing is raised when the date passes; the queue's order (R-BC-13) decides which visit is worked first.
- Refusal: none.
- Who: the payment function (M3), with R-BC-14.
- Source: D42; #161 (zuki, 2026-10-16): three days, counted from the admin fee's payment, not the handover, which D85 reads as the first payment; General Flow DRV-08 → DRV-13; [Ref] Database rules and conventions, Settings (visit_due_days, default 3). Replaces R-BC-06's due date.
R-BC-19 · Rejecting a driver cancels their open visit check, in the same transaction
Section titled “R-BC-19 · Rejecting a driver cancels their open visit check, in the same transaction”- Status: planned
- Example: given a driver whose virtual check fails with "no visit" (R-BC-17), when they are rejected, then their scheduled visit check is cancelled and leaves the visit queue; if the cancel fails, the rejection isn't saved either.
- Refusal: none.
- Who: the check decision function and every function that rejects a driver (M3).
- Source: D42; #161 (zuki, 2026-10-16); General Flow DRV-11 → DRV-06.
R-BC-20 · A driver's clearance reads only their latest virtual check and their latest visit check
Section titled “R-BC-20 · A driver's clearance reads only their latest virtual check and their latest visit check”- Status: planned
- Example: given a driver whose first virtual check failed and whose second passed, when v_driver_clearance is read, then they are provisional, not failed; a driver whose old visit check passed and whose latest failed is failed, not verified.
- Refusal: none.
- Who: v_driver_clearance and everything that reads it (booking, the visit queue). Cancelled checks don't count, as the view has them today.
- Source: D54 (OQ7). Built in M3, with a pgTAP test each way.
R-BC-21 · Nothing refuses a pending rental, a booking or a handover over the unpaid balance of the admin fee, which stays an open charge
Section titled “R-BC-21 · Nothing refuses a pending rental, a booking or a handover over the unpaid balance of the admin fee, which stays an open charge”- Status: planned
- Example: given a driver who paid Rp 100.000 of an admin fee of Rp 300.000, when their rental is made pending and their car handed over, then neither is refused for the Rp 200.000 left; the balance is an open charge, chased like any other under the overdue thresholds (R-MON-68). A minimum share of the fee before the checks open is not a rule; it could be added as a setting.
- Refusal: none.
- Who: the booking and handover functions (M3, M4).
- Source: D85; zuki on #236 (2026-11-02, option a); Syamsul on #236 (2026-10-22). No earlier rule refused a rental over an unpaid fee, so none is retired.
R-BC-22 · A refund of the admin fee is never more than what the driver paid of it
Section titled “R-BC-22 · A refund of the admin fee is never more than what the driver paid of it”- Status: planned
- Example: given a driver who paid Rp 100.000 of an admin fee of Rp 300.000, when a check is decided with refund_admin_fee, then the refund adjustment is Rp 100.000 at most; a refund of Rp 150.000 is refused; a driver who paid nothing has nothing to refund.
- Refusal: a key named by BE in M3.
- Who: the check decision function (M3), with R-BC-07.
- Source: D85; #81 (BC open 2, P16); the CTO's list on #236 (2026-10-26).