[Commands] Add temp permission that expires after purchase is used.

How would I go about adding temp permission that are link to specific commands and then remove that permission when the command has been executed? an example would be some thing like:

Player A buys a command that is locked behind permission B. As a result of the purchase Player A is granted permission B until the purchased command is used, at which point permission B is removed from player A.

Is this possible?

And is it possible to give the player a visual representation of the command they purchased, like a note? Would it also be possible to have the command execute x = seconds after discarding it from inventory?

Thanks in advance,
 Gancho

Did you find out how? Am wanting to put backpack for a week, etc.