# `Worldpay.AccountUpdater`
[🔗](https://github.com/iamkanishka/worldpay/blob/v1.0.0/lib/worldpay/access/data.ex#L160)

Worldpay **Account Updater** — keep stored card credentials current.

## Real-time (Visa, Access APIs)

Set `requestAccountUpdater: true` in the instruction on a subsequent CIT.
Use `Worldpay.CardPayments.authorize_with_account_updater/3` for convenience.

## File-based batch (WPG / cnpAPI)

Build batch XML with the helpers here and submit via SFTP.
Completion file returned ~5 business days later.

### Batch limits

- Max 20,000 changes per batch
- Max 9,999 batches per session file
- Max 1,000,000 changes per session file

# `build_batch`

```elixir
@spec build_batch(String.t(), String.t(), String.t(), [String.t()]) :: String.t()
```

Wrap account update elements in a batch session file.

# `build_card_update`

```elixir
@spec build_card_update(String.t(), String.t(), String.t(), String.t()) :: String.t()
```

Build an accountUpdate element for a card.

# `build_token_update`

```elixir
@spec build_token_update(String.t(), String.t(), String.t(), String.t()) :: String.t()
```

Build an accountUpdate element for a token.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
