Seraya Psikologi — Documentation

Booking and payment MVP · Implementation baseline · 96 ADR

55. Calculate Package Validity as a Calendar Period

Status

Accepted for the MVP working model; allowed units/range and end-of-month behavior remain open.

Context

Package validity is configured per ServicePackage and starts at verified payment success. Fixed-day arithmetic is precise but less understandable in public copy; a calendar period maps better to package language such as “valid for three months.”

Decision

Represent validity as a calendar period configured per ServicePackage (for example, an integer number of months/approved units). At verified payment success, compute and snapshot a concrete expiry boundary using Asia/Jakarta policy semantics. The purchase displays both the configured period and concrete expiry. Catalog edits do not change existing PackagePurchase expiry.

End-of-month, leap-year, daylight/timezone, and boundary-at-midnight behavior must follow one tested calendar policy; the exact business values/allowed units remain open.

Consequences

Positive:

Costs and constraints:

Open follow-up

Define allowed units/range, end-of-month policy, local expiry time, extension/restore semantics, and exact package values.