Billing API overview

The Billing API uses Kubernetes custom resources and relies on the Kubernetes Resource Model (KRM) to manage SKUs for Google Distributed Cloud Hosted (GDCH) services.

To use the Billing API, use the GDCH console. If your application uses your own libraries to call the API, adopt the example service endpoint in the following section, and the full API definition to build your requests.

Service endpoint and discovery document

The API endpoint for the Billing API is: https://GDCH_API_SERVER_ENDPOINT/apis/billing.gdc.goog/v1 where GDCH_API_SERVER_ENDPOINT is the endpoint of the GDCH API server.

Using the kubectl proxy command, access the URL in your browser to obtain the discovery document for the Billing API. The kubectl proxy command opens up a proxy on 127.0.0.1:8001 to the Kubernetes API server on your local machine. Once that command is running, access the document at the following URL: http://127.0.0.1:8001/apis/billing.gdc.goog/v1.

Example resources

The following is a sample SKUDescription resource:

apiVersion: billing.gdc.goog/v1
kind: SKUDescription
metadata:
  name: 4a76-432c-797f
  namespace: billing-system
skuID: 4A76-432C-797F
invoiceDescription: "GDC-H Sample SKU"
description: "A description to describe what the SKU is charging."
category: Sample
pricingInfo:
  - unitPrice:
      currencyCode: USD
      units: 100
      nanos: 0
  usageUnit: vTestResource * month
  effectiveTime: "2023-01-01T00:00:00-08:00"