# Ask for a refund of part or all of what an order paid

`POST /shop/orders/{id}/refund` · Rivier · shop

Ask for a refund of part or all of what an order paid. A person approves it on the payments side before any money moves.

- Scope: shop:write
- Mcp: rivier_shop_order_refund
- Graphql: Mutation.refundShopOrder
- Sdk: shop.order.refund
- Cli: shop order refund

## Parameters

- `id` (path, required), string

## Request body

`application/json`

```json
{
  "type": "object",
  "properties": {
    "amountMinor": {
      "type": "integer",
      "minimum": 1,
      "maximum": 9007199254740991
    },
    "reason": {
      "type": "string",
      "minLength": 1,
      "maxLength": 300
    }
  },
  "required": [
    "reason"
  ],
  "additionalProperties": false
}
```

## Responses

- `200`: 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/shop/orders/{id}/refund' \
  -H 'Authorization: Bearer $KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "reason": "string"
}'
```
