Chapter 30: Lord's Day 30
Section 83. Q. 83: What are the keys of the kingdom? A. The preaching of the holy gospel and Christian discipline toward repentance. Both preaching and discipline open the kingdom of heaven to believers and close it to unbelievers.
Section 84. Q. 84: How does preaching the holy gospel open and close the kingdom of heaven? A. According to the command of Christ: The kingdom of heaven is opened by proclaiming and publicly declaring to each and every believer that, as often as he accepts the gospel promise in true faith, God, because of what Christ has done, truly has forgiven all his sins. The kingdom of heaven is closed, however, by proclaiming and publicly declaring to unbelievers and hypocrites that, as long as they do not repent, the anger of God and eternal condemnation rest on them. God's judgment, both in this life and in the life to come, is based on this gospel testimony.
Section 85. Q. 85: How is the kingdom of heaven closed and opened by Christian discipline? A. According to the command of Christ: Those who, though called Christians, profess unchristian teachings or live unchristian lives, and who after repeated personal and loving admonition, refuse to abandon their errors and wickedness, and who after being reported to the church, that is, to its officers, fail to respond also to their admonition — such persons the officers exclude from the Christian fellowship by withholding the sacraments from them, and God himself excludes them from the kingdom of Christ. Such persons, when they promise and show real amendment, are received again as members of Christ and of his church.