Skip to main content
POST
/
deposits
/
{operationId}
/
complete
Complete a deposit
curl --request POST \
  --url https://api.openfiskal.com/v1/deposits/{operationId}/complete \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "payments": [
    {
      "method": "cash",
      "direction": "inbound",
      "amount": 4250,
      "currency": "<string>",
      "reference": "<string>",
      "cash": {
        "amount_tendered": 5000
      },
      "card": {
        "scheme": "visa",
        "last4": "4242",
        "authorization_code": "<string>",
        "terminal_id": "<string>",
        "application_id": "<string>"
      },
      "wallet": {
        "provider": "apple_pay",
        "scheme": "visa",
        "last4": "4242",
        "authorization_code": "<string>"
      },
      "voucher": {
        "code": "SUMMER20",
        "type": "promotional"
      },
      "gift_card": {
        "gift_card_id": "<string>",
        "last4": "8821"
      },
      "online": {
        "provider": "paypal",
        "transaction_reference": "<string>"
      }
    }
  ]
}
'
{
  "id": "op_01HXYZ",
  "object": "<string>",
  "type": "sale",
  "state": "open",
  "register_id": "<string>",
  "location_id": "<string>",
  "organization_id": "<string>",
  "external_id": "<string>",
  "sequence_number": 123,
  "cashier": {
    "id": "<string>",
    "display_name": "Maria R."
  },
  "fiscal": {
    "regime": "<string>",
    "document_type": "Kassenbeleg",
    "transmission_status": "transmitted",
    "fiscal_unit_id": "fu_01HXYZ",
    "document_number": "2026-004822",
    "transmitted_at": "2023-11-07T05:31:56Z",
    "verification": {
      "url": "<string>",
      "qr_data": "<string>"
    },
    "tse_serial": "<string>",
    "client_id": "<string>",
    "signature_algorithm": "ecdsa-plain-SHA384",
    "time_format": "utcTime",
    "start_event": {
      "signed_at": "2023-11-07T05:31:56Z",
      "transaction_counter": 4821,
      "signature": "aSDinaTvuI8gbWludGxpZnk=",
      "process_type": "<string>",
      "process_data": "<string>"
    },
    "end_event": {
      "signed_at": "2023-11-07T05:31:56Z",
      "transaction_counter": 4821,
      "signature": "aSDinaTvuI8gbWludGxpZnk=",
      "process_type": "<string>",
      "process_data": "<string>"
    }
  },
  "fiscal_state": "pending",
  "references": {
    "original_operation_id": "<string>",
    "reason": "<string>"
  },
  "metadata": {},
  "started_at": "2023-11-07T05:31:56Z",
  "completed_at": "2023-11-07T05:31:56Z",
  "created_at": "2023-11-07T05:31:56Z",
  "data": {
    "amount": 123,
    "currency": "<string>",
    "description": "<string>",
    "payments": [
      {
        "method": "cash",
        "direction": "inbound",
        "amount": 4250,
        "currency": "<string>",
        "reference": "<string>",
        "cash": {
          "amount_tendered": 5000
        },
        "card": {
          "scheme": "visa",
          "last4": "4242",
          "authorization_code": "<string>",
          "terminal_id": "<string>",
          "application_id": "<string>"
        },
        "wallet": {
          "provider": "apple_pay",
          "scheme": "visa",
          "last4": "4242",
          "authorization_code": "<string>"
        },
        "voucher": {
          "code": "SUMMER20",
          "type": "promotional"
        },
        "gift_card": {
          "gift_card_id": "<string>",
          "last4": "8821"
        },
        "online": {
          "provider": "paypal",
          "transaction_reference": "<string>"
        },
        "id": "<string>",
        "status": "approved"
      }
    ],
    "capture_status": "open"
  }
}

Authorizations

Authorization
string
header
required

Platform API key sent as Authorization: Bearer ofk_platform_.... Platform integrators also pass OpenFiskal-Organization: org_xxx to act on behalf of a merchant.

Headers

OpenFiskal-Organization
string

Merchant organization ID. Required for platform integrators acting on behalf of a specific merchant. Omit when using an organization-scoped API key directly.

Idempotency-Key
string<uuid>

Unique key to make the request idempotent. If a request with this key was already processed, the original response is returned without re-executing the operation. Strongly recommended on all start and complete actions — these are fiscal events and must not be duplicated.

Path Parameters

operationId
string
required

Body

application/json
payments
object[]
required

Payments collecting the deposit amount.

Minimum array length: 1

Response

Deposit completed and fiscalized

Shared fields present on every operation regardless of type.

id
string
Example:

"op_01HXYZ"

object
string
Allowed value: "operation"
type
enum<string>
Available options:
sale,
refund,
exchange,
void,
cash_movement,
deposit,
deposit_capture,
training
Allowed value: "deposit"
state
enum<string>

The POS lifecycle state of the operation. Transitions are one-directional and enforced server-side — invalid transitions return 409 Conflict.

  • open — operation in progress, mutations allowed
  • completed — POS finalized the operation (payment collected)
  • cancelled — POS cancelled before completion

Valid transitions

FromEventTo
openPOST .../completecompleted
openPOST .../cancelcancelled
Available options:
open,
completed,
cancelled
register_id
string
location_id
string
organization_id
string
external_id
string | null
sequence_number
integer

Monotonically increasing, register-scoped sequence number

cashier
object
fiscal
object

Jurisdiction-specific fiscal output attached to every operation. Discriminated by regime — each variant carries typed fields for its fiscal security device and signing protocol.

fiscal_state
enum<string>

The fiscalization state of the operation, tracked independently from the operation state.

  • pending — fiscalization not yet attempted or in progress
  • succeeded — fiscal device recorded the event, fiscal data available
  • failed — fiscalization failed (device unreachable, transmission error)

The POS should check fiscal.state before printing — only print fiscal data on the receipt when it is succeeded.

Available options:
pending,
succeeded,
failed
references
object

Links to related operations. The audit chain between operations lives here at the envelope level — not inside the type-specific data block — because any operation type can reference any other.

metadata
object
started_at
string<date-time>

Timestamp of the fiscal start event

completed_at
string<date-time> | null
created_at
string<date-time>
data
object