Consolidate and pay multiple invoices

Combine multiple invoices into a single payment. This creates a new consolidated invoice with a new ID that you then use to complete the payment, for example, via POST /api/billing/pay.

Billing & Payments Invoices

Context

Used in the dashboard

/billing

Workflow links

Headers

Accept Example
Content-Type Example

Body

required
application/json
invoiceIds array required · Example: ["50416"]
primaryInvoiceId string required · Example: 50495

Responses

200
data object required
data.invoiceId string required · Example: 51541
data.mergedInvoices array<string> required · Example: ["50495","50416"]
data.message string required · Example: Bulk payment invoice created successfully

Human-readable message.

requestId string required · Example: 2121ae20-bd9d-41e9-aeeb-5dd1dd1a24ba

Unique request identifier (UUID).

success boolean required · Example: true

True for successful responses.

timestamp string required · Example: 2026-02-10T00:00:00.000Z

ISO 8601 timestamp (UTC).

POST https://cloud.hostup.se/api/billing/invoices/bulk-pay
For AI assistants
cURL
curl -X POST "https://cloud.hostup.se/api/billing/invoices/bulk-pay" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "primaryInvoiceId": "50495",
    "invoiceIds": [
      "50416"
    ]
  }'
Response
{
  "success": true,
  "timestamp": "2026-02-10T00:00:00.000Z",
  "requestId": "2121ae20-bd9d-41e9-aeeb-5dd1dd1a24ba",
  "data": {
    "invoiceId": "51541",
    "mergedInvoices": [
      "50495",
      "50416"
    ],
    "message": "Bulk payment invoice created successfully"
  }
}
Request Body Example 1
{
  "primaryInvoiceId": "50495",
  "invoiceIds": [
    "50416"
  ]
}