# Transfer Reversals

This section covers the Stripe API endpoints for managing transfer reversals. Transfer reversals allow you to reverse a previously made transfer.

## List all reversals

You can see a list of the reversals belonging to a specific transfer. Note that the 10 most recent reversals are always available by default on the transfer object. If you need more than those 10, you can use this API method and the `limit` and `starting_after` parameters to page through additional reversals.

**Endpoint:** `GET /v1/transfers/:id/reversals`

**Parameters:**

*   `ending_before` (string): A cursor for use in pagination.
*   `limit` (integer): A limit on the number of objects to be returned.
*   `starting_after` (string): A cursor for use in pagination.

**Returns:** A dictionary with a `data` property that contains an array of up to `limit` reversals, starting after reversal `starting_after`. Each entry in the array is a separate reversal object. If no more reversals are available, the resulting array will be empty. If you provide a non-existent transfer ID, this call raises an error.

**Example:**

```bash
curl -G https://api.stripe.com/v1/transfers/{{TRANSFER_ID}}/reversals \
  -u "sk_test_RXHltS2...7i001oa6x7o4sk_test_RXHltS2OKzISvxWQ7NmRN57i001oa6x7o4:" \
  -d limit=3
```

```json
{
  "object": "list",
  "url": "/v1/transfers/tr_1Mio2dLkdIwHu7ixsUuCxJpu/reversals",
  "has_more": false,
  "data": [
    {
      "id": "trr_1Mio2eLkdIwHu7ixN5LPJS4a",
      "object": "transfer_reversal",
      "amount": 400,
      "balance_transaction": "txn_1Mio2eLkdIwHu7ixosfrbjhW",
      "created": 1678147568,
      "currency": "usd",
      "destination_payment_refund": "pyr_1Mio2eQ9PRzxEwkZYewpaIFB",
      "metadata": {},
      "source_refund": null,
      "transfer": "tr_1Mio2dLkdIwHu7ixsUuCxJpu"
    }
  ]
}
```

## Update a reversal

Updates the specified reversal by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

**Endpoint:** `POST /v1/transfers/:id/reversals/:id`

**Parameters:**

*   `metadata` (object): Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.

**Returns:** The reversal object if the update succeeded. This call will raise an error if update parameters are invalid.

**Example:**

```bash
curl https://api.stripe.com/v1/transfers/{{TRANSFER_ID}}/reversals/{{TRANSFER_REVERSAL_ID}} \
  -u "sk_test_RXHltS2...7i001oa6x7o4sk_test_RXHltS2OKzISvxWQ7NmRN57i001oa6x7o4:" \
  -d "metadata[order_id]=6735"
```

```json
{
  "id": "trr_1Mio2eLkdIwHu7ixN5LPJS4a",
  "object": "transfer_reversal",
  "amount": 400,
  "balance_transaction": "txn_1Mio2eLkdIwHu7ixosfrbjhW",
  "created": 1678147568,
  "currency": "usd",
  "destination_payment_refund": "pyr_1Mio2eQ9PRzxEwkZYewpaIFB",
  "metadata": {
    "order_id": "6735"
  },
  "source_refund": null,
  "transfer": "tr_1Mio2dLkdIwHu7ixsUuCxJpu"
}
```

## Retrieve a reversal

By default, you can see the 10 most recent reversals stored directly on the transfer object, but you can also retrieve details about a specific reversal stored on the transfer.

**Endpoint:** `GET /v1/transfers/:id/reversals/:id`

**Parameters:**

*   None.

**Returns:** The reversal object.

**Example:**

```bash
curl https://api.stripe.com/v1/transfers/{{TRANSFER_ID}}/reversals/{{TRANSFER_REVERSAL_ID}} \
  -u "sk_test_RXHltS2...7i001oa6x7o4sk_test_RXHltS2OKzISvxWQ7NmRN57i001oa6x7o4:"
```

```json
{
  "id": "trr_1Mio2eLkdIwHu7ixN5LPJS4a",
  "object": "transfer_reversal",
  "amount": 400,
  "balance_transaction": "txn_1Mio2eLkdIwHu7ixosfrbjhW",
  // ... other fields
}
```