When building a SaaS product that integrates with a third-party API like Stripe, you will eventually face a problem that seems simple on the surface: how do you import existing data when a user connects their account? In theory it sounds trivial. Fetch the data, save it to your database, done. In practice, you are dealing with paginated APIs, rate limits, foreign key dependencies, partial failures, and users staring at a spinner with no idea what is happening. I ran into all of these problems while building Billy β a billing infrastructure layer for developers that lets you manage Stripe subscriptions, tokens, and seat-based billing through a simple SDK. When a developer connects their existing Stripe account, Billy needs to import all their products, prices, customers, and subscriptions automatically. Some accounts have tens of thousands of records. The naive approach falls apart immediately.β¦