The National Stock Exchange of India has agreed to pay Rs 40.35 crore to settle charges related to the indirect sharing of confidential information on listed companies with a third-party vendor, the Securities and Exchange Board of India (Sebi) said on Friday.