> 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 Billetera NFC requieren un `Contexto`.

Algunas API también requieren que la inicialización del SDK de Billetera NFC esté completa.

Use 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 `Contexto`.
  * Esto está disponible después de que llame a `SDKInitializer.INSTANCE.configure(...)`.
  * Esto también está disponible después de que inicie `SDKInitializer.INSTANCE.initialize(...)`.
* **Inicialización del SDK**: `SDKInitializer.INSTANCE.initialize(...)` completada con éxito.

Ver [Inicializar el SDK de Billetera NFC](/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 `false`.                      |
| `setDefault`         | Requerido                      | Requerido                       | Devuelve `DigitalizedCardErrorCodes.SDK_NOT_INITIALIZED` y no realiza la operación. |
| `isMultiAids`        | Requerido                      | No requerido                    | Devuelve `false`.                                                                   |
| `hasAuxiliaryScheme` | Requerido                      | No requerido                    | Devuelve `false`.                                                                   |
| `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                                                          |
| ------------------------------------- | ------------------------------ | ------------------------------- | ----------------------------------------------------------------------------------------- |
| `activate`                            | 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
