Building your own affiliate program for your products

November 21, 2026

Updated:

Guide
Building your own affiliate program for your products

What is your own affiliate program?

An affiliate program (affiliate marketing) run by the product owner is a set of rules and tools that allows others to introduce customers via their own link, then earn commission on paid orders: you decide the commission rate, recognition period, fraud prevention, payout schedule, and terms. This post is written from the angle of program owner; the angle of someone doing affiliate for other software is in the post Earn your first 1000 USD with B2B SaaS affiliate. This post does not promise that an affiliate program will bring revenue: OPCAIOS has built the technical part but has no partner data or affiliate revenue to report. Tax and legal sections are for reference only, not legal advice. The post covers how to design commission, recognition period, fraud prevention, payouts, terms, requirements to disclose affiliate relationships, taxes, and real experience when OPCAIOS built its own program.

Diagram of self-built affiliate program: partners share links with codes, customers click the link and are recognized by cookie, customer pays an order, system creates a commission pending approval, holding time to process refunds, approve commission, partner requests withdrawal, program owner transfers money
From introduction link to payout: each step has a rule that needs to be written clearly. Diagram: OPCAIOS.

When should you build your own affiliate program?

Building your own affiliate program makes sense when the product already has real buyers, has enough profit margin to share, and has people ready to introduce it (former students, satisfied customers, content creators in the same field). If the product does not sell for you yet, affiliate cannot fix that problem: partners only amplify a product that already has a reason to buy. The other option is to use a ready-made affiliate platform, in exchange you pay a fee and depend on the platform's rules. Building your own gives you control over customer data, commission rates by product type, and ties it directly to your existing payment system (for example collect payment via QR code bank transfer through SePay). The cost is that you take responsibility for detecting fraud, reconciliation, and paying on time.

How do you design commission for each product type?

Designing commission means making three decisions in order:

  1. First, the form of commission: percentage of the order or fixed amount per order.
  2. Next, once or recurring: membership packages or subscriptions raise the question of whether to pay each renewal for a number of months, or only the first period.
  3. Finally, the rate by product type: digital products with low marginal cost (templates, courses) usually can bear higher rates than hands-on services, because services take the owner's labor hours.
Choice Advantage Risk
Once per first order Simple, easy to reconcile Partners have little incentive to introduce long-term customers
Every order in N months Rewards repeat customers Must track customers over time
Recurring per renewal period Works with subscriptions Payout extends over time, needs a cap
Rate by product type Matches each type's profit margin Longer terms, needs clear table

The calculation should clearly state "on the amount the customer actually pays", after discounts, to avoid disputes when there are promo codes. Do not publish commission levels before calculating profit margin: a published number is very hard to take back.

How should you set the cookie period and recognition rules?

The recognition period (cookie window) is the time from when a customer clicks the link to when the order still counts for the partner; recognition rules decide who gets credit when a customer clicks multiple people's links. There are two common ways:

  1. First-click wins: a later link does not overwrite the code already in place. Fair to the person who introduced first, hard to be "stolen" at the last step.
  2. Last-click wins: the order belongs to the nearest link. Rewards the closer, but easily abused when partners insert a link on the discount code page.

A cookie only lives in one browser. A customer who clicks the link on a phone then buys on a computer will lose the tracking, unless the system ties the referral code to the customer's profile right when the customer leaves an email or phone number. Real example in OPCAIOS source code: cookie holds the code for 60 days, first-click wins, and orders within 12 months from recognition are counted (these levels are the current settings and can change). State the rules clearly in the terms so partners understand why some orders are not counted.

How do you prevent affiliate fraud with what rules?

Preventing affiliate fraud means setting rules and checks so that commissions are only paid for real new customers, real orders, and not refunded ones. Common types of fraud and how to block them:

  1. Self-referral: partners buy through their own link to get commission like a discount. Block by matching the buyer's email or phone number with the partner, and forbid it in the terms.
  2. Refund after receiving commission: set a hold time longer than the refund deadline, for example 14 days if the refund policy is 7 days; if the order is refunded then cancel the unpaid commission.
  3. Fake orders, fake customers: only count orders actually paid for, not free signups; watch for anomalies like many orders from the same person in a short time.
  4. Running ads on your brand keywords: partners get between customers already planning to buy and your site. Forbid it clearly in the terms.
  5. Spam and false promises: harm your product's reputation. Review partner profiles based on the channels they will promote through, and have the right to terminate.

Manual commission review in the early stage helps you spot fraud patterns before turning it automatic.

What does paying commission require?

Payment is the step that damages the program's reputation fastest if slow or unclear. Write clearly four parameters: hold time before review, minimum balance to withdraw, payment method (bank transfer is common in Vietnam), and deadline to transfer after the partner requests. Give partners a private page to see clicks, orders, pending commission, approved, paid; that way you spend less time answering "where is my order". Referral links can go through a shortened link system with stats if you want to measure by each channel.

What sections should an affiliate program's terms have?

An affiliate program's terms is the document partners agree to when signing up, setting out benefits and forbidden behavior. At minimum: commission rates by product type and calculation method; attribution period and first-click or last-click rules; hold time, minimum balance, payment schedule; forbidden behaviors (self-referral, spam, brand keyword ads, false promises); commission cancellation when refunded; request partners disclose the affiliate relationship; right to change terms with notice and right to terminate; tax responsibility of each side. For legal issues when running one-person business, see more legal checklist for solopreneur.

Why must you ask partners to disclose the affiliate relationship?

Disclosing the affiliate relationship means partners tell readers clearly that they get commission when readers buy through the link. According to the FAQ on product endorsement guides from the US Federal Trade Commission (FTC), read 25/10/2026:

  1. Disclosure must be clear, easy to see and placed near the endorsement.
  2. The word "affiliate link" standing alone is not enough; FTC suggests a sentence like "I get commission when you buy through the link in this post".
  3. The advertiser should have a reasonable program to guide and monitor the network of endorsers.

Rules in Vietnam and each social media platform may differ; we have not verified specific documents, so put a disclosure requirement in the terms as a minimum standard.

What should you watch for with taxes when paying affiliate commission?

This section is for reference only, not tax advice. According to sources citing Circular 111/2013/TT-BTC (point i section 1 Article 25), organizations paying wages, fees of 2 million dong per time or more to resident individuals not under labor contracts (or contracts under 3 months) must withhold 10% before paying. The Personal Income Tax Law revised effective in 2026 may change this rule; we have not verified the rule currently in effect. Ask your accountant about withholding, documents and how to record commission before paying the first amount, and note the partner's tax responsibility in the terms.

OPCAIOS's Experience

OPCAIOS's partner program is a technical system built in-house on opcaios.org, on the /doi-tac page, integrated with an internal CRM and programmed by an AI agent. What exists in the source code: referral links with codes recorded using 60-day cookies following the first-referrer-wins rule; the code is attached to a customer's profile when they leave an email or phone number; commissions are calculated by order type (courses, digital products, membership, services) on all paid orders within configured months; self-referral prevention through email and phone matching; a scheduled task that cancels unpaid commissions when orders no longer have paid status; commissions are approved after a holding period; partners have a private page to view clicks, commissions, and submit withdrawal requests with a minimum balance.

Actual status (checked 25/10/2026): the /doi-tac page is open for registration with commission rates of 30% for courses, 20% for shop, 20% for membership, 10% for services, with a 14-day holding period and a minimum withdrawal of 200,000 đồng; these rates were initially set by the AI agent when programming and may still be adjusted. OPCAIOS has not disclosed the number of partners, referral clicks, or commissions paid. OPCAIOS does not have partner data, orders via affiliate, or affiliate revenue figures to publish. The lesson we learned: the code part is fast; the slow part is business decisions (what ratio still makes profit), and that decision should not be delegated to AI.

Frequently Asked Questions

Should I choose one-time commission or recurring commission?

One-time commission on the first order is simplest and easiest to reconcile, suitable for products purchased once like courses or document templates. Recurring commission works well with membership packages or subscriptions, since partners are motivated to introduce customers who stay longer. If you choose recurring, set a cap on the number of months so the amount owed doesn't stretch indefinitely. A middle ground is to calculate all of a customer's orders within a certain number of months from when they arrive via the link. Whichever you choose, calculate based on the amount the customer actually paid and check the profit margin for each product type before publishing.

What cookie duration is reasonable?

There's no one right number for all products. Low-price products with quick decisions can use a short duration; high-price courses or services where customers deliberate longer need a longer duration. More important than the number is stating the rules clearly: whether the first or last clicker is counted, and that cookies only work on one browser. Attaching the referral code to a customer's profile when they leave an email or phone number helps preserve credit when customers switch devices. Track the actual time span from click to purchase and adjust accordingly.

How do I prevent partners from buying through their own links?

Ban self-referral in your terms and check with systems: match the buyer's email and phone number against partner information, and don't create commission when they match. Add a holding period before approval to catch unusual orders and refunds. In the early stage, manually approving commissions helps you spot fraud patterns before automating. If you find violations, cancel unpaid amounts and end the relationship per signed terms.

Must partners disclose "affiliate link"?

The U.S. FTC requires clear, prominent disclosure placed near the endorsement, and considers "affiliate link" alone insufficient; plain language like "I earn commission when you buy through this link" works better. Regulations in Vietnam and on each platform may differ, and we haven't verified specific texts. Regardless of what the law where you operate requires, putting a disclosure requirement in your terms is good for your product's reputation: readers who discover hidden relationships lose trust in both the partner and you.

Do I need to learn programming to build my own affiliate program?

Not necessarily. You can start manually: unique discount codes for each partner, a monthly spreadsheet for reconciliation, manual transfers. As your partner count grows, the code part (links with codes, cookies, commission calculation, partner page) can be built with a programming agent if you check each step carefully. What you don't delegate to AI is business decisions: commission rates, terms, and dispute handling. To learn how to safely use AI to build systems like this, see OPCAIOS's AI Application Training course.

Source: FTC, "FTC's Endorsement Guides: What People Are Asking" (read 25/10/2026); summary pages citing Circular 111/2013/TT-BTC Article 25 (read 25/10/2026). Not verified: current personal income tax regulations after the 2026 law amendment, advertising disclosure regulations in Vietnam. Tax and legal matters are for reference only, not legal advice. The experience is OPCAIOS's.

Translated from Vietnamese with AI. Read the original.

Want to apply this in your business?

Book a free 30-minute call (Vietnam time, in English or Vietnamese).

Book a call