### Configure a gateway

`POST /api/v1/admin/payments/config`

Upserts one gateway's credentials and settings. Every field is keep-existing, so a partial payload leaves unsent credentials alone rather than clearing them.

- Authentication: manager session (JWT) or API token
- Permission: `prm_settings` (Manage settings)
- Risk: danger
- Rate limit bucket: `t_mutate`

#### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `gateway` | body | string | yes | Driver id from the catalogue. |

#### Errors

| Code | Status | When |
| --- | --- | --- |
| `ERR_VALIDATION` | 400 | an unknown gateway id, or a field the driver does not accept |

