Refunds
Business+Read refunds for bookkeeping: refunds booked in PlanDocket and refunds that arrived from Stripe or PayPal. Refunds are started in the admin.
Read Only
This endpoint only supports GET requests.
Required scopes:
payments
Feature flag:
invoices
Endpoints
GET
/api/v1/refunds
List all refunds ("source" is refund or payment; gateway rows have ids like "payment-95")
GET
/api/v1/refunds/{id}
Retrieve a single refund booked in PlanDocket
Query Parameters
| Parameter | Description |
|---|---|
invoice_number
|
Only refunds of this invoice |
status
|
Filter by status (pending, completed, failed) |
gateway
|
Filter by gateway (stripe, paypal, manual ...) |
date_from
|
Filter payments from this date (ISO 8601) |
date_to
|
Filter payments until this date (ISO 8601) |
sort
|
Sort field (refund_id, amount, status, gateway, created_at, processed_at) |
order
|
Sort direction (ASC or DESC, default: DESC) |
Response Schema
| Field | Type |
|---|---|
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 |
Code Examples
curl -X GET "https://your-tenant.plandocket.com/api/v1/refunds" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Accept: 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/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://your-tenant.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://your-tenant.plandocket.com'
headers = {
'Authorization': f'Bearer {api_key}',
}
response = requests.get(f'{base_url}/api/v1/refunds', headers=headers)
data = response.json()
print(data)
Sample Response
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
}
}