Skip to content

Who a workspace's invoices are made out to: the billing email, name, address, tax ID (tax_id_type, tax_id), po_number and the invoices' language, with the default payment_method as far as it is safe to show (its kind, brand, last four digits and expiry).

GET/workspaces/{workspace}/billing_details

customer is false until the workspace has been set up to pay. Tax is worked out from the address: tax_location says whether it is enough for that (a country, and in the US a ZIP code), tax_address_needed_at is set while g1t is holding a charge for want of one, tax_id_status is Stripe’s check of the tax ID (pending, verified, unverified or unavailable), and tax_exempt is none, exempt or reverse. Members of the workspace only.

Owners change these on the workspace’s billing page. payment_method is null until a card or other way to pay is saved. Tax is worked out from the address: tax_location is false until it has at least a country (and in the US a ZIP code), and tax_address_needed_at is set while a charge waits for one.

  • Authentication: Required. Send an access token as Authorization: Bearer.
  • MCP tool: billing with action billing_details, and the same inputs
  • Scope: An access token needs billing:read.
Name Type Required Description
workspace string Yes The workspace’s slug, e.g. “flagon-io”.
curl https://api.g1t.sh/workspaces/flagon-io/billing_details \
-H "Authorization: Bearer $G1T_TOKEN"

A successful request answers 200 with:

{
"customer": true,
"email": "billing@flagon.example.com",
"name": "Flagon, Inc.",
"address": {
"line1": "100 Market Street",
"line2": "",
"city": "San Francisco",
"state": "CA",
"postal_code": "94105",
"country": "US"
},
"tax_id_type": "us_ein",
"tax_id": "12-3456789",
"po_number": null,
"language": "en",
"payment_method": {
"kind": "card",
"brand": "visa",
"last4": "4242",
"exp_month": 12,
"exp_year": 2028
},
"tax_location": true,
"tax_address_needed_at": null,
"tax_id_status": "unavailable",
"tax_exempt": "none"
}

A failed request answers with one of these statuses and a body like {"error": {"code": "not_found", "message": "Repository not found."}}. See errors.

Status Code When
401 unauthenticated A token is required, or the one sent is not valid.
403 forbidden The token is valid but not allowed to do this, such as a member-only change or an agent token outside its repository.
404 not_found It does not exist, or you cannot see it.
422 invalid The input is not valid. message says which field and why.