Credits
Guthaben abfragen und Credits kaufen
GET /v1/credits/
Ruft den aktuellen Kontostand und die Transaktionshistorie ab.
Antwort
{
"balance": "15000.00",
"transactions": [
{
"id": "ctx_abc123",
"orgId": "org_xyz",
"amount": "10000.00",
"type": "purchase",
"description": "Credit-Paket: Starter",
"createdAt": "2026-03-08T12:00:00.000Z"
},
{
"id": "ctx_def456",
"orgId": "org_xyz",
"amount": "-27.00",
"type": "deduction",
"description": "API-Nutzung: gpt-5.4",
"createdAt": "2026-03-08T12:05:00.000Z"
}
],
"packages": [
{
"id": "starter",
"label": "Starter",
"credits": 10000,
"price": "9.99"
}
]
}POST /v1/credits/purchase
Startet einen Credit-Kauf über Mollie.
Anfrage
{
"packageId": "starter"
}| Parameter | Typ | Pflicht | Beschreibung |
|---|---|---|---|
packageId | string | Ja | ID des Credit-Pakets |
Antwort
{
"paymentId": "tr_abc123",
"checkoutUrl": "https://checkout.mollie.com/..."
}Der Benutzer wird zur checkoutUrl weitergeleitet, um die Zahlung abzuschließen.
Fehlercodes
| Code | Beschreibung |
|---|---|
400 | Ungültiges Paket |
503 | Zahlungsanbieter nicht konfiguriert |