Create a payment plan
curl --request POST \
--url https://coreapi.io/api/payment-plans \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"invoiceId": "10000000-0000-0000-0003-000000000001",
"paymentMethodId": null,
"installments": [
{
"dueAt": "2026-08-05",
"amount": 595
}
],
"sendEmail": true
}
'import requests
url = "https://coreapi.io/api/payment-plans"
payload = {
"invoiceId": "10000000-0000-0000-0003-000000000001",
"paymentMethodId": None,
"installments": [
{
"dueAt": "2026-08-05",
"amount": 595
}
],
"sendEmail": True
}
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({
invoiceId: '10000000-0000-0000-0003-000000000001',
paymentMethodId: null,
installments: [{dueAt: '2026-08-05', amount: 595}],
sendEmail: true
})
};
fetch('https://coreapi.io/api/payment-plans', 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",
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([
'invoiceId' => '10000000-0000-0000-0003-000000000001',
'paymentMethodId' => null,
'installments' => [
[
'dueAt' => '2026-08-05',
'amount' => 595
]
],
'sendEmail' => true
]),
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": "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
Create a payment plan
Split an open, finalized invoice into installments. Send EITHER an explicit installments array OR a split object, never both and never neither. The installment amounts (or the computed split) must sum to the current open amount of the invoice in cents. In split mode the rounding remainder is added to the last installment. The invoice must be finalized and open (not draft, paid, canceled or refunded) and must not already have an active plan. While the plan is active, dunning for the invoice is paused.
POST
/
api
/
payment-plans
Create a payment plan
curl --request POST \
--url https://coreapi.io/api/payment-plans \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"invoiceId": "10000000-0000-0000-0003-000000000001",
"paymentMethodId": null,
"installments": [
{
"dueAt": "2026-08-05",
"amount": 595
}
],
"sendEmail": true
}
'import requests
url = "https://coreapi.io/api/payment-plans"
payload = {
"invoiceId": "10000000-0000-0000-0003-000000000001",
"paymentMethodId": None,
"installments": [
{
"dueAt": "2026-08-05",
"amount": 595
}
],
"sendEmail": True
}
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({
invoiceId: '10000000-0000-0000-0003-000000000001',
paymentMethodId: null,
installments: [{dueAt: '2026-08-05', amount: 595}],
sendEmail: true
})
};
fetch('https://coreapi.io/api/payment-plans', 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",
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([
'invoiceId' => '10000000-0000-0000-0003-000000000001',
'paymentMethodId' => null,
'installments' => [
[
'dueAt' => '2026-08-05',
'amount' => 595
]
],
'sendEmail' => true
]),
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": "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
Body
application/json
Send EITHER installments OR split, never both and never neither.
Antwort
The created payment plan.
War diese Seite hilfreich?