惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Hacker News: Ask HN
Hacker News: Ask HN
WordPress大学
WordPress大学
T
The Blog of Author Tim Ferriss
The GitHub Blog
The GitHub Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - 聂微东
A
About on SuperTechFans
Stack Overflow Blog
Stack Overflow Blog
雷峰网
雷峰网
Microsoft Azure Blog
Microsoft Azure Blog
腾讯CDC
爱范儿
爱范儿
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园 - 【当耐特】
V
Visual Studio Blog
有赞技术团队
有赞技术团队
U
Unit 42
D
Docker
小众软件
小众软件
F
Full Disclosure
I
Intezer
Scott Helme
Scott Helme
P
Privacy International News Feed
P
Proofpoint News Feed
Engineering at Meta
Engineering at Meta
Google DeepMind News
Google DeepMind News
B
Blog
Martin Fowler
Martin Fowler
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Vercel News
Vercel News
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Spread Privacy
Spread Privacy
宝玉的分享
宝玉的分享
S
Security Affairs
www.infosecurity-magazine.com
www.infosecurity-magazine.com
月光博客
月光博客
C
Cisco Blogs
云风的 BLOG
云风的 BLOG
Schneier on Security
Schneier on Security
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
T
Threat Research - Cisco Blogs
量子位
Hacker News - Newest:
Hacker News - Newest: "LLM"
H
Heimdal Security Blog
N
Netflix TechBlog - Medium
H
Hacker News: Front Page
P
Proofpoint News Feed
G
GRAHAM CLULEY
V
Vulnerabilities – Threatpost
S
Schneier on Security

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant Common SOC 2 Failures (Real World) Stop Vibe-Checking Your AI App: A Practical Guide to Evals How to Use SonarQube and SonarScanner Locally to Level Up Your Code Quality Your Next To-Do App Is Dead — I Replaced Mine with an OpenClaw AI Sign a Nostr event in 60 lines of Python using coincurve — no nostr-sdk, no nbxplorer, no rust toolchain ITGC Audit Explained Like You’re in Big 4 Patch Tuesday abril 2026: Microsoft parcha 163 vulnerabilidades y un zero-day en SharePoint Stop scraping everything: a better way to track competitor price changes Listing on MCPize + the Official MCP Registry while routing payments OUTSIDE the marketplace — how I kept 100% of my x402 revenue Building an AI-Powered Risk Intelligence System Using Serverless Architecture Why We Ripped Function Overloading Out of Our AI Toolchain Testing AI-Generated Code: How to Actually Know If It Works SaaS Churn Is Killing Your Business. Here Is What to Do About It (Without a Support Team) The Speed of AI Is No Longer Linear - And Self-Improving Models Are Why How to Implement RBAC for MCP Tools: A Practical Guide for Engineering Teams From Standard Quote to Persuasive Proposal: AI Automation for Arborists I built a CLI that scaffolds complete multi-tenant SaaS apps Axios CVE-2025–62718: The Silent SSRF Bug That Could Be Hiding in Your Node.js App Right Now The dashboard that ended our friendship Data Pipelines Explained Simply (and How to Build Them with Python) The Hidden Cost of AI Systems Nobody Talks About. undefined vs undeclared, and how typeof behaves Switching from file-based jobs to NATS/Kafka in Rust without changing code io_uring Adventures: Rust Servers That Love Syscalls Why Agentic AI is Killing the Traditional Database The POUR principles of web accessibility for developers and designers Quantum Neural Network 3D — A Deep Dive into Interactive WebGL Visualization How To Install Caveman In Codex On macOS And Windows Automation Pipeline Reliability: Why Your Workflow Breaks When Nobody Is Watching I Built an 'Open World' AI Coding Agent — It Works From ANY Folder From Freelancing to Product: A Tech Service Company's SaaS Transformation China's AI Giants: Adding Tencent Hunyuan & ByteDance Doubao to AI University (74 Providers) On the Vibe Coders and Their Lies clerk: Auto-Summarize Your Claude Code Sessions AI Weekly — 2026/04/10–04/17 | The Model Lockdown Is Here, but the Toolchain Is the Real Battleground AI 週報 — 2026/04/10–2026/04/17 模型封鎖潮來了,但工具鏈才是真戰場 Maybe this is how Open-Source apps are born... 🚀 Fine-Tune LLMs with LoRA and QLoRA: 2026 Guide tRPC v11 + Next.js App Router: End-to-End Type Safety Without the Boilerplate ShadCN UI in 2026: Why I Stopped Installing Component Libraries and Started Owning My Components SaaS Billing in React Server Components: Stripe + Supabase Without a Single `useEffect` Join our DEV Weekend Challenge — $1,000 in Prizes Across TEN winners! Submissions Due April 20 at 6:59 AM UTC. Implementing FSRS Spaced Repetition in Flutter + Supabase — Adding Memory Science to an AI Learning App "I Texted My Localhost From the Train — Claude Code Fixed the Bug Before I Got Home" I Built a Sales Prep AI and It Went Deeper Than Expected Design to Code #2: One JSON, Eleven Outputs Solving the 100M-Row Problem: A Summary Table Pattern for High-Volume Push Notification Logs Flutter Web With Wasm: What Actually Changes For Developers I Built 50 Royalty-Free Soundtracks for My Side Project in a Weekend Using AI Music Generation The Vibe Coding Security Checklist: 7 Things to Check Before You Ship Stop Letting Googlebot Guess Fix Your React App's SEO Right Desconstruindo o Streaming do LinkedIn: Como Criar um Engine de Extração de Vídeo de Alta Performance com HLS e FFmpeg (EDA Part-1) EDA (Exploratory Data Analysis) Explained With Real Life — Why Looking at Your Data Is the Most Important Step in Machine Learning Brand Relationship Management at Scale: Our 4-Touch Outreach System for 200+ Brands Why String.fromEnvironment() Might Return an Empty String in Dart JGuardrails 1.0.0 — Hardening Java LLM Apps Against Jailbreaks, Toxicity, and Prompt Injection Plan and Schedule a Full Week of Threads Content From One Claude Conversation Coding Cat Oran Ep3, Five Tables Changed Everything Updated: BFF Pattern I'm done watching freelancers get buried by 200 proposals. So I'm building the alternative. This is my first post BFS Algorithm in Java Step by Step Tutorial with Examples Tracking LLM Pricing Monthly: An Open Dataset for 22 AI Models How We Measure Content ROI on a Comparison Site: Revenue Attribution Without Perfect Data Introducing Nova AI Ops: The AI-Native Operating System for SRE Teams I built a free desktop video downloader for Windows — Grabbit How Talkie OCR Helps Vision-Impaired & Dyslexic Users Read the World Around Them VRCFaceTracking安装和iPhone面捕配置教程,有bug Even CrowdStrike Can't See Your Agents The Automation Gold Rush: What n8n Workflows and Claude Are Opening Up for Developers Right Now
Stripe Basil Quietly Moved current_period_end Off Subscription — And a Lot of Code Broke
FlareCanary · 2026-05-01 · via DEV Community

On March 31, 2025, Stripe shipped the Basil API version. Among other changes, it removed three fields from the Subscription object that a lot of production code was reading:

  • current_period_startmoved to subscription items
  • current_period_endmoved to subscription items
  • billing_thresholdsremoved entirely (later reintroduced — more on this)

If you upgraded your account's default API version without pinning the SDK, the endpoint still returned 200 OK. The subscription objects still serialized cleanly. The fields your code accessed just came back undefined.

One of those fields is current_period_end. If your app uses Stripe subscriptions at all, there's a very good chance you read current_period_end somewhere. Maybe it populates the "next bill date" in your UI. Maybe it drives a cron job that reminds customers before renewal. Maybe it gates feature access for annual plans. Whatever it is, it quietly stopped working.

What Actually Changed

From the Basil changelog:

current_period_start and current_period_end are removed from subscriptions. Instead, access the subscription item's billing periods directly via items.data[].current_period_start and items.data[].current_period_end.

The rationale is sound. In the old model, every subscription had a single billing cycle. In the new flexible-billing model, each item in a subscription can have its own cycle — useful for mixing monthly and annual items, or metered and flat items, on one subscription. Moving the fields down to the item level reflects reality.

From the consumer side, though, the surface looked like this:

Before (2025-02-24.acacia):

{
  "object": "subscription",
  "id": "sub_...",
  "current_period_start": 1710000000,
  "current_period_end": 1712678400,
  "items": { "data": [ /* ... */ ] }
}

Enter fullscreen mode Exit fullscreen mode

After (2025-03-31.basil):

{
  "object": "subscription",
  "id": "sub_...",
  "items": {
    "data": [
      {
        "current_period_start": 1710000000,
        "current_period_end": 1712678400
      }
    ]
  }
}

Enter fullscreen mode Exit fullscreen mode

Still a valid Subscription object. Still everything serializes. Just no more top-level period fields.

The breakage affected every SDK language — Node, Python, PHP, Java, Go, .NET. (Ruby, per the changelog, was the only one unaffected by this particular change, because of how that SDK maps the object.)

billing_thresholds — Removed, Then Quietly Un-Removed

The other Basil change that bit a lot of teams was billing_thresholds disappearing. This one has an even weirder story.

billing_thresholds was how you told Stripe "automatically invoice this subscription when the customer's usage passes this amount." For metered billing at scale, it was the thing that prevented a single runaway customer from accumulating a six-figure bill you might never collect.

On 2025-03-31, Stripe removed it from the Subscription API. The initial migration advice pointed teams at "metered billing alerts" as a replacement.

Developers quickly noticed the replacement wasn't on par. From stripe-node issue #2328:

"It's not clear why it was removed before the metered version was fully ready."

"The dashboard still allows setting billing thresholds and even generates the curl command. But when you actually use the same curl request, it produces an error stating the parameter is no longer supported."

Metered billing alerts only fired once per customer lifetime and didn't carry subscription IDs. You could not use them to auto-invoice at a threshold. There was no direct replacement for the thing that had been removed.

On 2025-05-28, Stripe reintroduced billing_thresholds. The field came back. Anyone who had already rewritten their billing logic to work around its absence had just shipped two migrations to land in the same place.

This is the other failure mode of silent schema changes: the churn of reacting to a change, then reacting to its reversal.

Why Most Teams Didn't Catch the Migration

The cleanest version of this upgrade is: pin your SDK to the old Basil-adjacent version, upgrade the SDK deliberately, test against a staging Stripe account, ship. A lot of teams do this. A lot don't.

Here are the common ways it slipped through:

Library auto-upgrades. A Dependabot PR bumps your stripe-node minor version, tests pass (because fixtures are from before the migration), and you merge it. Your SDK is now Basil-aware, your code still reads subscription.current_period_end, and the field is undefined in production.

Account-level API version default. Stripe lets you upgrade your account's default version in the dashboard. If someone on your team clicks through the upgrade flow without coordinating with engineering, every non-pinned API call starts returning the new shape.

Webhook events. Webhook payloads use the API version in effect at the time the event is created. If your account default shifts, your webhook handlers start receiving new-shape invoice.* and customer.subscription.* events — often before your SDK has been upgraded.

TypeScript didn't save anyone. The Stripe Node SDK updates its types with each version. If you pin to an older version, your types still describe current_period_end as top-level and your code happily accesses it. The runtime object just doesn't have it. TypeScript can't catch that — types are a compile-time shape, not a runtime guarantee.

Integration tests that mock Stripe. If your tests use recorded fixtures or a mock Stripe library, they validate against yesterday's shape, not today's live API. Your CI stays green while prod returns undefined.

Same pattern as every other silent schema change: the thing that's supposed to catch it was designed against the shape that no longer exists.

What Broke In Practice

A few of the concrete failure modes I've seen or heard about:

  • Dunning emails stopped. The cron that emails customers "your subscription renews on X" read subscription.current_period_end, got undefined, and sent "your subscription renews on Invalid Date" — or skipped the send entirely.
  • Customer-facing dashboards went blank. "Next invoice" widgets showed empty cells for every new subscription created after the cutover.
  • Proration math got weird. Code that calculated time remaining in the current period used current_period_end - Date.now(); when the field was undefined, proration defaulted to zero or to a NaN that cascaded into charge amounts.
  • Reporting numbers drifted. Analytics jobs that grouped subscriptions by current-period end-date started dropping rows because the field was missing from the row entirely.

None of these are showy failures. No 500s, no exceptions in Sentry. Just wrong or missing data on the customer experience.

The Migration That Actually Works

For the current_period_end move specifically, the honest migration is:

  1. Pin your SDK to the version you've tested. Don't let Dependabot drive your billing API upgrades.
  2. Read periods from items, not the subscription. For single-item subscriptions, subscription.items.data[0].current_period_end is the direct replacement. For multi-item, decide what "period end" means for your use case — the earliest item? The one that matches a specific price? Your code now has to answer that question explicitly.
  3. Update webhook handlers. customer.subscription.updated, invoice.created, and related events use the account API version. Test them against the new shape before flipping your account default.
  4. Stage the upgrade behind a feature flag if you can. Flip it on in staging, compare prod vs staging subscription reads for a week, then promote.

For billing_thresholds, the migration depends on when you started. If you started before 2025-05-28, you might have rewritten on top of metered alerts. Consider whether to revert to billing_thresholds now that it's back — or stay on whatever you built, since the reintroduction might not be permanent either.

How To Catch The Next One

This is the part that generalizes beyond Stripe. Pinning versions works for APIs that version properly. It does not help for the cases where:

  • The API version didn't change but the response shape did (GitHub Events API, some OpenAI endpoints)
  • You're on an account-default version and someone upstream flipped it
  • The SDK was upgraded but the API default was left alone, so your types and runtime disagree
  • The change is "allowed" within the version contract (e.g., a new optional field that turns out to be required when you want to match the old UX)

The general defense is to watch the shape of the responses you depend on. That can be:

  • A cron-scheduled script that hits your top N endpoints, hashes the field set, and alerts when the hash changes.
  • A test that runs nightly against live endpoints (not fixtures) and asserts on the structure of the response.
  • A purpose-built schema drift monitor.

I've been building FlareCanary for the third option. Point it at the API endpoints you depend on — Stripe, Plaid, OpenAI, Salesforce, whatever — and it polls them on a schedule, learns the response structure, and alerts when a field disappears, a type shifts, or a new field appears. Severity-classified: removed fields are alerts, new optional fields are informational, nullability flips fall somewhere in between.

You do not strictly need a tool for this. You need a habit. The Basil migration is a specific case of a very general problem: the APIs you depend on are changing in ways your type system and your CI can't see. The only reliable signal is watching the live response shape and comparing it to yesterday's.

The Thing That Actually Matters

Stripe did a fine job of the Basil release from the provider side. The changelog was clear. The migration docs existed. The new model is better designed than the old one. The billing_thresholds reintroduction, awkward as it was, was the right call once the replacement turned out to be insufficient.

None of that changed the fact that some number of teams woke up one Monday with blank "next invoice" dates in their dashboards because nobody owned "does the shape of the Subscription object match what our code expects?" as a question worth asking before every API version bump.

That's the monitoring gap. HTTP status codes tell you an endpoint is up. Response latencies tell you it's fast. Neither of those tells you that current_period_end moved three levels deeper into the response tree.

If you're on Stripe and haven't explicitly upgraded to Basil yet, this is your warning. If you already upgraded and everything's green, run a grep for current_period_end across your codebase and see what comes back. It is a very common field, and the number of surprising places it shows up tends to be higher than people expect.


If you've been bit by the Basil migration — or by any silent schema change on another API — I'd like to hear about it. The "undefined field, no error" failures are the ones I'm most interested in. Drop a comment or reach out.