APIHub
Back to Explore

Payments Reseller Subscription API

The Payments Reseller Subscription API lets partners manage resold subscription services—creating, provisioning, retrieving, canceling, extending, undo‑cancelling, and entitling subscriptions—and also provides endpoints to list available products and promotions and to find eligible promotions for end users.

Analytics
none
HTTPS
CORS: Unknown
Description enriched
Visit official documentation

Latency

30ms p95

Uptime

100.0% 30d

Playground

Verified

live

Endpoints

REST · JSON
GET

/v1/{name}

Used by partners to get a subscription by id. It should be called directly by the partner using service accounts.

  • name (path, required) — Required. The name of the subscription resource to retrieve. It will have the format of "partners/{partner_id}/subscriptions/{subscription_id}"
POST

/v1/{name}:cancel

Used by partners to cancel a subscription service either immediately or by the end of the current billing cycle for their customers. It should be called directly by the partner using service accounts.

  • name (path, required) — Required. The name of the subscription resource to be cancelled. It will have the format of "partners/{partner_id}/subscriptions/{subscription_id}"
POST

/v1/{name}:entitle

Used by partners to entitle a previously provisioned subscription to the current end user. The end user identity is inferred from the authorized credential of the request. This API must be authorized by the end user using OAuth.

  • name (path, required) — Required. The name of the subscription resource that is entitled to the current end user. It will have the format of "partners/{partner_id}/subscriptions/{subscription_id}"
POST

/v1/{name}:extend

[Deprecated] New partners should be on auto-extend by default. Used by partners to extend a subscription service for their customers on an ongoing basis for the subscription to remain active and renewable. It should be called directly by the partner using service accounts.

  • name (path, required) — Required. The name of the subscription resource to be extended. It will have the format of "partners/{partner_id}/subscriptions/{subscription_id}".
POST

/v1/{name}:undoCancel

Used by partners to revoke the pending cancellation of a subscription, which is currently in `STATE_CANCEL_AT_END_OF_CYCLE` state. If the subscription is already cancelled, the request will fail. It should be called directly by the partner using service accounts.

  • name (path, required) — Required. The name of the subscription resource whose pending cancellation needs to be undone. It will have the format of "partners/{partner_id}/subscriptions/{subscription_id}"
GET

/v1/{parent}/products

To retrieve the products that can be resold by the partner. It should be autenticated with a service account.

  • parent (path, required) — Required. The parent, the partner that can resell. Format: partners/{partner}
  • filter (query) — Optional. Specifies the filters for the product results. The syntax is defined in https://google.aip.dev/160 with the following caveats: - Only the following features are supported: - Logical operator `AND` - Comparison operator `=` (no wildcards `*`) - Traversal operator `.` - Has operator `:` (no wildcards `*`) - Only the following fields are supported: - `regionCodes` - `youtubePayload.partnerEligibilityId` - `youtubePayload.postalCode` - Unless explicitly mentioned above, other features are not supported. Example: `regionCodes:US AND youtubePayload.postalCode=94043 AND youtubePayload.partnerEligibilityId=eligibility-id`
  • pageSize (query, limit) — Optional. The maximum number of products to return. The service may return fewer than this value. If unspecified, at most 50 products will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.
  • pageToken (query) — Optional. A page token, received from a previous `ListProducts` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListProducts` must match the call that provided the page token.
GET

/v1/{parent}/promotions

To retrieve the promotions, such as free trial, that can be used by the partner. It should be autenticated with a service account.

  • parent (path, required) — Required. The parent, the partner that can resell. Format: partners/{partner}
  • filter (query) — Optional. Specifies the filters for the promotion results. The syntax is defined in https://google.aip.dev/160 with the following caveats: - Only the following features are supported: - Logical operator `AND` - Comparison operator `=` (no wildcards `*`) - Traversal operator `.` - Has operator `:` (no wildcards `*`) - Only the following fields are supported: - `applicableProducts` - `regionCodes` - `youtubePayload.partnerEligibilityId` - `youtubePayload.postalCode` - Unless explicitly mentioned above, other features are not supported. Example: `applicableProducts:partners/partner1/products/product1 AND regionCodes:US AND youtubePayload.postalCode=94043 AND youtubePayload.partnerEligibilityId=eligibility-id`
  • pageSize (query, limit) — Optional. The maximum number of promotions to return. The service may return fewer than this value. If unspecified, at most 50 products will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.
  • pageToken (query) — Optional. A page token, received from a previous `ListPromotions` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListPromotions` must match the call that provided the page token.
POST

/v1/{parent}/promotions:findEligible

To find eligible promotions for the current user. The API requires user authorization via OAuth. The user is inferred from the authenticated OAuth credential.

  • parent (path, required) — Required. The parent, the partner that can resell. Format: partners/{partner}
POST

/v1/{parent}/subscriptions

Used by partners to create a subscription for their customers. The created subscription is associated with the end user inferred from the end user credentials. This API must be authorized by the end user using OAuth.

  • parent (path, required) — Required. The parent resource name, which is the identifier of the partner. It will have the format of "partners/{partner_id}".
  • subscriptionId (query) — Required. Identifies the subscription resource on the Partner side. The value is restricted to 63 ASCII characters at the maximum. If a subscription was previously created with the same subscription_id, we will directly return that one.
POST

/v1/{parent}/subscriptions:provision

Used by partners to provision a subscription for their customers. This creates a subscription without associating it with the end user account. EntitleSubscription must be called separately using OAuth in order for the end user account to be associated with the subscription. It should be called directly by the partner using service accounts.

  • parent (path, required) — Required. The parent resource name, which is the identifier of the partner. It will have the format of "partners/{partner_id}".
  • subscriptionId (query) — Required. Identifies the subscription resource on the Partner side. The value is restricted to 63 ASCII characters at the maximum. If a subscription was previously created with the same subscription_id, we will directly return that one.

10 endpoints auto-detected

curl -X GET \
  "https://paymentsresellersubscription.googleapis.com/v1/{name}"

paymentsresellersubscription.googleapis.com · HTTPS only