# Create a refund

`POST /refunds`

Base URL: https://api.acme.dev/v1

Authentication: bearer token in Authorization header

## Request body

Content type: `application/json`

| Field | Type | Required | Description |
|---|---|---|---|
| `payment` | string | yes | ID of the payment to refund. |
| `amount` | integer | no | Amount in cents. Defaults to the full amount. |
| `reason` | enum | no |  Allowed: `duplicate`, `fraudulent`, `requested_by_customer`. |

## Example request

```bash
curl -X POST https://api.acme.dev/v1/refunds \
  -H "Content-Type: application/json" \
  -d '{"payment":"string"}'
```

## Responses

- **200**: The refund.

### Example response (200)

```json
{
  "id": "re_19Kd",
  "status": "pending"
}
```
