Abonnement kündigen
curl --request PATCH \
--url https://api.stage.localpayment.com/api/payin/subscriptions/{subscriptionId}/status \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"status": "CANCELLED"
}
'import requests
url = "https://api.stage.localpayment.com/api/payin/subscriptions/{subscriptionId}/status"
payload = { "status": "CANCELLED" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({status: 'CANCELLED'})
};
fetch('https://api.stage.localpayment.com/api/payin/subscriptions/{subscriptionId}/status', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.stage.localpayment.com/api/payin/subscriptions/{subscriptionId}/status",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'status' => 'CANCELLED'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.stage.localpayment.com/api/payin/subscriptions/{subscriptionId}/status"
payload := strings.NewReader("{\n \"status\": \"CANCELLED\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.stage.localpayment.com/api/payin/subscriptions/{subscriptionId}/status")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"status\": \"CANCELLED\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.stage.localpayment.com/api/payin/subscriptions/{subscriptionId}/status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"status\": \"CANCELLED\"\n}"
response = http.request(request)
puts response.read_body{
"externalId": "1623451995",
"subscriptionId": "498e4a08-13a8-405e-96a5-eccb44345ada",
"status": {
"code": "903",
"description": "CANCELLED",
"detail": "The subscription was canceled - merchant request"
}
}{
"status": {
"code": "400",
"description": "ERROR",
"detail": "Invalid operation"
}
}{
"detail": "Given token not valid for any token type",
"code": "token_not_valid",
"messages": [
{
"token_class": "AccessToken",
"token_type": "access",
"message": "Token is invalid or expired"
}
]
}{
"status": {
"code": "404",
"description": "ERROR",
"detail": "Subscription not found"
}
}Abonnements
Abonnement kündigen
PATCH
/
api
/
payin
/
subscriptions
/
{subscriptionId}
/
status
Abonnement kündigen
curl --request PATCH \
--url https://api.stage.localpayment.com/api/payin/subscriptions/{subscriptionId}/status \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"status": "CANCELLED"
}
'import requests
url = "https://api.stage.localpayment.com/api/payin/subscriptions/{subscriptionId}/status"
payload = { "status": "CANCELLED" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({status: 'CANCELLED'})
};
fetch('https://api.stage.localpayment.com/api/payin/subscriptions/{subscriptionId}/status', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.stage.localpayment.com/api/payin/subscriptions/{subscriptionId}/status",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'status' => 'CANCELLED'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.stage.localpayment.com/api/payin/subscriptions/{subscriptionId}/status"
payload := strings.NewReader("{\n \"status\": \"CANCELLED\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.stage.localpayment.com/api/payin/subscriptions/{subscriptionId}/status")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"status\": \"CANCELLED\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.stage.localpayment.com/api/payin/subscriptions/{subscriptionId}/status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"status\": \"CANCELLED\"\n}"
response = http.request(request)
puts response.read_body{
"externalId": "1623451995",
"subscriptionId": "498e4a08-13a8-405e-96a5-eccb44345ada",
"status": {
"code": "903",
"description": "CANCELLED",
"detail": "The subscription was canceled - merchant request"
}
}{
"status": {
"code": "400",
"description": "ERROR",
"detail": "Invalid operation"
}
}{
"detail": "Given token not valid for any token type",
"code": "token_not_valid",
"messages": [
{
"token_class": "AccessToken",
"token_type": "access",
"message": "Token is invalid or expired"
}
]
}{
"status": {
"code": "404",
"description": "ERROR",
"detail": "Subscription not found"
}
}Verwenden Sie diesen Endpunkt, um ein bestehendes Abonnement zu kündigen. Dadurch werden alle künftigen wiederkehrenden Zahlungen des Abonnements verhindert.
Wichtige Hinweise:
- Eine Kündigung führt nicht unbedingt zu einer Rückerstattung für die verbleibende Abonnementlaufzeit. Einzelheiten zu Rückerstattungen entnehmen Sie bitte Ihren Abonnementbedingungen.
- Kündigen Sie das Abonnement vor dem nächsten Abrechnungsdatum, um unerwünschte Belastungen zu vermeiden.
- Mit dem Endpunkt Abonnementstatus abrufen können Sie die Kündigung überprüfen.
subscriptionId. Ein gekündigtes Abonnement kann nicht fortgesetzt werden. Wenn Sie den Service wieder aktivieren möchten, müssen Sie ein neues Abonnement erstellen.Autorisierungen
Header
Bearer-Zugriffstoken zur Authentifizierung. Dieses Token erhalten Sie über die Endpunkte Zugriffstoken abrufen oder Zugriffstoken aktualisieren.
Antwort
OK
Zuletzt geändert am 22. November 2026

