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

# Transactions API overview

> Record and manage sales transactions for affiliate commission calculation. Track revenue, handle refunds, and manage rewards.

Transactions represent sales or actions made by referred customers. When a transaction is created, Partnero automatically calculates the partner's commission based on your program settings.

## Key concepts

* **Transaction key**: A unique identifier (e.g., invoice ID) used for tracking and refund handling
* **Amount**: The sale value used to calculate commission
* **Reward**: The commission earned by the partner (can be auto-calculated or set directly)
* **Action**: The type of transaction (e.g., `sale`)

## Available endpoints

<CardGroup cols={2}>
  <Card title="List transactions" icon="list" href="/api-reference/transactions/list">
    Retrieve all transactions with pagination
  </Card>

  <Card title="Get transaction" icon="receipt" href="/api-reference/transactions/get">
    Get a specific transaction and its rewards
  </Card>

  <Card title="Create transaction" icon="plus" href="/api-reference/transactions/create">
    Record a sale for commission calculation
  </Card>

  <Card title="Delete transaction" icon="trash" href="/api-reference/transactions/delete">
    Permanently remove a transaction (refund)
  </Card>

  <Card title="Archive" icon="box-archive" href="/api-reference/transactions/archive">
    Soft-delete a transaction (reversible)
  </Card>

  <Card title="Restore" icon="rotate-left" href="/api-reference/transactions/restore">
    Reactivate an archived transaction
  </Card>
</CardGroup>

## How commissions work

1. **Transaction created**—you record a sale with an amount.
2. **Commission calculated**—Partnero applies your program's commission rules.
3. **Reward generated**—a reward record is created for the partner.
4. **Payout**—rewards accumulate until the payout threshold is reached.

<Tip>
  Always use unique transaction keys (like invoice IDs). This lets you delete a transaction by key to reverse the commission automatically—useful for handling refunds.
</Tip>

<Note>
  For refer-a-friend programs, transaction endpoints use different field names. See the [refer-a-friend transactions](/api-reference/refer-a-friend/transactions) section.
</Note>
