Use pop:

```python
kwargs['currency_code'] = kwargs.pop('currency')
```

It will do the get + del, still raising an IndexError if not found