Billing operations

Credits, top-ups, invoices, and payment.

Each operation below is reachable at POST /v1/op/{operation_id} or the resource path POST /v1/{resource}/{action}, with a Bearer token (a gpra_ API key or a session token). Back to the Operations Reference index.

billing.approvals.approve

Approve a credit purchase and charge the saved card (human approver only).

Scopebilling:write
Side-effectspend — accepts an Idempotency-Key header
HTTPPOST /v1/op/billing.approvals.approve · POST /v1/billing/approvals/approve
Python / TypeScriptclient.billing.approvals.approve(…)
CLIgeopera billing approvals approve …

RequestApprovalRefInput

FieldTypeRequiredDescription
approval_idstringyes

ResponseApprovalOutput.

billing.approvals.get

Get one credit-purchase approval (org-scoped).

Scopebilling:read
Side-effectread
HTTPPOST /v1/op/billing.approvals.get · POST /v1/billing/approvals/get
Python / TypeScriptclient.billing.approvals.get(…)
CLIgeopera billing approvals get …

RequestApprovalGetInput

FieldTypeRequiredDescription
approval_idstringyes

Response — a streaming or binary payload (NDJSON / file / tile). Call the HTTP endpoint directly; the JSON SDK return does not apply.

billing.approvals.list

List the org’s credit-purchase approvals (optionally by status).

Scopebilling:read
Side-effectread
HTTPPOST /v1/op/billing.approvals.list · POST /v1/billing/approvals/list
Python / TypeScriptclient.billing.approvals.list(…)
CLIgeopera billing approvals list …

RequestApprovalsListInput

FieldTypeRequiredDescription
statusstring

Response — a streaming or binary payload (NDJSON / file / tile). Call the HTTP endpoint directly; the JSON SDK return does not apply.

billing.approvals.reject

Reject a pending credit-purchase approval.

Scopebilling:write
Side-effectcompute
HTTPPOST /v1/op/billing.approvals.reject · POST /v1/billing/approvals/reject
Python / TypeScriptclient.billing.approvals.reject(…)
CLIgeopera billing approvals reject …

RequestRejectApprovalInput

FieldTypeRequiredDescription
approval_idstringyes
reasonstring

ResponseApprovalOutput.

billing.approvals.request

Request approval for a large credit purchase.

Scopebilling:write
Side-effectcompute
HTTPPOST /v1/op/billing.approvals.request · POST /v1/billing/approvals/request
Python / TypeScriptclient.billing.approvals.request(…)
CLIgeopera billing approvals request …

RequestRequestApprovalInput

FieldTypeRequiredDescription
creditsintegeryes
expiry_hoursinteger

ResponseApprovalOutput.

billing.auto_topup.get

Read the org’s auto-topup settings (enabled=false if unset).

Scopebilling:read
Side-effectread
HTTPPOST /v1/op/billing.auto_topup.get · POST /v1/billing/auto_topup/get
Python / TypeScriptclient.billing.auto_topup.get(…)
CLIgeopera billing auto-topup get …

Request_Empty (see the OpenAPI schema for fields).

Response — a streaming or binary payload (NDJSON / file / tile). Call the HTTP endpoint directly; the JSON SDK return does not apply.

billing.credits.balance

The org’s current credit balance.

Scopebilling:read
Side-effectread
HTTPPOST /v1/op/billing.credits.balance · POST /v1/billing/credits/balance
Python / TypeScriptclient.billing.credits.balance(…)
CLIgeopera billing credits balance …

Request_Empty (see the OpenAPI schema for fields).

Response — a streaming or binary payload (NDJSON / file / tile). Call the HTTP endpoint directly; the JSON SDK return does not apply.

billing.credits.transactions

The org’s credit ledger (paged, optionally filtered by reason).

Scopebilling:read
Side-effectread
HTTPPOST /v1/op/billing.credits.transactions · POST /v1/billing/credits/transactions
Python / TypeScriptclient.billing.credits.transactions(…)
CLIgeopera billing credits transactions …

RequestTransactionsInput

FieldTypeRequiredDescription
limitinteger
offsetinteger
reasonstring

Response — a streaming or binary payload (NDJSON / file / tile). Call the HTTP endpoint directly; the JSON SDK return does not apply.

billing.invoices.list

The org’s enterprise invoices (grouped from settled orders).

Scopebilling:read
Side-effectread
HTTPPOST /v1/op/billing.invoices.list · POST /v1/billing/invoices/list
Python / TypeScriptclient.billing.invoices.list(…)
CLIgeopera billing invoices list …

RequestInvoicesInput

FieldTypeRequiredDescription
limitinteger

Response — a streaming or binary payload (NDJSON / file / tile). Call the HTTP endpoint directly; the JSON SDK return does not apply.

billing.plans.list

List all available plans with their quota/feature limits (public catalog).

Scopebilling:read
Side-effectread
HTTPPOST /v1/op/billing.plans.list · POST /v1/billing/plans/list
Python / TypeScriptclient.billing.plans.list(…)
CLIgeopera billing plans list …

Request_Empty (see the OpenAPI schema for fields).

Response — a streaming or binary payload (NDJSON / file / tile). Call the HTTP endpoint directly; the JSON SDK return does not apply.

billing.run_monthly_for_org

Run monthly billing for one org (manual; org admin).

Scopebilling:write
Side-effectspend — accepts an Idempotency-Key header
HTTPPOST /v1/op/billing.run_monthly_for_org · POST /v1/billing/run_monthly_for_org
Python / TypeScriptclient.billing.run_monthly_for_org(…)
CLIgeopera billing run-monthly-for-org …

RequestOrgInput

FieldTypeRequiredDescription
organization_idstringyes

Response — a streaming or binary payload (NDJSON / file / tile). Call the HTTP endpoint directly; the JSON SDK return does not apply.

billing.set_auto_topup

Configure automatic top-up (requires a default card when enabling).

Scopebilling:write
Side-effectcompute
HTTPPOST /v1/op/billing.set_auto_topup · POST /v1/billing/set_auto_topup
Python / TypeScriptclient.billing.set_auto_topup(…)
CLIgeopera billing set-auto-topup …

RequestSetAutoTopupInput

FieldTypeRequiredDescription
enabledbooleanyes
threshold_creditsintegeryes
topup_amount_creditsintegeryes
daily_charge_cap_audnumber

ResponseSetAutoTopupOutput.

billing.status.get

An org’s billing status + current usage (org membership required).

Scopebilling:read
Side-effectread
HTTPPOST /v1/op/billing.status.get · POST /v1/billing/status/get
Python / TypeScriptclient.billing.status.get(…)
CLIgeopera billing status get …

RequestOrgStatusInput

FieldTypeRequiredDescription
organization_idstringyes

Response — a streaming or binary payload (NDJSON / file / tile). Call the HTTP endpoint directly; the JSON SDK return does not apply.

billing.stripe_invoices.list

List the org’s Stripe invoices (never 500s — empty on a Stripe hiccup).

Scopebilling:read
Side-effectread
HTTPPOST /v1/op/billing.stripe_invoices.list · POST /v1/billing/stripe_invoices/list
Python / TypeScriptclient.billing.stripe_invoices.list(…)
CLIgeopera billing stripe-invoices list …

RequestInvoicesInput

FieldTypeRequiredDescription
limitinteger

Response — a streaming or binary payload (NDJSON / file / tile). Call the HTTP endpoint directly; the JSON SDK return does not apply.

billing.topup

Invoke Billing Topup.

Scopebilling:write
Side-effectspend — accepts an Idempotency-Key header
HTTPPOST /v1/op/billing.topup · POST /v1/billing/topup
Python / TypeScriptclient.billing.topup(…)
CLIgeopera billing topup …

Request — a free-form JSON object.