# Set the limits for payment requests an agent makes

`PUT /payments/limits` · Rivier · shop

Set the limits for payment requests an agent makes: the amount cap in minor units, one currency and the customers allowed (empty means any).

- Scope: shop:admin
- Sdk: shop.paymentLimits.set
- Cli: shop payment limits set

## Request body

`application/json`

```json
{
  "type": "object",
  "properties": {
    "amountCapMinor": {
      "type": "integer",
      "minimum": 0,
      "maximum": 99999999
    },
    "currency": {
      "type": "string",
      "pattern": "^[A-Za-z]{3}$"
    },
    "allowedCustomers": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 200
      },
      "maxItems": 200,
      "default": []
    }
  },
  "required": [
    "amountCapMinor",
    "currency"
  ],
  "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 PUT 'https://api.rivier.ai/payments/limits' \
  -H 'Authorization: Bearer $KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "amountCapMinor": 0,
  "currency": "string"
}'
```
