Skip to main content

WPI Version 2.0

Revision #7

Table of Contents

  1. Overview
  2. Interface Structure
  3. Service Types
  4. Payment Solution Implementation
  5. Data Dictionary
  6. Financial Transactions
  7. Management Actions
  8. Information Services

Overview

The Worldline Payment Interface (WPI) is an Android intent-based interface that enables easy and fast integration with payment apps. It is designed to allow additional business applications to execute payments on any Worldline offered SmartPOS device. A SmartPOS device is a payment device that runs Android.

All Worldline Payment Solutions support WPI, which means that business applications that use this interface can run everywhere without any change of code. This makes it easy for developers to build payment apps that are compatible with a wide range of payment devices and payment protocols.

The WPI interface is built on top of the Android Intent mechanism, which allows different parts of an app to communicate with each other in a structured way. By using intents to trigger payment-related actions, the WPI interface simplifies the payment integration process.

What's New in 2.0

Interface Structure Extensions
  • Gather information from Payment Solution
    • Session support
      • WPI_ERR_COND_SESSION_ID_ALREADY_IN_USE
      • Print Receipt Session ID
      • Last Transaction Requests uses Session ID
    • WPI_VERSION changed from Integer to String
    • Clarified the use of messenger service for background actions
Management Functional Extensions
  • Payment Parameterization
    • Acquirer Parameterization
    • Print Receipt
    • Abort Ongoing Payment
Financial Extensions - Request Fields
  • productRecords
    • receiptFormat
    • recognitionTimeout
    • recognitionOptions
    • receiptTarget
Financial Extensions - Response Fields
  • dccUsed, softwareVersion, terminalIdentifier
    • supportedLanguages, cardholderDefaultLanguage, merchantLanguage
    • countryCode, defaultCurrency, supportedCurrencies
    • shopInfo, acquirerProtocol, supportedTicketFormats
    • paymentInformation, paymentSolutionSupportedServiceTypes
    • entryMode, isoTrack1, isoTrack2, isoTrack3
    • token, pan, mediaType, mediaUniqueIdentifier
    • waitForNextAction, nextActionWaitTime, tipAmount

Revision History

RevisionChanges
#7Clarification added for QR Code printed on receipt; JSON format example updated for Receipt
#6Renamed Reservation chapters to Pre-authorization terminology; Clarified paymentSolutionReference usage; Changed isoTrack1 and isoTrack2 data types to String

Interface Structure

The WPI provides a set of intents that developers can use to build apps that work with the interface.

Intent Types

TypeCategoryIntentPurpose
FinancialDisplay Actioncom.worldline.payment.action.PROCESS_TRANSACTIONProcess a financial transaction
ManagementDisplay Actioncom.worldline.payment.action.PROCESS_MANAGEMENTTrigger payment solution managed actions
InformationBackground Actioncom.worldline.payment.action.PROCESS_INFORMATIONBackground management of payment solution specific information

Action Categories

These actions start the payment solution that are processing financial transactions or require user interaction.

- Uses [Android intents](https://developer.android.com/reference/android/content/Intent)

Request Extras

ExtraDescriptionTypeCondition
WPI_SERVICE_TYPESpecify the subtype of action to be executedStringMandatory
WPI_REQUESTJSON structured data mandatory for given service typeStringMandatory for Financial, Optional for Management
WPI_VERSIONUsed WPI versionStringMandatory
WPI_SESSION_IDIdentifier of a WPI exchange between client and payment application. Must be unique, part of response, and not reused for subsequent requests (except for last transaction recovery)StringMandatory
Any business application should store the `WPI_SESSION_ID` before sending the intent. This allows the business application to recover with the last transaction function to check the outcome of a previous transaction in case of a crash.

Response Extras

ExtraDescriptionTypeCondition
WPI_SERVICE_TYPESpecify the subtype of action that was executedStringMandatory
WPI_RESPONSEJSON structured data processed for the requested service typeStringMandatory
WPI_VERSIONUsed WPI versionStringMandatory
WPI_SESSION_IDIdentifier of a WPI exchange provided by the clientStringMandatory

Service Types

Each intent has several service types that specify the request.

Financial Service Types

Service TypePurpose
WPI_SVC_PAYMENTPerform a simple sale transaction (purchase)
WPI_SVC_CANCEL_PAYMENTReverse a previous transaction
WPI_SVC_REFUNDRefund a previous transaction
WPI_SVC_PRE_AUTHORIZATIONPerform a reservation
WPI_SVC_CANCEL_PRE_AUTHORIZATIONCancel a previous reservation
WPI_SVC_UPDATE_PRE_AUTHORIZATIONIncrement a previous reservation
WPI_SVC_CANCEL_UPDATE_PRE_AUTHORIZATIONCancel the previous incrementation of a reservation
WPI_SVC_PAYMENT_COMPLETIONPurchase a reservation / incremented reservation
WPI_SVC_CANCEL_PAYMENT_COMPLETIONCancel the purchased reservation
WPI_SVC_DEFERRED_PAYMENT_AUTHORIZATIONExecute a deferred payment authorization (energy solution use-case)
WPI_SVC_DEFERRED_PAYMENT_COMPLETIONExecute a deferred payment completion of a previous authorization
WPI_SVC_PAYMENT_INSTRUMENT_RECOGNITIONPayment card or non-payment card recognition without performing a real transaction
WPI_SVC_FOLLOW_ON_CREDITReferenced based credit transaction based on a previous transaction

Management Service Types

Service TypePurpose
WPI_SVC_PAYMENT_MENUOpen the payment solution menu
WPI_SVC_DAY_ENDUpload transactions to perform final settlement
WPI_SVC_PAYMENT_PARAMETERIZATIONFetch latest payment solution configuration
WPI_SVC_ACQUIRER_PARAMETERIZATIONFetch latest acquirer parameters
WPI_SVC_PRINT_RECEIPTReceipt printing
WPI_SVC_ABORTAbort an ongoing transaction

Information Service Types

Service TypePurpose
WPI_SVC_LAST_TRANSACTIONReturn the last transaction result
WPI_SVC_PAYMENT_INFORMATIONRetrieve payment solution information and supported service types

Payment Solution Implementation

Mandatory Attributes and Result Structure

  • The technical design defines only mandatory attributes in the request needed to meet every business use case, aiming to be payment protocol agnostic
  • The payment solution shall support every combination of attributes defined in the request
  • The result structure contains every possible attribute to be returned

Payment Solution Reference

The payment solution reference must be designed in a unique way so that all follow-on transactions can be handled with it.

The `paymentSolutionReference` is printed on the receipt as a QR Code: - Compliant with ISO/IEC 18004:2015 (or higher) standard - Highest (H) error correction level - QR Code version selected according to data length - Content limited to `paymentSolutionReference` value only (raw data)

Error Handling

  • The payment solution shall provide a remark that is understandable by a third-party integrator, only in case of an error condition not equal to WPI_ERR_COND_NONE
  • The payment solution shall return WPI_ERR_COND_BUSY in case of a transaction currently in progress

Versioning

The WPI uses versioning with the format Y.X (e.g., 1.0, 2.1):

  • Y (Major Version): Significant milestone with potential breaking changes. A payment solution for version 1.1 must remain compatible with version 1.0
  • X (Minor Version): New features or improvements that are backward compatible within the same major version. A version 2.2 request cannot be used with version 1.1
  • Revision Number: Specific iteration of a minor version (e.g., "3.2 Revision #9"). Includes small fixes, updates, and improvements

Data Dictionary

Request Data

All data must be provided as JSON in the WPI_REQUEST extra.

Field NameDescriptionType
currencyCurrency of the amount. Alpha code value defined in ISO 4217 (e.g., EUR)String
requestedAmountTotal payment amount as minor unit. For example, 11.91 EUR must be sent as 1191Integer
paymentSolutionReferencePrevious transaction reference used for subsequent transactions. Defined by the payment applicationString
referenceReference to be sent to the payment solution for reconciliationString
productRecordsProduct catalogue for energy solution based use-casesArray (Product Record Item)
receiptFormatOverride the default receipt formatArray (Receipt Format)
receiptDelegationDeactivate payment solution receipt handling. Default: trueBoolean
recognitionTimeoutTimeout before an error will be returned in millisecondsInteger
recognitionOptionsCard recognition optionsArray (Recognition Option)
receiptTargetDefines which receipt shall be printedString (Receipt Target)

Product Record Item

Product Records are items exchanged between the integrator and the issuer. The Payment Solution only sends the information.

Field NameDescriptionType
itemIdIdentifier of the item aligned with the issuerInteger
labelLabel of the itemString
unitAmountUnit price as minor unitInteger
quantityNumber of unitsInteger
totalAmountTotal amount as minor unitInteger
currencyCurrency of the amount (ISO 4217)String

Receipt Format

The receipt format defines how to retrieve the receipt. Default is FORMATTED.

ValuePurpose
FORMATTEDReturn the receipt as String (default)
JSONReturn the receipt as JSON

Recognition Option

ValuePurpose
WPI_RECOGNITION_OPTION_RETURN_CUSTOMER_TOKENCreate a token for the card that was read
WPI_RECOGNITION_OPTION_RETURN_MIFARE_DETAILSRecognize a non-payment card like MIFARE. The UID and card type will be evaluated

Receipt Target

ValuePurpose
CARDHOLDERPrint the cardholder receipt
MERCHANTPrint the merchant receipt
BOTHPrint both merchant and cardholder receipts one after the other

Response Data

All data is provided as JSON in the WPI_RESPONSE extra.

Field NameDescriptionType
resultResult of the transactionString (Result)
errorConditionSpecific error reasonString (Error Condition)
actionCodeSpecific action to be performed by the business applicationString (Action Code)
remarkTerminal/transaction specific message for detailed error descriptionsString
timestampDate and time of the transaction (ISO 8601 extended format)String
currencyCurrency code of the transaction (ISO 4217)String
authorizedAmountAmount of the transaction, including TIP, as minor unitInteger
brandNameBrand name of used payment card (MasterCard, VISA, AMEX, etc.)String
customerLanguageLanguage used on screens (ISO 639-1 alpha-2 code)String
applicationIdentifierPayment card application identifier (e.g., A0000000041010 for MasterCard)String
applicationLabelPayment card application label (e.g., MasterCard DEBIT)String
receiptContains the requested receiptsObject (Receipt)
paymentSolutionReferenceTransaction specific and unique identificationString
dccUsedWhether DCC was used for the transactionBoolean
tipAmountThe tip amount entered by the cardholderInteger
referenceReference sent to the payment app for reconciliationString
softwareVersionPayment Solution software versionString
terminalIdentifierTerminal identifier configured for the payment solutionString
supportedLanguagesList of supported languages (ISO 639-1)Array
cardholderDefaultLanguageConfigured cardholder default language (ISO 639-1)String
merchantLanguageConfigured merchant default language (ISO 639-1)String
countryCodeCountry code of the terminal (ISO 3166-1 alpha-2)String
defaultCurrencyDefault currency configured for the payment solution (ISO 4217)String
supportedCurrenciesAll currencies supported by the payment solutionArray
shopInfoShop information of the terminalObject (ShopInfo)
acquirerProtocolUsed acquirer protocol (ep2, CTAP, CB2A, NEXO, ZVT)String
supportedTicketFormatsSupported ticket formatsArray
supportsReceiptDelegationWhether the payment application supports receipt delegationBoolean
paymentInformationDetailed payment solution information per brand & acquirerArray (Payment Information)
paymentSolutionSupportedServiceTypesService types supported by the payment solutionArray
entryModeTechnology used to read the cardString (Entry Mode)
isoTrack1ISO track 1 dataString
isoTrack2ISO track 2 data (PAN data always masked)String
isoTrack3ISO track 3 dataString
tokenToken of the card PAN / UID for customer identificationString
panPAN of the card (always masked)String
mediaTypeMedia type of NFC non-payment card (e.g., MIFARE Ultralight)String
mediaUniqueIdentifierUID of NFC based non-payment cardString
waitForNextActionWhether payment solution keeps card in read modeBoolean
nextActionWaitTimeTime card is kept in read mode, in millisecondsInteger

ShopInfo

Field NameDescriptionType
nameName of the shopString
addressAddress (street and number)String
zipCodeZIP codeString
cityCityString
countryCountryString
logoContent provider URI of the logoString

Result

ResultDescription
WPI_RESULT_SUCCESSSuccessful transaction
WPI_RESULT_FAILUREFailed transaction

Error Conditions

Error ConditionDescription
WPI_ERR_COND_NONENo error occurred
WPI_ERR_COND_SERVICE_NOT_SUPPORTEDRequested service type not supported
WPI_ERR_COND_ABORTEDAbort request was accepted and processed
WPI_ERR_COND_BUSYPayment Application is busy, try later
WPI_ERR_COND_CARD_READ_ERRUnable to read the card
WPI_ERR_COND_USER_CANCELUser aborted the transaction
WPI_ERR_COND_USER_TIMEOUTTimeout while waiting for user interaction
WPI_ERR_COND_HOST_REFUSALAcquirer/Issuer refused the transaction
WPI_ERR_COND_NETWORK_ISSUENetwork issue occurred
WPI_ERR_COND_TRANSACTION_TIMEOUTTimeout during transaction
WPI_ERR_COND_ENCRYPTION_ISSUEEncryption issue caused transaction abort
WPI_ERR_COND_INVALID_KEYSecure component missing required key
WPI_ERR_COND_INVALID_TRANSACTION_REQInvalid transaction request
WPI_ERR_COND_INTERNALInternal error within payment service
WPI_ERR_COND_INVALID_AMOUNTInvalid amount entered
WPI_ERR_COND_INVALID_CURRENCYInvalid currency for transaction
WPI_ERR_COND_APP_NOT_SUPPORTEDNo accepted applications on card
WPI_ERR_COND_MISSING_MANDATORY_PARAMETERMissing mandatory parameter
WPI_ERR_COND_GENERICGeneric unspecified error
WPI_ERR_COND_NOT_INITIALIZEDPayment solution not configured
WPI_ERR_COND_WPI_VERSION_NOT_SUPPORTEDUnsupported WPI version
WPI_ERR_COND_SESSION_ID_ALREADY_IN_USESession ID already used
WPI_ERR_COND_INVALID_PASSWORDIncorrect password for protected transactions
WPI_ERR_COND_RECEIPT_DELEGATION_NOT_SUPPORTEDReceipt delegation not supported

Action Codes

Action CodeDescription
WPI_ACTION_CODE_NONENo additional action required
WPI_ACTION_CODE_ASK_LEGAL_IDENTIFICATIONAsk cardholder for legal identification
WPI_ACTION_CODE_ASK_SIGNATUREAsk cardholder to sign the merchant receipt

Supported Technologies

Entry ModeDescription
WPI_ENTRY_MODE_MAGSTRIPEMagnetic stripe support
WPI_ENTRY_MODE_CHIPEMV chip (ICC) support
WPI_ENTRY_MODE_NFCEMV NFC chip support
WPI_ENTRY_MODE_NFC_MIFARENFC MIFARE support
WPI_ENTRY_MODE_QR_CODEAlternative payment method via QR Code

Payment Information

Field NameDescriptionType
acquirerIdentifierAcquirer identifier for the given brandString
merchantIdentifierMerchant identifier used by the acquirerString
acquirerTerminalIdentifierTerminal identifier used by acquirerString
brandIdentifierBrand specific identifier (AID)String
brandNameBrand name (e.g., Mastercard)String
supportedServiceTypesSupported service types for the brandArray
cancellableServiceTypesService types that can be reversedArray
numberOfCancellableTransactionsNumber of last transactions that can be reversedInteger
supportedTechnologiesSupported technologies for card readingArray
supportsDCCWhether DCC is supportedBoolean

Financial Transactions

Each financial transaction has a minimum set of fields that needs to be present per service type.

Standard Financial Response

Field NameTypeCondition
resultStringMandatory
errorConditionStringMandatory
remarkStringConditional - only for unsuccessful transactions
actionCodeStringConditional - only for unsuccessful transactions
timestampString (ISO 8601)Conditional - only for successful transactions
currencyStringConditional - only for successful transactions
authorizedAmountIntegerConditional - only for successful transactions
customerLanguageStringConditional - only when payment card was used
brandNameStringConditional - only when payment card was used
applicationIdentifierStringConditional - only when payment card was used
applicationLabelStringConditional - only when payment card was used
receiptObjectConditional - always present for successful transactions
paymentSolutionReferenceStringConditional - always present for successful transactions
productRecordsArrayConditional - if present in request

Payment (WPI_SVC_PAYMENT)

Request:

Field NameTypeCondition
currencyStringMandatory
requestedAmountIntegerMandatory
referenceStringOptional
productRecordsArrayOptional - usually for energy solutions

Cancellation

The cancellation (reversal) can be executed for several service types. Use the correct cancellation service type based on the initial service type.

Service Types: WPI_SVC_CANCEL_PAYMENT, WPI_SVC_CANCEL_PRE_AUTHORIZATION, WPI_SVC_CANCEL_UPDATE_PRE_AUTHORIZATION, WPI_SVC_CANCEL_PAYMENT_COMPLETION

Request:

Field NameTypeCondition
paymentSolutionReferenceStringMandatory

Refund (WPI_SVC_REFUND)

Request:

Field NameTypeCondition
currencyStringMandatory
requestedAmountIntegerMandatory
referenceStringOptional

Pre-authorization (WPI_SVC_PRE_AUTHORIZATION)

Request:

Field NameTypeCondition
currencyStringMandatory
requestedAmountIntegerMandatory
referenceStringOptional

Update Pre-authorization (WPI_SVC_UPDATE_PRE_AUTHORIZATION)

Used to increase the pre-authorization amount. The requestedAmount is just the increment amount, not the total.

Request:

Field NameTypeCondition
currencyStringMandatory
requestedAmountIntegerMandatory
paymentSolutionReferenceStringMandatory
referenceStringOptional

Payment Completion (WPI_SVC_PAYMENT_COMPLETION)

To complete a previous pre-authorization. The final amount should be equal to or less than the total pre-authorization amount.

Using a higher amount for completion may result in an unsuccessful transaction because the higher amount was not reserved.

Request:

Field NameTypeCondition
currencyStringMandatory
requestedAmountIntegerMandatory
paymentSolutionReferenceStringMandatory
referenceStringOptional

Deferred Payment

Deferred payment for petrol transaction processing where the actual payment is delayed. Split into authorization and completion.

Service Type: WPI_SVC_DEFERRED_PAYMENT_AUTHORIZATION

| Field Name | Type | Condition |
|------------|------|-----------|
| `currency` | String | Mandatory |
| `requestedAmount` | Integer | Mandatory |
| `reference` | String | Optional |
PSD2 imposes the amount to be present in the request. The "Multi-Session" concept is usually configured for performing "Parallel Transactions" to increase terminal availability.

Payment Instrument Recognition (WPI_SVC_PAYMENT_INSTRUMENT_RECOGNITION)

Used to avoid double tap for contactless entry mode. Two possibilities: token retrieval only, or card recognition with further payment processing.

Request:

Field NameTypeCondition
currencyStringOptional - if transaction processing should happen afterwards
requestedAmountIntegerOptional - if transaction processing should happen afterwards
serviceTypeStringOptional - if transaction processing should happen afterwards
recognitionTimeoutIntegerMandatory
recognitionOptionsArrayMandatory

Response:

Field NameTypeCondition
resultStringMandatory
errorConditionStringMandatory
entryModeStringMandatory on success
customerLanguageStringMandatory on success
isoTrack1StringConditional - magnetic stripe card
isoTrack2StringConditional - magnetic stripe card
isoTrack3StringConditional - magnetic stripe card
tokenStringMandatory for payment card processing
panStringMandatory for payment card processing
mediaTypeStringMandatory for non-payment card processing
mediaUniqueIdentifierStringMandatory for non-payment card processing
waitForNextActionBooleanMandatory on success
nextActionWaitTimeIntegerMandatory on success

Follow on Credit (WPI_SVC_FOLLOW_ON_CREDIT)

Card-not-present transaction using card data from a previous transaction.

Request:

Field NameTypeCondition
currencyStringMandatory
requestedAmountIntegerMandatory
referenceStringOptional
paymentSolutionReferenceStringMandatory

Management Actions

Management actions have an empty request JSON content, except for services that contain a receipt.

Standard Management Response

Field NameTypeCondition
resultStringMandatory
errorConditionStringMandatory
receiptObjectConditional - only for services with receipts

Payment Menu (WPI_SVC_PAYMENT_MENU)

Opens the payment solution menu to trigger payment solution specific actions.

Day-End (WPI_SVC_DAY_END)

Uploads offline transactions to the host and returns a receipt with transaction summary per brand.

Payment Parameterization (WPI_SVC_PAYMENT_PARAMETERIZATION)

Synchronizes payment solution specific parameters with the corresponding management system.

Acquirer Parameterization (WPI_SVC_ACQUIRER_PARAMETERIZATION)

Synchronizes with the acquirer system. Multi-Acquirer solutions do parameterization for all acquirers.

Provides a compliant receipt by the payment solution.

Requirements:

  • A previous transaction was done with a corresponding session ID
  • The SESSION_ID must be the previous request's session ID, not a new one
  • The payment solution supports receipt delivery
  • Referenced request has a receipt available

Request:

Field NameTypeCondition
receiptTargetStringMandatory

Response:

Field NameTypeCondition
resultStringMandatory
errorConditionStringMandatory
remarkStringConditional - on error
Be aware any payment solution will just store the last `SESSION_ID` and response per application (package name). No other WPI requests shall be done before printing the receipt.

Abort (WPI_SVC_ABORT)

Aborts the current ongoing financial transaction. Returns WPI_RESULT_SUCCESS if successfully aborted or no transaction was running.


Information Services

Retrieval of Payment Solution specific information that does not require user interaction.

Last Transaction (WPI_SVC_LAST_TRANSACTION)

Recovery feature to request the last financial transaction response.

Request:

ExtraDescriptionTypeCondition
WPI_SERVICE_TYPESubtype of action to be executedStringMandatory
WPI_VERSIONUsed WPI versionStringMandatory
WPI_SESSION_IDSession ID of the requested session, not a new session IDStringMandatory

Response:

ExtraDescriptionTypeCondition
WPI_SERVICE_TYPEService type of the recovered transactionStringSession known and executed
WPI_RESPONSEFinancial Payment Response objectStringSession known and executed
WPI_VERSIONUsed WPI versionStringMandatory
WPI_SESSION_IDIdentifier of a WPI exchangeStringMandatory

Payment Solution Information (WPI_SVC_PAYMENT_INFORMATION)

Returns all required payment solution information. Returns WPI_ERR_COND_NOT_INITIALIZED if not properly configured.

Response:

Field NameTypeCondition
resultStringMandatory
errorConditionStringMandatory
softwareVersionStringOn success
terminalIdentifierStringOn success
terminalModelStringOn success
macAddressStringOn success
supportedLanguagesArrayOn success
cardholderDefaultLanguageStringOn success
merchantLanguageStringOn success
countryCodeStringOn success
defaultCurrencyStringOn success
supportedCurrenciesArrayOn success
shopInfoObjectOn success
acquirerProtocolStringOn success
supportedTicketFormatsArrayOn success
supportsReceiptDelegationBooleanOn success
paymentInformationArrayOn success
paymentSolutionSupportedServiceTypesArrayOn success

Receipts

Receipt Object Structure

Merchant and cardholder receipts as preformatted text. Width defined by payment application (often 32 characters).

```json
{
  "formatted": {
    "merchant": "    This is to confirm your transaction\\n...",
    "client": "    This is to confirm your transaction\\n..."
  }
}
```
Custom receipt formats should be compliant with local, payment solution, and EMV specifications.