Smart Buy Now, Pay Later (BNPL) Eligibility Estimator

Smart BNPL Eligibility Estimator

Get an instant estimate of your eligibility for Buy Now, Pay Later financing.

Enter Your Financial Profile

Your BNPL Eligibility Estimate

Please enter your profile details on the first tab and click "Next" to see your estimate.

$${p.amount.toFixed(2)}

`).join('')}
`; } resultOutput.innerHTML = `

Eligibility: ${result.verdict}

Based on your profile, your estimated eligibility score is ${Math.max(0, result.score)} out of 100.

Analysis Breakdown

    ${result.reasons.map(r => `
  • ${r}
  • `).join('')}

Simulated Offer

Estimated Approval Amount: $${result.approvedAmount.toFixed(2)}

A typical payment plan could be:

${paymentPlanHtml}
`; }; // --- Tab & Navigation Logic --- function switchTab(targetTabId) { if (targetTabId === 'result') { renderResult(); } currentTab = targetTabId; tabs.forEach(tab => tab.classList.toggle('active', tab.dataset.tab === currentTab)); tabContents.forEach(content => content.classList.toggle('active', content.id === currentTab)); updateNavButtons(); } function updateNavButtons() { if (currentTab === 'calculator') { prevBtn.style.display = 'none'; nextBtn.style.display = 'inline-flex'; pdfButtonContainer.style.display = 'none'; } else { prevBtn.style.display = 'inline-flex'; nextBtn.style.display = 'none'; pdfButtonContainer.style.display = 'block'; } } // --- Event Handlers --- tabs.forEach(tab => tab.addEventListener('click', () => switchTab(tab.dataset.tab))); nextBtn.addEventListener('click', () => switchTab('result')); prevBtn.addEventListener('click', () => switchTab('calculator')); // --- PDF Download --- downloadPdfBtn.addEventListener('click', async () => { const { jsPDF } = window.jspdf; const doc = new jsPDF({ orientation: 'p', unit: 'mm', format: 'a4' }); const content = document.getElementById('pdf-content'); document.getElementById('pdf-date').textContent = `Report Generated: ${new Date().toLocaleString()}`; const canvas = await html2canvas(content, { scale: 2 }); const imgData = canvas.toDataURL('image/jpeg', 1.0); const imgProps = doc.getImageProperties(imgData); const pdfWidth = doc.internal.pageSize.getWidth() - 28; const pdfHeight = (imgProps.height * pdfWidth) / imgProps.width; doc.addImage(imgData, 'JPEG', 14, 15, pdfWidth, pdfHeight); document.getElementById('pdf-date').textContent = ''; doc.save(`BNPL-Eligibility-Estimate-${new Date().toISOString().slice(0,10)}.pdf`); }); // --- Initial Load --- populateSampleData(); updateNavButtons(); });
Scroll to Top