Cut-price retail group The TJX Companies has agreed to pay up to US$24m in settlements to MasterCard users whose records were stolen by computer hackers.