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

# Merchants and checkouts

> An entry on the order. About one order in a hundred is on us, and the merchant is paid in full.

## What the buyer sees

> **Order #004821. Your order is on us.**
> 185.90 USDC back to your wallet.

<picture>
  <source media="(max-width: 639px)" />

  ![A checkout receipt: order #004821, total 185.90 USDC, paid; the merchant is paid in full. Then a notification from your wallet: Your order is on us, 185.90 USDC back to your wallet.](https://mintcdn.com/fade/pW-tKrlld5lR4Yeq/images/use-cases/checkout-light.svg?fit=max\&auto=format\&n=pW-tKrlld5lR4Yeq\&q=85\&s=7067b5749a94dc28031ab15ecde31659)
</picture>

The merchant is paid in full; Fade's vault pays the reward, and the business running the offer credits it to the buyer.

The sale stands and the buyer keeps the item. The vault pays out an amount equal to the order to the merchant or its checkout service, which credits it to the buyer. The buyer has won the order back.

## What the merchant gets

* **Paid in full, every time.** The merchant keeps the whole sale even when the order is on us: the reward comes from the vault, not from the sale.
* **Its own share of every entry.** The merchant's share (`appShareBps`) is its own to set, inside the margin the reward table declares. Zero for a promotion with the sharpest odds; a few percent to earn on every entry, for a few cents more per entry. It can change with every campaign.
* **An offer of its own design.** A reward table holds up to 32 reward levels, so the merchant chooses how often an entry wins and how much (see [Design the offer](#design-the-offer)).
* **No prize fund, no swings.** The vault carries who wins and when.

## Funded by the merchant

A checkout reward is funded by the merchant, out of its marketing budget: "1 order in 100 is on us". The buyer pays the normal price and nothing more, and the offer is designed as a sales promotion (see [Legal framework](https://docs.fade.finance/legal-framework.md)). The merchant gets a fixed, known cost per order, rather than the random cost of giving orders away itself.

It is a marketing product, and Fade's role in it is simple to state: the merchant pays a fixed share of sales, and the vault absorbs the variance of who wins and when.

## The arithmetic

The merchant funds about 1 % of a 185.90 USDC order: a cost of **1.92 USDC**. The reward table pays the whole order back or nothing, at a 3 % declared margin, the smallest at the base protocol share.

| | Value |
| - | - |
| Multiplier | `m = ceil(185.90 / 1.92 × 10 000) = 968 230` bps, 96.82× |
| Probability | `p = floor(9 700 × 1e9 / 968 230) = 10 018 280`, about 1 in 100 |
| Check | `p × m ≤ 9 700 × 1e9`: the reward table keeps its 3 % margin |
| Protocol share (200 bps) | 0.0384 USDC |
| App share | 0 in this example |
| Vault credit | 1.8816 USDC |
| Reward if won | 185.90016 USDC (`1.92 × 968 230 / 10 000`, rounded down) |
| Liability reserved | 184.02 USDC |

With no app share, the vault margin is 100 bps. On an idle vault, a 184 USDC liability fits the per-entry cap from about **36 850 USDC of assets** (the Kelly term binds first: 0.5 × 100 bps is 50 bps of the free balance, below the 150 bps bound on assets). A smaller vault backs a smaller order, or the same order at a smaller share. See [Reward tables](https://docs.fade.finance/build/reward-tables.md) for how to size a reward against the vault.

The merchant's cost is known in advance: 1.92 USDC per order, whatever happens. Once its cumulative volume lowers its protocol share to 1 %, the same offer at the 2 % minimum costs 1.90 USDC. Over many orders the vault pays back 97 % of the entry costs in rewards; the rest is the margin, split between the vault, the protocol and the merchant's share if it takes one.

## Design the offer

For the same cost, a merchant can trade how often an entry wins against how much it wins. Three offers on a 100 USDC order, at a 3 % declared margin:

| Offer | Outcomes | Entry |
| - | - | - |
| Your order, on us | 1 in 100 wins the order and the entry back | about 1.04 USDC |
| Half price, twice as often | 1 in 50 wins 50 USDC | about 1.03 USDC |
| A small win, often | 1 in 10 wins 10 USDC | about 1.03 USDC |

The rule behind all three is the reward table check: the expected reward of an entry may not exceed `(1 − margin)` times its price. Reward levels can also be mixed on one entry: "1 in 200 wins the order, 1 in 100 wins half" costs the same as "1 in 100 wins the order". Every reward level shares the same budget, so adding one means trimming the others.

## Who integrates

* Wallets, with a "1 order in 100 is on us" option on payments.
* Solana Pay checkouts and merchant platforms.
* Stablecoin card and payment apps.

## How it is wired

| Account | Merchant-funded |
| - | - |
| `integratorAuthority` | The checkout service's key, or its program's `["fade-integrator"]` PDA |
| `payer` | The checkout service: pays the SOL rent and fees, and gets the returnable part back. The buyer never needs SOL. |
| `funder`, `funderUsdc` | The merchant's promotion account, which signs |
| `recipient` | The merchant's or the checkout service's rewards account. That business credits the buyer. |
| `appShareBps` | The service's own share, within what the margin leaves |

The service signs the open with its own keys, in the payment's transaction or right after it, so the buyer signs only their own payment. The service hands the entry to a keeper, and the result lands a few seconds after the payment. See [Integration overview](https://docs.fade.finance/build/overview.md).

## Low entry costs

The program sets a minimum cost (1 USDC on devnet; the live value is in `Config`). Below the minimum, an app can accumulate small amounts into one entry, as round-up savings apps do.

## Wording

Say "won back" or "on us". Do not present the reward as money handed back: the sale is not cancelled, and presenting it that way may mislead buyers about what happened.

> [!NOTE]
>
> The business offering the reward runs it as organiser and is responsible for the rules of each market it serves. Fade is the technology provider. We recommend going over those rules with counsel before launch. See [Legal framework](https://docs.fade.finance/legal-framework.md) for the design rules and a summary by region.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.