after payment action

HI,
i want to add a some extra data in my custom table after the payment was successful done
and redirect to the thank you page ,
and after the user select the trial membership and redirect to the thank you page ,
so is there any action for this ..
Thnaks