Skip to main content

WMI - Management Interface

Interface structure and activity launch​

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

For management purpose com.worldline.management.action.PROCESS_OPERATION intent should be used.

TypeCategoryIntentPurpose
ManagementDisplay Action - these actions start the payment solution that are processing financial transactions or require user interaction.
Notice: Android intents are used
com.worldline.payment.action.PROCESS_OPERATIONProcess a management request

Here is intent creation code:

    public Intent formatWmiRequest(String sessionId, WpiPurchaseRequest req) \{
String json = GSON.toJson(req);

Intent intent = new Intent("com.worldline.management.action.WMI_SVC_CHECK_STATUS");
intent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
intent.putExtra("WMI_SERVICE_TYPE", "WPI_SVC_PAYMENT");
intent.putExtra("WMI_REQUEST", json);
intent.putExtra("SHOW_OVERLAY ", false)

return intent;
}

Intent contains a set of extras and needs to have FLAG_ACTIVITY_REORDER_TO_FRONT set.

ExtraDescriptionTypeCondition
WMI_SERVICE_TYPESpecify the subtype of action to be executed, see WMI Service TypesStringMandatory
WMI_REQUESTThe request contains JSON structured data that is mandatory for the given service typeStringMandatory
SHOW_OVERLAYThe flag controls whether a transparent overlay (false) or a spinner (true) should be displayed at the start of the intentBooleanOptional

To launch intent registerForActivityResult method should be used. In the response, the intent returns the following data.

ExtraDescriptionTypeCondition
WMI_SERVICE_TYPESpecify the subtype of action to be executedStringMandatory
WMI_RESPONSEThe response contains JSON structured data processed for the requested service typeStringMandatory

And here is response parsing sample code:

    public WmiPurchaseResponse parsePurchaseResponse(ActivityResult result) {

Intent intent = result.getData();

String json = intent.getStringExtra("WMI_RESPONSE");

WmiPurchaseResponse resp = GSON.fromJson(json, WmiPurchaseResponse.class);

return resp;
}
Please remember
The important thing to note is that ToM can only handle one intent invocation at a time (of any intent type — it doesn’t matter whether it’s a financial or informational function). Therefore, it is crucial to make the next request only after receiving the response from the previous one.

Checking application status​

This function is intended to be used outside of payment acceptance context to determine the current Tap on Mobile application status and assess whether it is properly authenticated and ready to perform payment acceptance functions.

Request

ExtraDescriptionTypeCondition
WMI_SERVICE_TYPEWMI_SVC_CHECK_STATUSStringMandatory

WMI_SVC_CHECK_STATUS - list of supported request parameters None – might be created for future use.

Response

ExtraDescriptionTypeCondition
WMI_SERVICE_TYPEWMI_SVC_CHECK_STATUSStringMandatory
WMI_RESPONSEJSON structured response parameters as described in subsequent tableStringMandatory

WMI_SVC_CHECK_STATUS - list of supported response parameters

Field nameDescriptionTypeCondition
resultResult of the transaction, see WMI ResultStringMandatory
errorConditionSpecific error reason
For more information check WMI Error codes)
StringMandatory
remarkTerminal / transaction specific message for detailed error descriptions. Text provided by payment app.StringConditional – only for NOT successful transaction
appStatusTap on Mobile application status indicating whether application is already registered.
For more information check WMI Application Statuses

Terminal registration​

This function is intended to be used outside of payment acceptance context to determine the current Tap on Mobile application status and assess whether it is properly authenticated and ready to perform payment acceptance functions.

Request

ExtraDesriptionTypeCondition
WMI_SERVICE_TYPEWMI_SVC_REGISTERStringMandatory

WMI_SVC_REGISTER - list of supported request parameters

Field nameDescriptionTypeCondition
registrationTokenTID specific registration token retrieved from Tap on Mobile backend (Merchant API); in case this parameter is not present, Tap on Mobile app will collect all required permissions and launch QR-code reader to scan the registration token;StringOptional

Response

ExtraDescriptionTypeCondition
WMI_SERVICE_TYPEWMI_SVC_REGISTERStringMandatory
WMI_RESPONSEJSON structured response parameters as described in subsequent tableStringMandatory

WMI_RESPONSE - list of supported response parameters

Field nameDescriptionTypeCondition
resultResult of the transaction, see WMI ResultStringMandatory
errorConditionSpecific error reason
For more information check WMI Error codes
StringMandatory
remarkTerminal / transaction specific message for detailed error descriptions. Text provided by payment app.StringConditional – only for NOT successful transaction

Terminal unregistration​

This function is intended to be used only with already registered terminal. It allows to unregister the currently assigned TID from the mobile application instance.

Request

ExtraDesriptionTypeCondition
WMI_SERVICE_TYPEWMI_SVC_AUTH_UNREGISTERStringMandatory

WMI_SVC_AUTH_UNREGISTER - list of supported request parameters None – might be created for future use.

Response

ExtraDesriptionTypeCondition
WMI_SERVICE_TYPEWMI_SVC_AUTH_UNREGISTERStringMandatory
WMI_RESPONSEJSON structured response parameters as described in subsequent tableStringMandatory

WMI_SVC_AUTH_UNREGISTER - list of supported response parameters**

Field nameDescriptionTypeCondition
resultResult of the transaction, see WMI ResultStringMandatory
errorConditionSpecific error reason
For more information check WMI Error codes and proper error handling
StringMandatory
remarkTerminal / transaction specific message for detailed error descriptions. Text provided by payment app.StringConditional – only for NOT successful transaction

Warning: Be cautious when using the unregister function, see more with Unregister

WMI Error codes​

Error conditionDescription
WMI_ERR_COND_NONEWill always be present if no error occurred, confirms successful result
WMI_ERR_COND_AUTH_NOT_POSSIBLEValid terminal registration was not found.
WMI_ERR_COND_GENERICA mobile application generic error that is not explicitly outlined here
WMI_ERR_COND_INTERNALBackend-driven generic error that is not explicitly outlined here
WMI_ERR_COND_INVALID_JSONWrong structure of WMI_REQUEST json
WMI_ERR_COND_NETWORK_ISSUEProblems with network connection
WMI_ERR_COND_SERVICE_NOT_SUPPORTEDRequested service type is not supported by the Payment Application
WMI_ERR_COND_TERMINAL_BUSYTerminal communication is exclusively restricted to another 3rd party application package
WMI_ERR_PERMISSIONTo old version of Tap on Mobile application. Upgrade to newest is needed

WMI Application Statuses​

StatusDescription
NEWTechnical status (should not be expected) indicating that the registration process may be performed; the Tap on Mobile application is not registered.
INITIALIZEDThe registration process may be performed; the Tap on Mobile application is not registered.
REGISTEREDThe Tap on Mobile application is registered but not yet authenticated. WPI functions may be performed.
AUTHENTICATEDTechnical status (should not be expected) indicating that the Tap on Mobile application is still performing configuration activities.
ACTIVEThe Tap on Mobile application is authenticated and ready to perform payment acceptance functions (WPI).
ERRORThe Tap on Mobile application crashed.

WMI Result​

ResultDescription
WMI_RESULT_SUCCESSIn case of a successful transaction
WMI_RESULT_FAILUREIn case of a failed transaction

WMI Service Types​

Action CodeDescription
WMI_SVC_CHECK_STATUSService type for checking the current Tap on Mobile application status
WMI_SVC_REGISTERService type for initiating the terminal enrollment sequence
WMI_SVC_AUTH_UNREGISTERService type for unregistering the terminal by the third-party application package previously used for enrollment