The Standard Insurance Company appeals 1 from an order of the bankruptcy court granting the debtor’s complaint for a declaratory judgment. The court determined that Standard may not recoup $45,316.54 of disability insurance “overpay-ments” from the debtor’s future disability payments. For the reasons below, we reverse and remand.
BACKGROUND
The facts were established by stipulation of the parties and are not in dispute. The debtor, Joseph Terry, was employed by the state of Missouri. He received a group long term disability policy through the Missouri State Employees’ Retirement System (MOSERS), which provides monthly long term disability benefits for certain disabled MOSERS employees. Terry became disabled on December 6, 2005. He filed a claim under the policy and Standard began sending Terry’s benefits in August of 2006. Two years later, in May of 2008, Terry was awarded Social Security Disability benefits, including a retroactive payment of $45,316.54 for a period going back to June 1, 2006.
Terry’s disability policy through Standard provided that his long term disability insurance benefits would be reduced by the amount of any Social Security payments he received and that Standard would be entitled to be reimbursed from his future Standard benefits for any previous “overpayments.” Standard determined that it had the right to the debtor’s retroactive award of $45,316.54 in SSDI. The policy provides that Standard will reduce its monthly benefit payment to the beneficiary by the amount of the beneficiary’s deductible income. The policy defines deductible income as including “Any amount you [the beneficiary] may receive or are eligible to receive because of your disability or retirement under: a. The Federal Social Security Act.” The policy provides rules for deductible income, including the following: “We will not deduct pending Deductible Income until it becomes payable. You must notify us of the amount of the Deductible Income when it is approved. You must repay us for the resulting overpayment of your claim” and *819“We will notify you of the amount of any overpayment of your claim [...]. You must immediately repay us. You will not receive any LTD Benefits until we have been repaid in full. In the meantime, any LTD Benefits paid, including the Minimum LTD Benefit, will be applied to reduce the amount of the overpayment.” On that basis, Terry repaid $45,316.54 to Standard from his deposit account on July 24, 2008.2
Terry filed a chapter 7 petition on July 31, 2008, one week after Standard had debited his account to reimburse itself for the overpayment. On October 29, 2008, the debtor received his chapter 7 discharge. On April 20, 2009, the trustee, Norman E. Rouse, sent a preference demand letter to Standard. The trustee demanded that Standard return the overpayment that it had received from the debtor on July 24, 2008. In response, Standard immediately sent the money to the trustee. Standard then reinstated Terry’s obligations for the overpayment and began to deduct the overpayment from Terry’s post-petition long term disability benefits. After the bankruptcy noted its concern that Standard might not be entitled to take that action against the debtor, Standard ceased the deductions pending the court’s determination regarding the various parties’ rights to the funds.
On July 30, 2009, Terry commenced this adversary proceeding against Rouse and Standard, seeking: 1) judgment declaring the rights, duties, and legal relationships between the plaintiff and the defendants; 2) judgment in favor of Terry and against the trustee for turnover of the $45,316.54; and 3) judgment in favor of Terry and against Standard requiring Standard to pay his monthly disability payments lawfully withheld retroactive to April 2009 and requiring payment of all future disability benefits as provided under the MOSER’S deferred compensation plan.
On October 23, 2009, Terry amended his schedules to claim an exemption in his entire future monthly disability benefit from Standard. No party objected to Terry’s claimed exemption. On March 23, 2010, the court ruled that the debtor could not claim as exempt the $45,316.54 that he had previously paid to Standard. The court therefore treated that issue as moot and dismissed Terry’s claims against the trustee. The only issue determined by the court in the order on appeal was whether Standard may exercise the equitable right of recoupment post-bankruptcy to recover from the debtor the money that Standard turned over to the trustee. Because the bankruptcy court determined that Standard was not entitled to recoupment solely on the basis of 11 U.S.C. § 502(h), it did not address the merits of Standard’s re-coupment defense and made no findings regarding equitability.
Standard of Review
The interpretation of 11 U.S.C. § 502(h) is a legal conclusion, which we review de novo. The CIT Group/Equipment Financing, Inc. v. M & S Grading, Inc. (In re M & S Grading, Inc.), 457 F.3d 898, 899 (8th Cir.2006); Bankr.R. 8013.
Discussion
When Standard turned over to the trustee the $45,316.54 that Terry had repaid it, the debtor’s satisfaction was undone and Standard’s right to be reimbursed by the debtor for the overpayment was revived. Hutchinson v. Otis, Wilcox & Co., 190 U.S. 552, 554, 23 S.Ct. 778, 779, 47 L.Ed. 1179 (1903) (“When Otis, Wilcox, & Co. paid the debts out of which they had received satisfaction, they undid the satisfaction, and the trustee in bankruptcy *820knew it. We see no sufficient ground on which he can deny the consequence that the right to prove revived.”). Standard’s right to be reimbursed for the overpayment is a claim. 11 U.S.C. § 101(5). As such, Standard’s claim is entitled to be paid as a general claim as allowed under 11 U.S.C. § 502(h).
Contrary to the bankruptcy court’s holding and the debtor’s arguments, nothing in § 502(h) limits Standard to a claim against the estate or eliminates Standards rights against the debtor. Section 502(h) assumes the existence of a prepetition claim and instructs the court on how such a claim is to be allowed in the case— nothing more. It does not create claims or confer priority and most importantly for our purposes, it does not purport to limit Standard’s rights to recovery. 11 U.S.C. § 502(h); Busseto Foods, Inc. v. Laizure (In re Laizure), 548 F.3d 693, 698 (9th Cir.2008) (holding that after trustee avoided a preference, the preference recipient’s claim against the debtor was reinstated and § 502(h) did not change the nature of the underlying claim). Although it is clear that Standard had a general unsecured claim and it is undisputed that it had notice of the case, it did not file a proof of claim, so its claim was not allowed. As a result, it was not entitled to any distribution in the case, which would have had the effect of reducing or even eliminating the amount it is trying to recover from the debtor. Its claim was also discharged. 11 U.S.C. § 727(b) (“a discharge under subsection (a) of this section discharges the debtor from all debts that arose before the date of the order for relief under this chapter”); Fed. R. Bankr.P. 3002(a).
Although Terry’s debt to Standard for the overpayment was discharged, Standard’s recoupment defense survived. The equitable defense3 of recoupment entitles Standard to defend against demands by the debtor under the contract by withholding payment in order to essentially repay itself for the overpayment, if the elements are satisfied. Williams v. Neely, 134 F. 1 (8th Cir.1904) (Recoupment is an equitable defense, which “crept from courts of chancery into the practice at law to enable courts of law to avoid the expense of suits in equity, to prevent circuity of action, and to obtain its benefit.”). “Re-coupment is the keeping back of something that is due because there is an equitable reason for holding it.” Id. It “presents no affirmative cause of action for a recovery.” Id. See also 4 Norton Bankr. L. & Prac. 3d § 73:2 (2010) (“The matters raised by a claim of recoupment directly reduce the amount of damages to which a plaintiff is entitled. No affirmative judgment is allowed.”). The Supreme Court has commented that it is well-settled “that a bankruptcy defendant can meet a plaintiff-debtor’s claim with a counterclaim arising out of the same transaction, at least to the extent that the defendant merely seeks recoupment.” Reiter v. Cooper, 507 U.S. 258, 265 n. 2, 113 S.Ct. 1213, 1218 n. 2, 122 L.Ed.2d 604 (1993). See also Bird v. Carl’s Grocery Co. (In re NWFX, Inc.), 864 F.2d 593, 596-97 (8th Cir.1989) (“The common law doctrine of recoupment is still important in bankruptcy. Where it is applicable, recoupment may be used to afford a creditor preferential treatment. For re-coupment to apply, however, the creditor must have a claim against the debtor that arises from the same transaction as the debtor’s claim against the creditor.”) (citing In re B & L Oil Co., 782 F.2d 155, 157 (10th Cir.1986)). Although Standard can no longer collect the overpayment affirma*821tively, it may seek to exercise its right of recoupment under the contract.
The parties disagree about the application of the Eighth Circuit’s decision in Dewey. U.S. Postal Serv. v. Dewey Freight System, Inc., 31 F.3d 620, 623 (8th Cir.1994). Dewey was a chapter 11 case involving recoupment of damages following the rejection of an executory contract. The Eighth Circuit cited a number of cases where recoupment was allowed in the bankruptcy context, and stated:
These cases suggest that USPS could recoup, for example, claims for overpayment or damage-in-transit arising from Dewey’s pre-petition trucking services against Debtor’s claims for post-petition services under the same contracts. But USPS’s Claim here is different — it stems from Debtor’s failure to perform its future contractual commitments, a failure that is inextricably tied to its status as a chapter 11 debtor.
Id. In this case, the debtor’s obligation is not “inextricably tied to its status” as a debtor in bankruptcy. The facts of this case are more like the cases distinguished by the court in Dewey that involved claims for overpayment, whereas in Dewey the creditor sought to reduce post-petition payments based on damages created by the debtor-in-possession’s rejection of their executory contract. Standard is not prohibited from asserting a recoupment defense against the debtor.
In order for recoupment to be permitted in bankruptcy cases, “ ‘both debts must arise out of a single integrated transaction so that it would be inequitable for the debtor to enjoy the benefits of that transaction without also meeting its obligations.’ ” Dewey at 623 (quoting In re Univ. Med. Ctr., 973 F.2d 1065, 1081 (3d Cir.1992)). Although the debtor argues that the contract does not satisfy the same transaction test, we disagree. It is undisputed that both parties’ rights and obligations arise out of a single contract, and the debtor has not persuaded us that some basis exists to view their mutual obligations as arising out of separate transactions.
However, recoupment is only allowed where it would be “inequitable for the debtor to enjoy the benefits of that transaction without also meeting its obligations,’ ” and recoupment should be narrowly construed in bankruptcy. Dewey at 623. Standard’s rights are not absolute, and the equities must be weighed. Because the bankruptcy court did not reach the question of whether the equities favor allowing recoupment, we must remand. There are a number of considerations that the bankruptcy court might weigh. For instance, if the court were to allow recoupment, Terry would be required to repay the funds a second time, which the debtor argues would be a particularly inequitable result for a permanently disabled debtor. In addition, allowing recoupment might compromise the debtor’s fresh start. We also note that Standard did not defend itself against the trustee’s preference demand. Although we express no opinion on the merits of the trustee’s claim or any defenses Standard might have had, in some cases, the failure to defend a preference demand would be relevant.
CONCLUSION
We hold that 11 U.S.C. § 502(h) does not operate to limit Standard’s rights to a claim against the bankruptcy estate. We reverse and remand to the bankruptcy court to determine whether the equities favor allowing Standard to recoup the debtor’s overpayment from the debtor’s post-petition benefits.
. Although Norman Rouse is named as a defendant, the bankruptcy court dismissed him from this adversary proceeding, and he is not a parly to this appeal.
. Standard withdrew the funds from Terry's bank account pursuant to a pre-authorization that Terry executed when he made a claim under the policy.
. While often referred to as a claim, we think recoupment is more properly characterized as a defense.