Worldpay.CustomerEventService (Worldpay v1.0.0)

Copy Markdown View Source

Worldpay Customer Event Service API — lifecycle events for provisioned NPTs.

This API delivers webhook events when network tokens change state:

  • Token created
  • Token updated (e.g. card reissued, new expiry)
  • Token deleted / expired

These events are separate from payment lifecycle events (see Worldpay.Webhooks).

Setup

Register your Customer Event Service endpoint URL with your Worldpay Implementation Manager. Events are delivered as JSON webhooks.

Event types

TypeDescription
token_createdNew NPT provisioned
token_updatedNPT details changed (account updater)
token_suspendedNPT temporarily suspended
token_resumedNPT re-activated
token_deletedNPT permanently deleted
token_expiredNPT expiry reached

Summary

Functions

Parse an incoming Customer Event Service webhook body.

Types

ces_event()

@type ces_event() :: %{
  type: atom(),
  network_token_id: String.t() | nil,
  payment_account_reference: String.t() | nil,
  card_last4: String.t() | nil,
  card_expiry: map() | nil,
  scheme: String.t() | nil,
  raw: map()
}

Functions

parse(body)

@spec parse(String.t() | %{required(String.t()) => term()}) :: {:ok, ces_event()}

Parse an incoming Customer Event Service webhook body.