Saltar al contenido principal

kobana finance receipts

Comandos de kobana finance receipts. Toda opción global (Opciones globales) vale aquí.

ComandoHTTPDescripción
receipts listGET /v1/receiptsListar comprobantes de pago
receipts getGET /v1/receipts/{id}Obtener comprobante de pago por ID

receipts list​

Listar comprobantes de pago

kobana finance receipts list [OPCIONES]

GET /v1/receipts

Returns a cursor-paginated page of payment receipts (comprovantes) for the workspace tied to the token's sub claim — the proof that a payment left. A receipt is either captured (source: "kobana", produced in the background when a payment dispatched to the bank was confirmed) or uploaded (source: "upload", a file someone attached for a payment made outside the system). Only an uploaded one can be missing a payable_id. Default sort is -paid_at. Requires scope finance/receipts with access level read.

⚠️ download_url points at the attachments resource, so fetching the bytes needs a token that also reaches finance/attachments (or a read access level alone). And a row can legitimately have no binary at all: when the origin offered only a format we do not store, the receipt is available and reachable through document_url instead.

Parámetros de consulta

NombreTipoObligatorioDescripción
company_idstringnoFilter by owning company UUID. Accepts [in].
payable_idstringnoFilter by the bill the receipt proves. Accepts [in].
financial_account_idstringnoFilter by the account the money left from. Accepts [in].
sourcestringnokobana (captured automatically) or upload (sent by a person). Accepts [in]. Valores: kobana, upload.
statusstringnoCapture state. ?status=failed is the queue of receipts a human should look at; ?status=available is everything ready to fetch. Accepts [in]. Valores: pending, available, failed.
payment_method_kindstringnoHow the payment settled. Accepts [in]. Valores: bank_billet, utility, tribute, ted, pix, credit_card, debit_card, cash, check, direct_debit, other, none.
external_uidstringnoFilter by the gateway payment uid the receipt was captured from — how you go from your own gateway record to the proof here. Accepts [in].
paid_atstringnoISO date filter on the payment date. Range operators: [gte], [lte], [gt], [lt].
created_atstringnoISO timestamp filter on when the receipt row appeared. Range operators supported.
updated_atstringnoISO timestamp filter on the last write. Range operators supported. This is the incremental-sync window: poll ?updated_at[gte]=<end of your last poll>&sort_by=updated_at to pick up captures that landed since. Deletions do NOT appear here.
amountstringnoDecimal filter on the amount paid (BRL). Range operators supported.
sort_bystringnoField to order by. Default: sort_by=paid_at&sort_order=desc. Valores: amount, created_at, paid_at, updated_at.
sort_orderstringnoOrder direction. Defaults to asc; ignored without sort_by. Valores: asc, desc.
limitintegernoPage size. Default 25, max 100.
cursorstringnoOpaque cursor for the next page. Round-trip meta.next_cursor from the previous response.
fieldsstringnoComma-separated top-level fields to return, e.g. fields=description,amount,due_date. Omit for every field. id is always included; naming an object field returns it whole. An unknown name is a 400 whose details lists unknown and available.

Encabezados

NombreTipoObligatorioDescripción
X-Workspace-IdstringsíWorkspace to act on, as a UUID. The token identifies the organization; this header picks which of its workspaces the request reads or writes. It is checked against the token's organization, so a workspace owned by anyone else answers UNKNOWN_WORKSPACE — the same code as one that does not exist. Omitting it answers WORKSPACE_REQUIRED (400).

Respuestas

HTTPDescripción
200Page of receipts plus pagination metadata.
400Malformed query (unknown filter / operator, invalid limit, bad cursor).

receipts get​

Obtener comprobante de pago por ID

kobana finance receipts get [ID] [OPCIONES]

GET /v1/receipts/{id}

A single payment receipt. Returns the same shape as the rows from the list endpoint. Requires scope finance/receipts with access level read. 404 covers both "doesn't exist" and "not in the tenant" — the API does not distinguish. The bytes are not served here — follow download_url, which lives on the attachments resource and needs finance/attachments.

Argumentos de la ruta: id

Parámetros de consulta

NombreTipoObligatorioDescripción
fieldsstringnoComma-separated top-level fields to return, e.g. fields=description,amount,due_date. Omit for every field. id is always included; naming an object field returns it whole. An unknown name is a 400 whose details lists unknown and available.

Encabezados

NombreTipoObligatorioDescripción
X-Workspace-IdstringsíWorkspace to act on, as a UUID. The token identifies the organization; this header picks which of its workspaces the request reads or writes. It is checked against the token's organization, so a workspace owned by anyone else answers UNKNOWN_WORKSPACE — the same code as one that does not exist. Omitting it answers WORKSPACE_REQUIRED (400).

Respuestas

HTTPDescripción
200Get a payment receipt by id
404Receipt not found within the tenant.