Freelance IP guide

Should a Freelancer Hand Over Source Code Before Payment?

Check your contract

Handing over source code before payment can be a reasonable part of an agreed delivery process, but check what you are committing to before signing. The key is to understand when the client receives the code, when payment becomes due and when ownership rights transfer.

Those events do not have to happen together.

Could the client receive and use the finished code while I am still waiting to be paid?

Delivery, payment and ownership are separate

Read the agreement for three different triggers:

  • Delivery: when you must provide the source code, repository access or agreed project files.
  • Payment: when you can invoice, what starts the payment period and when the money is due.
  • Ownership: when any agreed transfer of intellectual-property rights takes effect.

Access to a repository is a technical permission. An assignment transfers ownership of specified rights. A licence gives permission to use work under particular conditions.

For UK copyright, transferring ownership requires a signed written agreement. The rules and contractual effect can differ elsewhere. See the UK government’s guidance on copyright licensing and transfers.

Do not assume that “delivery on completion” means “after payment”, or that retaining ownership necessarily prevents every use by the client.

For the timing options, see When Should IP Transfer to a Client: Delivery or Payment?.

Example: code delivered, payment still outstanding

Consider this fictional £6,000 project:

  • £2,000 is paid upfront;
  • the final source code must be delivered on completion;
  • the remaining £4,000 is due 30 days after written client acceptance;
  • the contract gives no deadline for that acceptance.

You finish and deliver the code, but the client takes three weeks to approve it. Under that timetable, payment falls due 30 days after those three weeks, rather than 30 days after delivery.

You have handed over the code while £4,000 remains outstanding. You must separately check whether ownership has already transferred and what use the client is permitted to make of it.

Questions worth raising include:

  • How long does the client have to review the delivery?
  • Must a rejection explain which agreed requirements have not been met?
  • What happens if the client does not respond?
  • Can payment be linked to defined milestones rather than a single final acceptance?

For the approval process, see Can a Freelance Client Reject Work Indefinitely?.

Agree the handover sequence before starting

Possible arrangements to discuss include:

  • staged payments and delivery for defined milestones;
  • a deposit that reduces the unpaid balance at final handover;
  • a defined review period and clear acceptance criteria;
  • delivery before payment, with ownership transfer conditional on payment and permitted use expressly addressed.

These are commercial options, not standard terms suitable for every project.

An ownership condition does not guarantee payment or remove the need to pursue an unpaid invoice. If the agreement is already signed, do not assume you can change the handover terms or withdraw access unilaterally.

Who controls the repository?

If you work in the client’s repository from day one, the client may already have the code before formal completion.

Check:

  • who controls the repository and administrator permissions;
  • whether code is delivered continuously or at milestones;
  • what final handover adds, such as documentation, build instructions or deployment files;
  • whether the payment schedule reflects that ongoing delivery.

Repository control and legal ownership should be considered separately.

Protect pre-existing code and third-party materials

Identify reusable libraries, frameworks and tools you brought to the project. Check whether the agreement distinguishes them from client-specific deliverables and describes any licence the client needs to use them.

Third-party components, including open-source dependencies, have their own licence terms. Handover should not promise ownership of material you do not own.

See Can a Client Own My Pre-Existing Templates and Tools?.

Map the rights before you agree to handover

MaterialWhat to checkQuestion to raise
Code created for this projectThe exact deliverables, when rights transfer, and use before the final paymentDoes the agreement say what the client receives at each payment or acceptance milestone?
Your existing code and toolsWhether a broad “all work” clause captures code you already ownedCan the agreement identify what you retain and what licence the client needs to use the deliverable?
Third-party and open-source componentsWhether the promised assignment conflicts with rights or licence terms you do not controlAre these components excluded from any promise to transfer ownership, with their applicable licences identified?

The same agreement may address all three differently. Check the definitions of “work product”, “background IP” and “deliverables” alongside the payment, acceptance and handover clauses. If a clause is unclear, ask for clarification before signing.

Credentials and infrastructure

Distinguish source-code delivery from transferring operational access, including cloud administration, domains and signing keys.

Agree which project accounts or permissions must be transferred, who receives them and how the handover will be performed securely. Avoid treating shared personal credentials as project deliverables.

Questions to ask before signing

  • When must I deliver the source code?
  • What starts the final-payment clock?
  • Can client approval delay that clock indefinitely?
  • When do ownership rights transfer?
  • What use is permitted before full payment?
  • Are existing libraries and third-party components treated separately?
  • What repository access, documentation and operational permissions must I provide?
  • What happens to unpaid work if the project ends early?

Before agreeing to handover, make sure you can explain the delivery, payment and ownership sequence in plain English.

PactRivet helps you examine payment and intellectual-property wording in your freelance service agreement and prepare questions to raise with the client.

Check the payment and ownership terms in your development agreement.

Related guides

Check your own agreement

Check my contract

PactRivet provides general information and questions to consider. It is not legal advice.