Subject to subsection (d), as soon as practicable after completion by the debtor of all payments under the plan, and in the case of a debtor who is required by a judicial or administrative order, or by statute, to pay a domestic support obligation, after such debtor certifies that all amounts payable under such order or such statute that are due on or before the date of the certification (including amounts due before the petition was filed, but only to the extent provided for by the plan) have been paid, other than payments to holders of allowed claims provided for under section 1222(b)(5) or 1222(b)(9) of this title, unless the court approves a written waiver of discharge executed by the debtor after the order for relief under this chapter, the court shall grant the debtor a discharge of all debts provided for by the plan, allowed under section 503 of this title, or disallowed under section 502 of this title, except any debt—
(1) provided for under section 1222(b)(5) or 1222(b)(9) of this title; or
(2) of a kind specified in section 523(a) of this title, except as provided in section 1232(c).
Subject to subsection (d), at any time after the confirmation of the plan and after notice and a hearing, the court may grant a discharge to a debtor that has not completed payments under the plan only if—
(1) the debtor’s failure to complete such payments is due to circumstances for which the debtor should not justly be held accountable;
(2) the value, as of the effective date of the plan, of property actually distributed under the plan on account of each allowed unsecured claim is not less than the amount that would have been paid on such claim if the estate of the debtor had been liquidated under chapter 7 of this title on such date; and
(3) modification of the plan under section 1229 of this title is not practicable.
A discharge granted under subsection (b) of this section discharges the debtor from all unsecured debts provided for by the plan or disallowed under section 502 of this title, except any debt—
(1) provided for under section 1222(b)(5) or 1222(b)(9) of this title; or
(2) of a kind specified in section 523(a) of this title, except as provided in section 1232(c).
On request of a party in interest before one year after a discharge under this section is granted, and after notice and a hearing, the court may revoke such discharge only if—
(1) such discharge was obtained by the debtor through fraud; and
(2) the requesting party did not know of such fraud until after such discharge was granted.
After the debtor is granted a discharge, the court shall terminate the services of any trustee serving in the case.
The court may not grant a discharge under this chapter unless the court after notice and a hearing held not more than 10 days before the date of the entry of the order granting the discharge finds that there is no reasonable cause to believe that—
(1) section 522(q)(1) may be applicable to the debtor; and
(2) there is pending any proceeding in which the debtor may be found guilty of a felony of the kind described in section 522(q)(1)(A) or liable for a debt of the kind described in section 522(q)(1)(B).
(Added and amended Pub. L. 99–554, title II, § 255, title III, § 302(f), Oct. 27, 1986, 100 Stat. 3112, 3124; Pub. L. 103–65, § 1, Aug. 6, 1993, 107 Stat. 311; Pub. L. 105–277, div. C, title I, § 149(a), Oct. 21, 1998, 112 Stat. 2681–610; Pub. L. 106–5, § 1(1), (2), Mar. 30, 1999, 113 Stat. 9; Pub. L. 106–70, § 1, Oct. 9, 1999, 113 Stat. 1031; Pub. L. 106–518, title II, § 208, Nov. 13, 2000, 114 Stat. 2415; Pub. L. 107–8, § 1, May 11, 2001, 115 Stat. 10; Pub. L. 107–17, § 1, June 26, 2001, 115 Stat. 151; Pub. L. 107–170, § 1, May 7, 2002, 116 Stat. 133; Pub. L. 107–171, title X, § 10814(a), May 13, 2002, 116 Stat. 532; Pub. L. 107–377, § 2(a), Dec. 19, 2002, 116 Stat. 3115; Pub. L. 108–73, § 2(a), Aug. 15, 2003, 117 Stat. 891; Pub. L. 108–369, § 2(a), Oct. 25, 2004, 118 Stat. 1749; Pub. L. 109–8, title II, § 213(6), title III, § 330(c), title X, § 1001(a)(1), (c), Apr. 20, 2005, 119 Stat. 53, 101, 185, 186; Pub. L. 115–72, div. B, § 1005(b)(1)(B), Oct. 26, 2017, 131 Stat. 1233.)