Record transaction ID in database