There are 30 million UK credit card customers
Credit card holders will be offered greater protection from spiralling debts, although the changes are watered down from original proposals.
Consumers will be given 60 days to reject changes in the interest rates charged on their existing debts.
They will also be able to opt out of any increases in their credit limit.
The agreement comes after the credit card industry met the government's original proposals with a strident 230-page defence of its methods.
A proposal to raise the minimum amount that borrowers must pay off each month has been dropped.
Existing credit card accounts will maintain their current rules on the level of minimum repayments, which vary from lender to lender.
But new accounts will be covered by a new rule - that monthly repayments should at least cover interest, fees and charges, plus 1% of the amount spent.
"In our consultation it was made quite clear by consumers that they might not be able to manage their current debts if they had to pay off more each month," said the Consumer Minister Kevin Brennan.
"People with several cards would have had less flexibility to deal with their debts."
There are 30 million UK credit card customers holding 58 million cards.
The industry said that 62% of all UK adults had at least one credit card, but borrowing on these cards had been in "gentle decline" since 2005.
Last year the government told the credit card industry that it had to "clean up its act", but the group representing lenders came up with its own proposals for helping customers.
The new agreement is a merger of the two, with the changes coming into force by the end of January 2011 at the latest.
- Ensuring that the highest cost debt on a credit card is paid off first
- A new 30-day window to allow people to opt out of any unsolicited increase in their credit limit
- A ban on those in financial difficulties being offered an unsolicited rise in their credit limit
- A 60-day period for people to reject a change to the interest rate on their existing debt. If they reject it, they must then close their account, with "reasonable" time being given for them to pay off their debt or move it to another lender.
- Regular payments of only the minimum being met with more information from the lender.
"This is a fair framework of rights and rules that makes sure easy and convenient lending for the majority does not lead to unmanageable debt for the minority who may be in financial difficulty," said Consumer Minister Kevin Brennan.
Melanie Johnson, who chairs the UK Cards Association, said: "We are pleased that our evidence on unsolicited credit limit increases and the re-pricing of existing debt has conclusively shown that existing practices do not need to be overhauled.
"We believe that, overall, the outcome of the review is balanced."
The industry said that the changes would cost an estimated £533m over the first two years.
Cost of debt
The government backed down on initial proposals for a complete ban on unsolicited credit limit changes, and also accepted that on occasions debt should be re-priced depending on the risk level of the customer.
But it persuaded the industry to make the most significant change to existing practices - ensuring that the most expensive debt is paid off first.
This could cut the amount that borrowers will have to pay off and reduce the amount of time needed for some to clear their card debts. Very few lenders currently ensure that the most expensive debt on a card is paid off first.
Peter Vicary-Smith, chief executive of the consumers' association Which?, said: "The government's plans to enable credit card users to pay off their most expensive debt first are a move in the right direction, but there is still more to be done to ensure vulnerable consumers are protected.
"It is now time for industry to step up to the challenge and offer credit card users clearer and fairer terms and conditions, and weed out irresponsible lending practices."
Some 61% of credit card holders pay off their bill in full every month.
Shadow financial secretary Mark Hoban said Labour had failed to "stand up for British consumers" during its time in power.
"The Conservative Party is committed to an interest rate cap for store credit cards, banning energy companies from charging unfair profits on pre-payment energy meters and enabling people without bank accounts to pay their bills via direct debit at the Post Office."
Liberal Democrat's Business spokesman John Thurso said: "Credit card interest rates have been hiked to their highest levels since June 2006 despite the fact that interest rates have bottomed out at 0.5%. We need a maximum interest rate put in place to end this profiteering.
"It is right that the most expensive debt should be paid off first but the government's lack of action on minimum repayments means that credit card debt will still take decades to repay.
"On average, a £10,000 debt repaid at the minimum rate will still take more than 35 years to pay off."
Citizens Advice Director of Policy Teresa Perchard warned that not all lenders were bound by the voluntary code used for the changes.
"Too often we have seen situations where individuals' credit limits have drifted up to totally unaffordable levels, making it impossible for them to address their debts if they lose their job or hit a financial crisis," she said.
"In addition the level of minimum payments has not always enabled consumers to keep up with the interest."