Pay a specific invoice with a selected payment method

Make a payment for a specific invoice. You need to provide the ID of the invoice to be paid, which you can retrieve from the GET /api/billing/invoice/{id} endpoint. You can also specify a particular payment method (e.g., a credit card) by providing its ID, which you can retrieve from GET /api/billing/cards.

Billing & Payments Billing

Context

Used in the dashboard

/billing/pay/[uuid] /billing/pay/[uuid]/success /billing

Workflow links

Headers

Accept Example
Content-Type Example

Body

required
application/json
cardId string required · Example: primary
invoiceId string required · Example: 49332

Responses

200
data object required
data.message string required · Example: Function has been scheduled for execution

Human-readable message.

data.success boolean required · Example: true

True for successful responses.

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).

400
code string required · Example: BAD_REQUEST

Machine-readable error code.

error string required · Example: Bad Request

HTTP status title (e.g. 'Bad Request').

message string required · Example: Your card does not support this type of purchase.

Human-readable message.

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

Unique request identifier (UUID).

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

ISO 8601 timestamp (UTC).

POST https://cloud.hostup.se/api/billing/pay
For AI assistants
cURL
curl -X POST "https://cloud.hostup.se/api/billing/pay" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "invoiceId": "49332",
    "cardId": "primary"
  }'
Response
{
  "success": true,
  "timestamp": "2026-02-10T00:00:00.000Z",
  "requestId": "2121ae20-bd9d-41e9-aeeb-5dd1dd1a24ba",
  "data": {
    "success": true,
    "message": "Function has been scheduled for execution"
  }
}
Request Body Example 1
{
  "invoiceId": "49332",
  "cardId": "primary"
}