Pay your taxes on bitcoin…or else.

Late last year, the Internal Revenue Service persuaded a federal judge to require Coinbase, a San Francisco-based digital-currency wallet and platform with about 20 million customers, to turn over customer information. Driving the IRS’s decision was its belief that few bitcoin investors appear to be paying taxes due on sales. The court order is one of the agency’s first moves as it clamps down on cryptocurrency scofflaws.

By March 16, the IRS will have data on about 13,000 Coinbase account holders who bought, sold, sent or received digital currency worth $20,000 or more between 2013 and 2015. The data include the customer’s name, taxpayer identification number, birth date and address, plus account statements and the names of counterparties.

Criminal tax lawyers expect the IRS will act on the information and high-profile cases will follow.

Some cryptocurrency holders are now disclosing past tax lapses to avoid potential criminal prosecution.

Bryan Skarlatos, a lawyer with Kostelanetz & Fink with several such cases, reminds cryptocurrency investors of the IRS’s success in piercing the veil of Swiss bank secrecy. Since 2009, more than 56,000 Americans who hid money in offshore accounts have paid more than $11 billion to resolve tax issues.

“Digital currency holders shouldn’t think they can hide from the IRS,” he says.

Smaller investors are also feeling heat. Many traded during last year’s price spike, and tax preparers are now asking clients routinely about cryptocurrency sales. They aren’t supposed to sign returns with unreported income.

To be sure, the IRS hasn’t clarified important issues on digital currencies, and these gaps leave room for favorable interpretations.

But the gaps don’t leave room for hiding income. With the April tax date approaching, here is important information.

Asset type. In 2014, the IRS issued a notice declaring that cryptocurrencies are property, not currencies like dollars or francs. Often they are investment property akin to stock shares or real estate.

So if an investor sells a cryptocurrency after holding it longer than a year, then the profits are typically long-term capital gains. The tax rate is 0%, 15%, or 20%, plus a 3.8% surtax in some cases, depending on the owner’s total income.

Short-term gains on cryptocurrencies held a year or less are typically taxable at higher, ordinary-income rates. Capital losses can offset capital gains and up to $3,000 of other income a year, and unused losses can be carried forward for future use.

If digital currencies are held for personal use, as a home is, rather than primarily as an investment, then profits are taxable but losses aren’t deductible. The IRS hasn’t issued guidance in this area.

Tax triggers. Selling a cryptocurrency for cash typically triggers capital gains or losses. Using it to buy something like a meal or a car also counts as a sale by the buyer, even if the recipient accepts the cryptocurrency.

Recipients of these payments often have taxable income as well. If a worker is paid in bitcoin, payroll or self-employment taxes could also be due.

Cryptocurrency trades. An exchange of one digital currency for another—say, bitcoin for Ethereum—is taxable, beginning Jan. 1, 2018, because of the tax overhaul.

What about earlier swaps? The IRS hasn’t said, but some specialists think these could qualify as nontaxable “like-kind” exchanges.

Say that an investor bought some bitcoin for $100 several years ago and exchanged it for Ethereum last year. Ryan Losi, a certified public accountant with Piascik in Glen Ellen, Va., says the taxpayer could reasonably treat it as a nontaxable exchange. If so, it should be reported on IRS Form 8824.

He notes that when the Ethereum is sold, the investor’s “basis” in the Ethereum would be $100, because it carried over from the bitcoin. Basis is the starting point for measuring taxable gains.

Lot identification. If an investor bought bitcoin at $100, $2,000 and $15,000 and sold some of it for $14,000 last year, what was the investor’s basis?

The rules aren’t clear. Deloitte Tax CPA Jim Calvin advises investors selling partial lots to identify them specifically and get third-party confirmation before the sale. “Ideally, there would be a time stamp,” he says.

Account disclosure. Good news: According to a Treasury unit, investors aren’t currently required to report cryptocurrency holdings on FinCen Form 114, known as the Fbar, which is often required for foreign accounts greater than $10,000.

Chain-splits. These occur when a cryptocurrency branches into two or more versions, as bitcoin and Bitcoin Cash did last year. Investors are often entitled to new coins as a result.

Does this right generate taxable income? After much study, Mr. Calvin believes it isn’t taxable until the investor claims the new coins.

Statutes of limitations. In general, the IRS has until three years after a return’s due date to assess a deficiency, but that expands to six years if income is understated by more than 25%.

There are many exceptions. Among them: The statute doesn’t start running until the return is filed, and there is no time limit for civil fraud.

Write to Laura Saunders at