This section is an overview of the steps to integrate your application with GCP Marketplace. At a high level, you integrate your application with GCP in the following ways:
You must integrate your application's backend with the following Google APIs and services:
Integrate with Cloud Pub/Sub to receive notifications from GCP Marketplace, such as when a user signs up for your solution. Your Partner Engineer creates a Cloud Pub/Sub topic that you must subscribe to for notifications.
For information on subscribing to a Cloud Pub/Sub topic, see the Cloud Pub/Sub Subscriber Guide.
Integrate with the Partner Procurement API to create accounts for customers, and link these accounts with their GCP Marketplace purchase. You must also use the Partner Procurement API to update the linked accounts when users change or cancel their subscription plans.
If you have chosen a usage-based pricing model, integrate with Service Control to report usage information.
For detailed information on integrating your application's backend with GCP Marketplace, see Backend Integration.
For an example of integrating the backend of a basic product with GCP Marketplace and a walkthrough of the sample code, see the codelab to integrate a managed service.
In your application's frontend, you must set up the following integrations:
Create a sign-up page for new customers who are buying your solution through GCP Marketplace. When new customers are directed to this page, Google also sends a JSON Web Token (JWT), which contains the user's account ID. You can use this account ID to create a new account for the user, and link it to their Google account.
Integrate single sign-on (SSO), so that users can sign into your application using their Google accounts. To integrate SSO, your application must verify a JWT that contains the user's account ID. Your application must check the account ID with the user's linked account.
For detailed information on integrating your application's frontend with GCP Marketplace, see Frontend Integration.
Before you begin
- Verify that your Partner Engineer has enabled access to the Cloud Commerce Partner Procurement API.
Integrating with Google APIs
You can integrate your application with Google APIs using client libraries, which give you programmatic access to Google products. The client libraries are available for most popular development platforms, such as Java, Python, and .NET.
Install the client libraries for your platform from the API Client Libraries page.
With the client libraries, you can:
Connect to your Cloud Pub/Sub subscription, and handle incoming messages.
If you chose usage-based pricing, connect to the Service Control API to report usage data to Google.
To create linked accounts for customers, and to send and receive updates about user accounts, you must also integrate with the Partner Procurement API. Because the Partner Procurement API is restricted, you must build a new client library for the API.
To build a new client library, you need to install the Google client libraries, and build a new library from the API discovery document. The discovery document for the Partner Procurement API is at this URL:
Enabling the API in GCP Console
After your Partner Engineer has enabled access to the Partner Procurement API, enable the API in GCP Console by going to the following URL:
YOUR_PROJECT_ID is the project that hosts your
solution, which you created when you
set up your environment.