# Fluense Merchant API

Fluense is social discovery with real cashback: shoppers pay at your store, recommend what they bought, and earn cashback when friends buy through them. The Merchant API gives you everything needed to accept payments, track sales, and see the cashback your store funds.

**Base URL** `https://api.fluense.social` — one API serves sandbox and live. Your credentials decide which environment a request touches.

## What you can do

- Organizations, team members and roles
- API keys scoped to sandbox or live
- Terminals identified by a terminal id (QR, NFC, link — encode it your way)
- Checkouts and charge capture (authorize -> capture)
- Voids and full or partial refunds
- Sales list and detail, cashback summary
- Signed webhooks for checkout and charge events
- Payouts to your bank account

## Credentials at a glance

| Credential | Header | Used for |
| --- | --- | --- |
| API key | `x-api-key: fl_test_…` or `fl_live_…` | Server-to-server: checkouts, capture, void, returns, terminal scans, payouts |
| Session token | `authorization: Bearer sess_…` | Merchant console endpoints: team, keys, sales, webhooks, payout list |

Keys are **environment-scoped**: a `fl_test_` key only reads and writes sandbox data, `fl_live_` only live data. See [Environments](/environments).

## The payment flow

1. Create a **checkout** for a cart (your key).
2. The shopper **authorizes** it in the Fluense app (their session) — a 7-day hold.
3. You **capture** the charge (your key) — money moves, fees and cashback post.
4. Refund later with a **return** if needed; receive **webhooks** for every step.

## For LLMs and agents

These docs are built to be read by machines:

- [llms.txt](/llms.txt) — an index of every page with descriptions.
- [llms-full.txt](/llms-full.txt) — every page concatenated in one markdown file.
- Append `.md` to any page URL for raw markdown, e.g. `/checkouts.md`.
- Or send `Accept: text/markdown` to the same URL and get markdown instead of HTML.

## Links

- Merchant console: https://business.fluense.social
- Storefront (demo): https://store.fluense.social
- API health: `GET https://api.fluense.social/health`
