# `PaperTiger.Resources.Payout`
[🔗](https://github.com/EnaiaInc/paper_tiger/blob/v1.2.2/lib/paper_tiger/resources/payout.ex#L1)

Handles Payout resource endpoints.

## Endpoints

- POST   /v1/payouts      - Create payout
- GET    /v1/payouts/:id  - Retrieve payout
- POST   /v1/payouts/:id  - Update payout
- GET    /v1/payouts      - List payouts

Note: Payouts cannot be deleted (can only be canceled).

## Payout Object

    %{
      id: "po_...",
      object: "payout",
      created: 1234567890,
      amount: 2000,  # cents
      currency: "usd",
      status: "paid",
      arrival_date: 1234567890,
      method: "standard",
      type: "bank_account",
      destination: "ba_...",
      metadata: %{},
      # ... other fields
    }

# `create`

```elixir
@spec create(Plug.Conn.t()) :: Plug.Conn.t()
```

Creates a new payout.

## Required Parameters

- amount - Payout amount in cents
- currency - Three-letter ISO currency code (e.g., "usd")

## Optional Parameters

- status - Payout status (default: "pending")
- arrival_date - When the payout arrives
- method - Payout method: "standard" or "instant" (default: "standard")
- type - Destination type: "bank_account" or "card"
- destination - Bank account or card ID
- metadata - Key-value metadata

# `list`

```elixir
@spec list(Plug.Conn.t()) :: Plug.Conn.t()
```

Lists all payouts with pagination.

## Parameters

- limit - Number of items (default: 10, max: 100)
- starting_after - Cursor for pagination
- ending_before - Reverse cursor
- status - Filter by status (paid, pending, in_transit, canceled, failed)
- created - Filter by creation date

# `retrieve`

```elixir
@spec retrieve(Plug.Conn.t(), String.t()) :: Plug.Conn.t()
```

Retrieves a payout by ID.

# `update`

```elixir
@spec update(Plug.Conn.t(), String.t()) :: Plug.Conn.t()
```

Updates a payout.

Note: Only metadata can be updated after creation.

## Updatable Fields

- metadata

---

*Consult [api-reference.md](api-reference.md) for complete listing*
