Integrating your app: setting up

This section is an overview of the steps to integrate your app with Cloud Marketplace. At a high level, you integrate your app with Google Cloud in the following ways:

  • Backend integration

    You must integrate your app's backend with the following Google APIs and services:

    • Integrate with Pub/Sub to receive notifications from Cloud Marketplace, such as when a user signs up for your product. Your Partner Engineer creates a Pub/Sub topic that you must subscribe to for notifications.

      For information on subscribing to a Pub/Sub topic, see the Pub/Sub Subscriber Guide.

    • Integrate with the Partner Procurement API to create accounts for customers, and to link these accounts with their Cloud 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've chosen a usage-based pricing model, integrate with Service Control to report usage information.

    For detailed information on integrating your app's backend with Cloud Marketplace, see Integrating your app's backend.

    For an example of integrating the backend of a basic product with Cloud Marketplace and a walkthrough of the sample code, see the codelab for integrating a SaaS product.

  • Frontend integration

    In your app's frontend, you must set up the following integrations:

    • Provide a sign up page to sign up accounts for new customers who buy your product through Cloud Marketplace. When users visit this page, Google sends a JSON Web Token (JWT) containing the user's account ID. You use this account ID to link the user's account in your product with their Google account, and also for Identity and Access Management (IAM).

    • Provide a login page for your customers.

    Optionally, you can choose to:

    • Integrate single sign-on (SSO), so that your customers can sign into your app using their Google accounts. If you integrate SSO, when users sign in by using SSO, Google sends a JSON Web Token (JWT) containing information about the user for you to verify.

    For detailed information on integrating your app's frontend with Cloud Marketplace, see Integrating your app's frontend.

Before you begin

  • Verify that your Partner Engineer has enabled access to the Cloud Commerce Partner Procurement API.

Integrate with Google APIs

You can integrate your app with Google APIs by 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 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 must 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:

https://cloudcommerceprocurement.googleapis.com/$discovery/rest?version=v1

For example, if you're building a Python client library for the Partner Procurement API, use the build() method. For sample code that builds a client library, see the codelab samples on GitHub.

Enable the Partner Procurement API in Google Cloud console

After your Partner Engineer has granted you access to the Partner Procurement API, you don't need to take any additional steps to enable the API in Google Cloud console.