0,
'QUOTED' => 1,
'CREATED' => 2,
'KYC_DONE' => 3,
'PAID' => 4,
'EFFECTIVE' => 4,
];
$initialStep = $statusToStep[$status] ?? 0;
$coverage = is_array($quote['coverage_details'] ?? null) ? $quote['coverage_details'] : [];
// Normalize addon flags from either UI-shaped or Digit-shaped coverage JSON
$addonOn = [
'personal_accident' => !empty($coverage['personal_accident']) || !empty($coverage['personalAccident']['selection']),
'zero_dep' => !empty($coverage['zero_dep']) || !empty($coverage['addons']['partsDepreciation']['selection']),
'engine_protect' => !empty($coverage['engine_protect']) || !empty($coverage['addons']['engineProtection']['selection']),
'rsa' => !empty($coverage['rsa']) || !empty($coverage['addons']['roadSideAssistance']['selection']),
'consumables' => !empty($coverage['consumables']) || !empty($coverage['addons']['consumables']['selection']),
'key_protect' => !empty($coverage['key_protect']) || !empty($coverage['addons']['keyAndLockProtect']['selection']),
];
if ($coverage === []) {
$addonOn['personal_accident'] = true; // default matches chip markup
}
?>
Step 1 of 5 · quick quote
Vehicle and coverage details
Enter the vehicle to fetch an indicative premium before creating the policy quote.
01
Vehicle
Required
= esc($vehicle['vehicle_maincode'] ?? '') ?>
Required
Required
Previous policy
Coverage add-ons
Personal accident
Zero depreciation
Engine protect
Roadside assistance
Consumables
Key & lock
POST · motorQuickQuote
Step 2 of 5 · create quote
Confirm premium plan
Review the quick-quote premium, add policyholder details, then create the Digit quote.
02
Quoted premium
₹= isset($quote['premium']) ? number_format((float)$quote['premium'], 0) : '—' ?>
IDV ₹= isset($quote['idv']) ? number_format((float)$quote['idv'], 0) : '—' ?>
Vehicle identifiers
Policyholder
Step 3 of 5 · KYC status
Identity verification
Poll KYC status before the payment link can be issued.
03
= esc($kyc['kyc_verification_status'] ?? 'Not checked') ?>
Click refresh to fetch latest KYC status from Digit.
= esc($kyc['kyc_verification_status'] ?? 'Pending') ?>
| Quote number | = esc($quote['quote_number'] ?? '—') ?> |
| Application ID | = esc($quote['application_id'] ?? '—') ?> |
| KYC reference | = esc($kyc['reference_id'] ?? '—') ?> |
| OVD link | = !empty($kyc['link']) ? 'Open' : '—' ?> |
Step 4 of 5 · payment
Collect premium
Generates a Digit UI payment link for the customer to complete the transaction.
04
= !empty($payment['dispatcher_response']) ? 'Payment link ready' : 'No payment link yet' ?>
= esc($payment['digit_payment_id'] ?? 'Generate a link to continue') ?>
Step 5 of 5 · policy
Policy status & documents
Confirm payment outcome, then download schedule and proposal PDFs.
05
= esc(($policy['policy_number'] ?? $quote['quote_number'] ?? 'Policy') . ' · ' . ($policy['policy_status'] ?? $status)) ?>
Refresh status after customer payment, then fetch PDFs.
= esc($policy['policy_status'] ?? $status) ?>
Documents