# Status codes

> What each status from the conversion endpoint means – and what to do about it.

Every sale reported to Affilyflow gets a status. You see it in the response from the [conversion endpoint](https://www.affilyflow.com/docs/en/reference/conversion-api) (`{ "status": "…" }`) and in the live test under Setup in the store dashboard. Many statuses are perfectly normal – only some mean the setup needs fixing.

## Recorded

| Status | Meaning | What to do |
|---|---|---|
| `ok` | The sale is recorded and attributed to an affiliate – or to the store's test link, if it was a test purchase. It now awaits the store's approval. | Nothing. |

## Normal – not counted

| Status | Meaning | What to do |
|---|---|---|
| `duplicate` | The same order number came again in the same program and wasn't counted twice – e.g. a reloaded receipt. | Nothing. If it happens on every sale, check that the order number isn't the same every time. |
| `expired` | The click is older than the program's cookie window. The window is locked on the click. | Nothing. When testing: open the test link again and buy right after. |
| `unknown` | The click ID doesn't exist – deleted, wrong or never recorded. HTTP 404. | Check that you send the click ID unchanged (`c_…`). When testing: open the test link again and buy in the same browser. |
| `blocked` | The store has blocked the affiliate, so the sale earned no commission. | Nothing. |
| `suspended` | The affiliate is suspended, so the sale earned no commission. | Nothing. |
| `store_inactive` | The store is set to inactive, so the sale earned no commission. | Write to info@affilyflow.com if it is a mistake. |

## Fix the setup

| Status | Meaning | What to do |
|---|---|---|
| `store_mismatch` | The click belongs to a different store than the one the sale was reported for. | Check that `data-store` (or `store`) is your own store ID from Setup. |
| `invalid_value` | The amount was negative. | Send the goods amount after discount, excluding VAT and shipping, as a positive number. |
| `zero_value` | The program pays a fixed amount per sale, but the order was 0. | Check that the amount comes through. On the receipt: check the amount field. |
| `value_too_high` | The order was above the program's amount cap (50,000 in the settlement currency by default) and wasn't recorded. | Check that the amount wasn't sent in cents. If it is a real sale, write to info@affilyflow.com. |
| `unsupported_currency` | The currency couldn't be converted: the code isn't three letters, or there is no rate from the last 10 days. | Send an ISO 4217 code such as `DKK` or `EUR`. If the code is right, write to info@affilyflow.com. |
| `stale_lead_trigger` | A lead (an order number starting with `lead_`) was reported to a program that pays per sale. | Remove the lead code or `data-lead-url`, and use the sale code. |
| `program_inactive` | The program was paused when the sale came in. | Turn the program back on if the pause wasn't intended. |
| `not_joined` | Only for legacy links without a click ID: the affiliate hasn't joined the program. | Nothing – the affiliate needs to use a link from their dashboard. |

## Rejected under the rules

These sales are recorded but shown as rejected with the reason – without commission, fee or notifications.

| Status | Meaning | What to do |
|---|---|---|
| `self_referral` | The buyer's email is the same as the affiliate's (terms §7). Requires the integration to send `buyer_hash`. | Nothing. |
| `rule_breach` | The click broke the program's rules – a coupon site, forbidden paid search or a channel the program doesn't allow. Only when Affilyflow enforces program rules. | Nothing. The store sees the breach under Rule breaches. |

## Endpoint errors

| Status | HTTP | Meaning | What to do |
|---|---|---|---|
| `error` | 400 | Neither a click ID nor `aff` + `store` was included. | Send `afid`. |
| `error` | 500 | Recording failed. The sale may not be saved. | Try again with the same order number – a duplicate isn't counted twice. |
| `rate_limited` | 429 | Too many calls from the same IP address. | Wait a moment and try again. |
| `too_large` | 413 | The body was over 64 KB. | Send fewer item lines. |

## From the integrations

The Stripe webhook, the WooCommerce plugin and the Shopify app report sales too, and these statuses can appear in their events:

| Status | Meaning |
|---|---|
| `no_affiliate` | The sale came without a click or affiliate – a normal sale. |
| `not_recurring` | A subscription renewal where the click didn't qualify for subscription commission. |
| `first_rejected` | A renewal of a subscription whose first sale was rejected – no commission. |
| `cap_reached` | The subscription has reached the number of payments that earn commission. |
| `test_mode` | Stripe in test mode isn't booked. |
| `unpaid` | The payment wasn't completed. |
| `unattributed` | Shopify: a purchase without a click ID while the store is testing. Only the time is stored, and it is never credited. |

For Stripe, `unknown` and `expired` are common: a checkout without an affiliate has no click.

Kilde: https://www.affilyflow.com/docs/en/reference/status-codes
