Hooks for generating license key on product purchases

Hello,

I need to extend Marketpress to generate and store a license key string in the DB when certain products are purchased. I realize this will need to be custom code but would appreciate a pointer in the right direction as to the best way to get Marketpress to call my code when a purchase payment clears.

Thanks in advance!