curl -X POST https://api.llmgenerator.com/api/v1/subscriptions/cancel \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
const response = await fetch('https://api.llmgenerator.com/api/v1/subscriptions/cancel', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN'
}
});
const data = await response.json();
if (data.success) {
console.log('Subscription will end on:', data.cancellationDate);
}
import requests
response = requests.post(
'https://api.llmgenerator.com/api/v1/subscriptions/cancel',
headers={'Authorization': 'Bearer YOUR_ACCESS_TOKEN'}
)
data = response.json()
if data['success']:
print(f"Subscription will end on: {data['cancellationDate']}")
{
"success": true,
"message": "Subscription cancelled successfully",
"cancellationDate": "2024-02-15T00:00:00Z"
}
{
"message": "No active subscription to cancel"
}
Abonnements
Abonnement kündigen
Das aktive Abonnement zum Ende der laufenden Abrechnungsperiode kündigen.
POST
/
subscriptions
/
cancel
curl -X POST https://api.llmgenerator.com/api/v1/subscriptions/cancel \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
const response = await fetch('https://api.llmgenerator.com/api/v1/subscriptions/cancel', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN'
}
});
const data = await response.json();
if (data.success) {
console.log('Subscription will end on:', data.cancellationDate);
}
import requests
response = requests.post(
'https://api.llmgenerator.com/api/v1/subscriptions/cancel',
headers={'Authorization': 'Bearer YOUR_ACCESS_TOKEN'}
)
data = response.json()
if data['success']:
print(f"Subscription will end on: {data['cancellationDate']}")
{
"success": true,
"message": "Subscription cancelled successfully",
"cancellationDate": "2024-02-15T00:00:00Z"
}
{
"message": "No active subscription to cancel"
}
Überblick
Kündigt das Abonnement des Nutzers. Es bleibt bis zum Ende der aktuellen Abrechnungsperiode aktiv und verlängert sich nicht. Erfordert Sitzungsauthentifizierung (JWT-Access-Token).Für Drittanbieter-Integrationen: Verwenden Sie
POST /subscriptions/cancel/api mit API-Schlüssel-Authentifizierung.Die Kündigung wird zum Periodenende wirksam. Der Zugang bleibt bis
currentPeriodEnd bestehen. Für eine sofortige Beendigung nutzen Sie das Abrechnungsportal.Authentifizierung
string
erforderlich
JWT-Access-Token. Format:
Bearer YOUR_ACCESS_TOKENcurl -X POST https://api.llmgenerator.com/api/v1/subscriptions/cancel \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
const response = await fetch('https://api.llmgenerator.com/api/v1/subscriptions/cancel', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN'
}
});
const data = await response.json();
if (data.success) {
console.log('Subscription will end on:', data.cancellationDate);
}
import requests
response = requests.post(
'https://api.llmgenerator.com/api/v1/subscriptions/cancel',
headers={'Authorization': 'Bearer YOUR_ACCESS_TOKEN'}
)
data = response.json()
if data['success']:
print(f"Subscription will end on: {data['cancellationDate']}")
{
"success": true,
"message": "Subscription cancelled successfully",
"cancellationDate": "2024-02-15T00:00:00Z"
}
{
"message": "No active subscription to cancel"
}
Antwortfelder
boolean
Ob die Kündigung erfolgreich geplant wurde.
string
Für Menschen lesbare Statusmeldung.
string
ISO-8601-Zeitpunkt des Abonnementendes (nur bei Erfolg).
Fehlerantworten
Ungültige Anfrage – Kein aktives Abonnement oder Kündigung per API nicht möglich.
Nicht autorisiert – Ungültiges oder fehlendes Token.
Verhalten bei der Kündigung
| Szenario | Verhalten |
|---|---|
| Aktives Abonnement | Zur Kündigung zum Periodenende vorgemerkt |
| Bereits gekündigt | Fehler |
| Kein Abonnement | Fehler |
| Keine Stripe-Abonnement-ID | Fehler (Kündigung per API nicht möglich) |
Reaktivierung
Nutzer können:- Das Abrechnungsportal (
/subscriptions/portal) nutzen - Nach Ende des aktuellen Abonnements ein neues abschließen
Bewährte Praktiken
- Bestätigungsdialog: Vor der Kündigung immer bestätigen lassen
- Grund erfassen: Feedback einholen, warum gekündigt wird
- Retention: Rabatt oder Pausenoption erwägen
- Klare Kommunikation: Ende des Zugangs transparent angeben
POST /subscriptions/cancel/api
Kündigt das Abonnement mit API-Schlüssel-Authentifizierung. Geeignet für Drittanbieter-Integrationen.Authentifizierung
API-Schlüssel erforderlich. Übergeben Sie ihn im HeaderAuthorization:
Authorization: Bearer llmgen_your_api_key_here
Antwort
Wie bei/subscriptions/cancel oben.
curl -X POST https://api.llmgenerator.com/api/v1/subscriptions/cancel/api \
-H "Authorization: Bearer llmgen_your_api_key_here"
const response = await fetch('https://api.llmgenerator.com/api/v1/subscriptions/cancel/api', {
method: 'POST',
headers: {
'Authorization': 'Bearer llmgen_your_api_key_here'
}
});
const data = await response.json();
if (data.success) {
console.log('Subscription will end on:', data.cancellationDate);
}
import requests
response = requests.post(
'https://api.llmgenerator.com/api/v1/subscriptions/cancel/api',
headers={'Authorization': 'Bearer llmgen_your_api_key_here'}
)
data = response.json()
if data['success']:
print(f"Subscription will end on: {data['cancellationDate']}")
War diese Seite hilfreich?
⌘I