Let me answer this by different positions that you might hold on to expiry.
Long futures
Futures get settled on the settlement price on expiry day and the P&L gets added on your ledger. Post this, long futures position converts into buy stock holding position. You receive the stock after two days, but the trade date will be the expiry day and future settlement price will be the buy average price of the stock.
Since this is a Buy futures position, you will have to pay 0.1% of the contract value as STT.
Short futures
Same as above. Trade date is the expiry day, selling price of the stock from your holding is the settlement price of futures.
No STT on this trade.
Long Calls
Assume you had 1 lot (5000 quantity) of stock X calls with 100 strike bought at Rs 2. Stock closes at 103 on expiry.
All options will get expired at 0 value.
You will get 5000 shares of stock X with a buy price of 100 and trade date as expiry day.
STT of 0.125% of contract value
Short calls
All options expire at 0 value
You will have to deliver 5000 shares. So sell trade date will be expiry day and strike price will be the sell price.
No STT on this trade
Long puts
All options expire at 0 value
You will have to deliver 5000 shares. So sell trade date will be expiry day and strike price will be the sell price.
0.125% of the contract value as STT on this trade
Short puts
All options will get expired at 0 value.
You will get 5000 shares of stock X with a buy price of 100 and trade date as expiry day.
No STT on this trade
In case you have multiple positions which lead to net zero delivery obligation, each of these will be considered as separate exercises and STT applied. So for example,
If you had long futures and were short 102 strike calls at Rs 2. If you held this to expiry where the stock closed at 105. Following will happen
5000 buy stock at 105 (settlement price) - STT applicable
5000 sell stock at 102 (strike price) - STT not applicable
In net, there is no delivery obligation. But STT will be applicable.