### SDK Setup Progress States Source: https://github.com/thalesgroup/ttrsdk-docs/blob/master/android/6.13.1/com/gemalto/mfs/mwsdk/sdkconfig/SDKSetupProgressState.html This section details the various states indicating the progress of the SDK setup process. Each state represents a specific event or completion status during initialization. ```APIDOC ## Enum: SDKSetupProgressState ### Description Represents the different states of progress during the SDK setup and initialization process. ### Constants * **PROVISION_MODULE_INIT_STARTED** Indicates that the Provisioning Module's initialization has started. * **PROVISION_MODULE_INIT_COMPLETED** Indicates that the Provisioning Module's initialization has completed. * **PAYMENT_MODULE_INIT_STARTED** Indicates that the Payment Module's initialization has started. * **PAYMENT_MODULE_INIT_COMPLETED** Indicates that the Payment Module's initialization has completed. * **DB_MIGRATION_UPDATE** Indicates that the Database Migration Update has started. * **SDK_INIT_COMPLETED** Indicates that the SDK initialization has completed. ### Methods * **values()** Returns an array containing the constants of this enum class, in the order they are declared. Returns: an array containing the constants of this enum class, in the order they are declared * **valueOf(String name)** Returns the enum constant of this class with the specified name. The string must match *exactly* an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.) Parameters: * `name` (String) - The name of the enum constant to be returned. Returns: The enum constant with the specified name. Throws: * `IllegalArgumentException` - If this enum class has no constant with the specified name. * `NullPointerException` - If the argument is null. ``` -------------------------------- ### SDKControllerListener Methods Source: https://github.com/thalesgroup/ttrsdk-docs/blob/master/android/6.13.1/index-all.html Callbacks for SDK setup completion and progress. ```APIDOC ## onSetupComplete ### Description Notify the SDK configuration ended successfully. ### Method Callback ### Endpoint N/A ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```json {} ``` ### Response #### Success Response (200) None (Callback method) #### Response Example None ``` ```APIDOC ## onSetupProgress ### Description Notify the SDK Configuration, initialization and upgrade status as applicable. ### Method Callback ### Endpoint N/A ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```json { "progress_state": "SDKSetupProgressState", "message": "string" } ``` ### Response #### Success Response (200) None (Callback method) #### Response Example None ``` -------------------------------- ### DeviceCVMPreEntryService Class Source: https://github.com/thalesgroup/ttrsdk-docs/blob/master/android/6.13.1/allclasses-index.html Starts the DeviceCVMPreEntryReceiver. ```APIDOC ## DeviceCVMPreEntryService ### Description DeviceCVMPreEntryService that start the DeviceCVMPreEntryReceiver. ### Method N/A (Class) ### Endpoint N/A ### Parameters N/A ### Request Example N/A ### Response N/A ### Error Handling N/A ``` -------------------------------- ### APDUProcessorSetupCallbacks Source: https://github.com/thalesgroup/ttrsdk-docs/blob/master/android/6.13.1/allclasses-index.html Interface containing callback methods for APDU processing setup. ```APIDOC ## APDUProcessorSetupCallbacks ### Description This interface contain callback methods used for APDUs processing. ### Method N/A (Interface) ### Endpoint N/A ### Parameters N/A ### Request Example N/A ### Response N/A ### Error Handling N/A ``` -------------------------------- ### SDK Setup Progress States Source: https://github.com/thalesgroup/ttrsdk-docs/blob/master/android/6.13.1/index-all.html Enum constants indicating the progress of the Payment Module's initialization. ```APIDOC ## Enum: SDKSetupProgressState ### Description Indicates the progress of the Payment Module's initialization. ### Constants - **PAYMENT_MODULE_INIT_COMPLETED**: Enum constant. Indicates that the Payment Module's initialization has completed. - **PAYMENT_MODULE_INIT_STARTED**: Enum constant. Indicates that the Payment Module's initialization has started. ``` -------------------------------- ### Start Card Emulation Source: https://github.com/thalesgroup/ttrsdk-docs/blob/master/ios/7.3.0/Actors/ContactlessPaymentSession.html Asynchronously starts the card emulation process, presenting a modal UI to the user. This API is intended to be called after authentication is completed or when the POS is connected. It can throw errors related to device environment safety or other unknown issues. ```swift @available(iOS 17.4, *) nonisolated public func startEmulation() async throws ``` -------------------------------- ### onStartCommand Method Source: https://github.com/thalesgroup/ttrsdk-docs/blob/master/android/6.13.1/com/gemalto/mfs/mwsdk/payment/cdcvm/DeviceCVMPreEntryService.html This method is called by the system when the service is started. It handles incoming intents and manages the service's lifecycle. ```APIDOC ## onStartCommand Method ### Description Called by the system when the service is started. This method handles incoming intents and manages the service's lifecycle. It overrides the `onStartCommand` method from the `android.app.Service` class. ### Method `public int onStartCommand(android.content.Intent intent, int flags, int startId)` ### Endpoint N/A ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **intent** (android.content.Intent) - The Intent that started this service, as given to `Context.startService()`, or null if it started as a direct service. - **flags** (int) - Additional flags to control whether the service is restarted. - **startId** (int) - A unique integer representing this specific starting request. ### Request Example ```json { "example": "Intent object, flags, and startId are passed by the system." } ``` ### Response #### Success Response (200) - **int** - The return value indicates how the service should be treated by the system after it has been started. - `START_STICKY`: If this service's process is killed while it is started, then leave it in the started state but without a command to be delivered to. In this case, the system will try to re-create the service and deliver the last intent to it when it has enough memory. - `START_NOT_STICKY`: If this service's process is killed while it is started, then do not re-create the service. - `START_REDELIVER_INTENT`: If this service's process is killed while it is started, then re-create the service and deliver the last intent to it. #### Response Example ```json { "example": "START_STICKY" } ``` ``` -------------------------------- ### Get Provisioning Business Service Source: https://github.com/thalesgroup/ttrsdk-docs/blob/master/android/6.13.1/com/gemalto/mfs/mwsdk/provisioning/ProvisioningServiceManager.html Retrieves an instance of the ProvisioningBusinessService. ```APIDOC ## Get Provisioning Business Service ### Description To retrieve an instance of the `ProvisioningBusinessService`. ### Method GET ### Endpoint `/provisioning/provisioningBusinessService` ### Parameters None ### Request Example ```java ProvisioningBusinessService provisioningService = ProvisioningServiceManager.getProvisioningBusinessService(); ``` ### Response #### Success Response (200) - **instance** (`ProvisioningBusinessService`) - An instance of the ProvisioningBusinessService. ``` -------------------------------- ### MGConfigurationChangeService onStartCommand Method Source: https://github.com/thalesgroup/ttrsdk-docs/blob/master/android/6.13.1/com/gemalto/mfs/mwsdk/mobilegateway/MGConfigurationChangeService.html Called by the system every time a client explicitly starts the service. This method is deprecated. ```java public int onStartCommand(android.content.Intent intent, int flags, int startId) ``` -------------------------------- ### SDK Setup Progress States Enum Constants (Java) Source: https://github.com/thalesgroup/ttrsdk-docs/blob/master/android/6.13.1/com/gemalto/mfs/mwsdk/sdkconfig/SDKSetupProgressState.html Defines the various states indicating the progress of the SDK setup process. These states cover module initialization (Provisioning, Payment), database migration, and overall SDK completion. Each constant is a static final field of the SDKSetupProgressState enum. ```java public static final SDKSetupProgressState SDK_UPGRADE_COMPLETED public static final SDKSetupProgressState PROVISION_MODULE_INIT_STARTED public static final SDKSetupProgressState PROVISION_MODULE_INIT_COMPLETED public static final SDKSetupProgressState PAYMENT_MODULE_INIT_STARTED public static final SDKSetupProgressState PAYMENT_MODULE_INIT_COMPLETED public static final SDKSetupProgressState DB_MIGRATION_UPDATE public static final SDKSetupProgressState SDK_INIT_COMPLETED ``` -------------------------------- ### SDKSetupProgressState Enum Constants Source: https://github.com/thalesgroup/ttrsdk-docs/blob/master/android/6.13.1/com/gemalto/mfs/mwsdk/sdkconfig/SDKSetupProgressState.html This section details the various states of the SDK setup process as represented by the SDKSetupProgressState enum constants. ```APIDOC ## SDKSetupProgressState Enum ### Description Represents the progress states during the setup and initialization of the SDK. ### Enum Constants #### SDK_INIT_STARTED - **Description**: Indicates that the SDK initialization has started. #### DCM_MODULE_INIT_STARTED - **Description**: Indicates that the Digitalized Card Manager Module's initialization has started. #### DCM_MODULE_INIT_COMPLETED - **Description**: Indicates that the Digitalized Card Manager Module's initialization has completed. #### SDK_UPGRADE_STARTED - **Description**: Indicates that the SDK Upgrade has started. #### SDK_UPGRADE_COMPLETED - **Description**: Indicates that the SDK Upgrade has completed. ### Static Methods #### valueOf(String name) - **Description**: Returns the enum constant of this class with the specified name. - **Method**: static - **Parameters**: - **name** (String) - Required - The name of the enum constant to return. #### values() - **Description**: Returns an array containing the constants of this enum class, in the order they are declared. - **Method**: static - **Returns**: SDKSetupProgressState[] ``` -------------------------------- ### Get Description Source: https://github.com/thalesgroup/ttrsdk-docs/blob/master/android/6.13.1/com/gemalto/mfs/mwsdk/cdcvm/DeviceCVMVerifierInput.html Retrieves the description that was set during the constructor initialization. ```APIDOC ## GET /description ### Description Retrieves the description set in the constructor. ### Method GET ### Endpoint /description ### Parameters #### Query Parameters None #### Request Body None ### Response #### Success Response (200) - **description** (CharSequence) - The description of the component. #### Response Example { "description": "Example Description" } ``` -------------------------------- ### DataPreparationListener Interface Source: https://github.com/thalesgroup/ttrsdk-docs/blob/master/android/6.13.1/allclasses-index.html This interface allows the mobile wallet to get the state of the VAS Provisioning process. ```APIDOC ## DataPreparationListener ### Description This interface will allow the mobile wallet to get the state of the Vas Provisioning process. ### Method N/A (Interface) ### Endpoint N/A ### Parameters N/A ### Request Example N/A ### Response N/A ### Error Handling N/A ``` -------------------------------- ### SDK Initialization with Default Configuration Source: https://github.com/thalesgroup/ttrsdk-docs/blob/master/android/6.13.1/com/gemalto/mfs/mwsdk/payment/sdkconfig/SDKInitializer.html Initializes the SDK with a context, using the default configuration. This is a convenient method when no specific custom configuration is needed. ```APIDOC ## POST /initialize ### Description Initializes the SDK with a context, using the default configuration. This is a convenient method when no specific custom configuration is needed. The call is idempotent and can be called multiple times. ### Method POST ### Endpoint /initialize ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **context** (android.content.Context) - Required - Android Context ### Request Example ```json { "context": "" } ``` ### Response #### Success Response (200) - **status** (string) - Indicates successful initialization. #### Response Example ```json { "status": "SDK initialized successfully" } ``` #### Error Response (400) - **error** (string) - Description of the initialization error. #### Error Example ```json { "error": "SDKInitializationException: Failed to initialize SDK." } ``` ``` -------------------------------- ### Get Transaction Type - Java Source: https://github.com/thalesgroup/ttrsdk-docs/blob/master/android/6.13.1/com/gemalto/mfs/mwsdk/payment/engine/TransactionContext.html This method retrieves the type of the transaction. Examples include PURCHASE, REFUND, and CASHBACK. The type is returned as a byte. ```java byte getTrxType() Gets the transaction type (such as PURCHASE, REFUND, CASHBACK). ``` -------------------------------- ### Get Auxiliary Card Token Details (Java) Source: https://github.com/thalesgroup/ttrsdk-docs/blob/master/android/6.13.1/com/gemalto/mfs/mwsdk/mobilegateway/enrollment/CardMetaData.html Retrieves the last digits and expiry date of an auxiliary card's token. This information is available starting from version 6.12 and is provided as Strings. ```Java String getAuxiliaryTokenLastDigits() Only available for auxiliary card. Last (four or five) token PAN digits to display Since: 6.12 String getAuxiliaryTokenExpiryDate() Only available for auxiliary card. Token expiry date is in MMYY format. Since: 6.12 ``` -------------------------------- ### SDK Initialization with Custom Configuration Source: https://github.com/thalesgroup/ttrsdk-docs/blob/master/android/6.13.1/com/gemalto/mfs/mwsdk/payment/sdkconfig/SDKInitializer.html Initializes the SDK with a context and a custom configuration. This method is recommended for initializing the SDK with specific application settings. ```APIDOC ## POST /initialize ### Description Initializes the SDK with a context and a custom configuration. This method is recommended for initializing the SDK with specific application settings. The call is idempotent and can be called multiple times. ### Method POST ### Endpoint /initialize ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **context** (android.content.Context) - Required - Android Context - **configuration** (com.gemalto.mfs.mwsdk.payment.CustomConfiguration) - Required - Custom configurations used by the application. ### Request Example ```json { "context": "", "configuration": "" } ``` ### Response #### Success Response (200) - **status** (string) - Indicates successful initialization. #### Response Example ```json { "status": "SDK initialized successfully" } ``` #### Error Response (400) - **error** (string) - Description of the initialization error. #### Error Example ```json { "error": "SDKInitializationException: Failed to initialize SDK." } ``` ``` -------------------------------- ### Start Contactless Payment Flow Source: https://github.com/thalesgroup/ttrsdk-docs/blob/master/ios/7.3.0/Actors/ContactlessPaymentSession.html Asynchronously initiates a contactless payment flow using the provided input data. This method is crucial for beginning the actual payment process after necessary setup and authorizations are complete. ```swift public func startPayment(with inputData: ContactlessPaymentInputData) async throws ``` -------------------------------- ### SDK Initialization and Configuration Source: https://github.com/thalesgroup/ttrsdk-docs/blob/master/android/6.13.1/deprecated-list.html This section details the various methods for initializing and configuring the SDK, including different overloads available for different versions and requirements. ```APIDOC ## SDK Initialization and Configuration ### Description Methods for initializing and configuring the SDK with different parameters and version support. ### Methods #### `SDKInitializer.configure(Context, Notification, CustomConfiguration)` - **Method**: POST (or similar, depending on underlying implementation) - **Endpoint**: N/A (This is a method call within the SDK) - **Parameters**: - **context** (Context) - Required - The application context. - **notification** (Notification) - Required - Notification object for SDK events. - **customConfiguration** (CustomConfiguration) - Required - Custom configuration for the SDK. #### `SDKInitializer.configure(Context, CustomConfiguration)` - **Description**: Use this method since version 6.8.0 for simpler configuration. - **Method**: POST (or similar) - **Endpoint**: N/A - **Parameters**: - **context** (Context) - Required - The application context. - **customConfiguration** (CustomConfiguration) - Required - Custom configuration for the SDK. #### `SDKInitializer.initialize(Context, Notification, CustomConfiguration)` - **Method**: POST (or similar) - **Endpoint**: N/A - **Parameters**: - **context** (Context) - Required - The application context. - **notification** (Notification) - Required - Notification object for SDK events. - **customConfiguration** (CustomConfiguration) - Required - Custom configuration for the SDK. #### `SDKInitializer.initialize(Context, CustomConfiguration)` - **Description**: Use this method since version 6.8.0 for simpler initialization. - **Method**: POST (or similar) - **Endpoint**: N/A - **Parameters**: - **context** (Context) - Required - The application context. - **customConfiguration** (CustomConfiguration) - Required - Custom configuration for the SDK. #### `SDKInitializer.initialize(Context, SDKControllerListener, Notification)` - **Method**: POST (or similar) - **Endpoint**: N/A - **Parameters**: - **context** (Context) - Required - The application context. - **sdkControllerListener** (SDKControllerListener) - Required - Listener for SDK controller events. - **notification** (Notification) - Required - Notification object for SDK events. #### `SDKInitializer.initialize(Context, SDKControllerListener)` - **Description**: Use this method since version 6.8.0 for simpler initialization with a listener. - **Method**: POST (or similar) - **Endpoint**: N/A - **Parameters**: - **context** (Context) - Required - The application context. - **sdkControllerListener** (SDKControllerListener) - Required - Listener for SDK controller events. #### `SDKInitializer.initialize(Context, SDKControllerListener, Notification, CustomConfiguration)` - **Method**: POST (or similar) - **Endpoint**: N/A - **Parameters**: - **context** (Context) - Required - The application context. - **sdkControllerListener** (SDKControllerListener) - Required - Listener for SDK controller events. - **notification** (Notification) - Required - Notification object for SDK events. - **customConfiguration** (CustomConfiguration) - Required - Custom configuration for the SDK. #### `SDKInitializer.initialize(Context, CustomConfiguration, SDKControllerListener)` - **Description**: Use this method since version 6.8.0 for initialization with custom configuration and listener. - **Method**: POST (or similar) - **Endpoint**: N/A - **Parameters**: - **context** (Context) - Required - The application context. - **customConfiguration** (CustomConfiguration) - Required - Custom configuration for the SDK. - **sdkControllerListener** (SDKControllerListener) - Required - Listener for SDK controller events. ### Request Example ```json { "context": "", "notification": "", "customConfiguration": "", "sdkControllerListener": "" } ``` ### Response #### Success Response (200) - **status** (string) - Indicates the success of the operation. #### Response Example ```json { "status": "initialized" } ``` ``` -------------------------------- ### Get Other Amount for MasterCard Transaction Source: https://github.com/thalesgroup/ttrsdk-docs/blob/master/android/6.13.1/com/gemalto/mfs/mwsdk/payment/engine/MasterCardTransactionInfo.html This method returns the other amount of the transaction, formatted according to the currency's ISO-4217 standard for decimal places. For example, Japanese Yen has 0 decimal places, while Euro has 2. The return type is a double. ```java double getOtherAmount() Get the other amount of the transaction according to the currency used based on ISO-4217 Example : Based on ISO 4217 - 'E' denotes how many values are present after decimal points for that currency Japanese Yen - E = 0 - No decimal values Raw Value (getRawAmount) = 0x00, 0x00, 0x00, 0x00, 0x50, 0x00 Value = 5000 Euro, IDR and Brazil Real - E =2 - 2 values after decimal points Raw Value (getRawAmount) = 0x00, 0x00, 0x00, 0x00, 0x50, 0x65 Value = 50.65 Joranian Dinar - E = 3 - 3 values after decimal points Raw Value (getRawAmount) = 0x00, 0x00, 0x00, 0x00, 0x56, 0x65 Value = 56.65 Unidad de Fomento - E = 4 - 4 values after decimal points Raw Value (getRawAmount) = 0x00, 0x00, 0x00, 0x00, 0x56, 0x65 Value = 0.5665 ``` -------------------------------- ### SDK Initialization API Source: https://github.com/thalesgroup/ttrsdk-docs/blob/master/android/6.13.1/index-all.html This section details the various methods for initializing the SDK, with options for default or custom configurations, and listener callbacks. ```APIDOC ## POST /sdk/initialize ### Description Initializes the SDK with default configuration. ### Method POST ### Endpoint /sdk/initialize ### Parameters #### Query Parameters - **context** (Context) - Required - The application context. ### Request Example ```json { "context": "android.content.Context" } ``` ### Response #### Success Response (200) - **status** (string) - Indicates successful initialization. #### Response Example ```json { "status": "initialized" } ``` ``` ```APIDOC ## POST /sdk/initialize/custom ### Description Initializes the SDK with a customized configuration. ### Method POST ### Endpoint /sdk/initialize/custom ### Parameters #### Query Parameters - **context** (Context) - Required - The application context. - **customConfiguration** (CustomConfiguration) - Optional - Custom settings for the SDK. ### Request Example ```json { "context": "android.content.Context", "customConfiguration": {} } ``` ### Response #### Success Response (200) - **status** (string) - Indicates successful initialization. #### Response Example ```json { "status": "initialized_custom" } ``` ``` ```APIDOC ## POST /sdk/initialize/listener ### Description Initializes the SDK with default configuration and a listener for SDK events. ### Method POST ### Endpoint /sdk/initialize/listener ### Parameters #### Query Parameters - **context** (Context) - Required - The application context. - **listener** (SDKControllerListener) - Required - Listener for SDK events. ### Request Example ```json { "context": "android.content.Context", "listener": "com.gemalto.mfs.mwsdk.sdkconfig.SDKControllerListener" } ``` ### Response #### Success Response (200) - **status** (string) - Indicates successful initialization. #### Response Example ```json { "status": "initialized_listener" } ``` ``` ```APIDOC ## POST /sdk/initialize/custom/listener ### Description Initializes the SDK with custom configuration and a listener for SDK events. ### Method POST ### Endpoint /sdk/initialize/custom/listener ### Parameters #### Query Parameters - **context** (Context) - Required - The application context. - **customConfiguration** (CustomConfiguration) - Optional - Custom settings for the SDK. - **listener** (SDKControllerListener) - Required - Listener for SDK events. ### Request Example ```json { "context": "android.content.Context", "customConfiguration": {}, "listener": "com.gemalto.mfs.mwsdk.sdkconfig.SDKControllerListener" } ``` ### Response #### Success Response (200) - **status** (string) - Indicates successful initialization. #### Response Example ```json { "status": "initialized_custom_listener" } ``` ``` -------------------------------- ### Contactless Payment Service Listener - Transaction Started Source: https://github.com/thalesgroup/ttrsdk-docs/blob/master/android/6.13.1/index-all.html Callback invoked when a transaction starts, replacing onPaymentStarted(). ```APIDOC ## onTransactionStarted() ### Description Replaces onPaymentStarted(). Called when a transaction begins. ### Method Callback ### Endpoint N/A ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response None #### Response Example None ``` -------------------------------- ### Get Byte Array Code Representation (Java) Source: https://github.com/thalesgroup/ttrsdk-docs/blob/master/android/6.13.1/com/gemalto/mfs/mwsdk/payment/engine/CdcvmSupported.html Retrieves the byte array representation of an object. This method is part of the TTRSDK and is used to get the underlying code as bytes. ```java public byte[] getCode() ``` -------------------------------- ### SDK Initialization Source: https://github.com/thalesgroup/ttrsdk-docs/blob/master/android/6.13.1/index-all.html Configure the SDK with the Android application context. ```APIDOC ## POST /sdk/configure ### Description Set the Android application `Context` to SDK. ### Method POST ### Endpoint /sdk/configure ### Parameters #### Request Body - **context** (Context) - Required - The Android application context. - **customConfiguration** (CustomConfiguration) - Optional - Custom configuration for the SDK. ### Request Example ```json { "context": "android.content.Context", "customConfiguration": "com.gemalto.mfs.mwsdk.payment.CustomConfiguration" } ``` ### Response #### Success Response (200) - **status** (string) - Indicates the success of the operation. #### Response Example ```json { "status": "success" } ``` ``` -------------------------------- ### TerminalType Enum Methods (Java) Source: https://github.com/thalesgroup/ttrsdk-docs/blob/master/android/6.13.1/com/gemalto/mfs/mwsdk/payment/engine/TerminalType.html Provides Java methods for the TerminalType enum, including 'values()' to get all enum constants, 'valueOf(String name)' to retrieve a constant by its name, 'getCode()' to get the byte representation, 'get(byte value)' to retrieve a type by its byte value, and 'toString()' for a string representation. ```java public static TerminalType[] values() public static TerminalType valueOf(String name) public byte[] getCode() public static TerminalType get(byte value) public String toString() ``` -------------------------------- ### Get String Code for PaymentServiceErrorCode (Java) Source: https://github.com/thalesgroup/ttrsdk-docs/blob/master/android/6.13.1/com/gemalto/mfs/mwsdk/payment/PaymentServiceErrorCode.html Returns the string representation of the PaymentServiceErrorCode. This method is used to get the specific error code as a string. ```java public String getCode() ``` -------------------------------- ### Initialize SDK Source: https://github.com/thalesgroup/ttrsdk-docs/blob/master/android/6.13.1/com/gemalto/mfs/mwsdk/payment/sdkconfig/SDKInitializer.html Initializes the SDK with default configuration. This method is available since version 6.8.0. ```APIDOC ## POST /initialize ### Description Initializes the SDK with default configuration. This is to be called before using other features from the SDK. Since 6.6, this call is idempotent, and can be called multiple times. SDK manages the state internally if it is already initialized. **Note:** Before calling this API, please ensure [`configure(Context, Notification, CustomConfiguration)`](#configure\(android.content.Context,android.app.Notification,com.gemalto.mfs.mwsdk.payment.CustomConfiguration\)) is called. ### Method POST ### Endpoint /initialize ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **context** (android.content.Context) - Required - Android Context - **sdkControllerListener** (SDKControllerListener) - Required - Notifies SDK Initialization such as complete, in progress and error occurred ### Request Example ```json { "context": "", "sdkControllerListener": "" } ``` ### Response #### Success Response (200) Indicates successful initialization. #### Response Example ```json { "status": "initialized" } ``` ``` -------------------------------- ### SDK Initialization (Deprecated) Source: https://github.com/thalesgroup/ttrsdk-docs/blob/master/android/6.13.1/com/gemalto/mfs/mwsdk/payment/sdkconfig/SDKInitializer.html Initializes the SDK with a context, an optional notification, and an optional custom configuration. This method is deprecated and should be replaced by initialize(Context, CustomConfiguration). ```APIDOC ## POST /initialize (Deprecated) ### Description Initializes the SDK with a context, an optional notification, and an optional custom configuration. This method is deprecated and should be replaced by initialize(Context, CustomConfiguration). ### Method POST ### Endpoint /initialize ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **context** (android.content.Context) - Required - Android Context - **notification** (android.app.Notification) - Optional - Notification object - **configuration** (com.gemalto.mfs.mwsdk.payment.CustomConfiguration) - Optional - Custom configurations used by the application. ### Request Example ```json { "context": "", "notification": "", "configuration": "" } ``` ### Response #### Success Response (200) - **status** (string) - Indicates successful initialization. #### Response Example ```json { "status": "SDK initialized successfully" } ``` #### Error Response (400) - **error** (string) - Description of the initialization error. #### Error Example ```json { "error": "SDKInitializationException: Failed to initialize SDK." } ``` ``` -------------------------------- ### onCredentialsTimeout Method Implementation Example Source: https://github.com/thalesgroup/ttrsdk-docs/blob/master/android/6.13.1/com/gemalto/mfs/mwsdk/payment/CVMResetTimeoutListener.html Provides an example of implementing the onCredentialsTimeout method. This callback is triggered when the timer for Cardholder verification input has expired. It allows for re-initiating the CVM process or canceling the transaction. ```java /** * Call backed once the the timer to wait for End User to tap to the POS has timed out. * The UI application could once again call PaymentService.getCHVerifier(CHVerificationMethod) to show the credential input to the End User. * Otherwise, the transaction can be canceled by triggering PaymentBusinessService.deactivate(). * * @param activatedPaymentService The currently activate PaymentService (which represents the card to pay). * @param cvm The CVM option which indicates which method to verify the CardHolder (refer to PaymentService.getCHVerifier(CHVerificationMethod) for details). * @param cvmResetTimeout The timeout duration for CVM reset. */ @Override public void onCredentialsTimeout(com.gemalto.mfs.mwsdk.payment.engine.PaymentService activatedPaymentService, com.gemalto.mfs.mwsdk.payment.CHVerificationMethod cvm, long cvmResetTimeout) { // Re-initiate CVM or cancel transaction System.out.println("Credentials timed out. Re-initiating CVM or canceling transaction."); // Example: activatedPaymentService.getCHVerifier(cvm); // Example: paymentBusinessService.deactivate(); } ``` -------------------------------- ### Initialize SDK with Custom Configuration Source: https://github.com/thalesgroup/ttrsdk-docs/blob/master/android/6.13.1/com/gemalto/mfs/mwsdk/payment/sdkconfig/SDKInitializer.html Initializes the SDK with custom configuration. This method is available since version 6.8.0. ```APIDOC ## POST /initialize ### Description Initializes the SDK. This is to be called before using other features from the SDK. Since 6.6, this call is idempotent, and can be called multiple times. SDK manages the state internally if it is already initialized. **Note:** Before calling this API, please ensure [`configure(Context, Notification, CustomConfiguration)`](#configure\(android.content.Context,android.app.Notification,com.gemalto.mfs.mwsdk.payment.CustomConfiguration\)) is called. ### Method POST ### Endpoint /initialize ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **context** (android.content.Context) - Required - Android Context - **configuration** (CustomConfiguration) - Required - Custom configurations used by the application. - **sdkControllerListener** (SDKControllerListener) - Required - Notifies SDK Initialization such as complete, in progress and error occurred ### Request Example ```json { "context": "", "configuration": { "": "" }, "sdkControllerListener": "" } ``` ### Response #### Success Response (200) Indicates successful initialization. #### Response Example ```json { "status": "initialized" } ``` ``` -------------------------------- ### Example: Parsing and Using Payment Options from Additional Data Source: https://github.com/thalesgroup/ttrsdk-docs/blob/master/android/6.13.1/com/gemalto/mfs/mwsdk/payment/engine/PaymentService.html This code snippet demonstrates how to retrieve additional data, specifically 'payment_options', from the `PaymentService` and parse the byte array to determine available payment methods. It then shows how to use the `setData` method to update the card profile based on the user's selection or available options. Error handling for invalid payment options is also included. ```java final Map additionalData = paymentService.getAdditionalData(); final byte[] paymentOptionBytes = additionalData.get("payment_options").getBytes(); if (paymentOptionBytes[0] == 0x80) { // Calling setData(String, byte[]) to update card profile data for "pay by debit" paymentService.setData(..., ...); } else if (paymentOptionBytes[0] == 0x40) { // Calling setData(String, byte[]) to update card profile data for "pay by credit" paymentService.setData(..., ...); } else if (paymentOptionBytes[0] == 0xC0) { // Ask the user for his choice, then call setData(String, byte[]) like in the above 2 if-blocks. showDebitCreditSelectionDialog(); } else { // Handle error case here where the payment options is not in the range. } ``` -------------------------------- ### Get Enrolling Business Service Source: https://github.com/thalesgroup/ttrsdk-docs/blob/master/android/6.13.1/com/gemalto/mfs/mwsdk/provisioning/ProvisioningServiceManager.html Retrieves an instance of the EnrollingBusinessService. ```APIDOC ## Get Enrolling Business Service ### Description To retrieve an instance of `ProvisioningBusinessService` for enrollment purposes. ### Method GET ### Endpoint `/provisioning/enrollingBusinessService` ### Parameters None ### Request Example ```java EnrollingBusinessService enrollingService = ProvisioningServiceManager.getEnrollingBusinessService(); ``` ### Response #### Success Response (200) - **instance** (`ProvisioningBusinessService`) - An instance of the ProvisioningBusinessService for enrollment. ``` -------------------------------- ### SDK Configuration and Environment Source: https://github.com/thalesgroup/ttrsdk-docs/blob/master/android/6.13.1/overview-tree.html Details on SDK controller, environment settings, and secure log constants. ```APIDOC ## SDKController ### Description Controls the overall SDK operations and lifecycle. ### Method N/A (Class definition) ### Endpoint N/A ### Parameters N/A ### Request Example N/A ### Response N/A ## SDKEnv (Mobile Gateway) ### Description Environment settings specific to the mobile gateway component of the SDK. ### Method N/A (Class definition) ### Endpoint N/A ### Parameters N/A ### Request Example N/A ### Response N/A ## SDKEnv (Root) ### Description General environment settings for the SDK. ### Method N/A (Class definition) ### Endpoint N/A ### Parameters N/A ### Request Example N/A ### Response N/A ## SecureLogConstants ### Description Constants related to secure logging within the SDK. ### Method N/A (Class definition) ### Endpoint N/A ### Parameters N/A ### Request Example N/A ### Response N/A ``` -------------------------------- ### MerchantName Management Source: https://github.com/thalesgroup/ttrsdk-docs/blob/master/android/6.13.1/com/gemalto/mfs/mwsdk/payment/engine/MerchantIdentifier.html Methods for getting and setting the merchant name. ```APIDOC ## GET /merchant/merchant-name ### Description Retrieves the merchant name. ### Method GET ### Endpoint /merchant/merchant-name ### Parameters None ### Request Example ```java String merchantName = merchant.getMerchantName(); ``` ### Response #### Success Response (200) - **merchantName** (String) - The merchant name. #### Response Example ```json { "merchantName": "Example Merchant" } ``` ## SET /merchant/merchant-name ### Description Sets the merchant name. ### Method POST ### Endpoint /merchant/merchant-name ### Parameters #### Request Body - **merchantName** (String) - Required - The merchant name to set. ### Request Example ```json { "merchantName": "New Merchant Name" } ``` ### Response #### Success Response (200) - **message** (String) - Confirmation message. #### Response Example ```json { "message": "Merchant name updated successfully." } ``` ``` -------------------------------- ### APDUProcessorSetupCallbacks Source: https://github.com/thalesgroup/ttrsdk-docs/blob/master/android/6.13.1/com/gemalto/mfs/mwsdk/payment/AbstractHCEService.html Methods for setting up card activation, listeners, and plugin registration within the APDU processor. ```APIDOC ## Methods inherited from interface com.gemalto.mfs.mwsdk.payment.APDUProcessorSetupCallbacks ### Description Provides methods for configuring the APDU processor, including setting up card activation, listeners, and plugin registration. ### Methods - `setupCardActivation()` - `setupListener()` - `setupPluginRegistration()` ``` -------------------------------- ### MerchantID Management Source: https://github.com/thalesgroup/ttrsdk-docs/blob/master/android/6.13.1/com/gemalto/mfs/mwsdk/payment/engine/MerchantIdentifier.html Methods for getting and setting the merchant identifier. ```APIDOC ## GET /merchant/merchant-id ### Description Retrieves the merchant identifier. ### Method GET ### Endpoint /merchant/merchant-id ### Parameters None ### Request Example ```java String merchantId = merchant.getMerchantID(); ``` ### Response #### Success Response (200) - **merchantId** (String) - The merchant identifier. #### Response Example ```json { "merchantId": "exampleMerchantId" } ``` ## SET /merchant/merchant-id ### Description Sets the merchant identifier. ### Method POST ### Endpoint /merchant/merchant-id ### Parameters #### Request Body - **merchantId** (String) - Required - The merchant identifier to set. ### Request Example ```json { "merchantId": "newMerchantId" } ``` ### Response #### Success Response (200) - **message** (String) - Confirmation message. #### Response Example ```json { "message": "Merchant ID updated successfully." } ``` ``` -------------------------------- ### SDK Initialization Source: https://github.com/thalesgroup/ttrsdk-docs/blob/master/android/6.13.1/index-all.html Methods for initializing and configuring the Mobile Gateway (MG) SDK. ```APIDOC ## SDK Initialization ### Description Methods to initialize and configure the Mobile Gateway (MG) SDK. ### POST /configure(Context) #### Description This is the main entry point to initialize and configure the MG SDK. #### Method POST #### Endpoint `/configure(Context)` #### Parameters ##### Path Parameters - **context** (Context) - Required - The Android application context. #### Request Example ```java MobileGatewayManager.configure(context); ``` #### Response ##### Success Response (200) - **status** (string) - Indicates successful configuration. #### Response Example ```json { "status": "success" } ``` ### POST /configure(Context, Notification, CustomConfiguration) #### Description Deprecated method for initializing and configuring the MG SDK with additional parameters. #### Method POST #### Endpoint `/configure(Context, Notification, CustomConfiguration)` #### Parameters ##### Path Parameters - **context** (Context) - Required - The Android application context. - **notification** (Notification) - Optional - Notification settings. - **customConfiguration** (CustomConfiguration) - Optional - Custom configuration parameters. #### Request Example ```java MobileGatewayManager.configure(context, notification, customConfiguration); ``` #### Response ##### Success Response (200) - **status** (string) - Indicates successful configuration. #### Response Example ```json { "status": "success" } ``` ### POST /configure(Context, MGConfiguration...) #### Description This is the main entry point to initialize and configure the MG SDK with multiple configurations. #### Method POST #### Endpoint `/configure(Context, MGConfiguration...)` #### Parameters ##### Path Parameters - **context** (Context) - Required - The Android application context. - **mgConfigurations** (MGConfiguration...) - Optional - A variable number of MG configuration objects. #### Request Example ```java MobileGatewayManager.configure(context, mgConfig1, mgConfig2); ``` #### Response ##### Success Response (200) - **status** (string) - Indicates successful configuration. #### Response Example ```json { "status": "success" } ``` ### POST /configure(Context, CustomConfiguration) #### Description Set the Android application `Context` to SDK. This is the recommended method for configuration. #### Method POST #### Endpoint `/configure(Context, CustomConfiguration)` #### Parameters ##### Path Parameters - **context** (Context) - Required - The Android application context. - **customConfiguration** (CustomConfiguration) - Optional - Custom configuration parameters. #### Request Example ```java SDKInitializer.configure(context, customConfiguration); ``` #### Response ##### Success Response (200) - **status** (string) - Indicates successful configuration. #### Response Example ```json { "status": "success" } ``` ``` -------------------------------- ### AbstractWalletPinService Constructor and Methods (Java) Source: https://github.com/thalesgroup/ttrsdk-docs/blob/master/android/6.13.1/com/gemalto/mfs/mwsdk/dcm/AbstractWalletPinService.html This snippet shows the abstract constructor and key methods of the AbstractWalletPinService class. It includes methods for setting the wallet PIN, verifying the wallet PIN, and setting up an event listener for PIN management. These methods are intended to be implemented by the MPA. ```java public abstract class AbstractWalletPinService extends Object { public AbstractWalletPinService(); abstract void onSetWalletPin(CHCodeVerifier chCodeVerifier); abstract void onVerifyWalletPin(CHCodeVerifier chCodeVerifier); abstract WalletPinEventListener setupListener(); } ``` -------------------------------- ### Transaction History Service Source: https://github.com/thalesgroup/ttrsdk-docs/blob/master/android/6.13.1/index-all.html Provides an API to get an instance of the MGTransactionHistoryService. ```APIDOC ## getTransactionHistoryService() ### Description An API to get the instance of MGTransactionHistoryService. ### Method * Enum class: `MobileGatewayManager` ### Endpoint N/A (Method Call) ### Parameters None ### Request Example N/A ### Response * **transactionHistoryService** (MGTransactionHistoryService) - An instance of the transaction history service. ``` -------------------------------- ### Initialize SDK with Custom Configuration (Deprecated) Source: https://github.com/thalesgroup/ttrsdk-docs/blob/master/android/6.13.1/com/gemalto/mfs/mwsdk/payment/sdkconfig/SDKInitializer.html Initializes the SDK with custom configuration and an optional notification. This method is deprecated since version 6.8.0. ```APIDOC ## POST /initialize (Deprecated) ### Description Initializes the SDK. This is to be called before using other features from the SDK. Since 6.6, this call is idempotent, and can be called multiple times. SDK manages the state internally if it is already initialized. **Note:** Before calling this API, please ensure [`configure(Context, Notification, CustomConfiguration)`](#configure\(android.content.Context,android.app.Notification,com.gemalto.mfs.mwsdk.payment.CustomConfiguration\)) is called. ### Method POST ### Endpoint /initialize ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **context** (android.content.Context) - Required - Android Context - **sdkControllerListener** (SDKControllerListener) - Required - Notifies SDK Initialization such as complete, in progress and error occurred - **notification** (android.app.Notification) - Optional - Notification object - **configuration** (CustomConfiguration) - Optional - Custom configurations used by the application. ### Request Example ```json { "context": "", "sdkControllerListener": "", "notification": "", "configuration": { "": "" } } ``` ### Response #### Success Response (200) Indicates successful initialization. #### Response Example ```json { "status": "initialized" } ``` ``` -------------------------------- ### Get VAS Provisioning Business Service Source: https://github.com/thalesgroup/ttrsdk-docs/blob/master/android/6.13.1/com/gemalto/mfs/mwsdk/provisioning/ProvisioningServiceManager.html Retrieves an instance of the VasProvisioningBusinessService. ```APIDOC ## Get VAS Provisioning Business Service ### Description To retrieve an instance of the `VasProvisioningBusinessService`. ### Method GET ### Endpoint `/provisioning/vasProvisioningBusinessService` ### Parameters None ### Request Example ```java VasProvisioningBusinessService vasService = ProvisioningServiceManager.getVasProvisioningBusinessService(); ``` ### Response #### Success Response (200) - **instance** (`VasProvisioningBusinessService`) - An instance of the VasProvisioningBusinessService. ``` -------------------------------- ### Issuer Information Source: https://github.com/thalesgroup/ttrsdk-docs/blob/master/android/6.13.1/com/gemalto/mfs/mwsdk/mobilegateway/enrollment/CardMetaData.html Get contact and identification details for the card issuer. ```APIDOC ## GET /issuer/details ### Description Retrieves contact and identification details for the card issuer. ### Method GET ### Endpoint /issuer/details ### Parameters #### Query Parameters - **issuerIdentifier** (string) - Required - Identifier for the specific issuer. ### Response #### Success Response (200) - **issuerName** (string) - Name of the physical credit card issuer. - **issuerPhoneNumber** (string) - Issuer's customer service phone number. - **issuerEmail** (string) - Issuer's customer service email address. - **issuerWebsite** (string) - Issuer's website URL. - **tspId** (string) - The ID of the TSP (e.g., VTS for Visa). - **termsAndConditionsUrl** (string) - The URL of the issuer backend's Terms and Conditions for the card. #### Response Example ```json { "issuerName": "Example Bank", "issuerPhoneNumber": "1-800-555-1212", "issuerEmail": "support@examplebank.com", "issuerWebsite": "https://www.examplebank.com", "tspId": "VTS", "termsAndConditionsUrl": "https://www.examplebank.com/terms" } ``` ``` -------------------------------- ### Initialize SDK (Deprecated) Source: https://github.com/thalesgroup/ttrsdk-docs/blob/master/android/6.13.1/com/gemalto/mfs/mwsdk/payment/sdkconfig/SDKInitializer.html Initializes the SDK with default configuration and an optional notification. This method is deprecated since version 6.8.0. ```APIDOC ## POST /initialize (Deprecated) ### Description Initializes the SDK with default configuration. This is to be called before using other features from the SDK. Since 6.6, this call is idempotent, and can be called multiple times. SDK manages the state internally if it is already initialized. **Note:** Before calling this API, please ensure [`configure(Context, Notification, CustomConfiguration)`](#configure\(android.content.Context,android.app.Notification,com.gemalto.mfs.mwsdk.payment.CustomConfiguration\)) is called. ### Method POST ### Endpoint /initialize ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **context** (android.content.Context) - Required - Android Context - **sdkControllerListener** (SDKControllerListener) - Required - Notifies SDK Initialization such as complete, in progress and error occurred - **notification** (android.app.Notification) - Optional - Notification object ### Request Example ```json { "context": "", "sdkControllerListener": "", "notification": "" } ``` ### Response #### Success Response (200) Indicates successful initialization. #### Response Example ```json { "status": "initialized" } ``` ``` -------------------------------- ### BusinessService Source: https://github.com/thalesgroup/ttrsdk-docs/blob/master/android/6.13.1/allclasses-index.html Interface for initializing and resetting the SDK with different modules. ```APIDOC ## BusinessService ### Description This interface contains the BusinessService Methods used to initialize and reset the SDK with different Modules of the SDK namely: 1. ### Method N/A (Interface) ### Endpoint N/A ### Parameters N/A ### Request Example N/A ### Response N/A ### Error Handling N/A ``` -------------------------------- ### APDUProcessorSetupCallbacks Source: https://github.com/thalesgroup/ttrsdk-docs/blob/master/android/6.13.1/com/gemalto/mfs/mwsdk/payment/AsyncHCEService.html Methods inherited from the APDUProcessorSetupCallbacks interface for setting up card activation, listeners, and plugin registration. ```APIDOC ## Inherited Methods from APDUProcessorSetupCallbacks ### Description These methods are inherited from the `APDUProcessorSetupCallbacks` interface and are used for configuring the SDK's payment-related functionalities. ### Methods - `setupCardActivation()` - `setupListener()` - `setupPluginRegistration()` ```