For brand name drugs, the [Medicaid] rebate is 23.1% of Average Manufacturer Price (AMP) or the difference between AMP and “best price,” whichever is greater. Certain pediatric and clotting drugs have a lower rebate amount of 17.1%. Best price is defined as the lowest available price to any wholesaler, retailer, or provider, excluding certain government programs, such as the health program for veterans. AMP is defined as the average price paid to drug manufacturers by wholesalers and retail pharmacies. For generic drugs, the rebate amount is 13% of AMP, and there is no best price provision
Like the Inflation Reduction Act, Medicaid also requires rebates if prices rise faster than inflation. Plus there are supplemental rebates:
The rebate calculation also includes an additional inflationary component to account for rising drug prices over time. This rebate is calculated as the difference between the drug’s current quarter AMP and its baseline AMP adjusted to the current period by the Consumer Price Index for All Urban Consumers (CPI-U). In other words, if a drug’s price increases faster than inflation, the manufacturer has to rebate the difference to Medicaid…
As of June 2019, 47 states and DC had supplemental rebate agreements in place.15 These supplemental rebates are not subject to the best price floor. States often use placement on a preferred drug list (PDL) as leverage to negotiate supplemental rebates with manufacturers.
Beneficiary cost sharing in the Medicaid program is also very limited:
Federal rules limit beneficiary cost-sharing to nominal amounts: up to $4 for preferred drugs and $8 for non-preferred drugs, for individuals with incomes at or below 150% of the federal poverty level (FPL) and slightly higher for those with higher incomes
You can read more details here.