God’s mercy and kindness are said to be conditional, in many verses.
God’s mercy cannot be merited by legal obedience. Everyone sins, and as a result everyone forfeits deserving any good thing from God. In that sense of legal holiness, God’s mercies must always be free on His part. There is not a righteous man on the earth who always does right, and never sins (Ecclesiastes 7:20). So, given that the legal standard of merit is perfection (one must continually keep all the commandments, Gal. 3:10), mercy can never be earned.
God’s mercies and loving kindness precede any human meeting of any divine conditions.
God is showing mercy to the entire world, every day, even though the world does not know Him. This is called God’s prevenient grace. It is the grace that comes in before.
It is true that God is manifesting righteous punishments, also (Rom. 1:18). But, as long as a person is still living on this side of eternity, that person is still receiving some measure of the mercy of God. God does not completely withhold mercy until we comply with His will. God is already showing varying kinds and degrees of mercy to each person, every day.
But some of God’s mercies are tied to conditions, in various Bible verses. God shows His mercy to those who fear Him, that is, to those who trust, worship, and obey Him, from generation to generation. Luke 1:50. Mary reaffirmed what the Lord said centuries before.
The Lord delights in those who fear Him (Ps. 147:11). The Lord shows His lovingkindness to those who love Him and keep His commandments (Ex. 20:6), which Christ reiterated in John 14:15-21. God loves those disciples who love and obey Christ, and He reveals Himself on a deeper level to such people (14:21).
God shows saving mercy to the ignorant (1 Tim. 1:13). Paul’s testimony shows that God’s mercy is not disconnected from human conditions. God was merciful to Paul, in spite of his blasphemy, persecution, and violence, because God knew Paul was spiritually blind.
This reminds us of Christ’s cross-prayer for God to be merciful, which was predicated on human ignorance (Luke 23:34). God’s mercy to Nineveh was conditioned on the people’s ignorance (very likely referring to their young children, Jonah 4:11).
Repentant faith is God’s condition for saving mercy. The olive tree in Romans 11 symbolizes the blessings of the Abrahamic covenant. Paul says, using this illustration, that God broke off the Jews from the tree because of their unbelief toward Christ (Rom. 11:20). Belief was God’s condition; the Jews failed to meet it; as a result, God broke them off. But then, Paul says that God would and could easily “graft” Jews back in, if they did not persist in unbelief (i.e., if they repent, 11:23). Again, let a person meet God’s condition of repentance, and God shows saving kindness (11:22).
So, God’s merciful kindness here is conditional upon repentance and belief. The prodigal son did not receive the joyful fatherly embrace, the family ring, or the celebration, until he repented. Once he repented, on condition of that repentance, all those good things happened. Conversely, God hardens (the opposite of mercy, Romans 9:18) those who know the truth and reject it. Hardening is God’s punishment on the knowledgeably defiant.
God did not harden an innocent man. Pharaoh already knew about the Lord through nature (Rom. 1:19-20), and through Moses’ miracles, so he was without excuse. That knowledge is why God hardened/punished him. God did not unconditionally harden Pharaoh. Similarly, the Lord hardened the Palestinian Jews toward Christ, because they had already refused to believe in Him in spite of all His miracles (John 12:37-38). It was for this reason that the Lord blinded their eyes and deadened their hearts (12:39-40).
God's mercies cannot be earned, because we're never good enough to deserve them. But some of God's mercies hinge on people meeting God-ordained conditions.
 A divine condition is not meritorious. God saying, “Believe on the Lord Jesus Christ, and you shall be saved”, does not make belief a meritorious act. It also isn’t meritorious to keep a commandment in order to receive a blessing (such as Ephesians 6:1-3), since no one keeps the commandments perfectly. Even God’s rewards for godly choices come wrapped up in a great deal of blood-bought generosity.
 Paul makes clear in 1:16 that God's mercy refers to his salvation, not his appointment to the apostolic ministry. He wouldn't even have been in the ministry, if he hadn't received God's saving mercy first.