Zum Hauptinhalt springen
POST
/
api
/
payment-plans
/
{id}
/
cancel
Cancel a payment plan
curl --request POST \
  --url https://coreapi.io/api/payment-plans/{id}/cancel \
  --header 'Authorization: Bearer <token>'
{
  "id": "10000000-0000-0000-00e0-000000000001",
  "invoiceId": "10000000-0000-0000-0003-000000000001",
  "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,
      "paidAt": null
    }
  ]
}

Autorisierungen

Authorization
string
header
erforderlich

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

id
string<uuid>
erforderlich

The payment plan UUID.

Beispiel:

"10000000-0000-0000-00e0-000000000001"

Antwort

The canceled payment plan.

id
string<uuid>
erforderlich
Beispiel:

"10000000-0000-0000-00e0-000000000001"

invoiceId
string<uuid>
erforderlich
Beispiel:

"10000000-0000-0000-0003-000000000001"

status
enum<string>
erforderlich

Lifecycle status of a payment plan.

Verfügbare Optionen:
active,
completed,
broken,
canceled
totalAmount
integer
erforderlich

Sum of all installments in cents. Equals the open amount at creation.

Beispiel:

1190

currencyCode
string
erforderlich
Beispiel:

"EUR"

paymentMethodId
string<uuid> | null
erforderlich
Beispiel:

"10000000-0000-0000-004f-000000000001"

createdAt
string<date-time>
erforderlich
Beispiel:

"2026-07-05T16:20:00+00:00"

completedAt
string<date-time> | null
erforderlich

Timestamp the plan completed (all installments paid), or null.

Beispiel:

null

brokenAt
string<date-time> | null
erforderlich

Timestamp the plan broke, or null.

Beispiel:

null

canceledAt
string<date-time> | null
erforderlich

Timestamp the plan was canceled, or null.

Beispiel:

null

brokenReason
string | null
erforderlich

Reason the plan broke, or null while active.

Beispiel:

null

installments
object[]
erforderlich