# HppSessionCompletionReconciliationDto

A model the API reference uses in a request or a response. The operation pages link every field typed as this model here.

What a completion-counter reconciliation found and what it did about it.

## Fields
- `sessionId` (string(uuid)): The reusable link that was reconciled.
- `changed` (boolean): Whether the link was actually written to. `false` means the stored count and status  already agreed with the children, which is the expected answer.
- `previousCompletionCount` (integer(int32)): The completion count the link carried before the reconciliation.
- `completionCount` (integer(int32)): The completion count the link carries now. Equal to  `previousCompletionCount` when nothing needed correcting.
- `consumedCompletions` (integer(int32)): How many of the link's completions are consumed, which is the number the count was  reconciled to.
- `totalCompletions` (integer(int32)): How many completions the link has at all. Zero means the reconciliation was a no-op by  design: children share the link's retention TTL, so an empty partition is not evidence the  count should be zero.
- `previousStatus` ([HppSessionStatus](https://devportal.demo.winkpg.io/docs/api/models/HppSessionStatus.md)): The link's status before the reconciliation.
  Values:
  - `Pending`: The session has been created and is awaiting use by a customer. Also the status a session returns to when a premature consume is released: a submission that was rejected by pure request-shape validation before the orchestrator was invoked leaves the link usable, so the payer can correct their input and resubmit on the same link (see Consumed).
  - `Consumed`: The session has been consumed by a transaction submission. Terminal in practice: the only exit is the narrow release back to Pending performed by HppSession.ReleaseConsume, which requires that the session carries no OrchestratorDispatchedAt marker, that the consuming transaction id is still the one recorded, and that no vault token was minted. Once a submission reaches the orchestrator the marker is durable and the session stays Consumed regardless of the outcome, including a decline. Submit paths additionally validate the request BEFORE consuming, so a rejected request usually never spends the link in the first place; the release covers the rules that can only run inside the create.
  - `Revoked`: The session has been manually revoked by an administrator.
  - `Cancelled`: The session was cancelled by the parent page via the iframe two-way command channel Distinct from Revoked (admin-initiated) for clarity in audit + reporting: same terminal effect (session can no longer be consumed).
  - `Completed`: A reusable link has taken every completion it was capped at, so it accepts no further payers. Terminal, and reachable only on a reusable session: a single-use link spends itself through Consumed instead, and a reusable one is never Consumed because its per-payer consume state lives on its HppSessionCompletion children rather than on the parent. A reusable link created with no cap never reaches this status; it stays payable until it is revoked, cancelled or expires.
- `status` ([HppSessionStatus](https://devportal.demo.winkpg.io/docs/api/models/HppSessionStatus.md)): The link's status now. Differs from `previousStatus` only when the corrected  count crossed the link's cap in one direction or the other.
  Values:
  - `Pending`: The session has been created and is awaiting use by a customer. Also the status a session returns to when a premature consume is released: a submission that was rejected by pure request-shape validation before the orchestrator was invoked leaves the link usable, so the payer can correct their input and resubmit on the same link (see Consumed).
  - `Consumed`: The session has been consumed by a transaction submission. Terminal in practice: the only exit is the narrow release back to Pending performed by HppSession.ReleaseConsume, which requires that the session carries no OrchestratorDispatchedAt marker, that the consuming transaction id is still the one recorded, and that no vault token was minted. Once a submission reaches the orchestrator the marker is durable and the session stays Consumed regardless of the outcome, including a decline. Submit paths additionally validate the request BEFORE consuming, so a rejected request usually never spends the link in the first place; the release covers the rules that can only run inside the create.
  - `Revoked`: The session has been manually revoked by an administrator.
  - `Cancelled`: The session was cancelled by the parent page via the iframe two-way command channel Distinct from Revoked (admin-initiated) for clarity in audit + reporting: same terminal effect (session can no longer be consumed).
  - `Completed`: A reusable link has taken every completion it was capped at, so it accepts no further payers. Terminal, and reachable only on a reusable session: a single-use link spends itself through Consumed instead, and a reusable one is never Consumed because its per-payer consume state lives on its HppSessionCompletion children rather than on the parent. A reusable link created with no cap never reaches this status; it stays payable until it is revoked, cancelled or expires.
- `remainingCompletions` (integer(int32)): How many completions the cap still allows, or `null` on an uncapped link. (nullable)

## See also

- [All documentation](https://devportal.demo.winkpg.io/llms.txt): the machine-readable index of every public page on this site.
