Marginrule pricing agent
v0.3.4Pricing math for Etsy, Shopify, Payhip, Gumroad, Ko-fi, Notion Marketplace and Square.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
price_for_margin Lowest price for a target margin
Finds the lowest whole-cent price that keeps a target profit margin after a platform's fees, for a given cost per item. Use it when a US seller asks what to charge on Etsy, Shopify Basic, Payhip, Gumroad, Ko-fi, Notion Marketplace or Square to hit a margin. status is "ok", "not_possible" or "not_practical". With "ok" it returns price_usd, the fee breakdown at that price, profit_usd and the achieved margin. Do not use it for sellers outside the US, for Amazon FBA, for competitor repricing, for VAT, for shipping, or for monthly plan fees (use compare_plans for plan costs). Inputs are platform, c…
| Parameter | Type | Description |
|---|---|---|
cost * | number | Your cost per item sold in USD (materials, labour, packaging you pay). 0 for a digital download with no per-sale cost. |
platform * | string | Platform and plan id from list_platforms, e.g. "etsy", "payhip-free", "gumroad-direct", "ko-fi-shop". |
target_margin * | number | Target profit margin as a FRACTION of the price: profit / price. 0.30 means 30%. Must be at least 0 and under 1. A value like 30 is rejected as a percent. Margins below 0.0001 are treated as 0. Within… |
buyer_tax_rate | number | Buyer's sales tax as a FRACTION, e.g. 0.07 for 7%. Default 0. Tax is never profit; it only raises card processing on platforms that charge processing on the tax-inclusive total (see each platform's ta… |
cross_border | string | Optional cross-border and currency-conversion fees, from official pages opened 2026-11-20. "none" (the default) leaves them out, so answers match earlier callers. "international" adds the sourced extr… |
offsite_ads | string | Etsy only. Optional Offsite Ads flag. "none" (the default) leaves the fee out, so answers match earlier callers. "under_10k" adds 15% of the item price for a shop that has always made less than $10,00… |
price_floor_usd | number | Lowest price to suggest, in USD. Default 1.00 (Marginrule's assumption, not a platform rule). 0 turns the floor off. |
processor | string | Card processor for platforms where the seller adds their own (Payhip plans, Ko-fi Shop). "stripe" = 2.9% + $0.30 (default). "paypal" = PayPal Checkout or Guest Checkout, 3.49% + $0.49. Ignored, with a… |
processor_fixed_usd | number | Advanced override: your card processor's fixed fee per sale in USD, e.g. 0.30. Replaces the preset's fixed fee. |
processor_rate | number | Advanced override: your own card processor percentage as a FRACTION (0.029 = 2.9%). Only for platforms where the seller adds their own processor. Replaces the preset's rate. |
region | string | Buyer location relative to a US seller. "us" (default) = domestic. "international" is only modelled with processor "paypal" (adds PayPal's 1.50% international fee, so 4.99% + $0.49); other combination… |
fees_breakdown Fees and take-home at a price
Reports the fees a platform takes from one sale at a given price, split into platform, listing and card processor parts, plus net after fees, and with an optional cost, profit and margin as a fraction. Use it when a US seller asks what they keep from a sale on Etsy, Shopify Basic, Payhip, Gumroad (including Discover), Ko-fi, Notion Marketplace or Square. Do not use it for sellers outside the US, for Amazon FBA, for competitor repricing, for VAT, for shipping, or for monthly plan costs (use compare_plans to compare plans at a monthly volume). Inputs are platform and price. Optional cost, buyer_…
| Parameter | Type | Description |
|---|---|---|
platform * | string | Platform and plan id from list_platforms, e.g. "etsy", "payhip-free", "gumroad-direct", "ko-fi-shop". |
price * | number | Sale price in USD before buyer sales tax, in whole cents, at least 0.01, e.g. 17. |
buyer_tax_rate | number | Buyer's sales tax as a FRACTION, e.g. 0.07 for 7%. Default 0. Tax is never profit; it only raises card processing on platforms that charge processing on the tax-inclusive total (see each platform's ta… |
cost | number | Optional cost per item in USD, so the answer includes profit and margin. Default 0. |
cross_border | string | Optional cross-border and currency-conversion fees, from official pages opened 2026-11-20. "none" (the default) leaves them out, so answers match earlier callers. "international" adds the sourced extr… |
offsite_ads | string | Etsy only. Optional Offsite Ads flag. "none" (the default) leaves the fee out, so answers match earlier callers. "under_10k" adds 15% of the item price for a shop that has always made less than $10,00… |
processor | string | Card processor for platforms where the seller adds their own (Payhip plans, Ko-fi Shop). "stripe" = 2.9% + $0.30 (default). "paypal" = PayPal Checkout or Guest Checkout, 3.49% + $0.49. Ignored, with a… |
processor_fixed_usd | number | Advanced override: your card processor's fixed fee per sale in USD, e.g. 0.30. Replaces the preset's fixed fee. |
processor_rate | number | Advanced override: your own card processor percentage as a FRACTION (0.029 = 2.9%). Only for platforms where the seller adds their own processor. Replaces the preset's rate. |
region | string | Buyer location relative to a US seller. "us" (default) = domestic. "international" is only modelled with processor "paypal" (adds PayPal's 1.50% international fee, so 4.99% + $0.49); other combination… |
discount_impact What a discount does to fees and profit
Shows what a percentage or fixed-dollar discount on one item does to fees and profit at list and at the discounted price. It also reports the profit lost per sale and how many discounted sales it takes to match 100 sales at list. Use it when a US seller asks about a sale or promo code on Etsy, Shopify Basic, Payhip, Gumroad, Ko-fi, Notion Marketplace or Square. With optional target_margin it also returns the deepest discount that still keeps that margin after fees. Do not use it for sellers outside the US, for order-level discounts, free shipping offers, platform-funded promotions, VAT, Amazon…
| Parameter | Type | Description |
|---|---|---|
list_price * | number | Regular price in USD before the discount and before buyer sales tax, in whole cents, e.g. 20. |
platform * | string | Platform and plan id from list_platforms, e.g. "etsy", "payhip-free", "gumroad-direct", "ko-fi-shop". |
buyer_tax_rate | number | Buyer's sales tax as a FRACTION, e.g. 0.07 for 7%. Default 0. Tax is never profit; it only raises card processing on platforms that charge processing on the tax-inclusive total (see each platform's ta… |
cost | number | Optional cost per item in USD, so profit and margin are included. Default 0. |
cross_border | string | Optional cross-border and currency-conversion fees, from official pages opened 2026-11-20. "none" (the default) leaves them out, so answers match earlier callers. "international" adds the sourced extr… |
discount_rate | number | Percentage off as a FRACTION: 0.25 means 25% off, used to 6 decimals. Send this OR discount_usd, not both. The dollar amount off is rounded to the cent, half away from zero. |
discount_usd | number | Fixed dollars off per item, in whole cents, e.g. 5. Send this OR discount_rate, not both. |
offsite_ads | string | Etsy only. Optional Offsite Ads flag. "none" (the default) leaves the fee out, so answers match earlier callers. "under_10k" adds 15% of the item price for a shop that has always made less than $10,00… |
processor | string | Card processor for platforms where the seller adds their own (Payhip plans, Ko-fi Shop). "stripe" = 2.9% + $0.30 (default). "paypal" = PayPal Checkout or Guest Checkout, 3.49% + $0.49. Ignored, with a… |
processor_fixed_usd | number | Advanced override: your card processor's fixed fee per sale in USD, e.g. 0.30. Replaces the preset's fixed fee. |
processor_rate | number | Advanced override: your own card processor percentage as a FRACTION (0.029 = 2.9%). Only for platforms where the seller adds their own processor. Replaces the preset's rate. |
region | string | Buyer location relative to a US seller. "us" (default) = domestic. "international" is only modelled with processor "paypal" (adds PayPal's 1.50% international fee, so 4.99% + $0.49); other combination… |
target_margin | number | Optional target profit margin as a FRACTION (0.30 = 30%). If sent, the answer also gives the deepest discount off list_price that still keeps it, and whether this discount keeps it. |
compare_plans Which plan keeps the most at my volume
Compares selling plans at a price and monthly sales volume for Payhip Free, Plus and Pro, Gumroad direct and Discover, Ko-fi Shop and Ko-fi Gold, and Shopify Basic, Grow and Advanced, each billed monthly or yearly. Use it when a US seller asks which of those plans keeps the most after per-sale fees and monthly plan cost, or where the break-even between tiers falls. Do not use it for Etsy, Notion Marketplace or Square (they have no plan choice in the fee data, so use fees_breakdown), for sellers outside the US, for international cards, for Amazon FBA, for competitor repricing, for VAT, refunds,…
| Parameter | Type | Description |
|---|---|---|
price * | number | Your sale price per item in USD before buyer sales tax, in whole cents, e.g. 17. |
sales_per_month * | integer | How many sales you make (or expect) in a month, a whole number, e.g. 50. |
cost | number | Optional cost per item sold in USD, so the answer adds profit_per_month_usd and counts it in sales_to_cover_plan_cost. Default 0. |
platforms | array | Optional filter: families (payhip, gumroad, ko-fi, shopify) and/or plan ids (payhip-free, payhip-plus, payhip-pro, gumroad-direct, gumroad-discover, ko-fi-shop, ko-fi-gold, shopify-basic-monthly, shop… |
processor | string | Card processor for the plans where you add your own (Payhip plans, Ko-fi Shop and Ko-fi Gold). "stripe" = 2.9% + $0.30 (default). "paypal" = PayPal Checkout or Guest Checkout, 3.49% + $0.49. Domestic… |
list_platforms List platforms and fee presets
Every platform this server prices per sale is Etsy, Shopify Basic, Payhip Free, Plus and Pro, Gumroad direct and Discover, Ko-fi Shop, Notion Marketplace, and Square online or in person. It returns rates as fractions, fixed and listing fees in USD, monthly plan fee, whether it sells digital downloads, whether the seller adds their own processor, the tax-base flag, fees-as-of date, source URLs, and the card processor presets. Use it when you need valid platform ids or to read the sourced rates. Ko-fi Gold is a plan option, so it appears only in compare_plans. Shopify Grow and Advanced are plan…
data_version Fee data version and sources
Returns the fee dataset version, check dates, a staleness warning, hashes, and the source URLs for every platform and card processor. The full result includes the fees-as-of date per platform and processor, the oldest check date, the latest fee changelog entry, and SHA-256 of the embedded fee data and engine. Use it to cite or cache answers, or to check whether fee rows may be stale. Do not use it for price or fee math (use the other tools), for sellers outside the US, for Amazon FBA, for competitor repricing, or for VAT. It takes no inputs. US sellers only. Read-only.