Skip to main content

Module payment

Module payment 

Source
Expand description

Payment contracts for deposits, references, collection, waiver, and refund state. Payment-domain values for deposits, references, and review-safe money movement state.

These types record payment readiness without performing provider writes. That keeps deposit exceptions and front-desk collection work reviewable:

use domain::{money, payment};

let amount = money::Money::new(
    money::MinorUnits::try_new(5_000).unwrap(),
    money::Currency::Usd,
);
let deposit = payment::Deposit::paid(
    amount,
    payment::Reference::try_new("sandbox-receipt-42").unwrap(),
);

assert_eq!(deposit.status(), payment::DepositStatus::Paid);
assert!(!deposit.requires_collection());
assert!(deposit.payment_reference().is_some());

Structs§

Deposit
Deposit amount, status, refund window, and payment reference for a reservation.
Reference
External payment or POS reference used to reconcile pet-resort charges.

Enums§

DepositStatus
Lifecycle states for collecting, waiving, refunding, or failing a reservation deposit.
Error
Validation failures returned by payment domain constructors.

Type Aliases§

Result
Result type returned by fallible payment error operations.