Payments
List and retrieve payment records with status and method details.
Payments API
Read-only endpoints to list and retrieve payment records. Requires an API token with documents.view ability (payments are scoped through their associated documents). Amounts are in the smallest currency unit (e.g., cents).
List Payments
GET /api/v1/payments — Permission: documents.view
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
document_id | integer | No | Filter payments to a specific document |
status | string | No | Filter by payment status |
per_page | integer | No | Results per page, 1–100 (default: 25) |
Example Request
curl -X GET "https://your-domain.com/api/v1/payments?document_id=101&per_page=10" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Accept: application/json"const response = await fetch("https://your-domain.com/api/v1/payments?document_id=101&per_page=10", {
headers: {
"Authorization": "Bearer YOUR_API_TOKEN",
"Accept": "application/json"
}
});
const data = await response.json();$ch = curl_init('https://your-domain.com/api/v1/payments?document_id=101&per_page=10');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_API_TOKEN',
'Accept: application/json',
],
]);
$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true);import requests
response = requests.get(
"https://your-domain.com/api/v1/payments?document_id=101&per_page=10",
headers={
"Authorization": "Bearer YOUR_API_TOKEN",
"Accept": "application/json"
}
)
data = response.json()Example Response
{
"data": [
{
"id": 7,
"document_id": 101,
"amount": 82500,
"currency": "usd",
"method": "stripe",
"status": "succeeded",
"paid_at": "2025-03-18T14:22:00.000000Z",
"created_at": "2025-03-18T14:22:00.000000Z",
"updated_at": "2025-03-18T14:22:00.000000Z"
}
],
"meta": { "current_page": 1, "last_page": 1, "per_page": 10, "total": 1 },
"links": { "first": "...", "last": "...", "prev": null, "next": null }
}
Get Payment
GET /api/v1/payments/{id} — Permission: documents.view
Example Request
curl -X GET "https://your-domain.com/api/v1/payments/7" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Accept: application/json"const response = await fetch("https://your-domain.com/api/v1/payments/7", {
headers: {
"Authorization": "Bearer YOUR_API_TOKEN",
"Accept": "application/json"
}
});
const data = await response.json();$ch = curl_init('https://your-domain.com/api/v1/payments/7');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_API_TOKEN',
'Accept: application/json',
],
]);
$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true);import requests
response = requests.get(
"https://your-domain.com/api/v1/payments/7",
headers={
"Authorization": "Bearer YOUR_API_TOKEN",
"Accept": "application/json"
}
)
data = response.json()Returns the same shape as a single item in the list response.
Payment Statuses
| Status | Description |
|---|---|
pending | Payment has been initiated but not yet processed |
processing | Payment is being processed by the payment provider |
succeeded | Payment completed successfully |
failed | Payment failed (e.g., card declined) |
refunded | Payment was fully refunded |
partial_refund | Payment was partially refunded |
Payment Methods
| Method | Description |
|---|---|
stripe | Paid via Stripe online payment |
manual | Recorded manually (cash, check, wire, etc.) |
auto_pay | Charged via auto-pay schedule |
Was this article helpful?