Billing System API Tokens
Commands Reference
Manage secure tokens for billing system integrations:
Command | Description | Example |
---|---|---|
Generate Token | Create a new token (displayed once) | hvcli api:billing-token generate |
List Tokens | View all tokens | hvcli api:billing-token list |
Enable Token | Activate a deactivated token | hvcli api:billing-token enable 550e8400-e29b-41d4-a716-446655440000 |
Disable Token | Deactivate a token | hvcli api:billing-token disable 550e8400-e29b-41d4-a716-446655440000 |
Remove Token | Permanently delete a token | hvcli 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
- Store Tokens Securely
- IP Restrictions: Always bind tokens to specific IPs
- Regular Rotation: Replace tokens every 6-12 months
- Immediate Revocation: Disable compromised tokens immediately