# Ask for a refund

`POST /payments/refunds` · Rivier · shop

Ask for a refund. It waits for a person's approval; the limits of the money policy apply.

- Scope: shop:write
- Mcp: rivier_payments_refund_request
- Graphql: Mutation.requestRefund
- Sdk: shop.refund.request
- Cli: shop refund request
- Events: shop.refund.requested

## Request body

`application/json`

```json
{
  "type": "object",
  "properties": {
    "paymentId": {
      "type": "string",
      "format": "uuid"
    },
    "amountMinor": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 99999999999
    },
    "currency": {
      "type": "string",
      "pattern": "^[a-z]{3}$"
    },
    "reason": {
      "type": "string",
      "maxLength": 300,
      "default": ""
    },
    "idempotencyKey": {
      "type": "string",
      "minLength": 1,
      "maxLength": 120
    }
  },
  "required": [
    "paymentId",
    "idempotencyKey"
  ],
  "additionalProperties": false
}
```

## Responses

- `201`: Success
- `400`: The request was malformed
- `401`: No valid credential
- `403`: The credential lacks the scope, origin or address
- `429`: Over the key's rate limit; see Retry-After

## Example

```sh
curl -X POST 'https://api.rivier.ai/payments/refunds' \
  -H 'Authorization: Bearer $KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "paymentId": "string",
  "idempotencyKey": "string"
}'
```
