@seabass/co-fee-calculator

Calculates fee rates for Collage

Usage no npm install needed!

<script type="module">
  import seabassCoFeeCalculator from 'https://cdn.skypack.dev/@seabass/co-fee-calculator';
</script>

README

co-fee-calculator

Collage Fee Calculations

NPM version Dependencies build status Test Coverage

API

(All values are in cents)

finalPrice(initialPrice)

Returns the price of the item as it would appear in the marketplace (after 5% + $1 rounded increase)

finalPriceMargin(initialPrice)

Returns the percentage increase in the price of the item when running finalPrice()

stripeFee(finalPrice)

Returns merchant fee charged by Stripe, based on finalPrice

sellerFee(initialPrice)

Returns amount to be paid to Collage by seller on transaction

sellerEarns(initialPrice)

Returns amount to be paid to seller on transaction

sellerEarnsPercentage(initialPrice)

Returns percentage of sale price paid to seller

sellerFeeRevenue(initialPrice)

What collage earns from seller on transaction. (sellerFee - stripeFee)

buyerFeeRevenue(initialPrice)

What collage earns by increasing price via finalPrice()

collageRevenue(initialPrice)

Sum of sellerFeeRevenue and buyerFeeRevenue