# Cancel a reservation

`POST /payments/reservations/{id}/cancel` · Rivier · shop

Cancel a reservation. A held one is withdrawn. A paid one gives money back by the offering's rules: everything when the business cancels or the guest cancels early enough, a percentage after that. Giving money back that an agent asks for waits for the owner's approval.

- Scope: shop:write
- Mcp: rivier_payments_cancel_reservation
- Graphql: Mutation.shopReservationCancel
- Sdk: shop.reservation.cancel
- Cli: shop reservation cancel

## Parameters

- `id` (path, required), string

## Request body

`application/json`

```json
{
  "type": "object",
  "properties": {
    "by": {
      "type": "string",
      "enum": [
        "guest",
        "business"
      ],
      "default": "guest"
    }
  },
  "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/payments/reservations/{id}/cancel' \
  -H 'Authorization: Bearer $KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "by": "guest"
}'
```
