Worldpay.SecurityTokenService (Worldpay v1.0.0)

Copy Markdown View Source

Worldpay Security Token Service (STS) API — provision, exchange, and detokenize raw card/account numbers.

The STS is used for PCI-scope-reducing tokenization:

  • Convert raw PANs to tokens (provision)
  • Swap tokens between token vaults (exchange)
  • Retrieve raw PANs from tokens (detokenize — PCI-accredited only)

Warning: Detokenization retrieves raw card numbers and significantly increases PCI audit scope. Only use when absolutely necessary.

Summary

Functions

Detokenize — retrieve the raw card number from a token.

Exchange a token between vaults (inter-token exchange).

Provision a token from a raw card number.

Functions

detokenize(token_reference, config)

@spec detokenize(String.t(), Worldpay.Config.t()) ::
  {:ok, map()} | {:error, Worldpay.Error.t()}

Detokenize — retrieve the raw card number from a token.

PCI-accredited merchants only. Using this endpoint subjects your environment to PCI DSS Level 1 audit requirements.

exchange(body, config)

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

Exchange a token between vaults (inter-token exchange).

provision(body, config)

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

Provision a token from a raw card number.