House Republicans have finally passed a bill to repeal and replace Obamacare.

After some last-minute changes to the legislation, enough conservatives and moderates were convinced to support the bill Thursday.

The bill's passage isn't guaranteed, however. Now it heads to the Senate, which is likely to make substantial revisions.

Still, the American Health Care Act goes a long way to fulfilling the Republicans' seven-year pledge to repeal former President Obama's landmark health reform law. And it would erase the coverage gains of the last few years and leave 24 million more people uninsured by 2026 than under Obamacare, according to a Congressional Budget Office analysis of an earlier version of the bill.

Related: What's inside the Republican health care bill?

Replace Obamacare subsidies with refundable tax credits based mainly on age

The GOP's plan would eliminate the Obamacare subsidies, which are refundable tax credits based on a person's income and cost of coverage in their area. More than eight in 10 enrollees on the Obamacare exchanges receive this assistance, but individuals making more than $47,500 and families of four earning more than $97,200 do not qualify.

Instead, the Republicans want to issue refundable tax credits to help people afford coverage on the individual market, but these credits will be based mainly on a person's age.

The credits will range from $2,000 for 20-somethings to $4,000 for those in their early 60s. The credits will also have an income cap. Those making more than $75,000 would see their tax credits start to phase out, and an enrollee making more than $215,000 would not be eligible. Families with incomes above $150,000 would see their credits dwindle, while those earning more than $290,000 would not qualify.

The bill would also kill the additional help that individuals earning less than roughly $30,000 a year receive to cover their out-of-pocket costs. More than half of the enrollees on the Obamacare exchanges receive these cost-sharing subsidies.

Trade the individual and employer mandates for continuous coverage requirements

The GOP's bill would get rid of the Obamacare requirement that people have health coverage or face a tax penalty. It would also eliminate the mandate that employers with at least 50 employees provide health insurance to their workers.

Under Obamacare, these companies had to provide affordable insurance to staffers who work more than 30 hours a week. They would face a penalty if they did not meet this criteria and their employee sought subsidies on the exchanges.

Instead, the Republican plan seeks to allow insurers to impose a 30% surcharge on the premiums of those who let their coverage lapse for at least 63 days. The plan would enable insurers to levy this surcharge for one year, but it would only apply to policies bought in the individual or small group markets.

Under a recent amendment, states that seek waivers could replace this provision with one that allows insurers to charge consumers who've had a gap in coverage based on their health status.

Related: High-risk pools won't match Obamacare's protections for pre-existing conditions

Weaken Obamacare's protections for people with pre-existing conditions

States could get waivers that would allow carriers to set premiums based on enrollees' medical backgrounds under several circumstances. Those enrollees would have to have let their coverage lapse, and the state would have to set up a risk program -- such as a high-risk pool -- that, in some cases, could provide help to those being charged higher premiums.

States could also seek waivers that would allow insurers to sell plans that don't include all the essential health benefits mandated by the Affordable Care Act. Under Obamacare, carriers must provide outpatient care, emergency services, hospitalization, maternity, mental health and substance abuse, prescription drugs, rehabilitation services, lab work, preventative care and pediatric services.

Eliminating these two provisions could lower premiums somewhat and give consumers a wider choice of plans. But it would also make it harder for people to buy comprehensive coverage and weaken the protections for those with pre-existing conditions.

The bill would provide $138 billion through 2026 to help states and insurers lower premiums and set up high-risk pools to cover those with pre-existing conditions.

Revamp Medicaid funding

The GOP bill would significantly overhaul Medicaid.

It would send the states a fixed amount of money per Medicaid enrollee, known as a per-capita cap. States could also opt to receive federal Medicaid funding as a block grant for the adults and children in their program. Under a block grant, states would get a fixed amount of federal funding each year, regardless of how many participants are in the program.

Either option would limit federal responsibility, shifting that burden to the states. However, since states don't have the money to make up the difference, they would likely either reduce eligibility, curtail benefits or cut provider payments. The block grant would be more restrictive since the funding level would not adjust for increases in enrollment, which often happens in bad economic times.

The legislation would also end the enhanced match rate for Medicaid expansion for new enrollees starting in 2020. Those already in the program could stay as long as they remain continuously insured. States that have not already expanded would not be allowed to do so, starting immediately.

States could also require able-bodied Medicaid recipients to work, participate in job training programs or do community service.

The Congressional Budget Office projects that bill would cut the federal government's spending on Medicaid by 25% by 2026 as compared to current law.

Related: First 100 Days: What Trump has done to Obamacare

Loosen the age-band so insurers can charge older folks more

Under Obamacare, insurers could only charge older enrollees three times more than younger policy holders. The GOP bill would widen that band to five-to-one, which would hike premiums for those in their 50s and early 60s, but reduce them for younger folks.

States would also be allowed to seek waivers to allow insurers to charge older consumers even more than five times younger ones.

Eliminate Obamacare taxes

The Republican legislation would eliminate the taxes the law levied on wealthy Americans, insurers, prescription drug makers, device manufacturers and others.