FAILURE MAP
← Case archive

FA-59543 / Subscription proration billing / Member archive

Annual-to-monthly switch credit: partial month counted as used · case 03

Customers switching mid-month are credited for the month they are already using.

Member previewVariant 3 · 3 implementations · 8 checks per implementation

Case contract

Input {annual, months_used, days_into_month, month_days, monthly}. Months started = months_used plus one if the current month has begun (days_into_month > 0), capped at 12. Credit = annual*(12 - started)//12. The credit pays whole future monthly invoices; the remainder stays as balance. Return [credit, covered_invoices, leftover].

Why this case matters

Switching billing intervals converts unused prepaid time into credit that funds future invoices.

One recorded failure

Sample boundary fixture

This sample comes from the broken implementation of a controlled reproducer.

Boundary fixtureActualExpectedOutcome
regression 0[16650, 16, 650][8325, 8, 325]Failed

MEMBER ARCHIVE

The complete case is available to members.

This record includes three runnable implementations, regression fixtures, execution results, and source hashes.

Member access is invitation-based. Sign in with your invited account to inspect the sources.

Sign in to the archive ↗