curl --request POST \
--url https://coreapi.io/api/payment-plans/{id}/cancel \
--header 'Authorization: Bearer <token>'import requests
url = "https://coreapi.io/api/payment-plans/{id}/cancel"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://coreapi.io/api/payment-plans/{id}/cancel', 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://coreapi.io/api/payment-plans/{id}/cancel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"id": "10000000-0000-0000-00e0-000000000001",
"invoiceId": "10000000-0000-0000-0003-000000000001",
"status": "active",
"totalAmount": 1190,
"currencyCode": "EUR",
"paymentMethodId": "10000000-0000-0000-004f-000000000001",
"createdAt": "2026-07-05T16:20:00+00:00",
"completedAt": null,
"brokenAt": null,
"canceledAt": null,
"brokenReason": null,
"installments": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"position": 1,
"dueAt": "2026-08-05",
"amount": 595,
"status": "open",
"paidAt": null
}
]
}{
"status": 422,
"type": "PAYMENT_PLAN__SUM_MISMATCH",
"title": "An error occurred",
"detail": "The installments must sum to the open amount of the invoice."
}{
"status": 422,
"type": "PAYMENT_PLAN__SUM_MISMATCH",
"title": "An error occurred",
"detail": "The installments must sum to the open amount of the invoice."
}{
"status": 422,
"type": "PAYMENT_PLAN__SUM_MISMATCH",
"title": "An error occurred",
"detail": "The installments must sum to the open amount of the invoice."
}{
"status": 422,
"type": "https://tools.ietf.org/html/rfc2616#section-10",
"title": "Validation Failed",
"violations": [
{
"propertyPath": "installments[0].amount",
"message": "This value should be positive.",
"code": "<string>"
}
]
}Cancel a payment plan
Cancel an active or broken payment plan. No request body. The plan moves to canceled and dunning for the invoice resumes on the next run, because the open amount is due again. A completed or already canceled plan cannot be canceled (422).
curl --request POST \
--url https://coreapi.io/api/payment-plans/{id}/cancel \
--header 'Authorization: Bearer <token>'import requests
url = "https://coreapi.io/api/payment-plans/{id}/cancel"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://coreapi.io/api/payment-plans/{id}/cancel', 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://coreapi.io/api/payment-plans/{id}/cancel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"id": "10000000-0000-0000-00e0-000000000001",
"invoiceId": "10000000-0000-0000-0003-000000000001",
"status": "active",
"totalAmount": 1190,
"currencyCode": "EUR",
"paymentMethodId": "10000000-0000-0000-004f-000000000001",
"createdAt": "2026-07-05T16:20:00+00:00",
"completedAt": null,
"brokenAt": null,
"canceledAt": null,
"brokenReason": null,
"installments": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"position": 1,
"dueAt": "2026-08-05",
"amount": 595,
"status": "open",
"paidAt": null
}
]
}{
"status": 422,
"type": "PAYMENT_PLAN__SUM_MISMATCH",
"title": "An error occurred",
"detail": "The installments must sum to the open amount of the invoice."
}{
"status": 422,
"type": "PAYMENT_PLAN__SUM_MISMATCH",
"title": "An error occurred",
"detail": "The installments must sum to the open amount of the invoice."
}{
"status": 422,
"type": "PAYMENT_PLAN__SUM_MISMATCH",
"title": "An error occurred",
"detail": "The installments must sum to the open amount of the invoice."
}{
"status": 422,
"type": "https://tools.ietf.org/html/rfc2616#section-10",
"title": "Validation Failed",
"violations": [
{
"propertyPath": "installments[0].amount",
"message": "This value should be positive.",
"code": "<string>"
}
]
}Autorisierungen
Organisation API token. Send it as Authorization: Bearer api_... The token is scoped to a single Organisation. Reading a plan needs the invoice read permission, creating, canceling and extending need the invoice write permission.
Pfadparameter
The payment plan UUID.
"10000000-0000-0000-00e0-000000000001"
Antwort
The canceled payment plan.
"10000000-0000-0000-00e0-000000000001"
"10000000-0000-0000-0003-000000000001"
Lifecycle status of a payment plan.
active, completed, broken, canceled Sum of all installments in cents. Equals the open amount at creation.
1190
"EUR"
"10000000-0000-0000-004f-000000000001"
"2026-07-05T16:20:00+00:00"
Timestamp the plan completed (all installments paid), or null.
null
Timestamp the plan broke, or null.
null
Timestamp the plan was canceled, or null.
null
Reason the plan broke, or null while active.
null
Show child attributes
Show child attributes
War diese Seite hilfreich?