Ever since Mayor Charlie Hales announced earlier this month the arrival of Airbnb operational headquarters in Portland, it's been clear the city is laying out the red carpet for the online home-rental startup.

Now we know what the city's getting in return for cutting away the red tape.

Fortune broke the news this afternoon that Airbnb has brokered a deal with Portland officials to automatically collect an 11.5 percent lodging tax from homeowners renting rooms on its website. The company will then send that money to the city and Multnomah County.

If approved by City Council, the deal would make Portland the first city in the nation where Airbnb collects and hands over lodging taxes on its rentals.

The deal is essentially the legalization of a black market, allowing Portland to jump headfirst into the "share economy"—tech companies that create an online bazaar for people to loan out their homes, cars or even parking spaces for a fee. 

Fortune reports:

Perhaps most notably, the company says it is finalizing a plan with Portland to collect and remit taxes to the city on behalf of its hosts. Under the new proposal (yet to be approved by Portland's City Council), Airbnb would collect an 11.5% tax based on what guests pay to hosts (the 11.5% representing the City of Portland's 6% and Multnomah County's 5.5% transient lodging taxes). The tax would be collected by Airbnb out of guests' payment and sent quarterly to the city of Portland.

Word of the deal follows WW's report this morning that the Portland Bureau of Planning and Sustainability has crafted new rules to legalize short-term rentals of one or two rooms without an $4,130 zoning review.

The only caveats: The hosts must live on the property, and they have to inform their immediate neighbors and their neighborhood association. 

Morgan Tracy, a planner at the bureau, tells WW the cost for a short-term rental permit will likely be the same as a home occupation permit: $147.

In the past 13 months, Portland zoning inspectors have issued 25 violation notices for illicit short-term rentals, mostly in Northeast and Southeast Portland.

Even foes of Airbnb rentals say the city's proposals are sensible. Says Tamara DeRidder, Rose City Park Neighborhood Association land-use co-chair: "It actually looks like they've threaded the needle pretty well."

Other terms of the Airbnb deal reported by Fortune: the company will begin offering free smoke detectors to its clients, and it will work with the Portland Bureau of Emergency Management to train its hosts in preparing for a Cascadian Subduction Zone earthquake.