MellonGroupPOS.getApiKey Method

This method pairs the user's account with the 3rd party service.. 
Public Function getApiKey( _ 
ByVal posCode As String
) As Dictionary(Of String, String)
This language is not supported or no code example is available.
public Dictionary<string, string> getApiKey( 
string posCode 
)
This language is not supported or no code example is available.

Parameters

posCode
string

The EFT-POS authentication code

Return Value

Dictionary<string, string>

It returns an API key, which will be used in every method. 
IMPORTANT: The API Key should be saved by the software!

Remarks
 

In order for the client software to retrieve the X-Api-Key, the following workflow is to be followed:

  1. The user turns on the EFT-POS Or opens the softPOS application on their phone
  2. The user navigates to the relevant POS menu option named "Link with 3rd party services"
  3. The EFT-POS shows an authentication code. The user enters it in the client software.
  4. The client software exchanges (redeems) the authentication code with the API key, using the authentication code redeem API Call As described below
  5. The client software saves the API key And uses it for the rest of the integration lifetime

The client software can save/cache the API key And use it To start transactions at any point In time. 
The merchant has the ability To revoke the access permissions at any time, so the Api key may become invalid. 
In this case, the client software should handle this as an error condition.

Example
 
 Dictionary<string, string> myAPI = mlg.getApiKey("12345678"); // Where '12345678' is the POS Authentication Code
 string APIKey = myAPI["ID"];
 					
This language is not supported or no code example is available.
 Dim myAPI As Dictionary(Of String, String) = mlg.getApiKey("12345678") 'Where '12345678' is the POS Authentication Code
 Dim APIKey as string = myAPI("ID")
 					
This language is not supported or no code example is available.

.NET Framework

Supported in: 3.5 or newer

In this article

Definition