# `Worldpay.CNP.Builder`
[🔗](https://github.com/iamkanishka/worldpay/blob/v1.0.0/lib/worldpay/wpg/cnp.ex#L1)

Builds cnpAPI XML request documents for US eCommerce processing.

Supports: Authorization, Sale, Credit, Void, Capture, Reversal,
EcheckSale, EcheckVoid, EcheckCredit, Token registration, Dynamic Payout.

# `authorization`

```elixir
@spec authorization(keyword()) :: String.t()
```

Build an authorization transaction.

# `capture`

```elixir
@spec capture(keyword()) :: String.t()
```

Build a capture (settlement) transaction.

# `credit`

```elixir
@spec credit(keyword()) :: String.t()
```

Build a credit (refund) transaction.

# `echeck_credit`

```elixir
@spec echeck_credit(keyword()) :: String.t()
```

Build an eCheck credit (refund).

# `echeck_sale`

```elixir
@spec echeck_sale(keyword()) :: String.t()
```

Build an eCheck sale.

# `echeck_void`

```elixir
@spec echeck_void(keyword()) :: String.t()
```

Build an eCheck void.

# `envelope`

```elixir
@spec envelope(
  String.t(),
  keyword()
) :: String.t()
```

Wrap inner XML in a cnpRequest envelope.

# `funding_instruction`

```elixir
@spec funding_instruction(keyword()) :: String.t()
```

Build a Dynamic Payout funding instruction.

# `register_token`

```elixir
@spec register_token(keyword()) :: String.t()
```

Build a token registration request.

# `reversal`

```elixir
@spec reversal(keyword()) :: String.t()
```

Build a reversal transaction.

# `sale`

```elixir
@spec sale(keyword()) :: String.t()
```

Build a sale transaction (auth + auto-capture).

# `void`

```elixir
@spec void(keyword()) :: String.t()
```

Build a void transaction.

---

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