Get terminal information - Terminal features - Mercado Pago Developers

Get terminal information

To access detailed information about the terminal and the integrated SDK, such as the terminal's serial number or the SDK version, use the getInformation function from the SmartInformationTools class.

val informationTools = MPManager.smartInformationTools
informationTools.getInformation { response ->
   response.doIfSuccess { smartInformation ->
       // Handle device and integration information
       val deviceSerialNumber = smartInformation.smartDevice.serialNumber
       val brandName = smartInformation.smartDevice.brandName
       val modelName = smartInformation.smartDevice.modelName
       val paymentModuleVersion = smartInformation.smartDevice.paymentModuleVersion
       val sdkVersion = smartInformation.integration.nativeSdkVersion
   }.doIfError { error ->
       // Handle error in information request 
   }
}
final SmartInformationTools smartInformationTools = MPManager.INSTANCE.getSmartInformationTools();
final Function1<MPResponse<SmartInformation>, Unit> callback = (final MPResponse<SmartInformation> response) -> {
 if (response.getStatus() == ResponseStatus.SUCCESS) {
   // Handle device and integration information
   final String deviceSerialNumber = response.getData().getSmartDevice().getSerialNumber();
   final String brandName = response.getData().getSmartDevice().getBrandName();
   final String modelName = response.getData().getSmartDevice().getModelName();
   final String paymentModuleVersion = response.getData().getSmartDevice().getPaymentModuleVersion();
   final String sdkVersion = response.getData().getIntegration().getNativeSdkVersion();
 } else {
   // Handle error in information request
 }
 return Unit.INSTANCE;
};
smartInformationTools.getInformation(callback);
FieldDescription
serialNumberTerminal serial number.
brandNameTerminal brand name.
modelNameTerminal model name.
paymentModuleVersionSmartPos payment module version.
nativeSdkVersionNative SDK version for integrations.