Zahlungen
Business+Zahlungen verfolgen und verbuchen.
Erforderliche Bereiche:
payments
Feature-Flag:
invoices
Endpunkte
GET
/api/v1/payments
Alle Zahlungen auflisten
GET
/api/v1/payments/{id}
Einzelne Zahlung abrufen
POST
/api/v1/payments
Zahlung erfassen
PUT/PATCH
/api/v1/payments/{id}
Zahlung aktualisieren
DELETE
/api/v1/payments/{id}
Zahlung löschen
Abfrageparameter
| Parameter | Beschreibung |
|---|---|
invoice_number
|
Nach Rechnungsnummer filtern |
status
|
Nach Zahlungsstatus filtern |
date_from
|
Zahlungen ab diesem Datum filtern (ISO 8601) |
date_to
|
Zahlungen bis zu diesem Datum filtern (ISO 8601) |
sort
|
Sortierfeld (amount, status, payment_date, created_at) |
order
|
Sortierrichtung (ASC oder DESC, Standard: DESC) |
include
|
Verknüpfte Daten einschließen (invoice) |
Request-Schema
| Parameter | Typ | Erforderlich | Beschreibung |
|---|---|---|---|
invoice_number
|
string | Ja | Rechnungsnummer zur Zuordnung (erforderlich) |
amount
|
float | Ja | Zahlungsbetrag (erforderlich, muss positiv sein) |
currency
|
string | Nein | Währungscode (Standard: Rechnungswährung oder EUR) |
status
|
string | Nein | Zahlungsstatus (Standard: completed) |
payment_date
|
string | Nein | Zahlungsdatum (ISO 8601 Format, Standard: jetzt) |
notes
|
string | Nein | Interne Notizen zur Zahlung |
gateway_key
|
string | Nein | Zahlungsgateway-Kennung |
transaction_id
|
string | Nein | Externe Transaktions-ID |
Response-Schema
| Feld | Typ |
|---|---|
id
|
integer |
invoice_id
|
integer |
amount
|
float |
currency
|
string |
gateway_id
|
integer|null |
gateway_key
|
string|null |
gateway_name
|
string|null |
transaction_id
|
string|null |
gateway_fee
|
float |
net_amount
|
float |
status
|
string |
payment_date
|
string|null |
notes
|
string|null |
created_at
|
string |
updated_at
|
string |
Codebeispiele
curl -X GET "https://your-tenant.plandocket.com/api/v1/payments" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"
<?php
$apiKey = 'YOUR_API_KEY';
$baseUrl = 'https://your-tenant.plandocket.com';
$ch = curl_init();
curl_setopt_array($ch, [
CURLOPT_URL => $baseUrl . '/api/v1/payments',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $apiKey,
'Content-Type: application/json',
],
]);
$response = curl_exec($ch);
$data = json_decode($response, true);
curl_close($ch);
print_r($data);
const apiKey = 'YOUR_API_KEY';
const baseUrl = 'https://your-tenant.plandocket.com';
const response = await fetch(`${baseUrl}/api/v1/payments`, {
method: 'GET',
headers: {
'Authorization': `Bearer ${apiKey}`,
'Content-Type': 'application/json',
},
});
const data = await response.json();
console.log(data);
import requests
api_key = 'YOUR_API_KEY'
base_url = 'https://your-tenant.plandocket.com'
headers = {
'Authorization': f'Bearer {api_key}',
'Content-Type': 'application/json',
}
response = requests.get(f'{base_url}/api/v1/payments', headers=headers)
data = response.json()
print(data)
Beispiel-Antwort
200 OK
{
"data": {
"payment_id": 1,
"created_at": 1704067200,
"updated_at": 1704067200
},
"meta": {
"request_id": "req_abc123"
}
}