Worldpay.Express (Worldpay v1.0.0)

Copy Markdown View Source

Worldpay Express Interface (Integrated Payments Express) — lighter POS integration path covering all in-store payment types.

Supported payment types:

  • Credit card
  • Debit card (PIN and signature)
  • Check / ACH
  • Healthcare (FSA / HSA)
  • Electronic Benefits Transfer (EBT — SNAP and Cash)
  • Gift Card

Supported transaction types:

  • Sale
  • Authorization
  • Authorization Completion (capture)
  • Void
  • Reversal
  • Credit / Refund
  • Balance Inquiry
  • Card Activation (Gift)
  • Recurring Transactions
  • Level 3 / Enhanced Data (line item detail)
  • Lodging Data
  • Duplicate Checking

Configuration

config :worldpay,
  express_url: "https://api.expresshost.net/payments/v2",
  express_account_id: "your-account-id",
  express_account_token: "your-account-token",
  express_application_id: "your-app-id",
  express_application_name: "MyApp",
  express_application_version: "1.0.0"

Summary

Functions

Extract approval number from Express response.

True if Express response is approved.

Submit an Authorization (pre-auth).

Extract balance from Express response (debit/EBT/Gift).

Balance Inquiry (Debit, EBT, Gift Card).

Submit an Authorization Completion (capture a pre-auth).

Check / ACH sale.

Submit a Credit (refund).

Gift Card Activation.

Healthcare / FSA / HSA sale.

Recurring transaction (stored credential MIT).

Submit a Reversal.

Submit a Sale transaction.

Extract transaction ID from Express response.

Void a previous transaction.

Functions

approval_number(arg1)

@spec approval_number(map()) :: String.t() | nil

Extract approval number from Express response.

approved?(arg1)

@spec approved?(%{required(String.t()) => term()}) :: boolean()
@spec approved?(%{required(String.t()) => term()}) :: boolean()

True if Express response is approved.

authorize(opts, config)

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

Submit an Authorization (pre-auth).

balance(arg1)

@spec balance(map()) :: map() | nil

Extract balance from Express response (debit/EBT/Gift).

balance_inquiry(opts, config)

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

Balance Inquiry (Debit, EBT, Gift Card).

capture(opts, config)

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

Submit an Authorization Completion (capture a pre-auth).

check_sale(opts, config)

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

Check / ACH sale.

credit(opts, config)

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

Submit a Credit (refund).

gift_activate(opts, config)

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

Gift Card Activation.

healthcare_sale(opts, config)

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

Healthcare / FSA / HSA sale.

recurring(opts, config)

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

Recurring transaction (stored credential MIT).

reverse(opts, config)

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

Submit a Reversal.

sale(opts, config)

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

Submit a Sale transaction.

Options

  • :pan — card number
  • :expiry — MMYY
  • :amount — integer (cents)
  • :track1 / :track2 — raw track data (card-present)
  • :emv_data — EMV TLV data (chip)
  • :pin_block — encrypted PIN (debit)
  • :cvc — card security code (CNP)
  • :payment_type"Credit" | "Debit" | "EBTFoodStamp" | "EBTCashBenefit" | "GiftCard" | "Healthcare"

  • :duplicate_check_disable — boolean (default false)
  • :terminal_id — terminal/lane identifier
  • :clerk_number — clerk/cashier identifier
  • :reference_number — merchant reference
  • :ticket_number — ticket / receipt number

transaction_id(arg1)

@spec transaction_id(map()) :: String.t() | nil

Extract transaction ID from Express response.

void(opts, config)

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

Void a previous transaction.