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

> ## Agent Instructions
> Treat these docs and the Whop MCP server as the source of truth for Whop API behavior. Don't infer endpoint behavior from marketing pages.
> MCP server: connect https://mcp.whop.com/mcp (streamable HTTP, browser sign-in, no API key in the client config) to search these docs and read or change live Whop data. Setup: https://docs.whop.com/developer/guides/ai_and_mcp.md
> Whop CLI: install with `curl -fsSL https://whop.com/install.sh | sh` to scaffold, run, and deploy Whop apps and websites. It acts on production, not the sandbox. Overview: https://docs.whop.com/cli/overview.md Agent mode: https://docs.whop.com/cli/agent-mode.md
> Hosting: Whop serves a site or app from the build `whop apps deploy` uploads, with rollbacks, secrets, and server logs. Guide: https://docs.whop.com/developer/websites/hosting.md
> Plugins: in Claude Code, run `/plugin marketplace add whopio/plugins`, then `/plugin install whop@whop`. Guide: https://docs.whop.com/developer/guides/plugins/claude-code.md Every agent tool: https://docs.whop.com/developer/ai/overview.md
> Environments: build and test in the sandbox (API `https://sandbox-api.whop.com/api/v1`, keys at https://sandbox.whop.com/dashboard/developer, SDK environment `Sandbox`; no real money). Production (API `https://api.whop.com/api/v1`, keys at https://whop.com/dashboard/developer, SDK environment `Production`, the SDK default) moves real money, so use it only at launch. The two share no accounts, keys, products, or webhooks, and their keys look identical: never mix them. Sandbox guide: https://docs.whop.com/developer/guides/sandbox.md Comparison: https://docs.whop.com/developer/quickstart.md
> API: send `Authorization: Bearer <API_KEY>` from your server only, and pin a dated version with the `Api-Version-Date` header. OpenAPI spec: https://api.whop.com/api/v1/openapi.json
> Which API: build on the Current API, whose pages live under https://docs.whop.com/api-reference/ (start at https://docs.whop.com/api-reference/overview.md). Pages under /api-reference/legacy/ are the Legacy API. Use one only when https://docs.whop.com/api-reference/stability.md lists the resource as Legacy-only.

# Cashback Rules API

> En Cashback Rule betaler en platforms direkte underkonti en andel af deres kortforbrug tilbage, finansieret af platformen.

Hver regel angiver en sats, et berettigelsesvindue og valgfrie forhandlerfiltre og kan begrænses til én underkonto.

Brug Cashback Rules API'et til at oprette, opdatere og liste de regler, din platform finansierer, og udbetal derefter cashback efter behov fra din tilgængelige USD-saldo.

## Endpoints

| Endpoint | Anmodning |
| - | - |
| [List cashback-regler](https://docs.whop.com/da/api-reference/cashback-rules/list-cashback-rules.md) | GET `/cashback_rules` |
| [Opret cashback-regel](https://docs.whop.com/da/api-reference/cashback-rules/create-cashback-rule.md) | POST `/cashback_rule` |
| [Udbetal cashback](https://docs.whop.com/da/api-reference/cashback-rules/pay-out-cashback.md) | POST `/cashback_rules/payout` |
| [Opdater cashback-regel](https://docs.whop.com/da/api-reference/cashback-rules/update-cashback-rule.md) | PATCH `/cashback_rules/{id}` |

## Udbetal cashback

Send et tomt objekt til `POST /cashback_rules/payout` for at udbetale al berettiget cashback. Angiv `cashback_rule_id` for at udbetale én regel, `account_id` for at betale én underkonto eller `transaction_id` for at betale én korttransaktion. Flere filtre skal alle matche.

```json theme={null}
{
	"cashback_rule_id": "cicbr_7kR2m9Qx4L",
	"account_id": "biz_connectedDemo",
	"transaction_id": "citx_8jF6w3Nv2B"
}
```

Brug en `Idempotency-Key`-header, når du anmoder om en udbetaling. Et `202`-svar med `status: "processing"` bekræfter, at behandlingen blev sat i kø, og gentager de angivne filtre. Et `200`-svar med `status: "failed"` betyder, at køen afviste anmodningen. Disse statusser beskriver planlægning, ikke gennemførelse af betaling. Transaktionsjobs genforsøger fejl automatisk. Tilføj USD til finansieringstegnebogen, hvis den har utilstrækkelige midler. Gentagne anmodninger springer betalinger over, der allerede er registreret, og ledger-idempotens forhindrer dobbelte krediteringer.

Svar:

```json theme={null}
{
	"status": "processing",
	"cashback_rule_id": "cicbr_7kR2m9Qx4L",
	"account_id": "biz_connectedDemo",
	"transaction_id": "citx_8jF6w3Nv2B"
}
```

## Attributter

**id** `string` *required*

Cashback-regel-ID med præfikset `cicbr_`.

**created\_at** `string` *required*

Hvornår reglen blev oprettet, som et ISO 8601-tidsstempel.

**description** `string | null` *required*

Valgfri beskrivelse af cashback-reglen.

**discarded\_at** `string | null` *required*

Hvornår reglen blev kasseret, som et ISO 8601-tidsstempel. Null betyder, at den ikke er blevet kasseret.

**expires\_at** `string | null` *required*

Eksklusiv afslutning på berettigelsesvinduet som et ISO 8601-tidsstempel. Null betyder intet udløb.

**funding\_account\_id** `string` *required*

Platformskonto udpeget til at finansiere cashback, med præfikset `biz_`. Afledt af de godkendte legitimationsoplysninger.

**merchant\_category\_code** `string | null` *required*

Firecifret forhandlerkategorikode. Null matcher enhver MCC. Når begge forhandlerfiltre er null, er scoped\_account\_id påkrævet.

**merchant\_name** `string | null` *required*

Rå forhandlernavn rapporteret af kortudbyderen. Null matcher ethvert forhandlernavn. Når angivet, matcher det sammen med et eventuelt MCC-filter; ikke et delstrengs- eller beriget visningsnavnsmatch.

**rate\_bps** `integer` *required*

Cashback-sats i basispoint. 100 betyder 1 %, og 10000 betyder 100 %.

**scoped\_account\_id** `string | null` *required*

Underkonto-ID med præfikset `biz_`. Null udpeger alle direkte underkonti af den finansierende platform.

**starts\_at** `string` *required*

Inklusiv start på reglens berettigelsesvindue som et ISO 8601-tidsstempel.

**updated\_at** `string` *required*

Hvornår reglen sidst blev opdateret, som et ISO 8601-tidsstempel.

```json CashbackRule theme={null}
{
	"id": "cicbr_a1B2c3D4e5F6g",
	"merchant_name": "ACME SOFTWARE",
	"merchant_category_code": "5734",
	"rate_bps": 500,
	"description": "Software cashback",
	"funding_account_id": "biz_a1B2c3D4e5F6g",
	"scoped_account_id": "biz_h7I8j9K0l1M2n",
	"starts_at": "2026-10-01T00:00:00.000Z",
	"expires_at": "2026-11-01T00:00:00.000Z",
	"discarded_at": null,
	"created_at": "2026-09-10T08:00:00.000Z",
	"updated_at": "2026-09-10T08:00:00.000Z"
}
```


## Related topics

- [Create Cashback Rule](https://docs.whop.com/da/api-reference/cashback-rules/create-cashback-rule.md)
- [Update Cashback Rule](https://docs.whop.com/da/api-reference/cashback-rules/update-cashback-rule.md)
- [List Cashback Rules](https://docs.whop.com/da/api-reference/cashback-rules/list-cashback-rules.md)
