Skip to main content
This domain covers four related resources. Payments are the financial transactions attached to invoices, bills, and credit notes. Payment methods configure which payment processors (Stripe, NotchPay, cash, etc.) are active for a company. Cash register sessions model the full POS cash-control lifecycle — open, close, approve/reject differences. Cash denominations are the reference list of bills and coins used when counting a cash drawer. All cash-register endpoints require the 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:
Request example:
Success response 200 OK:
Error responses:
  • 400 — missing X-Company header (company_id_required)
  • 401 — invalid or expired token
  • 403 — insufficient scope

GET /2023-11/admin/payments/export/fields

Return the list of column names that can be requested in the export. Request example:
Success response 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:
Request example:
Success response — varies by async export handler (typically 200 OK with a job/download reference or a direct file download):
Error responses:
  • 401 — not authenticated
  • 403 — 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:
Request example:
Success response 200 OK:
Error responses:
  • 401 — invalid or expired token
  • 403 — payment belongs to a different company
  • 404 — 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:
Request example:
Success response 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:
Request example:
Success response 201 Created:
Error responses:
  • 400processor value is not in the allowed list
  • 500 — 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:
Success response 200 OK:
Error responses:
  • 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:
Request example:
Success response 200 OK:
Error responses:
  • 422 — invalid Stripe secret key (authentication failed) or validation error
  • 401 — 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:
Success response 200 OK:
When no Stripe method exists:

GET /2023-11/admin/payment-methods/{paymentMethod}

Return a single payment method by ID.
  • Path parameters:
Request example:
Success response 200 OK:
Error responses:
  • 404 — payment method not found
  • 401 — 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:
Request example:
Success response 200 OK:
Error responses:
  • 400processor value is not in the allowed list
  • 404 — payment method not found
  • 401 — invalid or expired token

DELETE /2023-11/admin/payment-methods/{paymentMethod}

Delete a payment method. Returns an empty 200 OK response.
  • Path parameters:
Request example:
Response: 200 OK — empty body (the controller returns no JSON on successful deletion). Error responses:
  • 404 — payment method not found
  • 401 — invalid or expired token

Cash Register Sessions

Feature flag: all cash register session endpoints require the company setting cash_control.enabled = true. If disabled, every request to this resource returns 403 Forbidden with {"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:
Request example:
Success response 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:
Request example:
Success response 201 Created:
Error responses:
  • 403 — cash control disabled, or not authorized to open sessions
  • 422 — validation failure (e.g. missing treasury_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:
Request example:
Success response 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:
Success response 200 OK:

GET /2023-11/admin/cash-register-sessions/statistics

Return aggregated statistics for cash register sessions in a date range.
  • Query parameters:
Request example:
Success response 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:
Request example:
Success response 200 OK:
Error responses:
  • 403 — cash control disabled, or not authorized to view this session
  • 404 — 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:
Request example:
Success response 200 OK:
Error responses:
  • 400 — session is not in opened status
  • 403 — cash control disabled, or not authorized to close this session
  • 404 — session not found
  • 422 — 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:
Request example:
Success response 200 OK:
Error responses:
  • 400 — session is not in pending_approval status
  • 403 — cash control disabled, or not authorized to approve differences
  • 404 — 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:
Request example:
Success response 200 OK:
Error responses:
  • 400 — session has no closed_at (was never closed)
  • 403 — cash control disabled, or not authorized to reject closures
  • 404 — session not found
  • 422reason is 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:
Request example:
Success response 200 OK:
Error responses:
  • 403 — cash control disabled
  • 404 — 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:
Request example:
Success response 200 OK:
action is one of: opened, closed, approved, rejected, adjusted. Error responses:
  • 403 — cash control disabled
  • 404 — 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:
Request example:
Success response 200 OK:
Note: this endpoint returns a plain collection (no pagination wrapper). Error responses:
  • 422currency_code query parameter is missing
  • 401 — invalid or expired token