# `Polarex.Refunds`
[🔗](https://github.com/giusdp/polarex/blob/main/lib/polarex/operations/refunds.ex#L1)

Provides API endpoints related to refunds

# `refunds_create`

```elixir
@spec refunds_create(body :: Polarex.RefundCreate.t(), opts :: keyword()) ::
  {:ok, Polarex.Refund.t()}
  | {:error, Polarex.HTTPValidationError.t() | Polarex.RefundedAlready.t()}
```

Create Refund

Create a refund.

**Scopes**: `refunds:write`

## Request Body

**Content Types**: `application/json`

# `refunds_list`

```elixir
@spec refunds_list(opts :: keyword()) ::
  {:ok, Polarex.ListResourceRefund.t()}
  | {:error, Polarex.HTTPValidationError.t()}
```

List Refunds

List refunds.

**Scopes**: `refunds:read` `refunds:write`

## Options

  * `id`: Filter by refund ID.
  * `organization_id`: Filter by organization ID.
  * `order_id`: Filter by order ID.
  * `subscription_id`: Filter by subscription ID.
  * `customer_id`: Filter by customer ID.
  * `external_customer_id`: Filter by customer external ID.
  * `succeeded`: Filter by `succeeded`.
  * `page`: Page number, defaults to 1.
  * `limit`: Size of a page, defaults to 10. Maximum is 100.
  * `sorting`: Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.

---

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