I don't recall the particulars of the answer, but it was eye-opening. She said that they had a team of lawyers whose job was to (try to) keep track of all of the laws, all over the world, that had any bearing on this topic. Not only was it state and federal law, but also county and even city law. (And territories...and military bases....etc.) There were some stipulations about where the card was bought AND where the card was used, if in different jurisdictions. Many of the laws were contradictory. In some cases, none of the money could be reclaimed, and would revert to different local funds. There were effectively endless permutations.
She and her team had to decide what of all of this they would model with code. They could not model all of it, so there was a hybrid of some actions being taken with the code, and the code outputting reports that humans would use to make decisions about actions.
It was eye opening to consider how legally complex many such 'simple' things, like gift cards, are when implemented on a wide scale.