// contracting · law · peru
The software development contract in Peru (and who ends up owning the code)
There is a widespread belief among people who commission software in Peru: that paying for the work makes you the owner of the code. It does not, and the surprise usually lands at the worst moment — when you want to change provider, when you ask for the repository, or when the system needs modifying and you find you have no right to touch it.
D.L. 822
the statute that protects software as a work
Express assignment
without it, payment transfers no rights
6 things
to assign beyond the source code
Inalienable
moral rights, which nobody can sign away
Facing this right now? We have solved it in production.
See how we do it →Paying for the service is not buying the work
In Peru, Legislative Decree 822 —the Copyright Law— protects a computer program as a work, in both its source and object versions, provided it is original. And it protects the work in favour of its author.
That means the service contract and the ownership of the work are two different things. You pay for a development service and you receive that service. The economic rights over what was built remain the author's until they are assigned, and the assignment happens through an express act, not through the fact of having paid the invoice.
This is not a lawyer's technicality: it decides whether in three years you can take your system to another team, or whether you have to negotiate that with whoever wrote it.
What can be assigned and what cannot
Peruvian copyright separates two blocks. Economic rights —reproducing, modifying, distributing, exploiting the work— are the ones that transfer and the ones you need.
Moral rights —recognition of authorship, among others— are inalienable. Nobody can assign them even by signing, and a contract that claims to is promising something the law does not allow. Your provider keeping authorship takes nothing from you operationally: you can still use, change and exploit the system.
The real warning sign is the opposite: a contract that says nothing about economic rights. Silence does not work in your favour — it works in the author's, which is what the statute protects by default.
What to assign beyond the source code
A clause that assigns “the software” and nothing else leaves you with a repository you may not even be able to deploy. This is what it actually takes to run and change the system.
| What | Why it matters |
|---|---|
| Source code | Without it you cannot change anything without going back to whoever wrote it. |
| Technical documentation | What lets another team understand the system instead of rebuilding it. |
| Designs and prototypes | Also protected works, and almost always forgotten. |
| Database model | The schema and the migrations — your data without its structure cannot be operated. |
| Scripts and pipelines | What deploys the system. Without them you have the code but no way to ship it. |
| Infrastructure as code | The environment definition. It is the difference between being able to change provider or not. |
The assignment should also state its scope: whether it is exclusive or not, for which territory, for how long and for which forms of exploitation. “Assigns the rights” on its own leaves far too much open.
The clauses that decide the project, not just ownership
what has to be in writing
- Scope and deliverables, with acceptance criteria — what counts as finished and who declares it.
- Milestones and payments tied to deliverables, not to calendar dates.
- Post-delivery warranty: how long it lasts and what exactly it covers.
- Confidentiality, in both directions and with a term.
- What happens if the project stops: who keeps what at that point.
- Environments, credentials and repository access from day one, not at the end.
- Assignment of economic rights, express and itemised.
If you are a public entity
That case has an extra layer. State entities usually require the assignment in broad terms —non-exclusive, unlimited, perpetual, worldwide exploitation, including reproduction, public communication, distribution and modification— and that has to be in the tender documents before signing, not negotiated afterwards.
If you are preparing the procurement, the piece that comes first is the requirements document. We work through it in how to write a TDR for custom software, which is where you define what you are contracting before discussing on what terms.
The mistakes we see
The most common is the downloaded template used as is. Many of the ones circulating are written for Argentina, Colombia or Spain, and plenty of others live on student-notes sites with no guarantee whatsoever. They are useful for understanding the structure; not for signing.
The second is leaving the assignment for the end, once the project is delivered and your negotiating position is the opposite one. The third is confusing access with ownership: being handed the repository does not mean you have the right to exploit it.
This does not replace a lawyer
We are engineers, not lawyers, and this article explains how the ground works so you know what to ask — it is not legal advice. To draft or review an actual contract, have a Peruvian lawyer specialising in intellectual property look at it.
What we can tell you from the technical side is what should be handed over for the system to genuinely be yours and operable. On our projects the code is 100 % the client's, and that sentence only means something if the contract spells it out.
Sources
Frequently asked questions
If I pay for the software, is the code mine?
Not automatically. Under Peru's Legislative Decree 822 a computer program is a protected work and its economic rights belong to the author until they are assigned. Paying for the service buys you the service; it does not by itself transfer the rights over the code. That transfer has to be written into the contract.
What is the difference between economic and moral rights?
Economic rights —reproducing, modifying, distributing, exploiting the work— can be assigned, and that is what a proper clause transfers to you. Moral rights, such as being recognised as the author, are inalienable under Peruvian law: nobody can sign them away, and no contract should claim to.
What exactly should the assignment cover?
Not only the source code. Documentation, designs, database schemas, scripts, deployment pipelines and infrastructure as code are all part of what you need in order to actually operate and change the system later. A clause that says only 'the software' leaves out the pieces that make it maintainable.
Is a template contract enough?
As a starting point, not as the final document. Templates circulating online are mostly written for other countries, and the ones on student-notes sites carry no guarantee at all. Use one to understand the structure, then have a Peruvian lawyer adapt it to your project.
About to contract a development?
We tell you what to ask for and what should be delivered, in the language of the project. You talk to the engineer, not a sales rep.
