codexier.

SaaS & MVPs

Owning Your Code: IP Clauses in Development Contracts

By CodexierPublished 6 min read

Paying for software does not automatically make it yours. Under Swedish copyright law the person who writes code owns it, and a contract that is silent on the point leaves you with, at best, an implied right to use what was delivered. Founders discover this when they try to sell the company, raise money or move to a new developer and the buyer's lawyer asks for the assignment clause. This guide explains the handful of clauses that decide ownership, what each one should say, and the two exceptions that are normal and not a problem.

Ownership versus licence

An assignment (överlåtelse) moves the economic rights in the code to you. A licence leaves them with the supplier and gives you permission to use the code on stated terms, which may be exclusive or not, time-limited or not, and may end if the contract ends. For a product you plan to build a company on, you want the assignment. For a supplier's reusable framework, a licence is the honest arrangement. Most disputes come from contracts that use the word licence where the client assumed ownership, or that say nothing at all.

Pre-existing code and libraries

No agency writes every line from scratch, and you should not want them to. Authentication modules, deployment scripts, UI components and internal tooling exist before your project and will be used after it. The contract should name this category, keep it with the supplier, and give you a licence wide enough that you can run, modify and sell your product without asking permission.

CategoryWho should own itWhat you need in the contract
Code written specifically for your projectYou, by assignmentAssignment clause covering source, documentation, designs and data models
Supplier's pre-existing componentsSupplierPerpetual, irrevocable, royalty-free licence to use, modify and sublicense as part of your product
Third-party libraries and servicesTheir ownersA list with licence names, and an obligation to flag anything copyleft or paid
Your own material: brand, content, dataYou, alreadyConfirmation that the supplier gets only a licence to use it for the project

Open-source licences

Modern software is mostly open source held together by custom code, and the licences on those pieces travel with your product. Permissive licences such as MIT, BSD and Apache require little more than keeping the notice. Copyleft licences such as the GPL can require you to release your own source if you distribute the software, which matters for an installed app or an on-premise product and matters less for a web service you only host. The contract cannot change those licences; it can only make sure you know what is in the code.

  • A software bill of materials at delivery: every dependency with its licence, generated by tooling, not typed by hand.
  • A rule that no strong-copyleft component is used in code you will distribute without your written approval.
  • An obligation to keep licence notices and attribution files in the repository.
  • For AI-assisted code: a statement that the supplier reviews generated code for licence contamination and does not paste in code from unknown sources.

Transfer on payment

Suppliers reasonably want to keep ownership until they are paid, and clients reasonably want ownership of what they have paid for even if the relationship ends early. The fair mechanism is a transfer that follows the money: rights in each delivered milestone pass to you when that milestone's invoice is settled, and the source code is in a repository you control from day one.

Repository in your name

The code lives in a GitHub or GitLab organisation you own, with the supplier as a collaborator. If the relationship ends, you remove access; nobody has to hand anything over.

Milestone-by-milestone assignment

Rights in each delivery pass on payment of that delivery. A dispute over the last invoice cannot hold the whole product hostage.

Deliverables defined

Source code, build scripts, infrastructure configuration, database schema, design files and documentation. Without the list, you may own the code and still not be able to deploy it.

Clauses to ask for

You do not need a long contract; you need these points stated plainly. Put them in the order form or the statement of work if the supplier's standard terms are vague, because a specific document usually overrides a general one.

  1. Assignment of all intellectual property rights in project-specific deliverables to the client, effective on payment per milestone, including the right to modify and transfer.
  2. Supplier retains pre-existing material, listed in an appendix, and grants a perpetual, irrevocable, worldwide, royalty-free licence to use it within the product.
  3. Supplier warrants that deliverables do not infringe third-party rights and delivers a dependency list with licences.
  4. Source code, credentials and infrastructure are held in accounts owned by the client from the start.
  5. Moral rights: the developer's right to be named is waived to the extent Swedish law allows, so you can publish without attribution requirements.
  6. Confidentiality that survives the contract, covering your data, business logic and the code itself.

When you do not need to fight for this: a low-risk internal tool or a marketing site on a standard platform is fine on a licence as long as you can export the content and move. The full assignment matters when the code is the product, when investors or acquirers will do due diligence, or when you may switch developers. Our own development terms follow the structure above, with the repository in your organisation and assignment on payment, and the MVP development and deployment package is delivered that way; the pricing page has the details and you can book a call to ask how it applies to your project.

Frequently asked questions

The agency says everyone uses their standard terms. Can I still ask for an assignment?

Yes. Standard terms are a starting point, and most reputable suppliers already assign project-specific code on payment; if they refuse, ask what exactly they want to keep and why. A supplier who will not assign code you paid for in full is telling you something about the exit.

Do I own the code if the developer was a freelancer through a platform?

Only if the platform's terms or your own agreement include an assignment. Many platforms do include one on payment, but check the wording, and make sure the code is in a repository you own so the assignment is not theoretical.

What about code written by the supplier's employees?

Under Swedish law the employer normally holds the rights in software written by employees in the course of their work, so the supplier can assign it. Ask for a warranty that this is the case and that subcontractors have signed equivalent terms.

Is escrow of the source code an alternative?

Escrow addresses the risk that the supplier disappears; it does not give you ownership. If the code is in your repository from the start, you do not need escrow for that purpose. Escrow is mainly relevant when you license a supplier's product and need the source if they fail.

Have a contract in front of you and not sure what it says?

Fifteen minutes: walk us through the IP section and we will tell you what you would own, what you would not, and what to ask for before signing. We are developers, not lawyers, and we will say when you need one.

Book a free 15-minute call