Skip to content

Latest commit

 

History

History
44 lines (38 loc) · 1.29 KB

rate-tiers.mdx

File metadata and controls

44 lines (38 loc) · 1.29 KB
title
Rate Tiers

Discounts are applied on USD-NGN offramp transaction rates based on the transaction amount. These discounts aim to provide better rates for customers transacting higher volumes.

Here are the rate tiers and applied discounts:

Amount Discount
$51 - $200.99 0.2%
$201 - $1,000.99 0.35%
$1,001 - $5,000.99 0.55%
$5,001 - $15,000.99 0.7%
$15,001+ 1%

These discounts are applied automatically. However, you can calculate the exact discounted rate from the base rate as follows:

```javascript Node function getDiscountedRate(transactionAmount, baseRate) { let discount = 0; const rateTiers = [ { min: 15001, rate: 1 }, { min: 5001, rate: 0.7 }, { min: 1001, rate: 0.55 }, { min: 201, rate: 0.35 }, { min: 51, rate: 0.2 }, { min: 0, rate: 0.0 } ]; const sortedThresholds = rateTiers.sort((a, b) => b.min - a.min); for (const threshold of sortedThresholds) { if (transactionAmount >= threshold.min) { discount = threshold.rate; break; } } const discountedRate = baseRate * (1 + discount / 100); return Number(discountedRate.toFixed(2)); }
</CodeGroup>