Apply credit to a specific invoice

Apply your available credit to a specific invoice. This reduces the cost of an existing invoice. The endpoint returns an ID for tracking the operation.

Path Parameters

id integer · min: 1 required Example

Unique id identifier

Headers

Accept Example
Content-Type Example

Body

required
application/json
amount string · enum required
130.00
1500.00
17.82
2.25
2.50
39.00
4.41
8.91
93.75

Responses

200
success boolean
timestamp string
requestId string
data object
400
error string
message string
code string
timestamp string
requestId string
POST https://cloud.hostup.se/api/billing/invoice/{id}/apply-credit
For AI assistants
cURL
curl -X POST "https://cloud.hostup.se/api/billing/invoice/46376/apply-credit" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": "130.00"
  }'
Response
{
  "success": true,
  "timestamp": "string",
  "requestId": "string",
  "data": {
    "message": "string",
    "invoiceId": "string",
    "amount": "string"
  }
}
Request Body
{
  "amount": "130.00"
}