Interface Settlement

All Known Implementing Classes:
Settlement.AlreadySettled, Settlement.Expired, Settlement.Rejected, Settlement.Settled

Outcome of PaymentBroker.settle(com.tnsai.payment.Quote) (TNS-298). Sealed so consumers can dispatch with an exhaustive pattern-match: settled, rejected, already-settled (idempotency replay), or expired.
Since:
0.10.0 (TNS-298)
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static final record 
    Idempotency replay — a prior settlement with the same Quote.idempotencyKey already succeeded; broker returns the original transactionId so callers can reconcile.
    static final record 
    Quote was past Quote.expiresAt when settlement was attempted.
    static final record 
    Broker refused — insufficient funds, payer KYC failure, broker policy block.
    static final record 
    Funds moved successfully.
  • Method Summary

    Modifier and Type
    Method
    Description
    The Quote.quoteId this settlement attempt referenced.
    Wall-clock instant the broker resolved this attempt.
  • Method Details

    • quoteId

      String quoteId()
      The Quote.quoteId this settlement attempt referenced.
    • resolvedAt

      Instant resolvedAt()
      Wall-clock instant the broker resolved this attempt.