Reminder: By Aug 31, 2025, all new apps and updates to existing apps must use Billing Library version 7 or newer. If you need more time to update your app, you can request an extension until Nov 1, 2025. Learn about Play Billing Library version deprecation.
Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Il sistema di fatturazione di Google Play è un servizio che ti consente di vendere contenuti e prodotti digitali nella tua app per Android, indipendentemente dal fatto che tu voglia monetizzare tramite acquisti singoli o offrire abbonamenti ai tuoi servizi. Google Play offre un insieme completo di API per l'integrazione sia con la tua app per Android sia con il backend del server, che consentono agli utenti di usufruire della familiarità e della sicurezza degli acquisti su Google Play.
Architettura di integrazione
Questa sezione illustra i diversi moduli funzionali che puoi creare e le API e le librerie disponibili per semplificare la procedura.
Figura 1. Diagramma di una tipica integrazione di Fatturazione Google Play.
Puoi integrare il sistema di fatturazione di Google Play con la tua app per Android utilizzando la Libreria
Fatturazione Google Play. Questa libreria consente la comunicazione con il livello Google Play Services che fornisce l'offerta di prodotti localizzata disponibile per ogni utente nella tua app, nonché metodi per gestire altre operazioni utente necessarie, come l'avvio del flusso di acquisto e la gestione del relativo esito.
Devi anche integrare il sistema di fatturazione di Google Play con il backend del server per creare i flussi necessari per gli sviluppatori. Questo è fondamentale per garantire che la gestione degli acquisti e i diritti multipiattaforma siano efficienti e sicuri.
Puoi creare questa integrazione con l'API Subscriptions and In-App Purchases fornita dall'API Google Play Developer. L'integrazione del backend sfrutta anche alcuni strumenti della piattaforma Google Cloud.
Figura 2. API e servizi forniti dall'API Google Play Developer.
Terminologia
Questa sezione elenca e descrive le tecnologie e i concetti di alto livello che potresti riscontrare durante l'integrazione del sistema di fatturazione di Google Play nella tua app. Consulta questo elenco man mano che segui le indicazioni per l'integrazione.
Tecnologie
Google Play. Un negozio online in cui gli utenti possono scaricare app e altri prodotti digitali.
Google Play Console. Una piattaforma
che fornisce un'interfaccia in cui puoi pubblicare la tua app su Google Play. Google Play Console mostra anche i dettagli della tua app, inclusi eventuali prodotti o contenuti che vendi con Google Play.
Console Google Cloud. Una
piattaforma che gestisce le API di backend, come l'API Google Play Developer.
Google Play Billing Library. Un'API che puoi utilizzare per integrare il sistema di fatturazione di Google Play nella tua app.
API Google Play per gli sviluppatori.
Un'API REST che puoi utilizzare per gestire in modo programmatico le attività di pubblicazione e gestione delle app.
Cloud Pub/Sub. Un servizio di messaggistica in tempo reale completamente gestito che consente di inviare e ricevere messaggi tra applicazioni indipendenti. Google Play utilizza Cloud Pub/Sub per inviare
notifiche in tempo reale per gli sviluppatori. Per utilizzare Cloud Pub/Sub, devi avere un progetto sulla Google Cloud Platform (GCP) con l'API Cloud Pub/Sub abilitata. Se non hai dimestichezza con Google Cloud e Cloud Pub/Sub, consulta la
guida rapida.
Server di backend sicuro. Nell'ambito dell'integrazione del sistema di fatturazione di Google Play
nella tua app, ti consigliamo vivamente di utilizzare un server di backend sicuro per
implementare attività correlate alla fatturazione come la verifica degli acquisti,
funzionalità specifiche per gli abbonamenti e la gestione delle notifiche
in tempo reale per gli sviluppatori.
App Google Play Store. Un'app che gestisce tutte le operazioni relative a Google Play. Tutte le richieste effettuate dalla tua app vengono gestite dall'app Google Play Store.
Concetti
Flusso. Un flusso mostra i passaggi tipici di un'attività correlata alla fatturazione. Ad esempio, un percorso di acquisto illustra i passaggi coinvolti quando un utente acquista il tuo prodotto. Un flusso di abbonamento potrebbe mostrare come un abbonamento passa da uno stato all'altro.
Diritti. Quando un utente acquista un prodotto in-app, ne ha il diritto all'interno della tua app. Per i prodotti una tantum, questo significa che ora l'utente dovrebbe avere accesso permanente al prodotto.
Per gli abbonamenti, significa che l'utente deve avere accesso mentre
l'abbonamento è attivo.
ID prodotto. L'ID di un tipo di prodotto specifico.
Token di acquisto. Una stringa che rappresenta il diritto di un acquirente a un prodotto su Google Play. Indica che un utente Google ha pagato per un prodotto specifico.
ID ordine. Una stringa che rappresenta una transazione finanziaria su Google Play.
Un ID ordine viene creato ogni volta che si verifica una transazione finanziaria. Questa stringa è inclusa in una ricevuta inviata via email all'acquirente. Puoi utilizzare l'ID ordine per gestire i rimborsi nella sezione Gestione ordini di Google Play Console. Gli ID ordine vengono utilizzati anche nei report su vendite e pagamenti.
Passaggi successivi
Per iniziare a integrare il sistema di fatturazione di Google Play con il backend dell'app e del server, consulta la guida alla configurazione.
I campioni di contenuti e codice in questa pagina sono soggetti alle licenze descritte nella Licenza per i contenuti. Java e OpenJDK sono marchi o marchi registrati di Oracle e/o delle sue società consociate.
Ultimo aggiornamento 2025-07-27 UTC.
[[["Facile da capire","easyToUnderstand","thumb-up"],["Il problema è stato risolto","solvedMyProblem","thumb-up"],["Altra","otherUp","thumb-up"]],[["Mancano le informazioni di cui ho bisogno","missingTheInformationINeed","thumb-down"],["Troppo complicato/troppi passaggi","tooComplicatedTooManySteps","thumb-down"],["Obsoleti","outOfDate","thumb-down"],["Problema di traduzione","translationIssue","thumb-down"],["Problema relativo a esempi/codice","samplesCodeIssue","thumb-down"],["Altra","otherDown","thumb-down"]],["Ultimo aggiornamento 2025-07-27 UTC."],[],[],null,["# Google Play's billing system is a service that enables you to sell digital products\nand content in your Android app, whether you want to monetize through one-time\npurchases or offer subscriptions to your services. Google Play offers a full set\nof APIs for integration with both your Android app and your server backend that\nunlock the familiarity and safety of Google Play purchases for your users.\n| **Note:** Google Play's billing system is only for digital items. For physical goods and services, or other non-digital content, see the [Google Pay SDK](https://developers.google.com/pay/api/android/overview).\n\nIntegration architecture\n------------------------\n\nThis section introduces the different functional modules that you can build and\nthe APIs and libraries available to simplify the process.\n**Figure 1.** Diagram of a typical Google Play billing integration.\n\nYou can integrate Google Play's billing system with your Android app using the [Play\nBilling Library](/reference/com/android/billingclient/classes). This library\nenables communication with the Google Play Services layer that provides the\nlocalized product offering available to each user in your app, as well as\nmethods to handle other necessary user operations, like launching the purchase\nflow and handling its outcome.\n\nYou should also integrate Google Play's billing system with your server backend to\ncreate the necessary developer flows. This is essential to guarantee that your\npurchase management and cross-platform entitlements are efficient and secure.\nYou can create this integration with the [Subscriptions and in-app purchases\nAPI](https://developers.google.com/android-publisher#subscriptions) provided by\nthe Google Play Developer API. The backend integration also leverages some\nGoogle Cloud platform tools.\n**Figure 2.** APIs and services provided by the Google Play Developer API.\n\nTerminology\n-----------\n\nThis section lists and describes the high-level technologies and concepts that\nyou might encounter when integrating Google Play's billing system into your app.\nReference this list as you proceed through the integration guidance.\n\n### Technologies\n\n- [**Google Play**](https://play.google.com). An online store where users can download apps and other digital products.\n- [**Google Play Console**](https://play.google.com/console). A platform that provides an interface where you can publish your app to Google Play. The Google Play Console also shows details about your app, including any products or content that you sell with Google Play.\n- [**Google Cloud Console**](https://console.developers.google.com/). A platform that manages backend APIs, such as the Google Play Developer API.\n- [**Google Play Billing Library**](/google/play/billing/integrate). An API that you can use to integrate Google Play's billing system into your app.\n- [**Google Play Developer API**](https://developers.google.com/android-publisher/). A REST API that you can use to programmatically handle publishing and app management tasks.\n- [**Cloud Pub/Sub**](https://cloud.google.com/pubsub/). A fully managed real-time messaging service that enables you to send and receive messages between independent applications. Google Play uses Cloud Pub/Sub to deliver Real-time developer notifications. To use [Cloud\n Pub/Sub](https://cloud.google.com/pubsub/), you must have a project on the [Google Cloud Platform (GCP)](https://cloud.google.com/) with the Cloud Pub/Sub API enabled. If you aren't familiar with GCP and Cloud Pub/Sub, see the [Quickstart guide](https://cloud.google.com/pubsub/docs/quickstart-console).\n- [**Real-time developer notifications**](/google/play/billing/getting-ready#configure-rtdn). A mechanism that lets you monitor state changes for Google Play-managed subscriptions in real time by leveraging [Cloud\n Pub/Sub](https://cloud.google.com/pubsub).\n- **Secure backend server**. As part of integrating Google Play's billing system into your app, we strongly recommend that you use a secure backend server to implement billing-related tasks such as purchase verification, subscription-specific features, and handling Real-time developer notifications.\n- **Google Play Store app**. An app that manages all operations related to Google Play. All requests made by your app are handled by the Google Play Store app.\n\n### Concepts\n\n- **Flow** . A flow shows the typical steps involved in a billing-related task. For example, a *purchase flow* outlines the steps involved when a user purchases your product. A *subscription flow* might show how a subscription transitions between states.\n- **Entitlement** . When a user purchases an in-app product, they are then *entitled* to that product within your app. For one-time products, this means that the user should now have permanent access to the product. For subscriptions, this means that the user should have access while the subscription is active.\n- **Product ID**. The ID of a specific product type.\n- **Purchase token**. A string that represents a buyer's entitlement to a product on Google Play. It indicates that a Google user has paid for a specific product.\n- **Order ID** . A string that represents a financial transaction on Google Play. An order ID is created every time a financial transaction occurs. This string is included in a receipt that is emailed to the buyer. You can use the order ID to manage refunds in the **Order Management** section of the Google Play Console. Order IDs are also used in sales and payout reports.\n\nNext steps\n----------\n\nTo begin integrating Google Play's billing system with your app and server backend,\nsee the [setup guide](/google/play/billing/getting-ready)."]]