Worldpay RAFT 610 Interface — ISO 8583 card-present processing.
Covers all payment types supported by the RAFT platform: Credit, Debit, EBT (SNAP/WIC), Gift Card, Fleet, Check/ACH, WIC.
This module provides:
Worldpay.RAFT.Message— ISO 8583 message buildersWorldpay.RAFT.Response— response field extractorsWorldpay.RAFT— submit messages over TCP/TLS to RAFT
RAFT transaction types
Credit card
- Authorization (0100)
- Sale (0200)
- Capture (0220)
- Reversal — full (0420), partial (0420 with partial flag)
- Refund (0200 with reversal indicator)
- Incremental authorization
Debit card
- Authorization (0100)
- Pre-authorization / DUKPT key exchange
- Reversal
- Balance Inquiry (0100)
EBT (Electronic Benefits Transfer)
- SNAP purchase
- SNAP return
- Cash Benefits withdrawal
- Balance Inquiry
- Voice Authorization / Voucher Clear
Gift Card
- Activation (0200)
- Balance Inquiry (0100)
- Mini-Statement (0100)
- Mass Transaction (0200)
- Reload / Add Value (0200)
Fleet Card
- Authorization
- Reversal
Check / ACH
- Enhanced Check Authorization (0200)
- Reversal (0420)
WIC (Women, Infants, Children)
- Authorization
- Reconciliation records
Network management
- System Health Check (0800)
- Key Change Request (0800)
- Lane Validation Request
- FleetOne Batch Close
- Reconciliation (0500/0510): Batch Inquiry, Batch Release, Batch Totals
Summary
Functions
Build a credit card authorization request.
Build a balance inquiry message.
Build a batch inquiry message (0500).
Build a batch release (close) message (0500).
Build a batch totals request.
Build a capture (settlement) message.
Build a Check/ACH Enhanced Check Authorization.
Build an EBT Cash Benefits withdrawal.
Build an EBT SNAP return/refund.
Build an EBT SNAP purchase message.
Build a Fleet card authorization.
Build a FleetOne batch close request.
Build a Gift Card activation message.
Build a Gift Card mini-statement message.
Build a Gift Card add-value (reload) message.
Build a system health check message (0800).
Build a DUKPT key change request (0800).
Build a lane validation request.
Build a refund / credit message.
Build a full reversal message.
Build a credit card sale (auth + auto-capture).
Build a WIC authorization.
Submit a RAFT ISO 8583 message over TCP/TLS.
Functions
@spec build_auth(keyword()) :: auth_msg()
Build a credit card authorization request.
Required opts
:pan— primary account number:expiry— MMYY format:amount— in cents/pennies (integer):merchant_id— RAFT merchant ID:terminal_id— terminal identifier:stan— systems trace audit number (6 digits):entry_mode—"022"(swipe) |"051"(EMV) |"071"(contactless) |"011"(keyed)
Optional opts
:cvv2— card verification value:avs_zip— zip for AVS check:avs_address— address for AVS:track2— raw track 2 data (card-present):emv_data— EMV TLV hex string (Field 55):cashback_amount— cashback in cents (debit):pin_block— encrypted PIN (DUKPT, debit/EBT):incremental— boolean (incremental auth):original_amount— original auth amount (for incremental)
@spec build_balance_inquiry(keyword()) :: balance_inquiry_msg()
Build a balance inquiry message.
@spec build_batch_inquiry(keyword()) :: batch_inquiry_msg()
Build a batch inquiry message (0500).
@spec build_batch_release(keyword()) :: batch_release_msg()
Build a batch release (close) message (0500).
@spec build_batch_totals(keyword()) :: batch_totals_msg()
Build a batch totals request.
@spec build_capture(keyword()) :: capture_msg()
Build a capture (settlement) message.
@spec build_check_auth(keyword()) :: check_auth_msg()
Build a Check/ACH Enhanced Check Authorization.
@spec build_ebt_cash(keyword()) :: ebt_cash_msg()
Build an EBT Cash Benefits withdrawal.
@spec build_ebt_return(keyword()) :: ebt_return_msg()
Build an EBT SNAP return/refund.
@spec build_ebt_snap_purchase(keyword()) :: ebt_snap_purchase_msg()
Build an EBT SNAP purchase message.
@spec build_fleet_auth(keyword()) :: fleet_auth_msg()
Build a Fleet card authorization.
@spec build_fleet_batch_close(keyword()) :: fleet_batch_close_msg()
Build a FleetOne batch close request.
@spec build_gift_activation(keyword()) :: gift_activation_msg()
Build a Gift Card activation message.
@spec build_gift_mini_statement(keyword()) :: gift_mini_statement_msg()
Build a Gift Card mini-statement message.
@spec build_gift_reload(keyword()) :: gift_activation_msg()
Build a Gift Card add-value (reload) message.
@spec build_health_check(keyword()) :: health_check_msg()
Build a system health check message (0800).
@spec build_key_change(keyword()) :: key_change_msg()
Build a DUKPT key change request (0800).
@spec build_lane_validation(keyword()) :: lane_validation_msg()
Build a lane validation request.
@spec build_refund(keyword()) :: refund_msg()
Build a refund / credit message.
@spec build_reversal(keyword()) :: reversal_msg()
Build a full reversal message.
@spec build_sale(keyword()) :: auth_msg()
Build a credit card sale (auth + auto-capture).
@spec build_wic_auth(keyword()) :: wic_auth_msg()
Build a WIC authorization.
@spec submit(%{required(atom()) => term()}, Worldpay.Config.t()) :: {:ok, %{required(String.t()) => term()}} | {:error, Worldpay.Error.t()}
Submit a RAFT ISO 8583 message over TCP/TLS.
In production, RAFT connection details (host, port, TLS certs) are supplied by Worldpay Implementation Manager. This function establishes a TLS connection, frames the message in the RAFT envelope, sends it, and parses the response.
Note: The actual ISO 8583 bit-map encoding and field serialization
are proprietary to RAFT. This function is a integration point; replace
serialize/1 and deserialize/1 with the RAFT-specific codec
provided by Worldpay.