Some customers will never pay. Accounting estimates that loss up front, before anyone knows which customers they are.
Accounts receivable in the general ledger is the sum of every customer’s balance in a subsidiary ledger.
The card company’s fee is an expense the moment the sale happens, not a reduction of revenue.
A company does not have to hold every receivable it creates. It can raise cash sooner by them as collateral for a loan, or by them outright to a for immediate cash, usually at a discount.
A sale works like factoring at the register: the merchant accepts a little less cash today in exchange for skipping the risk and the wait.