Extend a payment plan
curl --request POST \
--url https://coreapi.io/api/payment-plans/{id}/extend \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"installments": [
{
"dueAt": "2026-08-05",
"amount": 595
}
]
}
'import requests
url = "https://coreapi.io/api/payment-plans/{id}/extend"
payload = { "installments": [
{
"dueAt": "2026-08-05",
"amount": 595
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({installments: [{dueAt: '2026-08-05', amount: 595}]})
};
fetch('https://coreapi.io/api/payment-plans/{id}/extend', 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}/extend",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'installments' => [
[
'dueAt' => '2026-08-05',
'amount' => 595
]
]
]),
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;
}{
"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>"
}
]
}Zahlungsplan-Verwaltung
Extend a payment plan
Replace every not-yet-paid installment with a new schedule. Already paid installments stay untouched. Send EITHER installments OR split, exactly like create but without invoiceId. The new schedule must sum to the current open amount of the invoice in cents (in split mode the server computes it). A broken plan returns to active, and brokenAt and brokenReason are cleared. Use this instead of creating a new plan when a customer misses an installment or needs more time.
POST
/
api
/
payment-plans
/
{id}
/
extend
Extend a payment plan
curl --request POST \
--url https://coreapi.io/api/payment-plans/{id}/extend \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"installments": [
{
"dueAt": "2026-08-05",
"amount": 595
}
]
}
'import requests
url = "https://coreapi.io/api/payment-plans/{id}/extend"
payload = { "installments": [
{
"dueAt": "2026-08-05",
"amount": 595
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({installments: [{dueAt: '2026-08-05', amount: 595}]})
};
fetch('https://coreapi.io/api/payment-plans/{id}/extend', 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}/extend",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'installments' => [
[
'dueAt' => '2026-08-05',
'amount' => 595
]
]
]),
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;
}{
"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
Pfadparameter
Body
application/json
Like the create body without invoiceId. Send EITHER installments OR split.
Antwort
The extended payment plan.
War diese Seite hilfreich?