A 3D printed Android mascot Bugdroid is seen in front of a Google logo in this illustration

Google announced Thursday that it's allowing Spotify and Bumble to handle in-app purchases.

Subscribers to those apps can now be billed directly by the app instead of the transaction being processed through the Google Play app store. The decision allows users more payment options and flexibility and gives app developers a larger share of their overall sales.

"Our goal is to understand complexities involved in supporting user choice billing for developers and users in countries across the world while maintaining a safe and positive user experience," Android and Google Play said in a statement.

Historically, the Google Play app store and the Apple app store take between 15% to 30% of in-app purchases, and anything bought within an app is processed through the app store. For example, if someone were to make an in-app purchase, regardless of the app, it would appear in their Google or Apple account.

Spotify, one of the world's largest music streaming sites, has long been battling Apple over its 30% take of in-app purchases.

Apple recently rejected a Spotify app upgrade that would let users purchase audiobooks directly from the Spotify library in the iOS app. Spotify then publicly called out Apple for "anti-competitive" practices.

Google said in a supporting document that apps that bill users directly are still required to pay Google a percentage of their app sales, and all apps are still required to pay a service fee.

"User choice billing can be used for digital content and services, such as in-app purchases and subscriptions, in non-gaming mobile and tablet apps," according to a Google support document. The document also states that when users choose an alternative billing system, the service fee for the app will be decreased by 4%.

Spotify praised Google in a blog post on the company website on Thursday, saying that user choice billing has already been implemented in markets worldwide.

"Spotify has been publicly advocating for platform fairness and expanded payment options for years," Spotify said. "We believe that fair and open platforms enable better, frictionless consumer experiences that also empower developers to imagine, innovate, and thrive."

Spotify is the first company to pilot Google's user choice billing program. Google first announced the program's conception in March. The pilot program is open to non-gaming apps and is available for developers in the U.S., Brazil, South Africa, Australia, India, Indonesia, Japan, and Europe.

Spotify (SPOT) and Google (GOOG) stocks were up on Thursday. Spotify rose by over 9%, and Google rose by almost 8%.