হোম /
পরিশিষ্ট /
স্ট্যাটাস কোড
বাংলা সারসংক্ষেপ
এনুমারেটেড স্ট্যাটাস ভ্যালু। SCREAMING_SNAKE_CASE। মূল এন্টিটি: Booking, Ticket, Invoice, Payment, Refund, Memo, Period, Customer, Supplier। রুল: কখনই ইনডেক্স অনুসারে নয়—স্ট্রিং কোড ব্যবহার করুন।
বিস্তারিত (English)
Appendix 14.3 — Status & State Codes
1. Purpose
This appendix lists every enumerated state / status value used across the platform's entities, with the meaning, allowed transitions, and downstream effects of each. It serves as a single reference for developers, integrators, support, and auditors who encounter status values in payloads or reports.
2. Conventions
- All enums are uppercase
SCREAMING_SNAKE_CASE.
- State machines are defined per entity; transitions outside the allowed graph produce a
*_NOT_IN_*_STATE error.
- Terminal states are marked (terminal) — no further transitions.
- States ending with
_HISTORY are not states but markers in history tables.
3. Booking states
| State |
Meaning |
Terminal |
DRAFT |
Created; supplier hold not yet established |
No |
HELD |
Supplier hold in place; price locked until TL |
No |
PENDING_PAYMENT |
Cash flow; waiting on customer payment |
No |
PENDING_APPROVAL |
Above threshold; awaiting approver |
No |
ISSUED |
Tickets issued; supplier-confirmed |
No |
PARTIALLY_USED |
At least one segment flown; not all |
No |
COMPLETED |
All segments used or trip end passed |
Yes |
PARTIALLY_REFUNDED |
One or more refund events; booking still live |
No |
CANCELLED_BEFORE_ISSUE |
Aborted before ticketing |
Yes |
CANCELLED_AFTER_ISSUE |
Voided or fully refunded post-issuance |
Yes |
EXPIRED |
Hold lapsed without action |
Yes |
ARCHIVED |
Retention threshold reached; cold storage |
Yes |
Diagram: Chapter 13.2.
4. Ticket states
| State |
Meaning |
RESERVED |
Issued but pending settlement |
ISSUED |
Settled into BSP |
VOIDED |
Voided within window |
REFUNDED |
Fully refunded |
PARTIALLY_REFUNDED |
Partial refund processed |
EXCHANGED |
Replaced via reissue; pointer to successor |
FLOWN |
At least one coupon used |
EXPIRED |
Ticket validity passed unused |
5. EMD states
OPEN / EXCHANGED / REFUNDED / EXPIRED — mirroring ticket semantics for ancillary documents.
6. Invoice states
| State |
Meaning |
DRAFT |
Pre-finalisation |
ISSUED |
Numbered, delivered |
PARTIALLY_PAID |
Some payment applied |
PAID |
Fully settled |
OVERDUE |
Past due date with balance |
VOIDED |
Cancelled (with credit note) |
WRITTEN_OFF |
Bad debt; ECL realised |
7. Payment states
| State |
Meaning |
INITIATED |
Created; awaiting capture |
AUTHORIZED |
Gateway authorized hold |
CAPTURED |
Funds received |
APPLIED |
Linked to invoice(s) |
PARTIALLY_APPLIED |
Some amount applied |
REFUNDED |
Fully reversed |
PARTIALLY_REFUNDED |
Part reversed |
FAILED |
Did not complete |
CHARGEBACK |
Customer-initiated reversal via card network |
DISPUTED |
Customer claims wrongful charge — under investigation |
RECONCILED |
Matched in bank/gateway recon |
8. Payout states
| State |
Meaning |
DRAFT |
Created; not yet approved |
PENDING_APPROVAL |
Awaiting checker |
APPROVED |
Approved; ready to wire |
SENT |
Wire initiated |
CONFIRMED |
Bank confirmed |
FAILED |
Returned by bank |
REVERSED |
Recalled |
9. Refund states
| State |
Meaning |
REQUESTED |
Customer or ops initiated |
QUOTED |
Refund amount computed |
APPROVED |
Approver sign-off |
SUPPLIER_PROCESSING |
Submitted to supplier |
SUPPLIER_REJECTED |
Supplier said no |
SUPPLIER_APPROVED |
Supplier accepted |
PAYBACK_PENDING |
Awaiting payback to customer |
COMPLETED |
Customer paid back; JE finalised |
REJECTED |
Operator rejected |
CANCELLED |
Withdrawn |
10. Memo (ADM/ACM) states
| State |
Meaning |
RECEIVED |
Imported from BSP file |
UNLINKED |
No matching ticket found yet |
LINKED |
Matched to ticket |
UNDER_REVIEW |
Ops investigating |
DISPUTED |
Dispute filed with supplier |
ACCEPTED |
We agree; will settle |
SETTLED_IN_BSP |
Cleared via BSP cycle |
WITHDRAWN_BY_SUPPLIER |
Supplier rescinded |
WRITTEN_OFF |
Provision realised |
11. Commission accrual states
| State |
Meaning |
ACCRUED |
Posted at issuance |
RECOGNISED |
Moved to earned at service-date |
SETTLED |
Cleared by BSP / ACM / direct |
DISPUTED |
Variance under dispute |
WRITTEN_OFF |
Uncollected; expense |
REVERSED |
Recalled (refund) |
12. Period states
| State |
Meaning |
OPEN |
Operational entries permitted |
SOFT_CLOSED |
Operational blocked; adjustments allowed |
CLOSED |
All postings frozen; reopen requires approval |
LOCKED |
Audit-frozen; platform-admin only override |
REOPENED |
(transient marker on history rows) |
13. Customer states
| State |
Meaning |
PROSPECT |
Pre-onboarding |
KYC_PENDING |
Documents awaited |
ACTIVE |
Normal operation |
CREDIT_HOLD |
Payment-issue hold |
SANCTIONS_HOLD |
Watchlist match — block |
INACTIVE |
Voluntary close |
SUSPENDED |
Punitive (fraud) |
ARCHIVED |
Cold storage after retention |
14. Supplier states
PROSPECT / ONBOARDING / ACTIVE / BANK_HOLD / INACTIVE / SUSPENDED / ARCHIVED.
15. Import run states
| State |
Meaning |
RECEIVED |
File arrived; checksum logged |
PARSING |
Parser running |
PARSED |
Staging populated |
VALIDATING |
Rules in progress |
VALIDATED |
All passed |
COMMITTING |
Writing to live tables |
COMPLETED |
Done |
FAILED_PARSE |
Could not parse |
FAILED_VALIDATION |
Validation tier blocking |
FAILED_COMMIT |
Commit aborted (rare) |
PARTIAL_COMMIT |
Some lines committed; others quarantined |
16. Webhook delivery states
PENDING / IN_FLIGHT / DELIVERED / FAILED / RETRYING / EXHAUSTED.
17. JE states
| State |
Meaning |
DRAFT |
Pre-post (internal) |
POSTED |
Committed to ledger |
REVERSED |
Has a reversing JE pointing at it |
Note: JEs are append-only; REVERSED is a derived state via reverse_of_je_id, not a column flag, but it's surfaced as a status in views.
18. Reconciliation states
| Entity |
States |
recon_runs |
RUNNING / COMPLETED / FAILED |
recon_matches |
AUTO / MANUAL / RECONFIRMED |
recon_exceptions |
OPEN / IN_PROGRESS / RESOLVED / WRITTEN_OFF |
19. Tax return states
DRAFT / READY_TO_FILE / FILED / PAID / AMENDED.
20. Approval workflow states (generic)
PENDING / APPROVED / REJECTED / WITHDRAWN / EXPIRED.
21. Documentation note
When integrating, never store status comparisons by index — use the string code. Future versions may renumber or reorder; the string is the contract.