Buy Now Pay Later (BNPL) Ledger Logic

Architecting Buy Now Pay Later ledgers. Managing "Installment" objects, payment scheduling, and triggering late fees programmatically.

BNPL is a hybrid of payments and lending. A $100 purchase creates a $100 Merchant Payout (immediate) and a $100 Consumer Loan split into 4 installments of $25. The ledger must link these distinct entities. The complexity is the high velocity; a user might have 20 active micro-loans, each with its own schedule.

The Installment Object Structure

Instead of one loan, the database tracks Installments.

Loan_ID: 101

Installment_1: $25 | Due: T+0 | Status: Paid

Installment_2: $25 | Due: T+14 | Status: Scheduled

Installment_3: $25 | Due: T+28 | Status: Scheduled

Payment Routing: When a user pays $50, the "Allocation Engine" must intelligently apply it to the oldest due installments across multiple active loans.

Late Fee Triggering Logic

Automation is key to unit economics.

The Cron Job: Runs nightly. Checks WHERE due_date < today AND status != 'paid'.

The Action:

Transition Installment to Overdue.

Create new Ledger Entry: Debit: User_Account | Credit: Late_Fee_Revenue.

Trigger email notification.

Freeze user from making new purchases (Risk Control).

Frequently Asked Questions

How do returns work in BNPL?

If the user returns the item, the Merchant refunds the BNPL provider. The Provider must then refund any paid installments to the user and cancel the future installments.

Is BNPL a loan?

Legally and architecturally, yes. It requires the same General Ledger accounting (Receivables/Bad Debt) as a traditional bank loan.

Related Guides