Here is where I think some confusion may originate: Many (in fact, most) law firms will not even charge you for fees and expenses, unless the win (even though, legally, they could.) When an attorney says, "We handle your SSDI/SSI claim only on a contingency basis, they mean that they will waive those fees, if they lose."
The law says that attorneys don't have to take disability cases only on a contingency basis. But that just means that they can choose to make you reimburse them for expenses they have covered, like medical record copying fees.
If you lose, and there is no contingency contract, the attorney can submit a "fee petition" to the Social Security Administration, itemizing his out of pocket expenses, like traveling costs and document copying costs. He can bill you for those expenses only if SSA approves the petition. Before approving the "fee petition," the SSA requires that you get a copy of these expenses and have the opportunity to contest those fees, if you think they are innaccurate.