> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tagada.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Operating modes

> Merchant of Record (affiliate) vs Direct Merchant — who sells, who processes, who owns compliance, and how commissions flow.

# Operating modes

Tagada Rx runs in one of two modes, chosen **per store at activation time** (`operatingMode`). They answer one question differently: **who is the merchant on the patient's card statement?**

<CardGroup cols={2}>
  <Card title="Merchant of Record — `affiliate`" icon="building-shield">
    **Tagada carries the regulated relationship.** Your brand runs on TagadaRx infrastructure (LegitScript, clinical network, pharmacy). You keep 100% of your e-commerce margin — Tagada charges **6.9% of GMV** (processing included). Clinician and pharmacy costs pass through at cost.
  </Card>

  <Card title="Direct Merchant — `direct`" icon="store">
    **You are the merchant.** Same stack, your own LegitScript and rails. Coming soon at **4.9% of GMV** (processing included) plus a \$4,980 setup. Clinician and pharmacy costs pass through at cost.
  </Card>
</CardGroup>

***

## Side by side

|                          | Merchant of Record (`affiliate`)                                               | Direct Merchant (`direct`)           |
| ------------------------ | ------------------------------------------------------------------------------ | ------------------------------------ |
| Seller of record         | Tagada                                                                         | Your company                         |
| Payment processing       | Tagada's Rx processing stack                                                   | Your MIDs on TagadaPay               |
| Card statement           | Tagada marketplace descriptor                                                  | Your descriptor                      |
| Storefront hosting       | Subdomain on the marketplace domain (e.g. `yourbrand.tgdcare.com`) or your own | Your own domain                      |
| LegitScript / compliance | Carried by Tagada                                                              | Your responsibility (we assist)      |
| Your revenue             | Full order revenue minus 6.9% of GMV                                           | Full order revenue minus 4.9% of GMV |
| Chargebacks & refunds    | Tagada's book                                                                  | Your book                            |
| DEA-controlled products  | **Not allowed**                                                                | Allowed where compliant              |
| Time to launch           | Days (no merchant onboarding)                                                  | Depends on your KYB / MID setup      |

<Tip>
  **Rule of thumb:** start in **affiliate** mode to validate a vertical with zero payment/compliance setup, then graduate to **direct** mode once volume justifies owning the merchant relationship. The storefront code is identical in both modes — switching is a backend concern.
</Tip>

***

## How affiliate commissions work (legacy)

<Note>
  New stores have **no commission terms**: you keep the residual after Tagada's 6.9% take (processing included) and medical pass-through at cost. The affiliate ledger below only applies to legacy marketplace agreements that pre-date this pricing.
</Note>

In legacy marketplace agreements, economics are defined by **affiliate terms** — a versioned contract stored on the store and managed by your Tagada account manager:

| Basis                 | Meaning                                   | Example                    |
| --------------------- | ----------------------------------------- | -------------------------- |
| `order_subtotal_bps`  | Basis points of the order subtotal        | 1500 bps = 15% of subtotal |
| `order_net_bps`       | Basis points of the net (after discounts) | 1200 bps = 12% of net      |
| `flat_per_case_minor` | Flat amount per case, in minor units      | `2500` = \$25.00 per case  |

The lifecycle is automatic:

<Steps>
  <Step title="Accrual at submission">
    When a case is successfully submitted to the clinical network, the commission is computed and posted to your affiliate ledger (double-entry, idempotent per case). The amount is returned in the `rx.submitCase()` response as `accrualAmountMinor`.
  </Step>

  <Step title="Reversal on decline">
    If the clinician declines the case, the accrual is automatically reversed — you're never paid for care that didn't happen.
  </Step>

  <Step title="Payout">
    Accrued commissions are settled to you on the agreed payout schedule.
  </Step>
</Steps>

You can read your current terms with `GET /api/v1/rx/brand` (they ride along the brand config) and see the per-case accrual on every case detail. Terms are **write-restricted to account managers** — contact yours to negotiate changes.

<Warning>
  **Compliance guardrail:** in affiliate mode, products flagged `isDeaControlled` are rejected at case submission. If your catalog needs controlled substances, you must run in `direct` mode.
</Warning>

***

## How direct mode works

Direct mode is regular TagadaPay economics plus the Rx orchestration layer:

* Orders settle to **your** processing accounts, with the full multi-MID routing, cascade, and rebill engine you already know.
* The clinical network and pharmacy fees pass through at network rates.
* You own the storefront domain, the brand, the customer relationship, and the regulatory posture (LegitScript certification, state rules). Tagada assists with the LegitScript application as part of onboarding.

There is no commission ledger in direct mode — `rx.submitCase()` returns `accrualAmountMinor: 0`.

***

## Choosing at activation

The mode is passed when you request activation and cannot be changed silently afterwards (it defines the processing setup):

```ts theme={null}
await tagada.rx.requestActivation({
  storeId: 'store_xxx',
  clinicalNetworkSlug: 'mdi',
  operatingMode: 'affiliate', // or 'direct'
});
```

In the CRM the same choice appears as **"Marketplace — Tagada is merchant of record"** vs **"Direct — you are the merchant"** on the activation card. See [Activate in the CRM](/developer-tools/rx/crm-activation).
