How can I tell if a discount code was used in a post-purchase extension?

It’s seems that inputData doesn’t tell you if a customer has used a discount or not, is there a way to find on the post purchase level if a customer has used a discount and if yes the code of the discount ?