Feature Description
Please expose the billing endpoints already present in the OpenAPI spec and generated Go client as first-class hapi commands.
The generated client includes methods for:
GET /api/billing/v1/catalog
GET /api/billing/v1/payment-methods
POST /api/billing/v1/payment-methods/{paymentMethodId}
DELETE /api/billing/v1/payment-methods/{paymentMethodId}
GET /api/billing/v1/subscriptions
DELETE /api/billing/v1/subscriptions/{subscriptionId}/auto-renewal/disable
PATCH /api/billing/v1/subscriptions/{subscriptionId}/auto-renewal/enable
POST /api/billing/v1/orders
But the shipped CLI currently appears to expose only the vps command group.
Problem Statement
Agentic and automated workflows need a safe, scriptable way to discover purchasable item IDs, inspect default payment methods, and verify subscription state before and after provisioning.
Without billing/catalog commands, users can list VPS templates and data centers with the CLI, but cannot use the same CLI to discover the priced catalog item ID needed for VPS purchase, such as:
hostingercom-vps-kvm2-usd-1m
This pushes automation back to ad hoc API calls or dashboard/manual lookup.
Proposed Solution
Add command groups such as:
hapi billing catalog list --category VPS --format json
hapi billing payment-methods list --format json
hapi billing payment-methods set-default <payment-method-id>
hapi billing subscriptions list --format json
hapi billing subscriptions disable-auto-renewal <subscription-id>
hapi billing subscriptions enable-auto-renewal <subscription-id>
hapi billing orders create --item-id <price-item-id> --quantity 1 --payment-method-id <id>
For agentic workflows, --format json should produce stable JSON suitable for jq.
Use Cases
- Discover the correct VPS price item ID without dashboard lookup.
- Verify that a default payment method exists before a purchase attempt.
- Inspect subscription status after creating or stopping a VPS.
- Disable auto-renewal for intentionally short-lived resources.
- Build future-proof scripts that use one official Hostinger CLI instead of mixed dashboard/API/manual steps.
Additional Context
The OpenAPI spec already describes these operations, and the generated Go client already contains the corresponding methods. This request is primarily about exposing that existing API surface through the official CLI.
Are you willing to contribute?
Feature Description
Please expose the billing endpoints already present in the OpenAPI spec and generated Go client as first-class
hapicommands.The generated client includes methods for:
GET /api/billing/v1/catalogGET /api/billing/v1/payment-methodsPOST /api/billing/v1/payment-methods/{paymentMethodId}DELETE /api/billing/v1/payment-methods/{paymentMethodId}GET /api/billing/v1/subscriptionsDELETE /api/billing/v1/subscriptions/{subscriptionId}/auto-renewal/disablePATCH /api/billing/v1/subscriptions/{subscriptionId}/auto-renewal/enablePOST /api/billing/v1/ordersBut the shipped CLI currently appears to expose only the
vpscommand group.Problem Statement
Agentic and automated workflows need a safe, scriptable way to discover purchasable item IDs, inspect default payment methods, and verify subscription state before and after provisioning.
Without billing/catalog commands, users can list VPS templates and data centers with the CLI, but cannot use the same CLI to discover the priced catalog item ID needed for VPS purchase, such as:
This pushes automation back to ad hoc API calls or dashboard/manual lookup.
Proposed Solution
Add command groups such as:
For agentic workflows,
--format jsonshould produce stable JSON suitable forjq.Use Cases
Additional Context
The OpenAPI spec already describes these operations, and the generated Go client already contains the corresponding methods. This request is primarily about exposing that existing API surface through the official CLI.
Are you willing to contribute?