> For the complete documentation index, see [llms.txt](https://docs.payments.thalescloud.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.payments.thalescloud.io/nfc-wallet-sdk-android/es/help/sdk-api-requirements.md).

# Requisitos de la API del SDK

### Resumen

La mayoría de las API del SDK de NFC Wallet requieren un Android `Contexto`.

Algunas API también requieren que la inicialización del SDK de NFC Wallet se haya completado.

Utilice esta página para entender qué sucede si llama a una API demasiado pronto.

#### Definiciones de requisitos previos

* **Configuración del SDK**: el SDK tiene un Android `Contexto`.
  * Esto está disponible después de llamar a `SDKInitializer.INSTANCE.configure(...)`.
  * Esto también está disponible después de iniciar `SDKInitializer.INSTANCE.initialize(...)`.
* **Inicialización del SDK**: `SDKInitializer.INSTANCE.initialize(...)` se completó correctamente.

Consulte [Inicialice el SDK de NFC Wallet](https://docs.payments.thalescloud.io/nfc-wallet-sdk-android/es/get-started/configuration/4.-initialize-the-nfc-wallet-sdk.md).

{% hint style="warning" %}
Algunas API pueden lanzar excepciones en tiempo de ejecución (por ejemplo: `NullPointerException`) si faltan los requisitos previos.
{% endhint %}

### DigitalizedCardManager

| API                    | Requiere configuración del SDK | Requiere inicialización del SDK         | Si faltan los requisitos previos                                                                                                                                      |
| ---------------------- | ------------------------------ | --------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `getAllCards`          | Requerido                      | No requerido                            | Devuelve `DigitalizedCardErrorCodes.NULL_CONTEXT` con un `String[]`.                                                                                                  |
| `getDefault`           | Requerido                      | No requerido                            | Devuelve `DigitalizedCardErrorCodes.NULL_CONTEXT` con un `String`.                                                                                                    |
| `getDigitalizedCardId` | Requerido                      | No requerido                            | Devuelve `null`.                                                                                                                                                      |
| `getTokenizedCardId`   | Requerido                      | No requerido                            | Devuelve `null`.                                                                                                                                                      |
| `unsetDefaultCard`     | Requerido                      | Requerido                               | Devuelve `DigitalizedCardErrorCodes.SDK_NOT_INITIALIZED` y no realiza la operación.                                                                                   |
| `getTokenSyncSchedule` | Requerido                      | Requerido                               | Lanza `NullPointerException`.                                                                                                                                         |
| `isTokenSyncAllowed`   | Requerido                      | Requerido                               | Lanza `NullPointerException`.                                                                                                                                         |
| `invokeTokenSync`      | Requerido                      | Requerido (Mobile Gateway inicializado) | Lanza `IllegalStateException` si CPS no está inicializado. Devuelve `TokenSyncErrorCode.TOKEN_SYNC_ERROR_SDK_NOT_INITIALIZED` si Mobile Gateway no está inicializado. |

### DigitalizedCard

| API                  | Requiere configuración del SDK | Requiere inicialización del SDK | Si faltan los requisitos previos                                                    |
| -------------------- | ------------------------------ | ------------------------------- | ----------------------------------------------------------------------------------- |
| `getCardDetails`     | Requerido                      | No requerido                    | Devuelve `DigitalizedCardErrorCodes.NULL_CONTEXT` con `null`.                       |
| `getCardState`       | Requerido                      | No requerido                    | Devuelve `DigitalizedCardErrorCodes.NULL_CONTEXT` con `null`.                       |
| `isDefault`          | Requerido                      | No requerido                    | Devuelve `DigitalizedCardErrorCodes.NULL_CONTEXT` con `falso`.                      |
| `setDefault`         | Requerido                      | Requerido                       | Devuelve `DigitalizedCardErrorCodes.SDK_NOT_INITIALIZED` y no realiza la operación. |
| `isMultiAids`        | Requerido                      | No requerido                    | Devuelve `falso`.                                                                   |
| `hasAuxiliaryScheme` | Requerido                      | No requerido                    | Devuelve `falso`.                                                                   |
| `getAllAids`         | Requerido                      | No requerido                    | Devuelve un `ArrayList`.                                                            |
| `updateAidList`      | Requerido                      | No requerido                    | No realiza la operación.                                                            |

### PaymentBusinessService

| API                                   | Requiere configuración del SDK | Requiere inicialización del SDK | Si faltan los requisitos previos                                                          |
| ------------------------------------- | ------------------------------ | ------------------------------- | ----------------------------------------------------------------------------------------- |
| `activar`                             | Requerido                      | Requerido                       | Devuelve el `errorCode: PaymentServiceErrorCode.PAYMENT_NOT_ALLOWED_SDK_NOT_INITIALIZED`. |
| `startAuthentication`                 | Requerido                      | Requerido                       | Devuelve el `errorCode: PaymentServiceErrorCode.PAYMENT_NOT_ALLOWED_SDK_NOT_INITIALIZED`. |
| `getAuthenticationFlowPriorToPayment` | Requerido                      | Requerido                       | Devuelve el `errorCode: PaymentServiceErrorCode.PAYMENT_NOT_ALLOWED_SDK_NOT_INITIALIZED`. |
| `generateQRCodePaymentData`           | Requerido                      | Requerido                       | Devuelve el `errorCode: PaymentServiceErrorCode.PAYMENT_NOT_ALLOWED_SDK_NOT_INITIALIZED`. |
| `generateApplicationCryptogram`       | Requerido                      | Requerido                       | Devuelve el `errorCode: PaymentServiceErrorCode.PAYMENT_NOT_ALLOWED_SDK_NOT_INITIALIZED`. |
| `deactivate`                          | Requerido                      | Requerido                       | No realiza la operación.                                                                  |

### EnrollingBusinessService

| API                  | Requiere configuración del SDK | Requiere inicialización del SDK | Si faltan los requisitos previos                                                                                                                                                  |
| -------------------- | ------------------------------ | ------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `isEnrolled`         | Requerido                      | No requerido                    | Devuelve `EnrollmentStatus.ENROLLMENT_NEEDED`.                                                                                                                                    |
| `continueEnrollment` | Requerido                      | Requerido                       | Devuelve `ProvisioningServiceErrorCodes.NULL_CONTEXT` si falta la configuración del SDK. Devuelve `ProvisioningServiceErrorCodes.SDK_NOT_INITIALIZED` si falta la inicialización. |
| `enroll`             | Requerido                      | Requerido                       | Devuelve `ProvisioningServiceErrorCodes.NULL_CONTEXT` si falta la configuración del SDK. Devuelve `ProvisioningServiceErrorCodes.SDK_NOT_INITIALIZED` si falta la inicialización. |

### ProvisioningBusinessService

| API                                   | Requiere configuración del SDK | Requiere inicialización del SDK | Si faltan los requisitos previos                                            |
| ------------------------------------- | ------------------------------ | ------------------------------- | --------------------------------------------------------------------------- |
| `processIncomingMessage`              | Requerido                      | Requerido                       | Devuelve el `errorCode: ProvisioningServiceErrorCodes.SDK_NOT_INITIALIZED`. |
| `sendActivationCode`                  | Requerido                      | No requerido                    | Devuelve el `errorCode: ProvisioningServiceErrorCodes.NULL_CONTEXT`.        |
| `sendRequestForReplenishment`         | Requerido                      | No requerido                    | Devuelve el `errorCode: ProvisioningServiceErrorCodes.NULL_CONTEXT`.        |
| `updatePushToken`                     | Requerido                      | No requerido                    | Devuelve el `errorCode: ProvisioningServiceErrorCodes.NULL_CONTEXT`.        |
| `getAccessToken`                      | Requerido                      | No requerido                    | Devuelve el `errorCode: ProvisioningServiceErrorCodes.NULL_CONTEXT`.        |
| `sendRequestForODACertificateRenewal` | Requerido                      | No requerido                    | Devuelve el `errorCode: ProvisioningServiceErrorCodes.NULL_CONTEXT`.        |

### WalletSecureEnrollmentService

| API                           | Requiere configuración del SDK | Requiere inicialización del SDK         | Si faltan los requisitos previos                                                                                                                     |
| ----------------------------- | ------------------------------ | --------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
| `getState`                    | Requerido                      | No requerido                            | Devuelve `null`.                                                                                                                                     |
| `startWalletSecureEnrollment` | Requerido                      | Requerido (Mobile Gateway inicializado) | Devuelve `WalletSecureEnrollmentErrorCodes.WSE_CPS_COMPONENT_NOT_INITIALIZED` o `WalletSecureEnrollmentErrorCodes.WSE_MG_COMPONENT_NOT_INITIALIZED`. |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.payments.thalescloud.io/nfc-wallet-sdk-android/es/help/sdk-api-requirements.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
