New module: BuyNowPayLater.fs — zero-interest instalments and deferred payment#61
Draft
Copilot wants to merge 4 commits into
Draft
New module: BuyNowPayLater.fs — zero-interest instalments and deferred payment#61Copilot wants to merge 4 commits into
Copilot wants to merge 4 commits into
Conversation
Agent-Logs-Url: https://github.com/simontreanor/FSharp.Finance.Personal/sessions/5d31287c-9119-41af-ac1b-c3a68ea4b545 Co-authored-by: simontreanor <4550815+simontreanor@users.noreply.github.com>
…ests Agent-Logs-Url: https://github.com/simontreanor/FSharp.Finance.Personal/sessions/5d31287c-9119-41af-ac1b-c3a68ea4b545 Co-authored-by: simontreanor <4550815+simontreanor@users.noreply.github.com>
Agent-Logs-Url: https://github.com/simontreanor/FSharp.Finance.Personal/sessions/5d31287c-9119-41af-ac1b-c3a68ea4b545 Co-authored-by: simontreanor <4550815+simontreanor@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add new module for BuyNowPayLater with zero-interest instalments
New module: BuyNowPayLater.fs — zero-interest instalments and deferred payment
Apr 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a
BuyNowPayLatermodule to model 0%-interest instalment ("pay in 3 / pay in 12") and deferred payment ("pay later") products, along with the prerequisiteApr.CalculationMethod.Disabledcase for products where a conventional APR is not applicable.Apr.CalculationMethod.Disabled(Apr.fs)calculatereturnsSolution.Impossible,toPercentreturnsPercent 0mexplicitly"disabled"BuyNowPayLatermodule (src/BuyNowPayLater.fs)Types
FundingModel—RetailerFunded | LenderFunded(who absorbs the 0% cost)InstalmentConfig— equal-payment instalment product; carriesPenalInterestRatefor use when a missed payment is detectedDeferredConfig— deferred payment product;AccrueInterestDuringDeferralflag distinguishes true 0%-deferred from deferred-interest variantsFactory functions — all set
AprMethod = DisabledandStandardRate = Zero:For deferred-interest products,
deferredAdvancedParametersinjects aPromotionalRateofZerospanning the entire deferral window (including the payment day), so on-time amortisation shows zero net interest. ThePostDeferralRate/PenalInterestRateare stored in config for callers to apply viaPromotionalRatesafter a missed payment is detected.