{
  "id": 15581271,
  "title": "A school discount with no code, because the discount is the email domain",
  "url": "https://urgent.news/2026/10/19/a-school-discount-with-no-code-because-the-discount-is-the-email",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-10-19T08:30:12.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/daniel_pertu/a-school-discount-with-no-code-because-the-discount-is-the-email-domain-2fmd"
  },
  "original_language": "en",
  "account": "Schools now receive a discount based on their email domain rather than a manual discount code. This change simplifies the process by eliminating the need for users to remember or type in a code. The discount is automatically applied based on the school's email domain, with the matching rule being the longest suffix, not an exact match.\n\nTo determine the applicable discount, the system first checks if the email domain exists in the registration database. If multiple domains are involved (e.g., a trust with subdomains), the most specific domain takes precedence. For example, jane@pupils.beaumont.school would match \"pupils.beaumont.school\" before \"beaumont.school\".\n\nThe implementation involves a function that takes an email address as input and returns an array of candidate domains. The function handles various edge cases, such as invalid email formats, domains without mailboxes, and common consumer mailbox providers. The resulting candidate domains are then used to identify the applicable discount.\n\nThis change affects the user experience by streamlining the discount application process and reducing the potential for errors caused by mistyping or losing discount codes. The system also ensures that the discount is applied consistently across all pages and interactions within the platform.",
  "summary": "We used to give schools a discount code. A teacher asked for one, we minted it, and then we maintained the parts that follow from a code existing: an admin CRUD for the codes, a redemption table so per-user and per-year limits could be enforced, a validate endpoint, and a support thread every time somebody pasted a code with a smart quote in it. The replacement is that a school is registered by…",
  "key_points": [
    "Schools receive discount based on email domain, not code.",
    "System checks email domain in registration database.",
    "Most specific domain takes precedence in multiple matches."
  ],
  "editors_take": "Automating discounts through email domain recognition removes friction for educational users and minimizes manual errors by replacing traditional promotional codes with a seamless, backend verification process.",
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}