Integration Steps

Integration Steps


GCP Setup Steps

Create a separate Google Cloud project for your staging and production environments. These projects must be owned and shared with the appropriate members of your team to set up credentials for communicating with Google APIs.

Enable API

  1. From your client project, navigate to Menu > APIs & Services > Library.
  2. In the search bar, search for Payments Reseller Subscription API.
  3. Click Enable API.

For more information, please check Enabling an API in your Google Cloud Project.

Set up credentials

From your client project, go to Menu > APIs & Services > Credentials.

For Partner Managed Signup (OAuth) partners:

For Google Managed Signup, you can skip to Create a service account. This is because user authentication is handled by Google.

  1. Follow the instructions at Configure the OAuth consent screen and choose scopes.
  2. Add the correct scope by manually inserting the relevant scope for the product you're integrating with.
  3. Configure the authorized domain to be the domain where your client code runs.
  4. Provide links for your application's homepage, privacy policy, and terms of service. These links will appear on the OAuth screen where users grant consent.
  5. Click Save.

Create OAuth client secret and client ID [Partner Managed Signup Only]

  1. Follow the instructions on Create access credentials , and follow OAuth client ID credentials.
  2. Ensure that both Authorized JavaScript origins and Authorized redirect URLs are set to the domain where your client code runs.

Create service account [All Partners]

A service account is required for each project (staging/production). This step is necessary for server-to-server interactions, such as invoking 'provision' or using the subscription intent Google subscription API calls.

A Payments Reseller Admin (Beta) role provides full access to all Payments Reseller resources, including subscriptions, products, and promotions. If your server runs on Compute Engine or App Engine, the respective default service account already has this role granted.

  1. Follow the instructions on Create service accounts.
  2. You will need to add the Payment Reseller Admin (Beta) role to the service account. You can do this by either: a. Under the Permissions section on the Service Account creation screen, click on the dropdown under Role and search for Payments Reseller Admin. b. If you have already created the Service Account, you should refer to Manage access to service accounts. You should add the Payments Reseller Admin role to the Service Account.

Create service account keys

You should follow the instructions on Create and delete service account keys.

You can then refer to the documentation in Using OAuth 2.0 for Server to Server Applications.


Pub/Sub Setup

For more information around Pub/Sub set up, you should refer to Pub/Sub Notifications.

For the different types of Notification, you should refer to Pub/Sub Subscription Types.

Pub/Sub Notifications

Pub/Sub notifications are returned as JSON objects which break down the event to inform partners on what’s happening. You will likely have two subscriptions:

  • Subscription events
    • This covers events related to the subscription itself, such as the subscription being activated, or cancelled (either by the partner or Google).
  • Purchase Order events
    • This informs about events related to the subscription being renewed.

Please refer to the Pub/Sub Notifications section for examples.


Testing Requirements

To ensure a successful integration and launch, you must adhere to the Google's Test Requirements.