Track Product Cost Price and Margin in Sparkforge

By Sparkforge Support Team ·Last reviewed May 3, 2026

Enable cost price and margin on any product or variant in Sparkforge to see profitability inline and export line-item cost data through the Transactions CSV.

Cost Price and Margin are optional fields on any Sparkforge product or variant. Turn them on at the price level (or variant level for multi-variant products) and the platform calculates profitability per sale, with no spreadsheet needed.

Definitions

  • Cost Price — what the product costs your business to deliver. Always greater than or equal to 0.
  • Margin (Amount) — Selling Price minus Cost Price. Can be positive or negative.
  • Margin (Percentage) — ((Selling Price − Cost Price) ÷ Cost Price) × 100. If Cost Price is 0, margin percentage is treated as 100%.

Why turn it on

  • See margin per product without leaving the Products module.
  • Enter either Cost Price or Margin and the other auto-calculates.
  • Works for one-time and recurring products, plus variants.
  • Cost data flows into the Transactions CSV as a Line Item Cost Price column.

Prerequisites

  • Access to Payments > Products.
  • At least one product created.
  • Product create/edit permission on the user.

Enable margin tracking on a product

  1. Go to Payments > Products.
  2. Click + Create Product or open an existing one.
  3. Scroll to the Pricing section.
  4. Check Add Margin. The Cost Price and Margin fields appear.
  5. Pick Amount or Percentage mode, enter one value, and the other calculates from the selling price.
  6. Click Save.

Leaving both fields empty after checking Add Margin treats Cost Price as equal to Selling Price and exports a margin of 0.

Enable margin tracking on variants

Each variant has its own independent Cost Price and Margin. Create variants first, then:

  1. Open the product and go to the Variants section.
  2. Click Edit on the variant.
  3. Check Add Margin in the variant's Pricing block.
  4. Enter Cost Price or Margin, save, and repeat for each variant.

How sync works

Switching modes or changing the selling price recalculates the dependent field instantly. In Amount mode, Margin = Selling Price − Cost Price. In Percentage mode, Margin % is restricted between -100% and 100% (margin is divided by cost price, unlike markup).

Invoices, calendars, and overrides

When selling price is overridden at the line item level (in invoices or calendars), Cost Price stays sourced from the original product price and margin is not recalculated. Setup fees on recurring products are excluded from margin logic — only the recurring amount counts.

Transactions CSV: Line Item Cost Price

Go to Payments > Transactions and click Export CSV. The Line Item Cost Price column populates for any product where cost price is defined. If undefined, the column is blank. Cost data is not retroactive — only transactions created after configuration carry the column.

Frequently Asked Questions

Can I add cost price to existing products?
Yes. Edit the product, check Add Margin, and enter values. Past transactions are unaffected — only future ones carry the cost data.
Is cost price visible to customers?
No. Cost price is internal and never appears at checkout, on receipts, or on invoices.
Can each variant have its own cost price?
Yes. Each variant combination tracks Cost Price and Margin independently.
Are setup fees included in margin calculations?
No. Setup fees on recurring products are excluded — only the recurring amount is used.
Are historical transactions updated when I add cost price?
No. Only transactions created after cost price is configured will populate the Line Item Cost Price column.

Was this article helpful?