law: Indian Stamp Act, 1899 
  24. How transfer in consideration of debt, or subject to
  
  future payment, etc. to be charged 
  Where any property is transferred to any person in
  
  consideration, wholly or in part, of any debt due to him, or subject either
  
  certainly or contingently to the payment or transfer of any money or stock,
  
  whether being or constituting a charge or encumbrance upon the property or not,
  
  such debt, money or stock is to be deemed the whole or part, as the case may
  
  be, of the consideration in respect whereof the transfer is chargeable with ad
  
  valorem duty:
  PROVIDED  that nothing in this section shall apply to
  
  any such certificate of sale as is mentioned in Article No. 18 of Schedule I.
   Explanation :In the case of a sale of property subject to a
  
  mortgage or other encumbrance, any unpaid mortgage money or money charged,
  
  together with the interest (if any) due on the same, shall be deemed to be part
  
  of the consideration for the sale:
  PROVIDED  that, where property, subject to a mortgage is
  
  transferred to the mortgagee, he shall be entitled to deduct from the duty
  
  payable on the transfer the amount of any duty already paid in respect of the
  
  mortgage.
   Illustrations  
  (1) A owes B Rs. 1,000. A sells a property to B, the
  
  consideration being Rs. 500 and the release of the previous debt of Rs. 1,000.
  
  Stamp duty is payable on Rs. 1,500.
  (2) A sells property to B for Rs. 500 which is subject to a
  
  mortgage to C for Rs. 1,000 and unpaid interest Rs. 200. Stamp duty is payable
  
  on Rs. 1,700.
  (3) A mortgages a house of the value of Rs. 10,000 to B for Rs.
  
  5,000. B afterwards buys the house from A. Stamp duty is payable on Rs. 10,000
  
  less the amount of stamp duty already paid for the mortgage.