Crypto Payment Processor Fee Analyzer

Your Typical Transaction Profile (Monthly)

Payment Processor Details

Est. Transactions per Month: ${inputs.numTxPerMonth}

Total Monthly Volume Processed: ${cpp_formatCurrency(results[0].totalMonthlyVolume)}

`; results.forEach((procInputs, index) => { const proc = inputs.processors[index]; inputsHtml += `
Processor ${index + 1}: ${proc.processorName} - Inputs
Tx Fee %:${cpp_formatPercentage(proc.txFeePercent)}
Tx Fee Fixed $:${cpp_formatCurrency(proc.txFeeFixed)}
Est. Monthly Payout Fees $:${cpp_formatCurrency(proc.estMonthlyPayoutFees)}
Monthly Platform Fee $:${cpp_formatCurrency(proc.monthlyFee)}
Setup Fee $:${cpp_formatCurrency(proc.setupFee)} (Amortized: ${cpp_formatCurrency(proc.amortizedSetupFee)}/mo)
Supported Cryptos:${proc.supportedCryptos.replace(/
Settlement Options:${proc.settlementOptions.replace(/
`; }); let comparisonTableHtml = `Metric`; results.forEach(res => comparisonTableHtml += `${res.name}`); comparisonTableHtml += ``; let lowestCostPdf = Infinity; let bestProcessorNamePdf = ""; results.forEach(res => { if (res.totalMonthlyCost < lowestCostPdf) { lowestCostPdf = res.totalMonthlyCost; bestProcessorNamePdf = res.name; }}); const metricsPdf = [ { label: "Est. Monthly Transaction Fees", key: "totalTxFees", format: cpp_formatCurrency }, { label: "Est. Monthly Payout Fees", key: "estMonthlyPayoutFees", format: cpp_formatCurrency }, { label: "Recurring Monthly Platform Fee", key: "monthlyFee", format: cpp_formatCurrency }, { label: "Amortized Setup Fee (Monthly)", key: "amortizedSetupFee", format: cpp_formatCurrency }, { label: "Total Estimated Monthly Cost", key: "totalMonthlyCost", format: cpp_formatCurrency, highlight: true }, { label: "Net Amount Received by Merchant", key: "netAmountReceived", format: cpp_formatCurrency }, { label: "Effective Total Fee Rate (%)", key: "effectiveFeeRate", format: cpp_formatPercentage, highlight: true } ]; metricsPdf.forEach(metric => { comparisonTableHtml += `${metric.label.replace(/|<\/strong>/g, "")}`; // Remove strong for PDF data cell results.forEach(res => { const value = res[metric.key]; const displayValue = metric.format(value); const isHighlighted = (metric.highlight && res.name === bestProcessorNamePdf); comparisonTableHtml += `${displayValue}`; }); comparisonTableHtml += ``; }); comparisonTableHtml += ``; let conclusionTextPdf = bestProcessorNamePdf !== "" ? `Based on inputs, ${bestProcessorNamePdf} appears most cost-effective (Total Monthly Cost: ${cpp_formatCurrency(lowestCostPdf)}).` : "Review individual processor costs."; const interpretationNote_pdf = `Fee structures subject to change; verify with processors. Estimates exclude blockchain network fees unless part of processor fees. Consider all factors beyond cost.`; pdfContentEl.innerHTML = `
Crypto Payment Processor Fee Analysis
Transaction Profile & Processor Inputs
${inputsHtml}
Fee Comparison Summary
${comparisonTableHtml}
${conclusionTextPdf}
Important Notes: ${interpretationNote_pdf}
`; document.body.appendChild(pdfContentEl); html2canvas(pdfContentEl, { scale: 2, useCORS: true, logging:true, width: pdfContentEl.scrollWidth, windowHeight: pdfContentEl.scrollHeight }).then(canvas => { const imgData = canvas.toDataURL('image/png'); const pdfWidth = pdf.internal.pageSize.getWidth(); const pdfHeight = pdf.internal.pageSize.getHeight(); const imgProps = pdf.getImageProperties(imgData); let pageHeightPt = pdfHeight - 40; // margins let effectiveCanvasHeightForOnePage = pageHeightPt * (imgProps.width / (pdfWidth - 40)); let numPages = Math.ceil(imgProps.height / effectiveCanvasHeightForOnePage); for (let i = 0; i < numPages; i++) { if (i > 0) pdf.addPage(); let sourceY = i * effectiveCanvasHeightForOnePage; let sourceHeight = Math.min(effectiveCanvasHeightForOnePage, imgProps.height - sourceY); const pageCanvas = document.createElement('canvas'); pageCanvas.width = imgProps.width; pageCanvas.height = sourceHeight; const ctx = pageCanvas.getContext('2d'); ctx.drawImage(canvas, 0, sourceY, imgProps.width, sourceHeight, 0, 0, imgProps.width, sourceHeight); const pageImgData = pageCanvas.toDataURL('image/png'); const pageImgHeight = (sourceHeight * (pdfWidth - 40)) / imgProps.width; pdf.addImage(pageImgData, 'PNG', 20, 20, pdfWidth - 40, pageImgHeight, undefined, 'FAST'); } pdf.save('Crypto_Processor_Fee_Analysis.pdf'); if(document.body.contains(pdfContentEl)) document.body.removeChild(pdfContentEl); }).catch(err => { console.error("CPP PDF Error:", err); alert("Error generating CPP PDF. See console."); if(document.body.contains(pdfContentEl)) document.body.removeChild(pdfContentEl); }); } document.addEventListener('DOMContentLoaded', function() { cpp_generateProcessorInputs(); // Initialize with default number of processor inputs if (!document.getElementById('cpp_avgTxValue')) { console.error("Critical input 'cpp_avgTxValue' not found."); } });
Scroll to Top