Index
PaymentsResellerOutboundService
(interface)PaymentsResellerSubscriptionService
(interface)Amount
(message)AuthorizationResult
(enum)AuthorizePurchaseOrderChargeRequest
(message)AuthorizePurchaseOrderChargeResponse
(message)AuthorizeSubscriptionAddonRequest
(message)AuthorizeSubscriptionAddonResponse
(message)AuthorizeSubscriptionSignupRequest
(message)AuthorizeSubscriptionSignupResponse
(message)CancelSubscriptionRequest
(message)CancelSubscriptionResponse
(message)CancellationReason
(enum)CreateSubscriptionRequest
(message)Duration
(message)EntitleSubscriptionRequest
(message)EntitleSubscriptionRequest.LineItemEntitlementDetails
(message)EntitleSubscriptionResponse
(message)ExtendSubscriptionRequest
(message)ExtendSubscriptionResponse
(message)Extension
(message)FindEligiblePromotionsRequest
(message)FindEligiblePromotionsResponse
(message)FiniteBillingCycleDetails
(message)GenerateUserSessionRequest
(message)GenerateUserSessionResponse
(message)GetSubscriptionRequest
(message)GoogleOnePayload
(message)GoogleOnePayload.Channel
(enum)GoogleOnePayload.Offering
(enum)IntentPayload
(message)ListProductsRequest
(message)ListProductsResponse
(message)ListPromotionsRequest
(message)ListPromotionsResponse
(message)Location
(message)PriceDetails
(message)Product
(message)Product.BundleDetails
(message)Product.BundleDetails.BundleElement
(message)Product.BundleDetails.EntitlementMode
(enum)Product.PriceConfig
(message)Product.ProductType
(enum)ProductPayload
(message)Promotion
(message)Promotion.IntroductoryPricingDetails
(message)Promotion.IntroductoryPricingDetails.IntroductoryPricingSpec
(message)Promotion.PromotionType
(enum)ProvisionSubscriptionRequest
(message)PurchaseOrder
(message)PurchaseOrder.SubscriptionDetails
(message)PurchaseOrder.SubscriptionDetails.PurchaseOrderType
(enum)PurchaseOrderLineItem
(message)ServicePeriod
(message)Subscription
(message)Subscription.CancellationDetails
(message)Subscription.LineItem
(message)Subscription.LineItem.BundleDetails
(message)Subscription.LineItem.BundleDetails.BundleElementDetails
(message)Subscription.LineItem.LineItemRecurrenceType
(enum)Subscription.LineItem.LineItemState
(enum)Subscription.LineItem.OneTimeRecurrenceDetails
(message)Subscription.ProcessingState
(enum)Subscription.PromotionSpec
(message)Subscription.State
(enum)Subscription.UpgradeDowngradeDetails
(message)Subscription.UpgradeDowngradeDetails.BillingCycleSpec
(enum)UndoCancelSubscriptionRequest
(message)UndoCancelSubscriptionResponse
(message)Unit
(enum)UnitLevelDetails
(message)UserSession
(message)YoutubePayload
(message)YoutubePayload.PartnerPlanType
(enum)
PaymentsResellerOutboundService
Service allowing Google to make outbound calls to partners to authorize subscription and purchase order changes.
AuthorizePurchaseOrderCharge |
---|
Used by Google to check with reseller whether a charge for purchase order is authorized. If the purchase order is originated from a subscription, declining the charge will also cancel the originating subscription, or deactivate the originating subscription line items. |
AuthorizeSubscriptionAddon |
---|
Used by Google to check with reseller whether an add-on to the subscription is authorized. |
AuthorizeSubscriptionSignup |
---|
Used by Google to check with reseller whether the subscription signup is authorized. |
PaymentsResellerSubscriptionService
Service allowing partners to create and manage subscriptions for their customers.
CancelSubscription |
---|
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. |
CreateSubscription |
---|
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. |
EntitleSubscription |
---|
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. |
ExtendSubscription |
---|
[Opt-in only] Most 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. |
FindEligiblePromotions |
---|
To find eligible promotions for the current user. The API requires user authorization via OAuth. The bare minimum oauth scope |
GenerateUserSession |
---|
[Preview only]. This API replaces user authorized OAuth based APIs (Create and Entitle). Preview APIs are working in progress and are subject to change. Generates a token for a short-lived user session based on the user intent. The session token can be used to redirect the user to Google to finish the signup flow. The session token is valid for 1 hour. |
GetSubscription |
---|
Used by partners to get a subscription by id. It should be called directly by the partner using service accounts. |
ListProducts |
---|
To retrieve the products that can be resold by the partner. It should be autenticated with a service account.
|
ListPromotions |
---|
Retrieves the promotions, such as free trial, that can be used by the partner.
It should be autenticated with a service account. |
ProvisionSubscription |
---|
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. |
UndoCancelSubscription |
---|
Revokes the pending cancellation of a subscription, which is currently in
It should be called directly by the partner using service accounts. |
Amount
Describes the amount unit including the currency code.
Fields | |
---|---|
currency_code |
Required. Currency codes in accordance with ISO-4217 Currency Codes. For example, USD. |
amount_micros |
Required. Amount in micros (1_000_000 micros = 1 currency unit) |
AuthorizationResult
The set of potential responses the reseller can give for actions like purchase order charge, subscription signup and add-on etc.
Enums | |
---|---|
AUTHORIZATION_RESULT_UNSPECIFIED |
Unspecified. It is reserved as an invalid value. Do not use. |
AUTHORIZATION_RESULT_AUTHORIZED |
The reseller authorized the action. |
AUTHORIZATION_RESULT_REJECTED |
The reseller rejected the action. |
AuthorizePurchaseOrderChargeRequest
The reseller to authorize a charge for a purchase order.
Fields | |
---|---|
parent |
Required. The parent resource name, which is the identifier of the partner. It will have the format of "partners/{partner_id}". |
request_id |
Required. A random UUID to uniquely identify the request. The idempotency key for the request. So in case of retries, request_id will be same as previous one. |
purchase_order |
Required. Details of the charge. |
AuthorizePurchaseOrderChargeResponse
The reseller's determination as to whether the charge should be approved.
Fields | |
---|---|
authorization_result |
Required. The reseller's authorization result for purchase order charge request. |
purchase_order_id |
Required. Sets the id only if the authorization is approved. The id assigned by the partner for the authorized purchase order. The purchase order notification from Cloud pubsub notification message will contain the resource name with this id. |
AuthorizeSubscriptionAddonRequest
The reseller to authorize an add-on for a subscription.
Fields | |
---|---|
name |
Required. The name of the subscription resource for which addon is being requested. It will have the format of "partners/{partner_id}/subscriptions/{subscription_id}" |
request_id |
Required. A UUID to uniquely identify the request. The idempotency key for the request. So in case of retries, request_id will be same as previous one. |
subscription |
Required. Details of the subscription for add-on request. |
new_line_items[] |
Required. Details of the new line items that are being added to the subscription. |
AuthorizeSubscriptionAddonResponse
The reseller's determination as to whether an add-on to the subscription should be approved.
Fields | |
---|---|
authorization_result |
Required. The reseller's authorization result for subscription add-on request. |
AuthorizeSubscriptionSignupRequest
The reseller to authorize a subscription signup.
Fields | |
---|---|
parent |
Required. The parent resource name, which is the identifier of the partner. It will have the format of "partners/{partner_id}". |
request_id |
Required. A random UUID to uniquely identify the request. The idempotency key for the request. So in case of retries, request_id will be same as previous one. |
subscription |
Required. Details of the subscription signup. |
AuthorizeSubscriptionSignupResponse
The reseller's determination as to whether the subscription signup should be approved.
Fields | |
---|---|
authorization_result |
Required. The reseller's authorization result for subscription signup request. |
subscription_id |
Sets the id only if the authorization is approved. The id assigned by the partner for the authorized subscription. The subscription notification from Cloud pubsub notification message will contain the resource name with this id. |
CancelSubscriptionRequest
Request to cancel a subscription.
Fields | |
---|---|
name |
Required. The name of the subscription resource to be cancelled. It will have the format of "partners/{partner_id}/subscriptions/{subscription_id}" |
cancellation_reason |
Specifies the reason for the cancellation. |
cancel_immediately |
Optional. If true, Google will cancel the subscription immediately, and may or may not (based on the contract) issue a prorated refund for the remainder of the billing cycle. Otherwise, Google defers the cancelation at renewal_time, and will not issue a refund.
|
CancelSubscriptionResponse
Response that contains the cancelled subscription resource.
Fields | |
---|---|
subscription |
The cancelled subscription resource. |
CancellationReason
Describes the reason for cancellation of the subscription.
Enums | |
---|---|
CANCELLATION_REASON_UNSPECIFIED |
Reason is unspecified. Should not be used. |
CANCELLATION_REASON_FRAUD |
Fraudualant transaction. |
CANCELLATION_REASON_REMORSE |
Buyer's remorse. |
CANCELLATION_REASON_ACCIDENTAL_PURCHASE |
Accidential purchase. |
CANCELLATION_REASON_PAST_DUE |
Payment is past due. |
CANCELLATION_REASON_ACCOUNT_CLOSED |
Used for notification only, do not use in Cancel API. User account closed. |
CANCELLATION_REASON_UPGRADE_DOWNGRADE |
Used for notification only, do not use in Cancel API. Cancellation due to upgrade or downgrade. |
CANCELLATION_REASON_USER_DELINQUENCY |
Cancellation due to user delinquency |
CANCELLATION_REASON_SYSTEM_ERROR |
Used for notification only, do not use in Cancel API. Cancellation due to an unrecoverable system error. |
CANCELLATION_REASON_SYSTEM_CANCEL |
Used for notification only, do not use in Cancel API. The subscription is cancelled by Google automatically since it is no longer valid. |
CANCELLATION_REASON_OTHER |
Other reason. |
CreateSubscriptionRequest
Request message for creating a Subscription resource.
Fields | |
---|---|
parent |
Required. The parent resource name, which is the identifier of the partner. It will have the format of "partners/{partner_id}". |
subscription |
Required. The Subscription to be created. |
subscription_id |
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. |
Duration
Describes the length of a period of a time.
Fields | |
---|---|
unit |
The unit used for the duration |
count |
number of duration units to be included. |
EntitleSubscriptionRequest
Partner request for entitling the previously provisioned subscription to an end user. The end user identity is inferred from the request OAuth context.
Fields | |
---|---|
name |
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}" |
line_item_entitlement_details[] |
Optional. The line items to be entitled. If unspecified, all line items will be entitled. |
LineItemEntitlementDetails
The details of the line item to be entitled.
Fields | |
---|---|
line_item_index |
Required. The index of the line item to be entitled. |
products[] |
Optional. Only applicable if the line item corresponds to a hard bundle. Product resource names that identify the bundle elements to be entitled in the line item. If unspecified, all bundle elements will be entitled. The format is 'partners/{partner_id}/products/{product_id}'. |
EntitleSubscriptionResponse
Response that contains the entitled subscription resource.
Fields | |
---|---|
subscription |
The subscription that has user linked to it. |
ExtendSubscriptionRequest
Request message for extending a Subscription resource. A new recurrence will be made based on the subscription schedule defined by the original product.
Fields | |
---|---|
name |
Required. The name of the subscription resource to be extended. It will have the format of "partners/{partner_id}/subscriptions/{subscription_id}". |
request_id |
Required. Restricted to 36 ASCII characters. A random UUID is recommended. The idempotency key for the request. The ID generation logic is controlled by the partner. request_id should be the same as on retries of the same request. A different request_id must be used for a extension of a different cycle. |
extension |
Required. Specifies details of the extension. Currently, the duration of the extension must be exactly one billing cycle of the original subscription. |
ExtendSubscriptionResponse
Response that contains the timestamps after the extension.
Fields | |
---|---|
cycle_end_time |
The time at which the subscription is expected to be extended, in ISO 8061 format. UTC timezone. Example, "cycleEndTime":"2019-08-31T17:28:54.564Z" |
renewal_time |
Output only. The time at which the subscription is expected to be renewed by Google - a new charge will be incurred and the service entitlement will be renewed. A non-immediate cancellation will take place at this time too, before which, the service entitlement for the end user will remain valid. UTC timezone in ISO 8061 format. For example: "2019-08-31T17:28:54.564Z" |
free_trial_end_time |
End of the free trial period, in ISO 8061 format. UTC timezone. Example, "freeTrialEndTime":"2019-08-31T17:28:54.564Z" This time will be set the same as initial subscription creation time if no free trial period is offered to the partner. |
Extension
Describes the details of an extension request.
Fields | |
---|---|
partner_user_token |
Required. Identifier of the end-user in partner’s system. |
duration |
Required. Specifies the period of access the subscription should grant. |
FindEligiblePromotionsRequest
Request to find eligible promotions for the current user.
Fields | |
---|---|
parent |
Required. The parent, the partner that can resell. Format: partners/{partner} |
filter |
Optional. Specifies the filters for the promotion results. The syntax is defined in https://google.aip.dev/160 with the following caveats:
|
page_size |
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. |
page_token |
Optional. A page token, received from a previous When paginating, all other parameters provided to |
FindEligiblePromotionsResponse
Response containing the found promotions for the current user.
Fields | |
---|---|
promotions[] |
The promotions for the current user. |
next_page_token |
A token, which can be sent as |
FiniteBillingCycleDetails
Details for a subscriptiin line item with finite billing cycles.
Fields | |
---|---|
billing_cycle_count_limit |
Required. The number of a subscription line item billing cycles after which billing will stop automatically. |
GenerateUserSessionRequest
[Preview only] Request to generate a user session.
Fields | |
---|---|
parent |
Required. The parent, the partner that can resell. Format: partners/{partner} |
intent_payload |
The user intent to generate the user session. |
GenerateUserSessionResponse
[Preview only] Response that contains the details for generated user session.
Fields | |
---|---|
user_session |
The generated user session. |
GetSubscriptionRequest
Request message for retrieving a Subscription resource.
Fields | |
---|---|
name |
Required. The name of the subscription resource to retrieve. It will have the format of "partners/{partner_id}/subscriptions/{subscription_id}" |
GoogleOnePayload
Payload specific to Google One products.
Fields | |
---|---|
campaigns[] |
Campaign attributed to sales of this subscription. |
sales_channel |
The type of sales channel through which the subscription was sold. |
store_id |
The identifier for the partner store where the subscription was sold. |
offering |
The type of offering the subscription was sold by the partner. e.g. VAS. |
Channel
Describes the channel through which the subscription was sold by partner.
Enums | |
---|---|
CHANNEL_UNSPECIFIED |
The channel type is unspecified. |
CHANNEL_RETAIL |
Sold at store. |
CHANNEL_ONLINE_WEB |
Sold through partner website. |
CHANNEL_ONLINE_ANDROID_APP |
Sold through partner android app. |
CHANNEL_ONLINE_IOS_APP |
Sold through partner iOS app. |
Offering
Describes the type of partner offering the subscription was part of.
Enums | |
---|---|
OFFERING_UNSPECIFIED |
The type of partner offering is unspecified. |
OFFERING_VAS_BUNDLE |
Google One product purchased as a Value added service in addition to existing partner's products. Customer pays additional amount for Google One product. |
OFFERING_VAS_STANDALONE |
Google One product purchased by itself by customer as a value add service. Customer pays additional amount for Google One product. |
OFFERING_HARD_BUNDLE |
Product purchased as part of a hard bundle where Google One was included with the bundle. Google One pricing is included in the bundle. |
OFFERING_SOFT_BUNDLE |
Purchased as part of a bundle where Google One was provided as an option. Google One pricing is included in the bundle. |
IntentPayload
The payload that describes the user intent.
Fields | |
---|---|
Union field
|
|
create_request |
The request to create a subscription. |
entitle_request |
The request to entitle a subscription. |
ListProductsRequest
Request to list products.
Fields | |
---|---|
parent |
Required. The parent, the partner that can resell. Format: partners/{partner} |
filter |
Optional. Specifies the filters for the product results. The syntax is defined in https://google.aip.dev/160 with the following caveats:
|
page_size |
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. |
page_token |
Optional. A page token, received from a previous When paginating, all other parameters provided to |
ListProductsResponse
Response that contains the products.
Fields | |
---|---|
products[] |
The products for the specified partner. |
next_page_token |
A token, which can be sent as |
ListPromotionsRequest
Request to list promotions of a partner.
Fields | |
---|---|
parent |
Required. The parent, the partner that can resell. Format: partners/{partner} |
filter |
Optional. Specifies the filters for the promotion results. The syntax is defined in https://google.aip.dev/160 with the following caveats:
|
page_size |
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. |
page_token |
Optional. A page token, received from a previous When paginating, all other parameters provided to |
ListPromotionsResponse
Response that contains the promotions.
Fields | |
---|---|
promotions[] |
The promotions for the specified partner. |
next_page_token |
A token, which can be sent as |
Location
Describes a location of an end user.
Fields | |
---|---|
region_code |
2-letter ISO region code for current content region. Ex. “US” Please refers to: https://en.wikipedia.org/wiki/ISO_3166-1 |
postal_code |
The postal code this location refers to. Ex. "94043" |
PriceDetails
A wrapper message containing various prices.
Fields | |
---|---|
pretax_amount |
Optional. The tax-exclusive amount. |
tax_amount |
Optional. The amount of tax to collect. |
total_amount |
Optional. The total cost, including tax. |
Product
A Product resource that defines a subscription service that can be resold.
Fields | |
---|---|
name |
Identifier. Response only. Resource name of the product. It will have the format of "partners/{partner_id}/products/{product_id}" |
titles[] |
Output only. Localized human readable name of the product. |
subscription_billing_cycle_duration |
Output only. Specifies the length of the billing cycle of the subscription. |
region_codes[] |
Output only. 2-letter ISO region code where the product is available in. Ex. "US" Please refers to: https://en.wikipedia.org/wiki/ISO_3166-1 |
price_configs[] |
Output only. Price configs for the product in the available regions. |
product_type |
Output only. Output Only. Specifies the type of the product. |
bundle_details |
Output only. Output Only. Specifies the details for a bundle product. |
finite_billing_cycle_details |
Optional. Details for a subscription line item with finite billing cycles. If unset, the line item will be charged indefinitely. |
BundleDetails
Details for a bundle product.
Fields | |
---|---|
bundle_elements[] |
The individual products that are included in the bundle. |
entitlement_mode |
The entitlement mode of the bundle product. |
BundleElement
The individual product that is included in the bundle.
Fields | |
---|---|
product |
Required. Output only. Product resource name that identifies the bundle element. The format is 'partners/{partner_id}/products/{product_id}'. |
EntitlementMode
The entitlement mode of a bundle product.
Enums | |
---|---|
ENTITLEMENT_MODE_UNSPECIFIED |
Unspecified. It's reserved as an unexpected value, should not be used. |
ENTITLEMENT_MODE_FULL |
All the bundle elements must be fully activated in a single request. |
ENTITLEMENT_MODE_INCREMENTAL |
The bundle elements could be incrementally activated. |
PriceConfig
Configs the prices in an available region.
Fields | |
---|---|
region_code |
Output only. 2-letter ISO region code where the product is available in. Ex. "US". |
amount |
Output only. The price in the region. |
ProductType
The type of product.
Enums | |
---|---|
PRODUCT_TYPE_UNSPECIFIED |
Unspecified. It's reserved as an unexpected value, should not be used. |
PRODUCT_TYPE_SUBSCRIPTION |
The product is a subscription. |
PRODUCT_TYPE_BUNDLE_SUBSCRIPTION |
The product is a bundled subscription plan, which includes multiple subscription elements. |
ProductPayload
Specifies product specific payload.
Fields | |
---|---|
google_one_payload |
Product-specific payloads. Payload specific to Google One products. |
youtube_payload |
Payload specific to Youtube products. |
Promotion
A Promotion resource that defines a promotion for a subscription that can be resold.
Fields | |
---|---|
name |
Identifier. Response only. Resource name of the subscription promotion. It will have the format of "partners/{partner_id}/promotion/{promotion_id}" |
titles[] |
Output only. Localized human readable name of the promotion. |
free_trial_duration |
Optional. Specifies the duration of the free trial of the subscription when promotion_type is PROMOTION_TYPE_FREE_TRIAL |
region_codes[] |
Output only. 2-letter ISO region code where the promotion is available in. Ex. "US" Please refers to: https://en.wikipedia.org/wiki/ISO_3166-1 |
applicable_products[] |
Output only. The product ids this promotion can be applied to. |
start_time |
Optional. Specifies the start time (inclusive) of the period that the promotion is available in. |
end_time |
Optional. Specifies the end time (exclusive) of the period that the promotion is available in. If unset, the promotion is available indefinitely. |
introductory_pricing_details |
Optional. Specifies the introductory pricing details when the promotion_type is PROMOTION_TYPE_INTRODUCTORY_PRICING. |
promotion_type |
Output only. Output Only. Specifies the type of the promotion. |
IntroductoryPricingDetails
The details of a introductory pricing promotion.
Fields | |
---|---|
introductory_pricing_specs[] |
Output only. Specifies the introductory pricing periods. |
IntroductoryPricingSpec
The duration of an introductory pricing promotion.
Fields | |
---|---|
region_code |
Output only. 2-letter ISO region code where the product is available in. Ex. "US". |
recurrence_count |
Output only. Output Only. The duration of an introductory offer in billing cycles. |
Union field
|
|
discount_amount |
Output only. The discount amount. The value is positive. |
discount_ratio_micros |
Output only. The discount percentage in micros. For example, 50,000 represents 5%. |
PromotionType
The type of promotion.
Enums | |
---|---|
PROMOTION_TYPE_UNSPECIFIED |
The promotion type is unspecified. |
PROMOTION_TYPE_FREE_TRIAL |
The promotion is a free trial. |
PROMOTION_TYPE_INTRODUCTORY_PRICING |
The promotion is a reduced introductory pricing. |
ProvisionSubscriptionRequest
Request message for provisioning a Subscription resource.
Fields | |
---|---|
parent |
Required. The parent resource name, which is the identifier of the partner. It will have the format of "partners/{partner_id}". |
subscription |
Required. The Subscription to be created. |
subscription_id |
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. |
PurchaseOrder
A purchase order resold via a third-party reseller.
Fields | |
---|---|
name |
Output only. Identifier. PurchaseOrder resource name in the format of: "partners/{partner_id}/purchaseorders/{purchase_order_id}" |
partner_user_token |
Required. Identifier of the end-user in partner’s system. |
line_items[] |
Required. Purchase order line items. |
subscription_details |
Optional. Only populated if this order is related to a subscription, such as renewal or proration. |
SubscriptionDetails
Details of the subscription this charge is related to.
Fields | |
---|---|
subscription |
Required. Subscription resource name in the format of: "partners/{partner_id}/subscription/{subscription_id}" |
purchase_order_type |
Required. The type of the purchase order. |
PurchaseOrderType
The type of the purchase order.
Enums | |
---|---|
PURCHASE_ORDER_TYPE_UNSPECIFIED |
Purchase order type is unspecified. |
PURCHASE_ORDER_TYPE_RENEWAL |
This is a renewal purchase order. |
PURCHASE_ORDER_TYPE_PRORATION |
The is a proration purchase order. |
PURCHASE_ORDER_TYPE_ONE_TIME |
The is a one-time purchase order. |
PURCHASE_ORDER_TYPE_OFF_CYCLE_CHARGE |
The is an off cycle charge purchase order. |
PurchaseOrderLineItem
Purchase order line item.
Fields | |
---|---|
product |
Required. Product resource name in the format of partners/{partner_id}/products/{product_id}. |
description |
Required. Description of this line item. |
amount |
Required. Line item amount. |
service_period |
Optional. Service period this purchase order line item is being delivered over. |
charged_details |
Optional. Details about units that are charged. |
refunded_details |
Optional. Details about units that are refunded. |
line_item_index |
Output only. A unique index of the purchase order line item. |
ServicePeriod
A description of what time period or moment in time the product or service is being delivered over.
Fields | |
---|---|
start_time |
Required. The start time of the service period. Time is inclusive. |
end_time |
Optional. The end time of the service period. Time is exclusive. |
Subscription
A subscription serves as a central billing entity between an external partner and Google. The underlying Google services rely on the subscription state to grant or revoke the user's service entitlement.
It's important to note that the subscription state may not always perfectly align with the user's service entitlement. For example, some Google services may continue providing access to the user until the current billing cycle ends, even if the subscription has been immediately canceled. However, other services may not do the same. To fully understand the specific details, please consult the relevant contract or product policy.
Fields | |
---|---|
name |
Identifier. Resource name of the subscription. It will have the format of "partners/{partner_id}/subscriptions/{subscription_id}". This is available for authorizeAddon, but otherwise is response only. |
products[] |
Optional. Deprecated: consider using |
promotions[] |
Optional. Deprecated: consider using the top-level |
promotion_specs[] |
Optional. Subscription-level promotions. Only free trial is supported on this level. It determines the first renewal time of the subscription to be the end of the free trial period. Specify the promotion resource name only when used as input. |
partner_user_token |
Required. Identifier of the end-user in partner’s system. The value is restricted to 63 ASCII characters at the maximum. |
service_location |
Required. The location that the service is provided as indicated by the partner. |
purchase_time |
Optional. The timestamp when the user transaction was made with the Partner. Specify for the case of "bundle with choice", and it must be before the provision_time (when the user makes a selection). |
upgrade_downgrade_details |
Optional. Details about the previous subscription that this new subscription upgrades/downgrades from. Only populated if this subscription is an upgrade/downgrade from another subscription. |
redirect_uri |
Output only. The place where partners should redirect the end-user to after creation. This field might also be populated when creation failed. However, Partners should always prepare a default URL to redirect the user in case this field is empty. |
create_time |
Output only. System generated timestamp when the subscription is created. UTC timezone. |
update_time |
Output only. System generated timestamp when the subscription is most recently updated. UTC timezone. |
cycle_end_time |
Output only. The time at which the subscription is expected to be extended, in ISO 8061 format. UTC timezone. For example: "2019-08-31T17:28:54.564Z" |
renewal_time |
Output only. The time at which the subscription is expected to be renewed by Google - a new charge will be incurred and the service entitlement will be renewed. A non-immediate cancellation will take place at this time too, before which, the service entitlement for the end user will remain valid. UTC timezone in ISO 8061 format. For example: "2019-08-31T17:28:54.564Z" |
free_trial_end_time |
Output only. End of the free trial period, in ISO 8061 format. For example, "2019-08-31T17:28:54.564Z". It will be set the same as createTime if no free trial promotion is specified. |
end_user_entitled |
Output only. Indicates if the subscription is entitled to the end user. |
state |
Output only. Describes the state of the subscription. See more details at the lifecycle of a subscription. |
processing_state |
Output only. Describes the processing state of the subscription. See more details at the lifecycle of a subscription. |
cancellation_details |
Output only. Describes the details of a cancelled subscription. Only applicable to subscription of state |
line_items[] |
Required. The line items of the subscription. |
CancellationDetails
Describes the details of a cancelled or cancelling subscription.
Fields | |
---|---|
reason |
Output only. The reason of the cancellation. |
LineItem
Individual line item definition of a subscription.
Fields | |
---|---|
product |
Required. Product resource name that identifies one the line item The format is 'partners/{partner_id}/products/{product_id}'. |
description |
Output only. Description of this line item. |
line_item_promotion_specs[] |
Optional. The promotions applied on the line item. It can be:
When used as input in Create or Provision API, specify its resource name only. |
state |
Output only. The state of the line item. |
line_item_free_trial_end_time |
Output only. The free trial end time will be populated after the line item is successfully processed. End time of the line item free trial period, in ISO 8061 format. For example, "2019-08-31T17:28:54.564Z". It will be set the same as createTime if no free trial promotion is specified. |
recurrence_type |
Output only. The recurrence type of the line item. |
one_time_recurrence_details |
Output only. Details only set for a ONE_TIME recurrence line item. |
product_payload |
Optional. Product specific payload for this line item. |
amount |
Output only. The price of the product/service in this line item. The amount could be the wholesale price, or it can include a cost of sale based on the contract. |
bundle_details |
Output only. The bundle details for the line item. Only populated if the line item corresponds to a hard bundle. |
finite_billing_cycle_details |
Optional. Details for a subscription line item with finite billing cycles. If unset, the line item will be charged indefinitely. Used only with LINE_ITEM_RECURRENCE_TYPE_PERIODIC. |
line_item_index |
Output only. A unique index of the subscription line item. |
BundleDetails
The bundle details for a line item corresponding to a hard bundle.
Fields | |
---|---|
bundle_element_details[] |
Output only. The details for each element in the hard bundle. |
BundleElementDetails
The details for an element in the hard bundle.
Fields | |
---|---|
product |
Output only. Product resource name that identifies the bundle element. The format is 'partners/{partner_id}/products/{product_id}'. |
user_account_linked_time |
Output only. The time when this product is linked to an end user. |
LineItemRecurrenceType
The recurrence type of the line item.
Enums | |
---|---|
LINE_ITEM_RECURRENCE_TYPE_UNSPECIFIED |
The line item recurrence type is unspecified. |
LINE_ITEM_RECURRENCE_TYPE_PERIODIC |
The line item recurs periodically. |
LINE_ITEM_RECURRENCE_TYPE_ONE_TIME |
The line item does not recur in the future. |
LineItemState
The state of a subscription line item.
Enums | |
---|---|
LINE_ITEM_STATE_UNSPECIFIED |
Unspecified state. |
LINE_ITEM_STATE_ACTIVE |
The line item is in ACTIVE state. If the subscription is cancelled or suspended, the line item will not be charged even if the line item is active. |
LINE_ITEM_STATE_INACTIVE |
The line item is in INACTIVE state. |
LINE_ITEM_STATE_NEW |
The line item is new, and is not activated or charged yet. |
LINE_ITEM_STATE_ACTIVATING |
The line item is being activated in order to be charged. If a free trial applies to the line item, the line item is pending a prorated charge at the end of the free trial period, as indicated by line_item_free_trial_end_time . |
LINE_ITEM_STATE_DEACTIVATING |
The line item is being deactivated, and a prorated refund in being processed. |
LINE_ITEM_STATE_WAITING_TO_DEACTIVATE |
The line item is scheduled to be deactivated at the end of the current cycle. |
LINE_ITEM_STATE_OFF_CYCLE_CHARGING |
Line item is being charged off-cycle. |
OneTimeRecurrenceDetails
Details for a ONE_TIME recurrence line item.
Fields | |
---|---|
service_period |
Output only. The service period of the ONE_TIME line item. |
ProcessingState
The processing state of a subscription which is transient.
Enums | |
---|---|
PROCESSING_STATE_UNSPECIFIED |
The processing state is unspecified. |
PROCESSING_STATE_CANCELLING |
The subscription is being cancelled. |
PROCESSING_STATE_RECURRING |
The subscription is recurring. |
PromotionSpec
Describes the spec for one promotion.
Fields | |
---|---|
promotion |
Required. Promotion resource name that identifies a promotion. The format is 'partners/{partner_id}/promotions/{promotion_id}'. |
type |
Output only. The type of the promotion for the spec. |
Union field
|
|
introductory_pricing_details |
Output only. The details of the introductory pricing spec if the promotion is of type INTRODUCTORY_PRICING. |
free_trial_duration |
Output only. The duration of the free trial if the promotion is of type FREE_TRIAL. |
State
The state of a subscription.
Enums | |
---|---|
STATE_UNSPECIFIED |
The state is unspecified. |
STATE_CREATED |
The subscription is created, a state before it is moved to STATE_ACTIVE. |
STATE_ACTIVE |
The subscription is active. |
STATE_CANCELLED |
The subscription is cancelled. This is the final state of the subscription, as it can no longer be modified or reactivated. |
STATE_IN_GRACE_PERIOD |
The subscription is in grace period. It can happen: 1) in manual extend mode, the subscription is not extended by the partner at the end of current cycle. 2) for outbound authorization enabled partners, a renewal purchase order is rejected. |
STATE_CANCEL_AT_END_OF_CYCLE |
The subscription is waiting to be cancelled by the next recurrence cycle. |
STATE_SUSPENDED |
The subscription is suspended. |
UpgradeDowngradeDetails
Details about the previous subscription that this new subscription upgrades/downgrades from.
Fields | |
---|---|
previous_subscription_id |
Required. The previous subscription id to be replaced. This is not the full resource name, use the subscription_id segment only. |
billing_cycle_spec |
Required. Specifies the billing cycle spec for the new upgraded/downgraded subscription. |
BillingCycleSpec
Specifies the billing cycle spec for the new upgraded/downgraded subscription.
Enums | |
---|---|
BILLING_CYCLE_SPEC_UNSPECIFIED |
Billing cycle spec is not specified. |
BILLING_CYCLE_SPEC_ALIGN_WITH_PREVIOUS_SUBSCRIPTION |
The billing cycle of the new subscription aligns with the previous subscription it upgrades or downgrades from. |
BILLING_CYCLE_SPEC_START_IMMEDIATELY |
The billing cycle of the new subscription starts immediately. |
UndoCancelSubscriptionRequest
Request to revoke a cancellation request.
Fields | |
---|---|
name |
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}" |
UndoCancelSubscriptionResponse
Response that contains the updated subscription resource.
Fields | |
---|---|
subscription |
The updated subscription resource. |
Unit
Frequency of the period.
Enums | |
---|---|
UNIT_UNSPECIFIED |
Default value, reserved as an invalid or an unexpected value. |
MONTH |
Unit of a calendar month. |
DAY |
Unit of a day. |
HOUR |
Unit of an hour. It is used for testing. |
UnitLevelDetails
Details about a subset of units in a given process.
Fields | |
---|---|
price_details |
Optional. The pricing details about units in a given process. |
UserSession
[Preview only] Preview APIs are working in progress and are subject to change. A user session which includes information required to interact with Google Payments Reseller Platform.
Fields | |
---|---|
token |
Output only. The encrypted token of the user session, including the information of the user's intent and request. This token should be provided when redirecting the user to Google. |
expire_time |
Output only. The time at which the user session expires. |
YoutubePayload
Payload specific to Youtube products.
Fields | |
---|---|
partner_eligibility_ids[] |
The list of eligibility_ids which are applicable for the line item. |
access_end_time |
Output only. The access expiration time for this line item. |
partner_plan_type |
Optional. Specifies the plan type offered to the end user by the partner. |
PartnerPlanType
Partner side plan type.
Enums | |
---|---|
PARTNER_PLAN_TYPE_UNSPECIFIED |
Unspecified. Should not use, reserved as an invalid value. |
PARTNER_PLAN_TYPE_STANDALONE |
This item is offered as a standalone product to the user. |
PARTNER_PLAN_TYPE_HARD_BUNDLE |
This item is bundled with another partner offering, the item is provisioned at purchase time. |
PARTNER_PLAN_TYPE_SOFT_BUNDLE |
This item is bundled with another partner offering, the item is provisioned after puchase, when the user opts in this Google service. |