Expand description
PostgreSQL schema contract and transaction orchestration for Syrup Rail.
Production service construction must not expose or invoke a migrator; host applications materialize versioned install artifacts as immutable migrations.
Structs§
- Admitted
Host Charge - Admitted
Subscription Enrollment - One committed final-admission result that authorizes exactly one immediate provider submission by consuming this value.
- Admitted
Subscription Payment Method Replacement - One committed final-admission result authorizing exactly one immediate Customer Vault mutation.
- Admitted
Subscription Recovery - One committed final-admission result authorizing exactly one immediate subscription-recovery submission.
- Admitted
Subscription Renewal - One committed final-admission result authorizing exactly one immediate automatic recurring charge.
- Billing
Event Write Error - Billing
Transaction Error - External
Reversal Host Store Error - Gateway
Lifecycle Quarantine Alert - Gateway
Lifecycle Quarantine Resolution Record - Gateway
Lifecycle Quarantine Review Record - Gateway
Lifecycle Reconciliation Summary - Host
Charge Ledger Admission Query - Host
Charge Submission Admission - Host
Charge Target Error - Host
Charge Target Reservation - Manual
Attempt Failure Host Store Error - Processor
Charge Classification Summary - Subscription
Billing Service
Enums§
- Billing
Transaction Subject State - Compensating
Processor Charge Outcome - Entitlement
Guard Error - Entitlement
Query Error - Exact
Query Observation - External
Reversal Attestation Outcome - External
Reversal Host Transition Outcome - Gateway
Lifecycle Apply Outcome - Gateway
Lifecycle Quarantine Resolution Outcome - Gateway
Lifecycle Reconciliation Error - Gateway
Mutation Cooldown Scope - Host
Charge Admission Outcome - Host
Charge Application Error - Host
Charge Ledger Admission - Host
Charge Ledger Admission Error - Host
Charge Ledger Admission Mode - Host
Charge Preflight Outcome - Host
Charge Provider Result - Host
Charge Reservation Decision - Host
Charge Reservation Outcome - Host
Charge Store Error - Host
Charge Submission Decision - Host
Charge Submission Outcome - Manual
Attempt Failure Host Transition Outcome - Operator
Review Error - Payment
Attempt Store Error - Processor
Charge Observation Outcome - Processor
Charge Store Error - Renewal
Store Error - Subscription
Cancellation Error - Subscription
Discount Operation Error - Subscription
Enrollment Admission Outcome - Subscription
Enrollment Application Error - Subscription
Enrollment Provider Result - Subscription
Enrollment Service Error - Subscription
Grant Mutation Error - Subscription
Payment Method Replacement Admission Outcome - Subscription
Payment Method Replacement Provider Result - Subscription
Recovery Admission Outcome - Subscription
Recovery Provider Result - Subscription
Renewal Admission Outcome - Subscription
Renewal Provider Result
Traits§
- Billing
Transaction - One host-owned transaction and its typed event projection capability.
- Billing
Transaction Coordinator - Host-prepared transaction whose subject authorization lock is acquired before any shared billing lock.
- External
Reversal Host Store - Host
Charge Target Store - Host-owned target extension composed into shared ledger transactions.
- Manual
Attempt Failure Host Store - Subscription
Offer Store
Functions§
- activate_
gateway_ configuration - Activates an exact gateway configuration without touching cooldown state.
- admit_
host_ charge_ submission - admit_
host_ charge_ submission_ in_ transaction - admit_
subscription_ enrollment_ submission - Owns and commits final enrollment admission before exposing a one-shot
submission capability. A rolled-back transaction can never yield the
capability consumed by
submit_admitted_subscription_enrollment. - admit_
subscription_ enrollment_ submission_ in_ transaction - Revalidates a prepared initial attempt and durably admits its one provider mutation.
- admit_
subscription_ payment_ method_ replacement - Commits final payment-method replacement admission before exposing its one-shot Customer Vault capability.
- admit_
subscription_ payment_ method_ replacement_ in_ transaction - Revalidates the exact subscription baseline and commits one-shot Customer Vault admission. Semantic drift terminalizes the prepared attempt.
- admit_
subscription_ recovery_ submission - Commits final recovery admission before exposing its one-shot capability.
- admit_
subscription_ recovery_ submission_ in_ transaction - Revalidates the exact locked snapshot and commits one-shot provider admission. Every semantic rejection terminalizes the prepared attempt.
- admit_
subscription_ renewal_ submission - Commits final automatic-renewal admission and captures the exact stored credential.
- admit_
subscription_ renewal_ submission_ in_ transaction - Revalidates one exact renewal snapshot and commits one-shot submission admission.
- apply_
exact_ query_ observation - Applies one authoritative negative exact-query observation.
- apply_
gateway_ lifecycle_ evidence - apply_
host_ charge_ gateway_ outcome - apply_
reconciled_ host_ charge_ gateway_ outcome - apply_
reconciled_ subscription_ enrollment_ gateway_ outcome - Applies an already-observed provider outcome to an exact durable enrollment attempt.
- apply_
reconciled_ subscription_ payment_ method_ replacement_ gateway_ outcome - apply_
reconciled_ subscription_ recovery_ gateway_ outcome - Re-enters the same recovery application authority from durable evidence and never resolves a live gateway or submits another mutation.
- apply_
reconciled_ subscription_ renewal_ gateway_ outcome - apply_
staged_ gateway_ lifecycle_ evidence - apply_
subscription_ enrollment_ gateway_ outcome - Applies one initial-enrollment gateway outcome to the durable billing ledger.
- apply_
subscription_ payment_ method_ replacement_ gateway_ outcome - apply_
subscription_ recovery_ gateway_ outcome - Applies one recovery outcome through the canonical charge ledger and host billing transaction.
- apply_
subscription_ renewal_ gateway_ outcome - attempt_
review_ page - attest_
external_ reversal - billing_
deletion_ blockers - Reports the canonical financial rows that prevent host account deletion.
- cancel_
subscription_ in_ transaction - Cancels one exact scope/subscriber/plan subscription inside the caller’s transaction.
- claim_
exact_ reconciliation_ attempts - Claims one bounded, account-scoped batch for authoritative exact queries.
- claim_
gateway_ lifecycle_ quarantine_ alert - claim_
subscription_ discount - claim_
subscription_ discount_ in_ transaction - classify_
pending_ processor_ charges - Classifies one bounded batch of durable pending processor charges.
- clear_
subscription_ discount - clear_
subscription_ discount_ in_ transaction - create_
subscription_ discount_ code - create_
subscription_ discount_ code_ in_ transaction - create_
subscription_ grant - Creates a grant inside the caller’s transaction.
- disable_
subscription_ discount_ code - disable_
subscription_ discount_ code_ in_ transaction - due_
renewals - Returns the deterministic, provider-neutral renewal work due now.
- entitlement
- Loads one exact scope/subscriber/plan entitlement from a single database snapshot.
- fail_
review_ required_ attempt - fail_
stale_ unsubmitted_ payment_ method_ replacements - Fails one bounded batch of stale payment-method replacements for an account.
- fail_
stale_ unsubmitted_ subscription_ enrollments - Expires every stale prepared enrollment for one account.
- find_
payment_ attempt_ by_ id_ in_ transaction - Loads an attempt by its exact scope and durable identity without locking it.
- gateway_
lifecycle_ quarantine_ review_ page - gateway_
lifecycle_ reconciliation_ start - host_
charge_ ledger_ admission - list_
subscription_ discount_ codes - list_
subscription_ discount_ codes_ in_ transaction - lock_
payment_ attempt_ by_ idempotency_ in_ transaction - Locks the exact owner-scoped idempotency row for replay or mutation.
- mark_
subscription_ discount_ claim_ applied_ in_ transaction - observe_
processor_ charge_ in_ transaction - preflight_
host_ charge_ in_ transaction - preflight_
subscription_ enrollment_ in_ transaction - Resolves subscriber-wide enrollment idempotency before host admission.
- preflight_
subscription_ payment_ method_ replacement_ in_ transaction - Resolves payment-method replacement idempotency before host admission.
- preflight_
subscription_ recovery_ in_ transaction - Resolves subscriber-wide recovery idempotency before host admission.
- processor_
charge_ review_ page - reconcile_
gateway_ transaction_ reports - reconciliation_
gateway_ accounts - Returns every registered gateway account in deterministic locator order.
- record_
gateway_ lifecycle_ quarantines - register_
gateway_ account - Registers canonical gateway metadata on the caller’s connection.
- renewal_
attempt_ state - Computes the one shared renewal/recovery period ledger state.
- require_
entitlement_ for_ update - Locks and revalidates one exact entitlement inside the caller’s transaction.
- reserve_
host_ charge_ in_ transaction - reserve_
subscription_ enrollment_ in_ transaction - Reserves or resumes one exact-plan initial enrollment inside the caller’s transaction.
- reserve_
subscription_ payment_ method_ replacement_ in_ transaction - Locks the exact subscription baseline and reserves a token-free replacement attempt before Customer Vault I/O.
- reserve_
subscription_ recovery_ in_ transaction - Locks the canonical subscription, derives the exact due-period request, and inserts a token-free recovery attempt in one transaction.
- reserve_
subscription_ renewal_ in_ transaction - Locks one exact due subscription and inserts its automatic-renewal attempt.
- resolve_
gateway_ lifecycle_ quarantine - revoke_
subscription_ grant - Revokes an exact grant inside the caller’s transaction.
- save_
gateway_ lifecycle_ reconciliation_ cursor - saved_
subscription_ discount_ claim - saved_
subscription_ discount_ claim_ in_ transaction - scrub_
subscriber_ billing_ data - Removes the canonical mutable billing PII for one subscriber.
- stage_
gateway_ lifecycle_ evidence - store_
compensating_ processor_ charge - submit_
admitted_ host_ charge - submit_
admitted_ subscription_ enrollment - Performs the one provider sale authorized by a committed final admission, then applies or durably parks its result.
- submit_
admitted_ subscription_ payment_ method_ replacement - Performs the one Customer Vault mutation authorized by committed admission.
- submit_
admitted_ subscription_ recovery - Performs the one provider sale authorized by committed recovery admission, then applies or durably parks its result without holding a database lock across provider I/O.
- submit_
admitted_ subscription_ renewal - Performs the one recurring sale authorized by committed renewal admission.
- transition_
processor_ charge_ in_ transaction - update_
subscription_ discount_ code - update_
subscription_ discount_ code_ in_ transaction - validate_
subscription_ discount_ code - validate_
subscription_ discount_ code_ in_ transaction