Billing & Profile
Manage your billing information, payment methods, and view usage statistics.
Billing & Profile
Manage your billing information, payment methods, and view usage statistics.
Current Billing
GET /profile/billing/current
Get the current month's billing items across all your projects.
Headers
Name | Type | Description |
---|---|---|
Authorization | string | Bearer token for authentication |
Response
200 - Success
[
{
"project": "proj_abc123",
"projectName": "Production Environment",
"items": [
{
"type": "vps",
"name": "Web Server 01",
"hours": 720,
"cost": 49.00
},
{
"type": "vps",
"name": "Database Server",
"hours": 720,
"cost": 99.00
}
],
"total": 148.00,
"hours": 1440
}
]
Invoice History
GET /profile/billing/invoices
Retrieve your complete invoice history with detailed line items.
Headers
Name | Type | Description |
---|---|---|
Authorization | string | Bearer token for authentication |
Response
200 - Success
[
{
"id": "inv_1234567890",
"paymentStatus": "paid",
"lastChecked": "2025-01-15T10:30:00Z",
"created": "2025-01-01T00:00:00Z",
"total": 148.00,
"items": [
{
"name": "VPS Basic - Web Server 01",
"type": "vps",
"product": "prod_abc123",
"project": "proj_abc123",
"projectName": "Production Environment",
"hours": 720,
"cost": 49.00,
"productCost": 49
}
]
}
]
Payment Methods
Get Payment Method
GET /profile/billing/payment-method
Retrieve your current payment method details.
Headers
Name | Type | Description |
---|---|---|
Authorization | string | Bearer token for authentication |
Response
200 - Success
{
"agreement": "agr_abc123",
"facilitator": "mobilepay_recurring",
"displayName": "John Doe",
"testMode": false,
"created": "2025-01-01T00:00:00Z",
"status": "success"
}
Setup MobilePay
GET /profile/billing/mobilepay
Set up MobilePay as your payment method.
Headers
Name | Type | Description |
---|---|---|
Authorization | string | Bearer token for authentication |
Response
200 - Success
{
"facilitator": "mobilepay_recurring",
"url": "https://mobilepay.dk/recurring-setup/..."
}
Setup Nets Payment
GET /profile/billing/nets
Set up Nets card payment as your payment method.
Headers
Name | Type | Description |
---|---|---|
Authorization | string | Bearer token for authentication |
Response
200 - Success
{
"facilitator": "nets",
"url": "https://payment.nets.eu/..."
}
Remove Payment Method
DELETE /profile/billing/payment-method
Remove your current payment method.
Headers
Name | Type | Description |
---|---|---|
Authorization | string | Bearer token for authentication |
Response
200 - Success
{
"success": true
}
Billing Details
Get Billing Details
GET /profile/billing/details
Retrieve your billing contact information.
Headers
Name | Type | Description |
---|---|---|
Authorization | string | Bearer token for authentication |
Response
200 - Success
{
"name": "John Doe",
"street": "Example Street 123",
"zipCode": "1234",
"city": "Copenhagen",
"countryKey": "DNK",
"phone": "+4512345678",
"email": "john@example.com",
"isPerson": true
}
Update Billing Details
POST /profile/billing/details
Update your billing contact information.
Headers
Name | Type | Description |
---|---|---|
Authorization | string | Bearer token for authentication |
Request Body
Name | Type | Description |
---|---|---|
name | string | Full name or company name |
street | string | Street address |
zipCode | string | Postal/ZIP code |
city | string | City name |
countryKey | string | ISO 3166-1 alpha-3 country code |
phone | string | Phone number with country code |
string | Billing email address | |
isPerson | boolean | Whether this is a personal or business account |
Example Request:
{
"name": "John Doe",
"street": "Example Street 123",
"zipCode": "1234",
"city": "Copenhagen",
"countryKey": "DNK",
"phone": "+4512345678",
"email": "john@example.com",
"isPerson": true
}
Response
200 - Success
{
"success": true
}
Project Billing
Project Hourly Billing
GET /projects/{project}/billing/hourly
Get historical hourly billing for a specific project.
Path Parameters
Name | Type | Description |
---|---|---|
project | string | Unique project identifier |
Headers
Name | Type | Description |
---|---|---|
Authorization | string | Bearer token for authentication |
Response
200 - Success
[
{
"created": "2025-01-01T00:00:00Z",
"year": 2025,
"month": 1,
"items": [
{
"type": "vps",
"name": "Web Server 01",
"hours": 744,
"cost": 49.0
}
]
}
]
Current Project Billing
GET /projects/{project}/billing/hourly/current
Get current month's hourly billing for a specific project.
Path Parameters
Name | Type | Description |
---|---|---|
project | string | Unique project identifier |
Headers
Name | Type | Description |
---|---|---|
Authorization | string | Bearer token for authentication |
Response
200 - Success
[
{
"productType": "vps",
"product": "prod_abc123",
"type": "vps",
"name": "Web Server 01",
"hours": 360,
"cost": 24.5,
"lastUpdated": "2025-01-15T10:00:00Z",
"created": "2025-01-15T00:00:00Z"
}
]
Related Topics
- Projects - Manage projects that generate billing
- Authentication - Required for accessing billing information
- Virtual Machines - Resources that appear on your bills