Who Owns the Code You Build for a Client

- Without a written clause, code ownership does not automatically go to whoever paid for it - assume nothing until it is in writing.
- The clean pattern most builders use: the client owns everything built specifically for their project once the final invoice clears. You keep your own reusable components, templates, and general-purpose scripts.
- Put the ownership line in the same one-page agreement you already send before you build, not in a separate document nobody reads.
The Direct Answer: It Depends on the Contract, Not on Who Paid
A client does not automatically own the code just because they paid for the project. Ownership of custom work is a matter of contract, and if the agreement is silent on it, the answer depends on the specifics of your situation and where you are based - which is exactly the ambiguity you want to close before it becomes a dispute. This is not legal advice, and a contract worth real money deserves a real lawyer's eyes. What follows is the practical pattern builders in the Claude Code Profit Room actually put in their agreements.
The Ownership Line to Put in Every Agreement
One sentence does most of the work. Something close to: upon receipt of final payment, the builder assigns to the client all rights to the custom code, configurations, and content created specifically for this project. The builder retains ownership of any pre-existing tools, templates, scripts, or components used to build it, and may reuse them in future work.
| Goes to the client | Stays with the builder |
|---|---|
| The finished, custom build made for their specific business | Reusable templates, boilerplate, and internal tools used to build it |
| Configuration and content created specifically for their project | General-purpose scripts and components built before or outside this project |
| The right to run, modify, and extend what was delivered | The right to reuse the same underlying components on future client work |
What transfers to the client versus what the builder keeps
What You Keep: Your Reusable Components
Every builder accumulates a personal toolkit over time - a lead-intake pattern, a dashboard shell, a set of prompts and configs that work. If your agreement hands over 'all work product' with no carve-out, you are technically signing away pieces of that toolkit every time you deliver a project, even though the client never asked for them by name and would not know what to do with them on their own.
Naming the carve-out protects the part of your business that actually compounds. A client owns the house you built them. You still own the tools in your truck.
Ownership Transfers at Final Payment, Not at Kickoff
Tie the assignment to final payment clearing, not to project kickoff or delivery. If a client stops paying partway through, you still own the code until the last invoice is settled - which is real leverage if a relationship goes sideways. Handing over full ownership on day one, before a dollar has cleared, removes that leverage for no reason.
Third-Party Tools, APIs, and Model Access Are Never Yours to Assign
You can only assign what you actually own. Claude, any third-party API, hosting account, or software subscription used to build the project belongs to whoever holds that account and agreed to its own terms - you cannot sign that ownership over to a client because it was never yours to give. Be explicit in the agreement that ownership covers the custom code and configuration you built, not the underlying tools and services it runs on.
Put the Ownership Line in Your Agreement, Not in a Side Conversation
This clause belongs in the same one-page agreement you already send before starting any build - not in a follow-up email, not as a verbal understanding from the kickoff call. One sentence, sent once, in writing, before the first line of code, closes the question for good.
Short, practical drops on offers, outreach, pricing, and closing clients with Claude Code. No spam, unsubscribe anytime.
Frequently asked
Does a client own the code just because they paid for it?
Not automatically. Payment and ownership are separate unless a written agreement ties them together. Without an explicit assignment clause, ownership can default to an outcome neither side expected, which is why the clause belongs in every agreement rather than an assumption.
Can I reuse code I built for one client in a project for another client?
Only the general-purpose components you built or owned before that specific project - your templates, scripts, and internal tools - not anything custom and specific to that one client's business. Carve this out explicitly in your agreement so it is not a gray area later.
What happens to code ownership if a client stops paying halfway through?
If your agreement ties ownership transfer to final payment clearing, you retain ownership of the work until the last invoice is settled. That is real leverage in a non-payment situation, which is why handing over ownership at kickoff instead of at final payment gives it away for nothing.
Do I need a lawyer to write an IP ownership clause?
For a small, low-dollar project, a clear plain-language sentence in your standard agreement is normal practice among builders. For a larger engagement or anything with real money or exclusivity attached, a real lawyer reviewing the specific language for your situation and jurisdiction is worth the cost.
Last reviewed August 8, 2026.

Co-founder of the Claude Code Profit Room. Went from shipping software to closing paying clients, and now teaches builders the selling half of the equation.
More from David Iya →

