Worldpay.ForwardAPI (Worldpay v1.0.0)

Copy Markdown View Source

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.

Summary

Functions

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

Forward a request with card data to a target endpoint.

Functions

detokenize_response(body, config)

@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(body, config)

@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