Download OpenAPI specification:
Payment and transaction management service.
Git Commit ID: 6cb74c5c6f21a394787dd1ee692443b2710091a2
Software Version: 0.0.1
Build: 2026-10-21 11:01:45
Receives Stripe webhook events (e.g. checkout.session.completed, checkout.session.expired). Verifies the webhook signature, saves the event into the transaction record, and updates the transaction status.
This is a public endpoint — no JWT required. Called directly by Stripe servers. The request body must be raw (not parsed as JSON) for signature verification.
{ }{- "message": "string"
}Browser-facing endpoint. Stripe redirects the customer here after a Checkout attempt.
Retrieves the Checkout Session from Stripe, saves it into the transaction record
and redirects the customer to {frontend_url}/check?ticket_nr=...&email=...&message=....
If the request cannot be verified plain-text error are returned.
This is a public endpoint - no JWT required.
| ticket_nr required | string Full ticket number, set by us in the start URL. |
| email required | string Ticket holder email, set by us in the start URL. |
| frontend_url required | string <uri> The frontend to redirect to set by us in the start URL. |
| session_id required | string Stripe Checkout Session ID appended by Stripe. |
| stripe_status required | string Status from the redirect URL (success or cancel), set by us in the start URL. |
Receives the SimplePay IPN callback after a payment is completed/confirmed.
Saves the IPN data and status into the transaction record.
Responds with the HMAC-SHA384 signature in the Signature header (required by SimplePay protocol).
This is a public endpoint — no JWT required. Called directly by SimplePay servers.
| orderRef required | string Transaction reference (format "TR123") |
| status required | string Payment status from SimplePay (e.g. FINISHED) |
{- "orderRef": "string",
- "status": "string"
}Browser-facing endpoint. SimplePay redirects the customer here after a payment attempt.
Verifies the signature, decodes the SimplePay response, saves it into the transaction record
(the backref event also becomes the transaction status unless the IPN has already arrived or the status is FINISHED)
and redirects the customer to {frontend_url}/check?ticket_nr=...&email=...&message=....
If the request cannot be verified plain-text error are returned
This is a public endpoint — no JWT required.
| ticket_nr required | string Full ticket number, set by us in the start URL. |
| email required | string Ticket holder email, set by us in the start URL. |
| frontend_url required | string <uri> Origin of the frontend to redirect to (must be listed in ALLOWED_ORIGINS), set by us in the start URL. |
| r required | string Base64 encoded SimplePay response JSON, appended by SimplePay. |
| s required | string Signature of the decoded JSON string, appended by SimplePay. |
Searches for a transaction by its integer ID. Returns at most one result.
This is a service endpoint — it is primarily called by the tickets service
(via payments_client.js) during ID searches, using a service JWT that carries
the original user's privileges. Direct user JWT calls are also accepted.
Requires the Priv payments_search permission.
For service JWT calls, the permission is checked from servicePrivs (forwarded user privs).
For direct user JWT calls, the permission is checked from privs.
| Privilege name | Sample values | Description |
|---|---|---|
| Priv payments_search * | true | Grants access to search for transactions. Without it, the request is denied with 403. |
| * required permission. | ||
| search_term required | integer The transaction ID to search for. |
{- "search_term": 1234
}{- "transactions": [
- {
- "id": 1234,
- "created_at": "2026-04-10 14:30:00",
- "id_ticket": 56789,
- "id_account": 32216,
- "product_kind": "ticket",
- "currency": "HUF",
- "debit": 15000,
- "payment_mode": "simplepay",
- "status": "finished",
- "document_type": "invoice",
- "document_no": "INV-2026-00123"
}
]
}Stornos a previously finished payment. Takes the original transaction id and always creates the reversing transaction
With refund option as false (or not sent) it is a storno: only the credit note is issued, no money is moved, - any payment method accepted.
With refund=true it also refunds the full original amount at the payment provider. Currently supported for SimplePay, Stripe and Teya.
Requires a logged-in staff user with the payments_refund privilege.
| transaction_id required | integer The id of the original (finished) transaction to reverse |
| refund | boolean When true, refund the full amount at the original payment provider AND issues the credit note. When false or omitted, only the credit is issued. |
{- "transaction_id": 1234,
- "refund": false
}{- "transaction_id": 1235,
- "status": "FINISHED",
- "message": "Refund processed."
}Initiates a payment for a ticket. A JWT is optional
The endpoint validates the requested payment code against the template's available payment options, creates a transaction record, and calls the payment provider (SimplePay or Stripe Checkout). Returns the redirect URL for the payment provider's hosted payment page.
| ticket_id required | integer The ticket ID to pay for |
| code required | string The payment option code selected by the user.
Format: |
required | object Billing/invoicing data. |
{- "ticket_id": 42,
- "code": "NORMAL-TOTAL-FEE-EUR-SIMPLE",
- "metas": {
- "document_type": "RECEIPT",
- "billing_name": "string",
- "billing_address": "string",
- "billing_city": "string",
- "billing_country": "string",
- "billing_postcode": "string",
- "billing_vat": "string"
}
}{- "redirect_url": "string",
- "transaction_id": 0
}Returns all transaction records associated with the given ticket ID, ordered by transaction ID ascending.
Requires the Priv payments_search permission.
Also requires ticket access via either Priv tickets_search_flags/years/events OR
Priv tickets_get_flags/years/events (all three of whichever set). The ticket must match
the user's allowed scope. Ticket access is verified via the tickets service.
| Privilege name | Sample values | Description |
|---|---|---|
| Priv payments_search * | true | Grants access to view transactions. Without it, the request is denied with 403. |
| Priv tickets_search_flags/years/events | HU,26,OZ | Alternative ticket access - all three required within this set. |
| Priv tickets_get_flags/years/events | HU,26,OZ | Alternative ticket access - all three required within this set. |
| * payments_search is required; either tickets_search or tickets_get set is also required. | ||
| ticket_id required | integer Ticket ID to retrieve transactions for |
{- "ticket_id": 42
}{- "transactions": [
- {
- "id": 1234,
- "created_at": "2026-04-10 14:30:00",
- "id_ticket": 42,
- "id_account": 32216,
- "product_kind": "ticket",
- "currency": "HUF",
- "debit": 15000,
- "payment_mode": "simplepay",
- "status": "finished",
- "document_type": "invoice",
- "document_no": "INV-2026-00123",
- "id_storno": 1235
}
]
}Returns all transaction records associated with the given ticket ID, ordered by transaction ID ascending.
Each transaction includes its log entries (ordered newest first) unless include_logs is set to false
This is a service endpoint - it can only be called by other microservices using a service JWT.
| ticket_id required | integer Ticket ID to retrieve transactions for |
| include_logs | boolean Default: true Whether to include each transaction's log entries. Defaults to |
{- "ticket_id": 42,
- "include_logs": true
}{- "transactions": [
- {
- "id": 1234,
- "created_at": "2026-04-10 14:30:00",
- "id_ticket": 42,
- "id_account": 32216,
- "product_kind": "ticket",
- "currency": "HUF",
- "debit": 15000,
- "payment_mode": "simplepay",
- "status": "finished",
- "document_type": "invoice",
- "document_no": "INV-2026-00123",
- "id_storno": 1235,
- "logs": [
- {
- "id": 5678,
- "created_at": "2026-04-10 14:30:05",
- "flag": "info",
- "ip_address": "192.168.1.1",
- "message": "SimplePay IPN received",
- "message_meta": { }
}
]
}
]
}Queries the Teya POSLink API for the current status of one TEYA transaction and, when the terminal has reached a final state (SUCCESSFUL / FAILED / CANCELLED), records the result and (on success) advances the ticket. This is the on-demand fast path for the frontend.
Requires a logged-in staff user with access to the ticket (verified via the tickets service).
| transaction_id required | integer The TEYA transaction ID returned by /new |
{- "transaction_id": 1234
}{- "status": "SUCCESSFUL",
- "finished": true,
- "success": true
}Returns the list of available payment options for a given ticket. The caller must provide the ticket_id, ticket_status, template, and optionally metas.
This is a service endpoint - it can only be called by other microservices using a service JWT.
| ticket_id required | integer The ticket ID |
| ticket_status required | string Current status of the ticket |
| template required | object The ticket's template (getFormattedListItem format) |
Array of objects Ticket metas (needed for transferred tickets' transfer_price_eur/huf) |
{- "ticket_id": 42,
- "ticket_status": "registered",
- "template": { },
- "metas": [
- {
- "keyword": "string",
- "value": "string"
}
]
}{- "payment_options": [
- {
- "code": "string",
- "title": "string",
- "note": "string",
- "amount": 0,
- "currency": "string",
- "payment_mode": "string"
}
], - "payment_options_reason": "public context, include SIMPLE EUR, no valid payment_simplepay_huf, status registered, full price period, 1 options"
}Returns one transaction by its id with the same data the tickets service /get-ticket returns
in its transactions array: the transaction fields, the id of its storno transaction if there is one
and its log entries.
Requires the Priv payments_search permission.
| id required | integer Transaction ID |
{- "id": 1234
}{- "transaction": {
- "id": 1234,
- "created_at": "2026-04-10 14:30:00",
- "id_ticket": 42,
- "id_account": 32216,
- "product_kind": "ticket",
- "currency": "HUF",
- "debit": 15000,
- "payment_mode": "simplepay",
- "status": "finished",
- "document_type": "invoice",
- "document_no": "INV-2026-00123",
- "id_storno": 1235,
- "logs": [
- {
- "id": 5678,
- "created_at": "2026-04-10 14:30:05",
- "flag": "info",
- "ip_address": "192.168.1.1",
- "message": "SimplePay IPN received",
- "message_meta": { }
}
]
}
}Returns the distinct non-null ticket IDs referenced by transactions.
This is a service endpoint - it can only be called by other microservices using a service JWT.
{- "ticket_ids": [
- 42,
- 31090
]
}Searches for transactions using an array of sequential search steps.
Each step has an action (extend, constrain or omit) and a search_fields object.
The endpoint walks through the steps in order, maintaining a set of matched transactions.
Each step modifies that set based on its action:
| Action | Description |
|---|---|
extend |
Runs the search and adds the matching transactions to the current set. Used as the very first step it seeds the set; later steps add more transactions to it. |
constrain |
Runs the search restricted to the current set, then keeps only the transactions that match. If the current set is empty, the step is skipped (no effect). |
omit |
Runs the search restricted to the current set, then removes the matching transactions from it. If the current set is empty, the step is skipped (no effect). |
Inside a single step, multiple search_fields are combined with AND.
The first step should always be an extend - constrain and omit only operate on an existing set,
so using them first is a no-op.
| Field | Matching |
|---|---|
id_from / id_to | Transaction id range (inclusive). |
created_from / created_to | Creation date range (inclusive), on the transaction's created_at. YYYY-MM-DD. |
ticket_nr | Ticket number (e.g. HUDA2663434), resolved to the linked ticket id via the tickets service. |
id_account | Exact account id. |
product_kind | Case-insensitive substring match (e.g. COMPLEMENTARY, registration). |
currency | Exact, case-insensitive. |
debit | Exact amount. |
payment_mode | Case-insensitive substring match. |
backref | Matches the value against any value stored anywhere inside the backref jsonb. |
ipn | Matches the value against any value stored anywhere inside the ipn jsonb. |
status | Exact, case-insensitive. |
document_type | Exact, case-insensitive. |
document_no | Exact, case-insensitive. |
Requires the Priv payments_search permission.
| action required | string Enum: "extend" "constrain" "omit" |
required | object |
[- {
- "action": "extend",
- "search_fields": {
- "status": "finished",
- "currency": "HUF"
}
}, - {
- "action": "constrain",
- "search_fields": {
- "product_kind": "registration"
}
}
]{- "transactions": [
- {
- "id": 0,
- "product_kind": "string",
- "currency": "string",
- "debit": 0,
- "payment_mode": "string",
- "status": "string",
- "id_storno": 0
}
]
}