https://www.irs.gov/pub/irs-pdf/f8949.pdf

If you get a 1099-k, then fill out that form so that you can specify the cost basis for the goods sold.

What a mess.