Transactions API
v1.0 • REST • JSON
Full CRUD management for transaction accounts. Create, retrieve, update, and delete transaction records with built-in pagination and role-based access control support.
Quick Reference
/api/transactions
200 OK
Get All Transactions
Retrieves a paginated list of all transactions in the system. Use the pageNumber
and pageSize query parameters to navigate large result sets.
The response envelope includes total count and page metadata.
| Parameter | Type | Default | Description |
|---|---|---|---|
pageNumber |
integer | 1 |
Page number, 1-based index. Values below 1 are treated as 1. |
pageSize |
integer | 10 |
Number of records per page, from 1 to 100. Values outside this range are clamped. |
/api/transactions/{id}
200 OK
Get Single Transaction
Fetch the full profile for a specific transaction using their numeric ID. Returns all transaction fields including assigned role names and account metadata.
| Parameter | Type | Required | Description |
|---|---|---|---|
id |
integer | Required | Unique transaction identifier |
/api/transactions/{id}
404 Not Found
Transaction Not Found
Returned when the requested transaction ID does not exist in the system. Use this example to test error-handling logic and build graceful fallback UI for missing transaction resources.
/api/payments/capture
200 OK
Create Transaction
Captures an existing payment: marks it as Paid and records a Charge
transaction for the full payment amount. Returns 200 OK with the new
transaction, or 404 Not Found if the payment does not exist.
| Field | Type | Required | Description |
|---|---|---|---|
paymentId |
integer | Required | Payment id |
/api/transactions/{id}
200 OK
Update Transaction
Fully replaces an existing transaction's data with the values in the request body.
type must be Charge, Refund or Adjustment.
If gatewayReference is omitted, the current reference is kept. A successful
update returns 200 OK with response body.
| Field | Type | Required | Description |
|---|---|---|---|
paymentId |
integer | Required | Payment id |
amount |
decimal | Required | Amount |
type |
string | Required | Type |
status |
string | Required | Status |
gatewayReference |
string | Optional | Gateway reference |
/api/transactions/{id}
204 No Content
Delete Transaction
Permanently removes a transaction by its ID. Returns 409 Conflict if the transaction has refunds, because financial history is kept. This action cannot be undone.
| Parameter | Type | Required | Description |
|---|---|---|---|
id |
integer | Required | ID of the transaction to delete |