Erstattungen
Business+Erstattungen für die Buchhaltung abrufen: in PlanDocket gebuchte Erstattungen und Erstattungen, die von Stripe oder PayPal kamen. Erstattungen werden im Admin-Bereich ausgelöst.
Nur Lesen
Dieser Endpunkt unterstützt nur GET-Anfragen.
Erforderliche Bereiche:
payments
Feature-Flag:
invoices
Endpunkte
GET
/api/v1/refunds
Alle Erstattungen auflisten ("source" ist refund oder payment; Gateway-Zeilen haben IDs wie "payment-95")
GET
/api/v1/refunds/{id}
Einzelne in PlanDocket gebuchte Erstattung abrufen
Abfrageparameter
| Parameter | Beschreibung |
|---|---|
invoice_number
|
Nur Erstattungen dieser Rechnung |
status
|
Nach Status filtern (pending, completed, failed) |
gateway
|
Nach Zahlungsanbieter filtern (stripe, paypal, manual …) |
date_from
|
Zahlungen ab diesem Datum filtern (ISO 8601) |
date_to
|
Zahlungen bis zu diesem Datum filtern (ISO 8601) |
sort
|
Sortierfeld (refund_id, amount, status, gateway, created_at, processed_at) |
order
|
Sortierrichtung (ASC oder DESC, Standard: DESC) |
Response-Schema
| Feld | Typ |
|---|---|
id
|
integer|string |
source
|
string |
payment_id
|
integer|null |
invoice_id
|
integer|null |
invoice_number
|
string|null |
amount
|
float |
currency
|
string |
reason
|
string|null |
gateway
|
string|null |
gateway_refund_id
|
string|null |
status
|
string |
processed_at
|
string|null |
created_at
|
string |
updated_at
|
string |
Codebeispiele
curl -X GET "https://ihr-mandant.plandocket.com/api/v1/refunds" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Accept: application/json"
<?php
$apiKey = 'YOUR_API_KEY';
$baseUrl = 'https://ihr-mandant.plandocket.com';
$ch = curl_init();
curl_setopt_array($ch, [
CURLOPT_URL => $baseUrl . '/api/v1/refunds',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $apiKey,
],
]);
$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true);
print_r($data);
const apiKey = 'YOUR_API_KEY';
const baseUrl = 'https://ihr-mandant.plandocket.com';
const response = await fetch(`${baseUrl}/api/v1/refunds`, {
method: 'GET',
headers: {
'Authorization': `Bearer ${apiKey}`,
},
});
const data = await response.json();
console.log(data);
import requests
api_key = 'YOUR_API_KEY'
base_url = 'https://ihr-mandant.plandocket.com'
headers = {
'Authorization': f'Bearer {api_key}',
}
response = requests.get(f'{base_url}/api/v1/refunds', headers=headers)
data = response.json()
print(data)
Beispiel-Antwort
200 OK
{
"data": [
{
"id": 1,
"source": "string",
"payment_id": 1,
"invoice_id": 1,
"invoice_number": "string",
"amount": 100,
"currency": "string",
"reason": "string",
"gateway": "string",
"gateway_refund_id": "string",
"status": "string",
"processed_at": "2026-01-15T10:00:00+01:00",
"created_at": "2026-01-15T10:00:00+01:00",
"updated_at": "2026-01-15T10:00:00+01:00"
}
],
"meta": {
"current_page": 1,
"per_page": 25,
"total": 1,
"total_pages": 1
}
}