Appearance
Syrve test-only payment write playbook
Safe live payment write on test iiko only. Registered runtime capability is always on, but execution still requires explicit manual approval and all safety checks.
Key concept: method-specific preflight
Generic BackOffice RPC verify (403 forbidden on authorization / getCurrentAuthInfo) is not a total blocker when:
- REST
/resto/api/authsucceeds - Document sync / refresh works
- Method-specific preflight is WriteEligible for
setPaymentsForInvoicesorsetPaymentsForOutgoingDocuments
Safety logic uses required ISyrvePaymentWritePreflightService rather than treating generic connection health as sufficient.
Preconditions
- Read-only smoke: REST auth OK; sync shows at least one
Unpaid/PartiallyPaidtest document. - Generic RPC verify results are interpreted by method-specific preflight; there is no bypass flag.
- Operator selects account + cash-flow article on posting (
PUT /write-target) or via env defaults. - Owner approval for this specific test posting.
Always-on runtime contract
Do not add removed Syrve/iiko enablement, verification-status, or bypass flags. A new posting always starts in ApprovalRequired. Required checks are scoped RBAC, manual approval, idempotency, payable/amount/allocation/anomaly controls, server applicability, credentials, HTTP/RPC and method-specific preflight, and technical limits.
Account / cash-flow (test operator-provided or from references API):
env
IIKO_TEST_PAYMENT_ACCOUNT_FROM=<guid>
TEST_SYRVE_CASHFLOW_ARTICLE_ID=14c0fe4b-76ec-2681-846e-81d1ec32db08Flow (no synchronous API write)
- Read-only smoke until sync + unpaid document confirmed.
- Bank allocation for tiny unpaid document (confirm → optional approve).
POST /api/syrve/postings/queue/{allocationId}PUT /api/syrve/postings/{id}/write-targetif account/cash-flow not set from env.GET /api/syrve/postings/{id}/preflight— method-specific eligibility.POST /api/syrve/postings/{id}/dry-run— gates + payload preview, no iiko write.POST /api/syrve/postings/{id}/approve- Worker (
PaymentPostingWorker) executes live write viaIIikoPaymentWriteFacade. GET /api/syrve/postings/{id}/evidence- Reconciliation worker /
POST /api/syrve/postings/{id}/reconcile - Verify in Syrve/iiko BackOffice.
- File report under
docs/docs/integrations/reports/.
API
| Method | Path | Notes |
|---|---|---|
| GET | /api/syrve/postings/{id}/preflight | Method-specific write eligibility |
| PUT | /api/syrve/postings/{id}/write-target | Account + cash-flow article |
| POST | /api/syrve/postings/{id}/dry-run | Gates + preview only |
| GET | /api/syrve/postings/{id}/attempts | Worker attempt metadata |
| GET | /api/syrve/postings/{id}/evidence | Sanitized before/preflight/request/after |
Blockers
| Code | Meaning |
|---|---|
read_path_unavailable | REST/read path unhealthy (no server version, auth failed) |
write_preflight_required | Preflight not run or incomplete |
write_contract_not_verified | Historical/compatibility code; investigate method-specific applicability and transport contract |
connection_not_connected_for_write | Connection/transport readiness failed |
approval_required | Approve posting |
account_required / cash_flow_article_required | Configure write target |
Never
- Treat always-on capability as permission to write.
- Add direct “Execute now” from API/UI.
- Mark
Reconciledwithout readback.