Worldpay.NetworkPaymentTokens (Worldpay v1.0.0)

Copy Markdown View Source

Worldpay Network Payment Token (NPT) API — manages network payment tokens that can be used across Worldpay and other acquirers.

Network tokens are format-preserving 16-digit tokens issued by Visa or Mastercard. Unlike Worldpay tokens (which are Worldpay-specific), NPTs can be used with any acquirer that supports network tokenization.

This module covers:

  • NPT provisioning, inquiry, update, deletion
  • Cryptogram provisioning per CIT
  • paymentAccountReference (PAR) support
  • Multi-acquirer portability

Summary

Functions

Delete a network token.

Retrieve a network token.

Provision a new network token (Visa or Mastercard).

Provision a cryptogram for a CIT using a network token.

Update a network token (e.g. update status).

Functions

delete(npt_id, config)

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

Delete a network token.

get(npt_id, config)

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

Retrieve a network token.

provision(body, config)

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

Provision a new network token (Visa or Mastercard).

provision_cryptogram(npt_id, config)

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

Provision a cryptogram for a CIT using a network token.

Each CIT requires a fresh cryptogram. The cryptogram is single-use and expires within minutes.

update(npt_id, body, config)

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

Update a network token (e.g. update status).