# `Worldpay.ForwardAPI`
[🔗](https://github.com/iamkanishka/worldpay/blob/v1.0.0/lib/worldpay/access/token_services.ex#L199)

Worldpay **Forward API** — PCI-scope-reducing proxy/tokenizer.

The Forward API acts as a transparent proxy between your systems and
third-party APIs. It tokenizes sensitive card data in-flight so that
raw PANs never touch your servers.

## How it works

1. You POST to the Forward API with card data + target endpoint
2. Worldpay tokenizes the card data
3. The request is forwarded to the target with tokens in place of PANs
4. The response is returned to you

Keeps merchants out of PCI scope for integrations with third-party
processors, analytics platforms, or legacy systems.

# `detokenize_response`

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

Detokenize in a forwarded response — retrieve raw values from tokens in a response.

# `forward`

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

Forward a request with card data to a target endpoint.

Worldpay intercepts, tokenizes card fields, and forwards.

## body fields

- `targetUrl` — the third-party endpoint to forward to
- `method` — HTTP method (`"POST"` | `"GET"` | `"PUT"`)
- `headers` — headers to pass through to target
- `body` — request body (card fields will be tokenized)
- `tokenizeFields` — list of field paths to tokenize before forwarding

---

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