Use case · Affiliate program

Launch an affiliate program.Track every sale for thousands of partners, at any volume.

Trail & CoPartnersNovember

Your earnings

€330.50+18%

Nov 1Nov 30

trailandco.shop/r/aliceCopy

2 140clicks

34sales

10%commission

  1. SaleSigned by Trail & Co€120through Alice’s link
  2. SaleSigned by Trail & Co€95through Alice’s link
  3. Refund, shoes returnedSigned by Support−€9.50commissionnew record

The build

Everything an affiliate program needs. You know the app you want. Your team builds it from BaaS SDK, with no server to run.

Authentication

Affiliates join in seconds

Face ID, fingerprint, Google or a hardware key. No password.

Trail & Co Partners

See your sales and commissions

Sign in with Face IDSign in with fingerprintSign in with GoogleSign in with a hardware key

Smart contract

The rules of the program

Who may record a sale, refund it or pay a commission, written once in Solidity and kept with the data.

AffiliatesWho can do it

  • Record a saleTrail & Co
  • Refund a saleSupport
  • Pay the commissionsFinance
  • Delete a saleNo one
See Affiliates.sol
contract Affiliates {
    struct Sale { address affiliate; uint amount; uint rate; }

    // every sale through a link is recorded as it is paid
    function recordSale(address affiliate, uint amount)
        external onlyMerchant { … }

    // a refund is a new record: the sale stays
    function refund(uint sale) external onlySupport { … }

    // what an affiliate is owed: her sales, less refunds
    function owed(address affiliate) external view returns (uint) { … }
}

CLI and SDK

Deployed in one command

Write the contract, deploy it with one command, and call it from your app in one line.

$ baas deploy  → live on SealDB

app.ts

// what Alice is owed this month
const owed = await affiliates
  .function('owed')
  .params(alice)
  .read();

SealDB

Every sale on record

Written as it is paid, on your project’s own blockchain, where each affiliate can check theirs.

SealDBNo gas fees

  1. Block 52 1161 recordnow
  2. Block 52 1156 records3s
  3. Block 52 1143 records6s

Alice’s November, read from her sales€330.50

Automations

Affiliates paid on time

At the end of each month, every affiliate is paid and sent their statement, with no worker to host.

Trail & Co PartnersnowYou were paid €330.50November: 34 sales, listed one by one
Month closedOn
  1. WhenThe month endsnowsales past the 30-day return window
  2. ThenPay each affiliate€330.50 to Alice
  3. Email their statementevery sale, one by one

Run 11214 affiliates paid

Why BaaS

No sale ever disappears. Every sale is written for good. A refund adds a record, and nothing is ever erased.

On a usual database

-- Trail & Co, full access
DELETE FROM sales
WHERE affiliate = 77;

Success · 34 rows deleted

Alice’s 34 sales are gone, and her €330.50 with them. Whoever runs the database can do this, and rewrite the log too.

On blockchain

// Trail & Co, full access
await affiliates
  .function('deleteSales')
  .params(alice)
  .sendTransaction();

Reverted · a sale can only be refunded

Every sale recorded for Alice stays, and she can check each one.

Good to know

The questions people ask first.

What does it cost?
Free to start: 90 compute hours and 0.5 GB a month, no credit card, no gas fees. Then from €99 a month plus the hours it runs; idle time is never billed.
Where does the money go?
To your payment provider. BaaS keeps every sale and commission on record; at the end of the month an automation pays each affiliate through it.
Do I replace my stack?
No. Call BaaS from your React or Next.js app, next to what you run today; names and emails stay where you keep them.
Can my coding agent build it?
Yes. Connect it to your project’s MCP: it reads the docs, writes the contract and sets up the automations, then deploys with the CLI.
Can an auditor check it?
Yes. Seal the record on Ethereum as well, and anyone can verify it without trusting you.

Three steps

Your first app starts free. Get started in three steps. No credit card needed.

  1. 1

    Create a project

    Sign-in, automations and your own blockchain, ready to use.

  2. 2

    Connect MCP

    Use Claude Code, Codex or build it yourself.

  3. 3

    Build your app

    Code with the SDK, then deploy from the CLI.

Start free

Free plan, no credit card.