訂購客戶帳戶後,您可以建立多個不同的訂閱項目:
- 年約訂閱方案
- 彈性訂閱方案
- 30 天免費試用期
- 以折扣價訂閱
如要進一步瞭解這些訂閱項目使用的產品,請參閱「產品和 SKU」。
如果您並未訂購這位客戶的帳戶,可以轉移訂閱方案。
customerType = 'team'
客戶只能購買 Google Workspace Essentials 和 Enterprise Essentials 版本。如果您嘗試購買其他 Google Workspace 訂閱方案,系統會顯示錯誤訊息 Customer is not eligible to purchase this subscription
。購買 Essentials 或以用量計費訂閱方案的客戶可能無法處理年度承諾方案,且升級和降級選項有限。
建立訂閱項目
如要為新建立的客戶帳戶建立訂閱項目,請使用下列 POST
HTTP 要求,並附上授權權杖:
POST https://reseller.googleapis.com/apps/reseller/v1/customers/CUSTOMER_ID/subscriptions
CUSTOMER_ID
是客戶的主要網域名稱,或擷取已售出客戶帳戶時傳回的客戶專屬 ID。
建立年度承諾方案
對於年約方案訂閱,並非所有 SKU 都具有相同的預設續約設定。建議您一律傳遞 renewalSettings
。建立含有 10 個座位的年度承諾訂閱:
POST https://reseller.googleapis.com/apps/reseller/v1/customers/CUSTOMER_ID/subscriptions { "kind": "reseller#subscription", "customerId": "CUSTOMER_ID", "skuId": "SKU_ID", "plan": { "planName": "ANNUAL_MONTHLY_PAY" }, "seats": { "kind": "subscriptions#seats", "numberOfSeats": 10 }, renewalSettings: { "renewalType": 'RENEW_CURRENT_USERS_MONTHLY_PAY' }, "purchaseOrderId": "PURCHASE_ORDER_ID" }
更改下列內容:
CUSTOMER_ID
:客戶的主網域名稱或專屬 ID。SKU_ID
:專屬庫存單位 (SKU) ID。詳情請參閱「產品和 SKU ID」。PURCHASE_ORDER_ID
:可選的購買訂單 ID,可用於追蹤使用情形。
成功的回應會傳回 HTTP 200
狀態,以及年繳方案的新訂閱設定。ANNUAL_MONTHLY_PAY
會在所有 API 回應中傳回為 ANNUAL
。
以下是年度方案回應範例:
{
"kind": "reseller#subscription",
"customerId": "C0123456",
"subscriptionId": "123",
"billingMethod": "ONLINE",
"skuId": "1010020028",
"creationTime": "1331647980142",
"plan": {
"planName": "ANNUAL",
"isCommitmentPlan": true,
"commitmentInterval": {
"startTime": "1331647980142",
"endTime": "1363183980142"
}
},
"seats": {
"kind": "subscriptions#seats",
"numberOfSeats": 10,
"licensedNumberOfSeats": 10
},
"trialSettings": {
"isInTrial": false
},
"renewalSettings": {
"kind": "subscriptions#renewalSettings",
"renewalType": "SWITCH_TO_PAY_AS_YOU_GO"
},
"purchaseOrderId": "my_example.com_annual_1",
"status": "ACTIVE",
"customerDomain": "my_example.com",
"skuName": "Google Workspace Business Standard"
}
建立彈性方案
如要為新建立的客戶帳戶建立彈性訂閱項目,請使用下列 POST
HTTP 要求,並附上授權權杖:
POST https://reseller.googleapis.com/apps/reseller/v1/customers/CUSTOMER_ID/subscriptions { "kind": "reseller#subscription", "customerId": "CUSTOMER_ID", "skuId": "SKU_ID", "plan": { "planName": "FLEXIBLE" }, "seats": { "kind": "subscriptions#seats", "maximumNumberOfSeats": 10 }, "purchaseOrderId": "PURCHASE_ORDER_ID" }
更改下列內容:
CUSTOMER_ID
:客戶的主網域名稱或專屬 ID。SKU_ID
:專屬庫存單位 (SKU) ID。詳情請參閱「產品和 SKU ID」。PURCHASE_ORDER_ID
:可選的購買訂單 ID,可用於追蹤使用情形。
以下是彈性方案回應範例:
{
"kind": "reseller#subscription",
"customerId": "C0123456",
"subscriptionId": "123",
"billingMethod": "ONLINE",
"skuId": "1010020028",
"creationTime": "1331647980142",
"plan": {
"planName": "FLEXIBLE",
"isCommitmentPlan": false
},
"seats": {
"kind": "subscriptions#seats",
"maximumNumberOfSeats": 10,
"licensedNumberOfSeats": 0
},
"trialSettings": {
"isInTrial": false
},
"purchaseOrderId": "my_example_flex_1",
"status": "ACTIVE",
"customerDomain": "my_example.com",
"skuName": "Google Workspace Business Standard"
}
建立免費試用
如要為新建立的客戶帳戶建立 30 天免費試用訂閱,請使用下列 POST
HTTP 要求,並附上授權權杖:
POST https://reseller.googleapis.com/apps/reseller/v1/customers/CUSTOMER_ID/subscriptions { "kind": "reseller#subscription", "customerId": "CUSTOMER_ID", "skuId": "SKU_ID", "plan": { "planName": "TRIAL" }, "seats": { "kind": "subscriptions#seats", "maximumNumberOfSeats": 10 }, "purchaseOrderId": "PURCHASE_ORDER_ID" }
更改下列內容:
CUSTOMER_ID
:客戶的主網域名稱或專屬 ID。SKU_ID
:專屬庫存單位 (SKU) ID。詳情請參閱「產品和 SKU ID」。PURCHASE_ORDER_ID
:可選的購買訂單 ID,可用於追蹤使用情形。
以下是 30 天免費試用方案回應範例:
{
"kind": "reseller#subscription",
"customerId": "C0123456",
"subscriptionId": "123",
"billingMethod": "ONLINE",
"skuId": "1010020028",
"creationTime": "1331647980142",
"plan": {
"planName": "TRIAL",
"isCommitmentPlan": false
},
"seats": {
"kind": "subscriptions#seats",
"maximumNumberOfSeats": 10,
"licensedNumberOfSeats": 0
},
"trialSettings": {
"isInTrial": true,
"trialEndTime": "1331648420142"
},
"purchaseOrderId": "my_example_trial_1",
"status": "ACTIVE",
"customerDomain": "my_example.com",
"skuName": "Google Workspace Business Standard"
}
建立折扣訂閱
Google 可能會提供特惠代碼,讓您以折扣價格建立訂閱項目。如要為訂閱項目提供折扣,您必須在訂閱 insert
呼叫中提供交易代碼。如果客戶變更原始 SKU,折扣就會移除。
如要為新建立的客戶帳戶建立折扣年約訂閱方案,請使用下列 POST
HTTP 要求,並附上授權權杖:
POST https://reseller.googleapis.com/apps/reseller/v1/customers/CUSTOMER_ID/subscriptions { "kind": "reseller#subscription", "customerId": "CUSTOMER_ID", "skuId": "SKU_ID", "plan": { "planName": "ANNUAL_MONTHLY_PAY" }, "seats": { "kind": "subscriptions#seats", "numberOfSeats": 10 }, renewalSettings: { "renewalType": 'RENEW_CURRENT_USERS_MONTHLY_PAY' }, "purchaseOrderId": "PURCHASE_ORDER_ID", "dealCode": "GOOGLE_CONTRACT_DEAL_CODE" }
更改下列內容:
CUSTOMER_ID
:客戶的主網域名稱或專屬 ID。SKU_ID
:專屬庫存單位 (SKU) ID。詳情請參閱「產品和 SKU ID」。PURCHASE_ORDER_ID
:可選的購買訂單 ID,可用於追蹤使用情形。GOOGLE_CONTRACT_DEAL_CODE
:Google 提供的折扣代碼。
以下是折扣年費方案回應的範例:
{
"kind": "reseller#subscription",
"customerId": "C0123456",
"subscriptionId": "123",
"billingMethod": "ONLINE",
"skuId": "1010020028",
"creationTime": "1331647980142",
"plan": {
"planName": "ANNUAL",
"isCommitmentPlan": true,
"commitmentInterval": {
"startTime": "1331647980142",
"endTime": "1363183980142"
}
},
"seats": {
"kind": "subscriptions#seats",
"numberOfSeats": 10,
"licensedNumberOfSeats": 10
},
"trialSettings": {
"isInTrial": false
},
"renewalSettings": {
"kind": "subscriptions#renewalSettings",
"renewalType": "SWITCH_TO_PAY_AS_YOU_GO"
},
"purchaseOrderId": "my_example.com_annual_1",
"status": "ACTIVE",
"customerDomain": "my_example.com",
"dealCode": "GOOGLE_CONTRACT_DEAL_CODE",
"skuName": "Google Workspace Business Standard"
}
轉移訂閱內容
如果您並未使用訂購新客戶帳戶作業訂購客戶帳戶,請在為該客戶建立訂閱項目時使用客戶的轉移權杖。
如要為未訂購的客戶帳戶建立訂閱項目,請使用以下 POST
HTTP 要求:
POST https://reseller.googleapis.com/apps/reseller/v1/customers/CUSTOMER_ID/subscriptions?customerAuthToken=TOKEN_VALUE
更改下列內容:
CUSTOMER_ID
:客戶的主網域名稱或專屬 ID。TOKEN_VALUE
:客戶提供的轉移權杖。客戶產生權杖後,權杖的有效期限為 30 天。
如要進一步瞭解客戶如何取得轉移權杖,請參閱 Google Workspace 說明中心。
如要轉移年度承諾方案客戶的訂閱項目,請使用下列 POST
HTTP 要求,並附上授權權杖:
POST https://reseller.googleapis.com/apps/reseller/v1/customers/C0123456/subscriptions?customerAuthToken=auth token { "customerId": "CUSTOMER_ID", "skuId": "SKU_ID", "plan": { "planName": "ANNUAL_MONTHLY_PAY" }, "seats": { "numberOfSeats": 10, "licensedNumberOfSeats": 10 }, "purchaseOrderId": "PURCHASE_ORDER_ID" }
更改下列內容:
CUSTOMER_ID
:客戶的主網域名稱或專屬 ID。SKU_ID
:專屬庫存單位 (SKU) ID。詳情請參閱「產品和 SKU ID」。PURCHASE_ORDER_ID
:可選的購買訂單 ID,可用於追蹤使用情形。
成功的回應會傳回 HTTP 200
狀態碼,以及已轉移的訂閱方案設定 (針對年度承諾方案):
{
"kind": "reseller#subscription",
"customerId": "C0123456",
"subscriptionId": "123",
"billingMethod": "ONLINE",
"skuId": "1010020028",
"creationTime": "1331647980142",
"plan": {
"planName": "ANNUAL",
"isCommitmentPlan": true,
"commitmentInterval": {
"startTime": "1331647980142",
"endTime": "1363183980142"
}
},
"seats": {
"kind": "subscriptions#seats",
"numberOfSeats": 10,
"licensedNumberOfSeats": 10
},
"trialSettings": {
"isInTrial": false
},
"renewalSettings": {
"kind": "subscriptions#renewalSettings",
"renewalType": "SWITCH_TO_PAY_AS_YOU_GO"
},
"purchaseOrderId": "example.com_annual_1",
"status": "ACTIVE",
"resourceUiUrl": "URL to customer's Admin console dashboard",
"skuName": "Google Workspace Business Standard"
}
轉移限制
如果要轉移 Google Workspace 訂閱方案,且該方案與 Google 雲端硬碟或 Google Vault 訂閱方案相關聯,請使用 batch
作業轉移所有狀態為 ACTIVE
的訂閱方案。逐一轉移每個訂閱項目會導致錯誤。
只有在停權原因為 PENDING_TOS_ACCEPTANCE
、TRIAL_ENDED
或 RENEWAL_WITH_TYPE_CANCEL
時,才能轉移已停權的訂閱項目。
轉移舊版 SKU 時,subscriptions.list
會傳回需要轉移的 SKU 的 skuId
。客戶實際擁有的 SKU 的 skuId
會傳回為 transferInfo.currentLegacySkuId
。如需完整的 skuIds
清單,以及這些方案使用的產品,請參閱「產品和 SKU」。
轉帳不適用於折扣優惠代碼。