This section describes the steps to integrate your app's backend with
Cloud Marketplace. With this integration, you can manage users' accounts
and *entitlements*, which indicate that users have bought your product from
Cloud Marketplace. If you chose a usage-based pricing model, you also
integrate your backend to report usage to Google.

For an example of integrating a basic app with Cloud Marketplace and a
walkthrough of the sample code, see the
[codelab to integrate a managed service](https://codelabs.developers.google.com/codelabs/gcp-marketplace-integrated-saas/#0).

For the sample code used in the codelab, see the
[GitHub repository](https://github.com/googlecodelabs/gcp-marketplace-integrated-saas/).

## Before you begin

- Set up access to the Cloud Commerce Partner Procurement API, as described in [Integrate your app](https://docs.cloud.google.com/marketplace/docs/partners/integrated-saas/technical-integration-setup.md.txt).
- If you chose a usage-based pricing scheme, verify that your Partner Engineer has created a service that you can report usage against. This service displays in the **Service domain** field of the [**Billing Integration** section](https://docs.cloud.google.com/marketplace/docs/partners/integrated-saas/backend-integration.md.txt#backend-integration) of Producer Portal.

## Access your app's backend integration in Producer Portal

To access all of the information you need to integrate your app's backend with
Cloud Marketplace from one location, such as your service accounts and plan
level identifiers, you can use the **Billing integration** section of Producer
Portal.

The direct link to Producer Portal is:

```
https://console.cloud.google.com/producer-portal?project=YOUR_PROJECT_ID
```

> [!NOTE]
> **Note:** If you don't see the link, or can't access the URL, verify that you've selected the correct project. If you still can't access the URL, use the [Partner Support Desk](https://g.co/cloud/psd-partner) to request assistance, and include the word "Marketplace" in your description. For more information about Partner Support Desk, visit [Request assistance with Cloud Marketplace](https://docs.cloud.google.com/marketplace/docs/partners/get-support.md.txt).

To access the **Billing integration** section:

1. In the list of products, click the name of your product.

2. From the **Overview** page of your product, go to the
   **Technical integration** section.

3. In the **Technical integration** section, click **Billing integration**.

## Create and link service accounts in Producer Portal

You can use the **Billing integration** section of Producer Portal to create and
link the service accounts that you use to interact with the Partner APIs and to
get information about users' purchases.

The direct link to Producer Portal is:

```
https://console.cloud.google.com/producer-portal?project=YOUR_PROJECT_ID
```

> [!NOTE]
> **Note:** If you don't see the link, or can't access the URL, verify that you've selected the correct project. If you still can't access the URL, use the [Partner Support Desk](https://g.co/cloud/psd-partner) to request assistance, and include the word "Marketplace" in your description. For more information about Partner Support Desk, visit [Request assistance with Cloud Marketplace](https://docs.cloud.google.com/marketplace/docs/partners/get-support.md.txt).

In the following steps, you can use existing service accounts, or create new
service accounts. If you create a new service account, specify the service
account's name in the **Service account name** field and the service account's
ID in the **Service account ID** field, and then click **Create and link** . For
detailed steps to create a service account, see
[Creating and managing service accounts](https://docs.cloud.google.com/iam/docs/creating-managing-service-accounts).

To link your service accounts:

1. In the list of products, click the name of your product.

2. On the **Overview** page of your product, go to the **Technical integration**
   section and click **Billing integration**.

3. To integrate with the Partner Procurement API, under
   **Link a service account to call Procurement API** , click
   **Add service account**. You can enter an existing service account into the
   field, or create a new service account.

4. To integrate with Pub/Sub, under
   **Link a service account to subscribe to Pub/Sub topic** , click
   **Add service account** . You can enter an existing service account into the
   field, or create a new service account. Grant the
   [Pub/Sub Editor](https://docs.cloud.google.com/pubsub/docs/access-control.md.txt#pubsub.editor)
   Identity and Access Management (IAM) role to the service account that you link.

5. To integrate with the Service Control API, under
   **Add `roles/servicemanagement.serviceController` to a service account** ,
   click **Add service account**. You can enter an existing service account into
   the field, or create a new service account.

## What's next

- [Manage user accounts](https://docs.cloud.google.com/marketplace/docs/partners/integrated-saas/manage-user-accounts.md.txt) for your SaaS products.
- [Manage customer entitlements](https://docs.cloud.google.com/marketplace/docs/partners/integrated-saas/manage-entitlements.md.txt) for your SaaS products.
- For products with usage-based pricing, [configure your app's usage reporting](https://docs.cloud.google.com/marketplace/docs/partners/integrated-saas/configure-usage-reports.md.txt) to Google.