Fapiao1 (发票, fa1piao4) in mainland China are a kind of receipt issued for a variety of purposes, most having to do with accounting, taxation, expense reporting, etc.
That's what fapiao are. From here on out, it's all digressions about taxes, fraud and personal anecdotes. I can only speak to the system implemented in southern China, as opposed to Beijing, etc. and I fear my sources here are mostly going to be what I've been told. No well sourced factual here!
Fapiao are a very official kind of receipt that can be slightly baffling the first time you run into it. Let's take an example. You go out for dinner and at the end you're presented with an itemized receipt of everything you consumed and your total owed. You stack up RMB, they're taken away and your change comes back with...what's this? Why, it's a pile of small, very official looking pieces of paper bearing various denominations that add up to the total price of the meal. (Or, quite possibly, you're obviously New Here, and they try to get away with not giving you any receipt at all. More on that later.)
Let's say you're a tourist just visiting China. You're not paying taxes in China, and you can't write off any of the expenses either in China or your home country. You couldn't give an eighth of a shit about a receipt. But wait! Look carefully. See that little silvery area? That's a scratch-off lottery. I hope you brought a coin from home (or a stop-over in Hong Kong which has a really nifty wavey-ridged 2HKD coin,) because you're going to have to buy something comically tiny to ever see a coin in China. You win that puppy, the government will pay you out anything between a couple RMB to...well, I don't know how high it goes. The only person I talked to that had won double digits got something like 50RMB (about $7USD at the time.)
In the US, we have systems like the "$20 if you didn't get a receipt" signs you see in some places. In that case, it's to keep employees from pocketing sales without ringing them up. In the same vein every customer has a material incentive to make sure to get fapiao at every opportunity. Even if you don't care about a couple bucks, it's fun to sit back after a meal with a group and let someone scratch all the fapiao while everyone roots for them.
It's really quite fiendish. Every consumer has a reason to ask for their fapiao. The government prints up books of fapiao in various denominations for each business and can account for what monetary value of sales they've gone through in the books and tax them accordingly. In a system like the US, you can do all sorts of jiggery-pokery. You can fake receipt tapes trivially. You can print receipts that never end up on the books. It's beyond trivial. Fapiao are simultaneously harder to fake, and less worth faking. Take fapiao for 1RMB. 1RMB is about $.15USD. I can't imagine the cost to forge fapiao for 15 cents of income being lower than the taxes on that income. Forging only larger denominations would probably raise red flags as well. On top of that, I'd guess that the statistical distribution of scratch off wins could be used to raise flags.
Thus, the incentive is created for the tax-minimizing business to never, ever offer fapiao to foreigners. Make 'em ask for it. Seems to me like a pretty clever system.
So, we've got an interesting system designed to minimize unreported income by businesses. That brings us to the ever important topic of expensing.
Say you need to purchase something with your own money that you're going to expense to a Chinese company. That fapiao is what you're going to turn in. Now, this is where it gets really interesting.
Let's say you're in a position to expense things to your company. Let's say you have larceny in your heart and just want to get paid, and you're allowed to expense a certain amount for lunch every day. Remember that system that ensures that every single person asks for their fapiao, scratches it off, and then stops giving a fuck? Opportunity is knocking. You eat at that noodle place that charges nearly nothing, find some of that scratched off fapiao from another restaurant that adds up close to your expensable limit.
There are certainly places in Shenzhen that sound like Central Park in the 80's. There are people just loitering around certain areas muttering "fapiao, fapiao" over and over like they were selling crack. I was told that these people ranged from intermediaries for proper forgers to people that just sold other people's fapiao (say...from a restaurant waiter that always grabbed the scratched fapiao left behind.)
There's fapiao for much larger expenses like rent, corporate purchasing, etc. I know nothing of these things but from what I heard, there's a totally different industry there for defrauding that part of the system.
1: Words in Mandarin don't tend to have a plurality. They use numbers and counting words. So I apologize if I'm messing up is/are all over the place.