If an obligee receives the full value of a thing or right which is the subject of the claim as damages, the obligor subrogates the obligee to that thing or right by operation of law.
債権者が、損害賠償として、その債権の目的である物又は権利の価額の全部の支払を受けたときは、債務者は、その物又は権利について当然に債権者に代位する。
Read this with the articles around it
damages
損害賠償
Compensation for loss one person has caused another. A debtor who does not perform an obligation as it should be performed, or cannot perform it, must compensate the creditor for the loss that results, unless the failure comes from a cause the debtor is not responsible for, judged by the contract or other source of the obligation and by accepted views in dealings (Civil Code, Article 415, paragraph (1)); and a person who, intentionally or negligently, infringes another's rights or legally protected interests must compensate for the loss that results (Article 709). It is paid in money unless otherwise agreed (Articles 417 and 722, paragraph (1)), and the parties to a contract may agree in advance the amount due if it is not performed; a sum fixed for breach (違約金) is presumed to be such an agreement (Article 420, paragraphs (1) and (3)). The Consumer Contract Act makes void the part of such an amount in a consumer contract, for its cancellation, with any penalty added, above the average loss the business would suffer from the cancellation of consumer contracts of that kind, measured separately for each category the clause sets, such as the reason for and time of cancellation (Consumer Contract Act, Article 9, paragraph (1), item (i)).
Written for this site using Civil Code, Arts. 415, 417, 420, 709, 722 and Consumer Contract Act, Art. 9 as a reference.