# Create a refund

Initiate a refund for a card transfer.

**Use the [Cancel or refund a card transfer](https://docs.moov.io/api/money-movement/refunds/cancel/) endpoint for more comprehensive cancel and refund options.**

See the [reversals](https://docs.moov.io/guides/money-movement/accept-payments/card-acceptance/reversals/) guide for more information.

To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/) you will need to specify the `/accounts/{accountID}/transfers.write` scope.

## HTTP Method

POST

## Endpoint

/accounts/{accountID}/transfers/{transferID}/refunds

## Example Requests

### cURL
```shell
curl -X POST "https://api.moov.io/accounts/{accountID}/transfers/{transferID}/refunds" \
  -H "Authorization: Bearer {token}" \
  -H "X-Moov-Version: v2026.07.00"
```

### Go
```go
mc, _ := moov.NewClient()

var accountID string
var transferID string

mc.RefundTransfer(ctx, accountID, transferID, moov.CreateRefund{
    Amount: 1700,
})
```

### TypeScript
```typescript
import { Moov } from "@moovio/sdk";

const moov = new Moov({
  security: {
    username: "",
    password: "",
  },
});

async function run() {
  const result = await moov.transfers.initiateRefund({
    xIdempotencyKey: "8d9af6b8-67e1-4efa-8188-68039f34097d",
    accountID: "cb6ae9f9-afab-4f06-9eb0-8abf54a3ada2",
    transferID: "04022119-95be-4ef4-9dd4-b3782f6aa7b9",
    createRefund: {
      amount: 1000,
      amountDetails: {
        surcharge: {
          currency: "USD",
          valueDecimal: "12.987654321",
        },
      },
    },
  });

console.log(result);
}

run();
```

### PHP
```php
declare(strict_types=1);

require 'vendor/autoload.php';

use Moov\
