cash_control.enabled company setting to be true; they return 403 otherwise.
Base URL https://api.genuka.com · Auth Authorization: Bearer <token> + X-Company: <companyId> · See Getting Started for shared conventions, pagination & error formats.
Endpoints at a glance
Payments
GET /2023-11/admin/payments
List all payments for the authenticated company, with rich filtering and sorting.
-
Query parameters:
200 OK:
400— missingX-Companyheader (company_id_required)401— invalid or expired token403— insufficient scope
GET /2023-11/admin/payments/export/fields
Return the list of column names that can be requested in the export.
Request example:
200 OK:
POST /2023-11/admin/payments/export
Trigger an async export of payments. The same filter/sort parameters accepted by the list endpoint can be sent in the body. Returns immediately with a job reference; the file is delivered asynchronously (e.g. by email or notification).
-
Request body:
200 OK with a job/download reference or a direct file download):
401— not authenticated403— insufficient scope
GET /2023-11/admin/payments/{payment}
Return a single payment with its full set of relationships loaded (payable, treasury account, address, creator, and — for invoice payables — the linked order).
-
Path parameters:
200 OK:
401— invalid or expired token403— payment belongs to a different company404— payment not found
Payment Methods
GET /2023-11/admin/payment-methods
List all payment methods configured for the company. Each record includes its linked treasury account and non-secret configuration values (sensitive keys such as secret, private, token are masked with ********************************).
-
Query parameters:
200 OK:
POST /2023-11/admin/payment-methods
Create a payment method for the company, or update it if one already exists for the same processor. A matching treasury account is created automatically if none exists.
-
Request body:
201 Created:
400—processorvalue is not in the allowed list500— internal error during creation (transaction rolled back)
GET /2023-11/admin/payment-methods/stripe/connect
Initiate the Stripe Connect OAuth flow. Returns a Stripe-hosted authorization URL. Redirect the user’s browser to the returned url to begin the connection.
Request example:
200 OK:
401— invalid or expired token
POST /2023-11/admin/payment-methods/stripe/direct-keys
Save Stripe direct-mode credentials (publishable key, secret key, webhook secret). The secret key is validated against the Stripe API before saving. Switches the Stripe payment method to mode=direct.
-
Request body:
200 OK:
422— invalid Stripe secret key (authentication failed) or validation error401— invalid or expired token
GET /2023-11/admin/payment-methods/stripe/webhook-url
Retrieve the webhook URL the merchant must register in their Stripe dashboard when using direct-mode integration. Returns null if no Stripe payment method exists for the company.
Request example:
200 OK:
GET /2023-11/admin/payment-methods/{paymentMethod}
Return a single payment method by ID.
-
Path parameters:
200 OK:
404— payment method not found401— invalid or expired token
PUT /2023-11/admin/payment-methods/{paymentMethod}
Update an existing payment method. Only the provided fields are modified.
-
Path parameters:
-
Request body:
200 OK:
400—processorvalue is not in the allowed list404— payment method not found401— invalid or expired token
DELETE /2023-11/admin/payment-methods/{paymentMethod}
Delete a payment method. Returns an empty 200 OK response.
-
Path parameters:
200 OK — empty body (the controller returns no JSON on successful deletion).
Error responses:
404— payment method not found401— invalid or expired token
Cash Register Sessions
Feature flag: all cash register session endpoints require the company settingcash_control.enabled = true. If disabled, every request to this resource returns403 Forbiddenwith{"message": "Cash control is disabled for this company."}.
GET /2023-11/admin/cash-register-sessions
List cash register sessions for the company, sorted by most-recently-opened first.
-
Query parameters:
200 OK:
POST /2023-11/admin/cash-register-sessions
Open a new cash register session. If balance_start is greater than 0, cash_count_details is required.
-
Request body:
201 Created:
403— cash control disabled, or not authorized to open sessions422— validation failure (e.g. missingtreasury_account_id, invalid denomination)
GET /2023-11/admin/cash-register-sessions/active
Return all sessions with status=opened that were opened within the last 24 hours. Results can be scoped by treasury account or user.
-
Query parameters:
200 OK: array of CashRegisterSessionResource objects (no pagination wrapper).
GET /2023-11/admin/cash-register-sessions/enums
Return all enumeration values used by the cash register domain (statuses, difference reasons, transaction types, and actions).
Request example:
200 OK:
GET /2023-11/admin/cash-register-sessions/statistics
Return aggregated statistics for cash register sessions in a date range.
-
Query parameters:
200 OK:
GET /2023-11/admin/cash-register-sessions/{session}
Return a single session with all relationships loaded, plus a computed summary from the cash register service.
-
Path parameters:
200 OK:
403— cash control disabled, or not authorized to view this session404— session not found
POST /2023-11/admin/cash-register-sessions/{session}/close
Close an open cash register session. The session must have status=opened. If the counted balance differs from the expected balance, the response indicates whether manager approval is required.
-
Path parameters:
-
Request body:
200 OK:
400— session is not inopenedstatus403— cash control disabled, or not authorized to close this session404— session not found422— validation failure
POST /2023-11/admin/cash-register-sessions/{session}/approve-difference
Approve a cash difference for a session in pending_approval status. The session transitions to closed and any difference adjustments are applied.
-
Path parameters:
-
Request body:
200 OK:
400— session is not inpending_approvalstatus403— cash control disabled, or not authorized to approve differences404— session not found
POST /2023-11/admin/cash-register-sessions/{session}/reject-closure
Reject a pending or closed session and reopen it. The session must have a closed_at timestamp. The session transitions back to opened so the cashier can recount.
-
Path parameters:
-
Request body:
200 OK:
400— session has noclosed_at(was never closed)403— cash control disabled, or not authorized to reject closures404— session not found422—reasonis missing
GET /2023-11/admin/cash-register-sessions/{session}/transactions
List the cash register transactions (payments, adjustments, expenses, transfers) within a session.
-
Path parameters:
-
Query parameters:
200 OK:
403— cash control disabled404— session not found
GET /2023-11/admin/cash-register-sessions/{session}/history
List the audit history entries for a session (open, close, approve, reject, adjust events).
-
Path parameters:
-
Query parameters:
200 OK:
action is one of: opened, closed, approved, rejected, adjusted.
Error responses:
403— cash control disabled404— session not found
Cash Denominations
GET /2023-11/admin/cash-denominations
Return the list of active cash denominations (bills and coins) for a given currency. Results are cached for one week. Denominations are ordered by sort_order descending, then value descending (largest first).
-
Query parameters:
200 OK:
422—currency_codequery parameter is missing401— invalid or expired token
