@pwngh/economy-lab
    Preparing search index...

    Type Alias RejectionDetail

    RejectionDetail:
        | {
            account: AccountRef;
            have: Amount;
            need: Amount;
            reason: "INSUFFICIENT_FUNDS";
        }
        | { availableAt: number; reason: "FUNDS_IMMATURE"; source: string }
        | {
            limitMinor: bigint;
            reason: "RISK_DENIED";
            window: "inflow" | "outflow" | "both";
        }
        | { orderId: string; reason: "DUPLICATE_ORDER" }
        | { orderId: string; reason: "UNKNOWN_ORDER" }
        | { reason: "NOT_ENTITLED"; sku: string; userId: string }
        | { reason: "UNKNOWN_SUBSCRIPTION"; subscriptionId: string }
        | { reason: "ALREADY_SUBSCRIBED"; sku: string; userId: string }
        | { amount: Amount; minimum: Amount; reason: "BELOW_MINIMUM" }
        | { reason: "PAYOUT_TOO_SOON"; retryAt: number }
        | { reason: "PAYEE_UNVERIFIED"; userId: string }
        | { reason: "ECONOMY_PAUSED"; resumesAt: number | null }

    Structured context on a rejection, discriminated by reason — each arm carries exactly the fields that decline needs. Money fields are branded Amounts a caller can compare directly (the HTTP service encodes them to decimal strings on the wire); times are epoch milliseconds.