If a customer cancels a product or service, there will be no further renewals and therefore no further commissions earned. If the product is eligible for a refund, commission earned from the sale will be removed. If the refund is prorated, the commission removed will also be prorated.
You might also see a chargeback, which is a withdrawal or reversal of an already processed payment. Chargebacks are typically requested by a buyer who has a dispute with the vendor or seller, and files a claim with their credit card company or financial institution. Commission is also removed when a chargeback is completed.