# `Worldpay.Express`
[🔗](https://github.com/iamkanishka/worldpay/blob/v1.0.0/lib/worldpay/raft/express.ex#L1)

Worldpay **Express Interface** (Integrated Payments Express) — lighter POS
integration path covering all in-store payment types.

Supported payment types:
- Credit card
- Debit card (PIN and signature)
- Check / ACH
- Healthcare (FSA / HSA)
- Electronic Benefits Transfer (EBT — SNAP and Cash)
- Gift Card

Supported transaction types:
- Sale
- Authorization
- Authorization Completion (capture)
- Void
- Reversal
- Credit / Refund
- Balance Inquiry
- Card Activation (Gift)
- Recurring Transactions
- Level 3 / Enhanced Data (line item detail)
- Lodging Data
- Duplicate Checking

## Configuration

    config :worldpay,
      express_url: "https://api.expresshost.net/payments/v2",
      express_account_id: "your-account-id",
      express_account_token: "your-account-token",
      express_application_id: "your-app-id",
      express_application_name: "MyApp",
      express_application_version: "1.0.0"

# `approval_number`

```elixir
@spec approval_number(map()) :: String.t() | nil
```

Extract approval number from Express response.

# `approved?`

```elixir
@spec approved?(%{required(String.t()) =&gt; term()}) :: boolean()
@spec approved?(%{required(String.t()) =&gt; term()}) :: boolean()
```

True if Express response is approved.

# `authorize`

```elixir
@spec authorize(
  keyword(),
  Worldpay.Config.t()
) :: {:ok, map()} | {:error, Worldpay.Error.t()}
```

Submit an Authorization (pre-auth).

# `balance`

```elixir
@spec balance(map()) :: map() | nil
```

Extract balance from Express response (debit/EBT/Gift).

# `balance_inquiry`

```elixir
@spec balance_inquiry(
  keyword(),
  Worldpay.Config.t()
) :: {:ok, map()} | {:error, Worldpay.Error.t()}
```

Balance Inquiry (Debit, EBT, Gift Card).

# `capture`

```elixir
@spec capture(
  keyword(),
  Worldpay.Config.t()
) :: {:ok, map()} | {:error, Worldpay.Error.t()}
```

Submit an Authorization Completion (capture a pre-auth).

# `check_sale`

```elixir
@spec check_sale(
  keyword(),
  Worldpay.Config.t()
) :: {:ok, map()} | {:error, Worldpay.Error.t()}
```

Check / ACH sale.

# `credit`

```elixir
@spec credit(
  keyword(),
  Worldpay.Config.t()
) :: {:ok, map()} | {:error, Worldpay.Error.t()}
```

Submit a Credit (refund).

# `gift_activate`

```elixir
@spec gift_activate(
  keyword(),
  Worldpay.Config.t()
) :: {:ok, map()} | {:error, Worldpay.Error.t()}
```

Gift Card Activation.

# `healthcare_sale`

```elixir
@spec healthcare_sale(
  keyword(),
  Worldpay.Config.t()
) :: {:ok, map()} | {:error, Worldpay.Error.t()}
```

Healthcare / FSA / HSA sale.

# `recurring`

```elixir
@spec recurring(
  keyword(),
  Worldpay.Config.t()
) :: {:ok, map()} | {:error, Worldpay.Error.t()}
```

Recurring transaction (stored credential MIT).

# `reverse`

```elixir
@spec reverse(
  keyword(),
  Worldpay.Config.t()
) :: {:ok, map()} | {:error, Worldpay.Error.t()}
```

Submit a Reversal.

# `sale`

```elixir
@spec sale(
  keyword(),
  Worldpay.Config.t()
) :: {:ok, map()} | {:error, Worldpay.Error.t()}
```

Submit a Sale transaction.

## Options

- `:pan` — card number
- `:expiry` — MMYY
- `:amount` — integer (cents)
- `:track1` / `:track2` — raw track data (card-present)
- `:emv_data` — EMV TLV data (chip)
- `:pin_block` — encrypted PIN (debit)
- `:cvc` — card security code (CNP)
- `:payment_type` — `"Credit"` | `"Debit"` | `"EBTFoodStamp"` | `"EBTCashBenefit"` | `"GiftCard"` | `"Healthcare"`
- `:duplicate_check_disable` — boolean (default false)
- `:terminal_id` — terminal/lane identifier
- `:clerk_number` — clerk/cashier identifier
- `:reference_number` — merchant reference
- `:ticket_number` — ticket / receipt number

# `transaction_id`

```elixir
@spec transaction_id(map()) :: String.t() | nil
```

Extract transaction ID from Express response.

# `void`

```elixir
@spec void(
  keyword(),
  Worldpay.Config.t()
) :: {:ok, map()} | {:error, Worldpay.Error.t()}
```

Void a previous transaction.

---

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