Skip to main content

Billing System API Tokens

Commands Reference

Manage secure tokens for billing system integrations:

CommandDescriptionExample
Generate TokenCreate a new token (displayed once)hvcli api:billing-token generate
List TokensView all tokenshvcli api:billing-token list
Enable TokenActivate a deactivated tokenhvcli api:billing-token enable 550e8400-e29b-41d4-a716-446655440000
Disable TokenDeactivate a tokenhvcli api:billing-token disable 550e8400-e29b-41d4-a716-446655440000
Remove TokenPermanently delete a tokenhvcli api:billing-token remove 550e8400-e29b-41d4-a716-446655440000

Key Features

  • ID: The UUID token identifier (use this for enable/disable/remove operations)
  • One-Time Visibility: Tokens are only shown during generation
  • IP Restricted: Each token is bound to specific IP addresses
  • State Control: Tokens can be enabled/disabled without deletion

Usage Examples

1. Generating a New Token

hvcli api:billing-token generate

Prompts for:

  • IP Address (e.g., 203.0.113.45)
  • Name (e.g., WHMCS-Production)
  • Description (optional)

Example Output:

Success! Your new API token:
Token ID: 550e8400-e29b-41d4-a716-446655440000
Token: *********

⚠️ WARNING: This token will NEVER be shown again!

2. Listing Active Tokens

hvcli api:billing-token list

Example Output:

+--------------------------------------+------------------+---------------------+----------------+---------+
| ID | Name | Description | IP Address | Enabled |
+--------------------------------------+------------------+---------------------+----------------+---------+
| 550e8400-e29b-41d4-a716-446655440000 | WHMCS-Production | Primary integration | 203.0.113.45 | Yes |
| 3d8d8e80-2b97-11ed-a261-0242ac120002 | Backup-System | Failover server | 198.51.100.10 | No |
+--------------------------------------+------------------+---------------------+----------------+---------+

3. Managing Token State

# Enable a token
hvcli api:billing-token enable 550e8400-e29b-41d4-a716-446655440000

# Disable a token
hvcli api:billing-token disable 550e8400-e29b-41d4-a716-446655440000

# Remove a token permanently
hvcli api:billing-token remove 550e8400-e29b-41d4-a716-446655440000

🔒 Security Best Practices

  1. Store Tokens Securely
  2. IP Restrictions: Always bind tokens to specific IPs
  3. Regular Rotation: Replace tokens every 6-12 months
  4. Immediate Revocation: Disable compromised tokens immediately