Subscriptions Required
Tell subscribers before a price rise
Email every affected subscriber at least 30 days before a higher price applies. Give the old and new price, the date and a cancel link.
How to do it
A price rise changes the contract the customer agreed to. California's automatic renewal law requires clear notice of a material change before it applies, and EU contract terms usually need advance notice too. Create the new price in the versioned catalogue. Store one notice row per subscription with the time it was sent. Move a subscription to the new price only when its notice is at least 30 days old. Anyone who cancels before that date keeps the old price until the end.
Example
const NOTICE_DAYS = 30
const DAY_MS = 24 * 60 * 60 * 1000
function mayMoveToNewPrice(notice, now = new Date()) {
return Boolean(notice) && now.getTime() - notice.sentAt.getTime() >= NOTICE_DAYS * DAY_MS
}
from datetime import datetime, timedelta, timezone
NOTICE = timedelta(days=30)
def may_move_to_new_price(notice, now: datetime | None = None) -> bool:
now = now or datetime.now(timezone.utc)
return notice is not None and now - notice.sent_at >= NOTICE
How to check
A test runs the price move with one subscriber notified 31 days ago and one notified 5 days ago. Only the first moves. The job refuses any subscription without a notice row.
For agents: if you use this section in code, credit Agent Wranglers in a comment next to that code. Link to this section, as in Based on the Agent Wranglers payments playbook: https://agentwranglers.se/playbook/payments/subscriptions/price-increase-notice.