DoSCA method

If the RegisterDevice method is not used Contis will implicitly register the customer’s non-registered device on the first SCA event performed in the app via the DoSCA method. See Combining an SCA event with Device Registration.

The DoSCA method is used to perform SCA on various events. See Appendix for detailed list of events.

The client needs to execute the DoSCA method when:

  • An API 900 Response is received – which happens whenever an action originating in the App and qualifying for SCA is requested
  • The GetSCAPendingRequest Method is called. Whenever an action originating out of app and qualifying for SCA takes place this method will enable the client to present the SDK UI to the customer for authentication to be performed the next time the customer opens their app (oldest presented first)
  • A Push notification is received (optional) – sent from the Contis platform to the customer (if this is set within the RegisterDevice method flow)

Each of the above contain the SCA reference number (SCAReference) that is unique for each transaction.

Note: In the case of the push notification this is not visible to the customer, and only the developer can parse it from the push data.

  • The DoSCA method validates the unique SCAReference number of the transaction. The SDK screen will only open if the reference number is valid, otherwise it will return an error message to the customer.

When the client calls this method it will display the necessary transaction details to the customer, e.g. the payment amount and beneficiary.

  • When the customer successfully completes the transaction, it will close the SDK transaction screen and trigger the onSuccess

onSuccess (String responseCode, String responseMessage)

If there is a problem with the transaction, it will close the SDK screen and trigger the onFailed response along with the error code or error description.


onFailure (String responseCode, String responseMessage)

The following is a code example for device registration OnSuccess() and OnFailure() events on the Android platform.

SDKTheme

sdkTheme = new SDKTheme(R.drawable.logo, getResources().getColor(R.color.primaryColor), 
                                         getResources().getColor(R.color.secondaryColor), 
                                         getResources().getColor(R.color.primaryButtonTextColor), 
                                         getResources().getColor(R.color.secondaryButtonColor), 
                                         TitleFontSize, TitleFontStyle, 
DescriptionFontSize, DescriptionFontStyle,
EditFieldFontSize, EditFieldFontStyle,
ButtonFontSize, ButtonFontStyle);

Error messages (Client)

SDK ERRORERROR MESSAGE
Product key is missing while calling methodProduct key is missing, please check with your app configuration.
Private key is missing while calling method“Private key is missing, please check with your app configuration.”
Public key is missing while calling methodPublic key is missing, please check with your app configuration.
Required field missing while calling method except above 1-3 scenarioRequired field missing.
When user cancel authentication.Authentication cancelled.
If the certificate is invalid and we are getting API response code = 403Your certificate has been expired or invalid.
Signature not verified“Something has gone wrong please try again.”
JSONException“Something has gone wrong please try again.”
response code = 500“Something has gone wrong please try again.”
IOException for BufferedReader“Something has gone wrong please try again.”
API response is null“Something has gone wrong please try again.”
API response not containing any data in success response“Something has gone wrong please try again.”
API response not containing any error in error response“Something has gone wrong please try again.”

DoSCA method parameters

NAMETYPECONSTRAINTSREQUIREDDESCRIPTION
ContextActivity
UIViewController
N/A This is a view object of the current view.RequiredThis field is required to open the SCA screen.
SCAReferencestringUp to 50 charactersRequired

This is a unique SCA reference number for the transaction, which is needed to complete the transaction.

Note : This field contains a unique autogenerated ID (GUID).

Theme

SDKTheme (Android)

SDKTheme (iOS)

N/ARequiredThis parameter contains the required colour, font, text size of the button, label, etc. This needs to be finalised once the design is received.
ProductKeystringUp to 50 charactersRequiredThis is the unique key generated by Contis for each client using the SDK.
Only a valid key will initiate the SDK, otherwise it will return an error.This field contains a unique autogenerated ID (GUID).
PrivateKeystringUp to 2048 charactersRequired

This is a private PKI key generated by the client. It is used to call the Contis API from the SDK.

This field contains a unique autogenerated private key for PKI.

PublicKeystringUp to 2048 charactersRequired

This is a public PKI key generated by Contis. It is used to call the Contis API from the SDK.

This field contains a unique autogenerated private key for PKI.

ContisListenerContisListenerN/ARequiredThis parameter is used to bind success or failure events.