Insurance
Concepts and Statuses

Concepts and Statuses

The concepts and statuses on this page are the same on the Checkout Form path and on the API path.

Core concepts

ConceptMeaning
Insurance typeLunixi's provider-independent insurance code. Example: TICKET_CANCELLATION (ticket cancellation). A published type code never changes. Each type has a schema; the schema version is given by schemaVersion.
OptionThe concrete insurance offered to the buyer in a quote: the provider's name and logo, the premium, a coverage summary and the terms.
QuoteThe price given for a specific basket and insured details. A quote has a validity period. If the basket changes, the quote becomes invalid and a new quote is obtained.
SelectionThe quote the buyer selected in the Checkout Form and the consent they gave. The selection is validated again when the payment is submitted. Insurance is never preselected. On the API path, you create the order directly from the quote.
OrderThe purchase of the selected quote. Premium collection, policy, refund and document processes are tracked on the order. If you take the payment with Lunixi, the ID of the premium item is the order ID.
PolicyThe insurance issued by the provider. Insurance is per unit: each unit in the basket is insured separately, so an order can have more than one policy. The policy number is the number printed on the policy document.
PremiumThe amount the buyer pays for the insurance.
Provider connectionThe representation in Lunixi of your agreement with your provider. You decide which provider is used through your connections, not through your requests.
Collection methodWho collects the premium. Your agreement with your provider determines it; you specify it for each product in your connection.

IDs

Lunixi IDs are prefixed and opaque. The prefix shows the type of the ID.

PrefixIDFormat
insq_Quoteinsq_ + 32 hexadecimal digits
inss_Selectioninss_ + 32 hexadecimal digits
inso_Orderinso_ + 32 hexadecimal digits
insp_Policyinsp_ + 32 hexadecimal digits
inspay_Provider premium charge attemptinspay_ + 32 hexadecimal digits
insclm_Claiminsclm_ + 32 hexadecimal digits
insl_Leadinsl_ + 32 hexadecimal digits
  • Store IDs as they are and send them back unchanged; do not attach meaning to their contents.
  • An ID of one type is not accepted where another type is expected. For example, an order ID sent where a quote ID is expected is treated like an ID that does not exist.
  • Responses contain only Lunixi IDs. The provider's own references are not included in responses.

Order statuses

The status of an order is tracked on four independent axes: collection, policy, refund and document. The axes do not erase each other's information. For example, if the premium was collected but the policy could not be issued, collection stays COLLECTED, policy FAILED_FINAL and refund REQUIRED.

Collection

ValueMeaning
NOT_STARTEDCollection has not started yet.
PENDINGCollection is in progress.
ACTION_REQUIREDThe buyer needs to take a step to complete the collection.
COLLECTEDThe premium was collected.
FAILEDThe premium could not be collected.
UNKNOWNThe outcome of the collection is not final yet. The record stays in this state until the outcome is verified.

Policy

ValueMeaning
NOT_REQUESTEDThe policy has not been requested yet.
PENDINGThe policy is being issued.
PARTIALLY_ISSUEDSome of the policies in the order were issued.
ISSUEDAll policies in the order were issued.
FAILED_RETRYABLEThe policy could not be issued for a temporary reason; it is retried until the product's deadline.
FAILED_FINALThe policy definitively could not be issued.
UNKNOWNThe outcome of the policy request is not final yet.
CANCEL_PENDINGCancellation was requested for the policy; the outcome is pending.
CANCELLEDThe policy was cancelled.
Policy status of an orderState machine: the policy axis starts at NOT_REQUESTED, becomes PENDING when the policy is requested, then ISSUED or FAILED_FINAL; a temporary error (FAILED_RETRYABLE) or a missing answer (UNKNOWN) keeps it open until it resolves to ISSUED or, at the deadline, FAILED_FINAL.REQUESTEDISSUEDNOT FINALRESOLVEDDEADLINEREJECTEDNOT_REQUESTEDPENDINGFAILED_RETRYABLEor UNKNOWNISSUEDFAILED_FINALorder createdcancel → CANCEL_PENDINGLEGENDIN PROGRESSNOT FINAL — DO NOT REPEATISSUEDFINAL FAILURE
PARTIALLY_ISSUED appears when only some units of the order are issued. While the axis is PENDING, FAILED_RETRYABLE or UNKNOWN, do not start the same operation again. An issued policy is cancelled through CANCEL_PENDING.

Refund

ValueMeaning
NONENo refund.
REQUIREDA premium refund is required.
PENDINGThe premium refund is in progress.
REFUNDEDThe premium was refunded.
FAILEDThe premium refund failed.

Document

ValueMeaning
NOT_AVAILABLENo document yet.
PENDINGThe document is being prepared.
AVAILABLEThe policy document can be retrieved.
FAILEDThe document could not be retrieved.

The policy document is not stored at Lunixi; it is retrieved from the provider on each request. An issued policy stays valid even if the document cannot be retrieved.

Overall status

The panel and the API also show an overall status for the order. The overall status is not stored separately; it is derived from the four axes on every read. The conditions are evaluated from top to bottom and the first matching row gives the overall status.

Overall statusCondition
REFUNDEDRefund is REFUNDED
CANCELLEDPolicy is CANCELLED
FAILEDCollection is FAILED or policy is FAILED_FINAL
ACTION_REQUIREDCollection is ACTION_REQUIRED
PROCESSINGCollection or policy is one of: PENDING, UNKNOWN, FAILED_RETRYABLE, CANCEL_PENDING
PARTIALLY_ACTIVEPolicy is PARTIALLY_ISSUED
ACTIVEPolicy is ISSUED
CREATEDNone of the above

The document status does not affect the overall status: once the policy is issued, the order is ACTIVE even if the document is not ready yet.

The overall status is a summary. When you need to understand what happened in detail, look at the axes. For example, the axes show whether a FAILED overall status comes from the collection or from the policy.

Processing (PROCESSING)

The outcome of some work is not final yet: the collection or the policy is in progress, being verified, being retried or awaiting cancellation. In this state, do not start the same operation again. The order status is updated once the outcome is final.

Refund required

If the premium was collected but the policy definitively could not be issued, the policy becomes FAILED_FINAL, the refund becomes REQUIRED and the overall status shows FAILED. In this case the premium must be refunded to the buyer. When the refund starts, the refund axis becomes PENDING; when it completes, REFUNDED.

If the policy is issued after all once the refund has started, the refund is not reversed; cancellation is requested for the policy automatically and the policy becomes CANCEL_PENDING.

Premium refund status of an orderState machine: the refund axis starts at NONE; when the premium was collected but the policy is FAILED_FINAL it becomes REQUIRED; starting the refund makes it PENDING, a completed refund REFUNDED and a rejected refund FAILED, from which the refund can be started again. A refund you request yourself goes from NONE to PENDING.FAILED_FINALREFUND STARTEDCOMPLETEDREFUND REQUESTREJECTEDSTART AGAINNONEREQUIREDPENDINGREFUNDEDFAILEDexternalRefund: REFUNDED at onceLEGENDSTATUSTHE PREMIUM MUST BE REFUNDEDFINAL
If the policy is still issued after the refund started, the refund is not reversed; a cancellation is requested for the policy automatically.

Data formats

DataFormatExample
AmountInteger in minor units (kuruş). No decimals, strings or currency symbols.12500 = 125.00 TRY
CurrencyISO 4217TRY
TimestampISO 8601, time zone required2025-12-23T12:50:00+03:00
DateISO 8601 YYYY-MM-DD1990-01-31
Empty valueIf there is no value, the field is not sent at all; do not send an empty string or a placeholder such as "none".—

A timestamp without a time zone (such as 2025-12-23T12:50) is not accepted. The values in the table are examples.