# Mobile SDK Integration (/in-store/integration/sdk_integration)





<div className="bg-background relative h-auto w-full overflow-hidden rounded-lg border px-10">
    <img alt="Payment Flow" src="__img0" />
</div>

## Before you start [#before-you-start]

The Tapaya Accept SDK embeds card payment processing in your app. It ships for &#x2A;*Android (Kotlin)** and for
**React Native / Expo**, and both target Android devices. The React Native package is a thin wrapper over the
Android SDK, so the surfaces, types, and failure cases are the same on either. Every code sample on this page is
tabbed by language; pick one and the whole page follows.

For every API with an example, see the [Android SDK reference](/in-store/integration/android_sdk).

### Install the SDK [#install-the-sdk]

<CodeBlockTabs defaultValue="kotlin" groupId="accept-language">
  <CodeBlockTabsList>
    <CodeBlockTabsTrigger value="kotlin">
      Android (Kotlin)
    </CodeBlockTabsTrigger>

    <CodeBlockTabsTrigger value="typescript">
      React Native (TypeScript)
    </CodeBlockTabsTrigger>
  </CodeBlockTabsList>

  <CodeBlockTab value="kotlin">
    ```kotlin title="build.gradle.kts"
    dependencies {
        implementation("com.tapaya:accept:$acceptVersion")
    }
    ```
  </CodeBlockTab>

  <CodeBlockTab value="typescript">
    ```json title="app.json"
    {
      "expo": {
        "plugins": ["@tapayadot/accept-react-native"]
      }
    }
    ```
  </CodeBlockTab>
</CodeBlockTabs>

* **Android:** add the dependency to your module-level `build.gradle.kts`, set `acceptVersion` to the latest
  release on [Maven Central](https://central.sonatype.com/artifact/com.tapaya/accept), then sync the project.
* **React Native:** install with `npx expo install @tapayadot/accept-react-native`, add the config plugin as
  shown, regenerate the native project with `npx expo prebuild --clean`, and run it with `npx expo run:android`.
* **Optional features:** add `com.tapaya:accept-installer` to install Tapaya Terminal on devices without an app
  store, and `com.tapaya:accept-nfc` to read [NFC tags](/in-store/integration/nfc_tags). On React Native, turn
  them on with the config plugin options `selfInstall` and `nfc`, then run `npx expo prebuild` again.

### Grant location permission [#grant-location-permission]

Card payments require the host app to hold location permission (`ACCESS_FINE_LOCATION`). The SDK does not
request it for you; grant it with the standard Android permission APIs before calling `pay()`.

<CodeBlockTabs defaultValue="kotlin" groupId="accept-language">
  <CodeBlockTabsList>
    <CodeBlockTabsTrigger value="kotlin">
      Android (Kotlin)
    </CodeBlockTabsTrigger>

    <CodeBlockTabsTrigger value="typescript">
      React Native (TypeScript)
    </CodeBlockTabsTrigger>
  </CodeBlockTabsList>

  <CodeBlockTab value="kotlin">
    ```kotlin
    class PaymentActivity : AppCompatActivity() {
        private val requestLocation = registerForActivityResult(
            ActivityResultContracts.RequestPermission()
        ) { granted ->
            if (granted) launchPaymentFlow() else showPermissionRationale()
        }

        fun startPayment() {
            requestLocation.launch(Manifest.permission.ACCESS_FINE_LOCATION)
        }
    }
    ```
  </CodeBlockTab>

  <CodeBlockTab value="typescript">
    ```typescript
    import { PermissionsAndroid } from 'react-native';

    const granted = await PermissionsAndroid.request(
        PermissionsAndroid.PERMISSIONS.ACCESS_FINE_LOCATION,
    );

    if (granted === PermissionsAndroid.RESULTS.GRANTED) launchPaymentFlow();
    else showPermissionRationale();
    ```
  </CodeBlockTab>
</CodeBlockTabs>

Payments use the device's last known location, refreshed in the background, so they do not wait for a new fix.
Only a device that has never had a fix waits, for up to 30 seconds. If location is missing when `pay()` runs, the
flow emits `PaymentEvent.CreationFailed` with `LocationPermissionRequired`, `LocationUnavailable`, or
`LocationTimeout` as the cause.

## Take your first payment [#take-your-first-payment]

<div className="fd-steps [&_h3]:fd-step">
  ### Initialize the SDK [#initialization]

  `Accept` is the entry point for all SDK functionality, so initialize it once at app startup.

  <CodeBlockTabs defaultValue="kotlin" groupId="accept-language">
    <CodeBlockTabsList>
      <CodeBlockTabsTrigger value="kotlin">
        Android (Kotlin)
      </CodeBlockTabsTrigger>

      <CodeBlockTabsTrigger value="typescript">
        React Native (TypeScript)
      </CodeBlockTabsTrigger>
    </CodeBlockTabsList>

    <CodeBlockTab value="kotlin">
      ```kotlin
      // Sandbox is the default (isProduction = false)
      Accept.initialize(context = this)

      // Target production explicitly
      Accept.initialize(context = this, isProduction = true)

      // Or drive it from your build type
      Accept.initialize(context = this, isProduction = !BuildConfig.DEBUG)
      ```
    </CodeBlockTab>

    <CodeBlockTab value="typescript">
      ```typescript
      import Accept from '@tapayadot/accept-react-native';

      // Sandbox is the default
      Accept.initialize();

      // Target production explicitly
      Accept.initialize({ isProduction: true });

      // Or drive it from your build
      Accept.initialize({ isProduction: !__DEV__ });
      ```
    </CodeBlockTab>
  </CodeBlockTabs>

  * On Android, call it in your `Application` class.
  * There is no `context` on React Native; the native module holds it for you.

  ### Authenticate the merchant [#step-2-authenticate]

  Call `Accept.auth.authenticate()` with a token from your backend to sign the merchant in. It is asynchronous,
  fails with an SDK error, and on success moves the SDK state to *authenticated*.

  <CodeBlockTabs defaultValue="kotlin" groupId="accept-language">
    <CodeBlockTabsList>
      <CodeBlockTabsTrigger value="kotlin">
        Android (Kotlin)
      </CodeBlockTabsTrigger>

      <CodeBlockTabsTrigger value="typescript">
        React Native (TypeScript)
      </CodeBlockTabsTrigger>
    </CodeBlockTabsList>

    <CodeBlockTab value="kotlin">
      ```kotlin
      // suspend; call from a coroutine
      try {
          val sdkToken = myBackendApi.getSdkToken()
          Accept.auth.authenticate(sdkToken)
          // Accept.state now emits SdkState.Authenticated
      } catch (e: AcceptException) {
          // handle authentication failure
      }
      ```
    </CodeBlockTab>

    <CodeBlockTab value="typescript">
      ```typescript
      try {
          const sdkToken = await myBackendApi.getSdkToken();
          await Accept.auth.authenticate(sdkToken);
          // Accept.state is now 'authenticated'
      } catch (error) {
          // handle authentication failure
      }
      ```
    </CodeBlockTab>
  </CodeBlockTabs>

  Observe the lifecycle to react to its transitions: `idle → initialized → authenticated`.

  <CodeBlockTabs defaultValue="kotlin" groupId="accept-language">
    <CodeBlockTabsList>
      <CodeBlockTabsTrigger value="kotlin">
        Android (Kotlin)
      </CodeBlockTabsTrigger>

      <CodeBlockTabsTrigger value="typescript">
        React Native (TypeScript)
      </CodeBlockTabsTrigger>
    </CodeBlockTabsList>

    <CodeBlockTab value="kotlin">
      ```kotlin
      // Accept.state is a StateFlow<SdkState>
      Accept.state.collect { state ->
          if (state == SdkState.Authenticated) loadMerchant()
      }
      ```
    </CodeBlockTab>

    <CodeBlockTab value="typescript">
      ```typescript
      // Accept.state is a plain getter; subscribe for changes
      const subscription = Accept.addStateListener((state) => {
          if (state === 'authenticated') loadMerchant();
      });

      // later
      subscription.remove();
      ```
    </CodeBlockTab>
  </CodeBlockTabs>

  * Your backend creates the token; see [Backend Integration](/in-store/integration/backend_integration).

  ### Install and activate the terminal [#install-and-activate-the-terminal]

  Every card payment hands off to **Tapaya Terminal**, the Tapaya plugin app, so it must be installed and
  activated for the merchant before the first payment. There is no card payment path that skips it.

  * Check for it with `Accept.plugin.isInstalled()`, install it with `Accept.plugin.install()`, and link the
    device with `Accept.plugin.activateTerminal()`. `install()` opens the app store, or installs directly on
    devices without one. See
    [Install and activate the terminal](/in-store/integration/card_terminal#install-and-activate-the-terminal) for
    the code and every activation outcome.
  * Read the plugin's current state with `Accept.plugin.status()`.

  ### Take a payment [#take-a-payment]

  Call `Accept.payments.pay()` with the amount and an ISO 4217 currency code, then observe the `PaymentEvent`s it
  reports: progress first, then the outcome. Amounts are in the currency's minor unit: `15000` with `CZK` is
  150.00 Kč.

  <CodeBlockTabs defaultValue="kotlin" groupId="accept-language">
    <CodeBlockTabsList>
      <CodeBlockTabsTrigger value="kotlin">
        Android (Kotlin)
      </CodeBlockTabsTrigger>

      <CodeBlockTabsTrigger value="typescript">
        React Native (TypeScript)
      </CodeBlockTabsTrigger>
    </CodeBlockTabsList>

    <CodeBlockTab value="kotlin">
      ```kotlin
      Accept.payments.pay(amount = 15000, currency = "CZK") // 150.00 Kč
          .collect { event ->
              when (event) {
                  PaymentEvent.Creating -> Log.d("pay", "creating")
                  is PaymentEvent.Created -> Log.d("pay", "created ${event.paymentToken}")
                  PaymentEvent.Launched -> Log.d("pay", "launched")
                  is PaymentEvent.Result -> Log.d("pay", event.payResult.toString())
                  is PaymentEvent.CreationFailed -> Log.e("pay", event.cause.toString())
              }
          }
      ```
    </CodeBlockTab>

    <CodeBlockTab value="typescript">
      ```typescript
      const subscription = Accept.payments.pay(
          { amount: 15000, currency: 'CZK' }, // 150.00 Kč
          (event) => {
              switch (event.type) {
                  case 'creating':
                      setStatus('Creating payment…');
                      break;
                  case 'created':
                      // The payment token and receipt URL exist before the plugin is launched.
                      setReceiptUrl(event.receiptUrl);
                      break;
                  case 'launched':
                      setStatus('Waiting for the card…');
                      break;
                  case 'result':
                      setResult(event.payResult);
                      break;
                  case 'creationFailed':
                      setError(event.error); // the payment never started
                      break;
              }
          },
      );

      // The stream ends itself after `result` or `creationFailed`.
      // Call subscription.remove() only to stop listening early.
      ```
    </CodeBlockTab>
  </CodeBlockTabs>

  * `pay()` never throws; a failure to create the payment arrives as a `CreationFailed` event. Kotlin returns a
    `Flow<PaymentEvent>` you collect from a coroutine; React Native takes a listener and returns a subscription.
  * The `Result` event carries a `PayResult`: success (`paymentToken`, `metadata`, `authCode`, `receiptDetails`),
    declined (`metadata`, `receiptDetails`), canceled (`metadata`), or failed (`reason`, `metadata`). Kotlin models
    these as `PayResult.Success`, `Declined`, `Canceled`, and `Failed`; React Native as a union you branch on with
    `payResult.type`. See [Payment outcome](/in-store/integration/card_terminal#payment-outcome).
  * `amount` and `currency` are required. For the optional parameters (`paymentToken`, `receiptConfig`,
    `nfcPosition`, `metadata`, `tip`, `transactionTimeout`, `display`, `customerFacingFlip`), see
    [Create a payment](/in-store/integration/card_terminal#create-a-payment). Later, query, stop, or refund the
    payment with `Accept.payments.status()`, `cancel()`, or `refund()`.

  <Callout title="On React Native" type="info">
    The same parameters arrive as a single `PaymentRequest` object, `pay({ amount, currency, tip, … })`, with
    `number` in place of `Long` and `Record<string, string>` in place of `Map<String, String>`. The timeout is
    `transactionTimeoutMs` and takes plain milliseconds (`0` to `120000`) rather than a `Duration`.
  </Callout>

  <Accordions>
    <Accordion title="Get only the outcome on React Native" id="payasync">
      If your UI does not render the intermediate states, `payAsync()` reduces the whole stream to its final
      `PayResult` and rejects with an `AcceptError` for anything that `pay()` would report as `creationFailed`. It has
      no Kotlin counterpart; collect the `Flow` there, or take only its last event.

      ```typescript
      const result = await Accept.payments.payAsync({ amount: 15000, currency: 'CZK' });
      if (result.type === 'success') {
          console.log(result.paymentToken, result.receiptUrl);
      }
      ```
    </Accordion>
  </Accordions>

  ### Sign out [#sign-out]

  When the merchant logs out of your app, clear all locally stored SDK state (auth token, device id, cached
  config, theme). This resets the SDK state to *idle*.

  <CodeBlockTabs defaultValue="kotlin" groupId="accept-language">
    <CodeBlockTabsList>
      <CodeBlockTabsTrigger value="kotlin">
        Android (Kotlin)
      </CodeBlockTabsTrigger>

      <CodeBlockTabsTrigger value="typescript">
        React Native (TypeScript)
      </CodeBlockTabsTrigger>
    </CodeBlockTabsList>

    <CodeBlockTab value="kotlin">
      ```kotlin
      Accept.plugin.logout() // suspend; signs out of the Tapaya Terminal app
      Accept.clear()         // suspend; clears local SDK state
      ```
    </CodeBlockTab>

    <CodeBlockTab value="typescript">
      ```typescript
      await Accept.plugin.logout(); // signs out of the Tapaya Terminal app
      await Accept.clear();         // clears local SDK state
      ```
    </CodeBlockTab>
  </CodeBlockTabs>

  * Call `Accept.plugin.logout()` first if the merchant should also be signed out of the Tapaya Terminal app.
</div>

## Merchant and SDK details [#merchant-and-sdk-details]

`Accept.merchant` exposes the authenticated merchant's profile and payment configuration; `Accept.sdk` exposes
facts about the SDK build and this device. Everything except `Accept.sdk.version` requires `Accept.initialize()`
first, and everything on `Accept.merchant` also requires `Accept.auth.authenticate()`, otherwise the call throws
`NotInitialized` or `NotAuthenticated`.

<CodeBlockTabs defaultValue="kotlin" groupId="accept-language">
  <CodeBlockTabsList>
    <CodeBlockTabsTrigger value="kotlin">
      Android (Kotlin)
    </CodeBlockTabsTrigger>

    <CodeBlockTabsTrigger value="typescript">
      React Native (TypeScript)
    </CodeBlockTabsTrigger>
  </CodeBlockTabsList>

  <CodeBlockTab value="kotlin">
    ```kotlin
    val info = Accept.merchant.info()                      // MerchantInformation?
    val config = Accept.merchant.config()                  // MerchantConfig
    val currencies = Accept.merchant.availableCurrencies() // List<String>
    val status = Accept.merchant.onboardingStatus()        // OnboardingStatus

    Accept.sdk.version            // String, the SDK version
    Accept.sdk.isProduction       // Boolean
    Accept.sdk.deviceId()         // String?  (suspend)
    Accept.sdk.minimumAmounts()   // List<MinimumAmount>  (suspend)
    ```
  </CodeBlockTab>

  <CodeBlockTab value="typescript">
    ```typescript
    const info = await Accept.merchant.info();                      // MerchantInformation | null
    const config = await Accept.merchant.config();                  // MerchantConfig
    const currencies = await Accept.merchant.availableCurrencies(); // string[]
    const status = await Accept.merchant.onboardingStatus();        // OnboardingStatus

    Accept.sdk.version                  // string, the SDK version
    Accept.sdk.isProduction             // boolean
    await Accept.sdk.deviceId()         // string | null
    await Accept.sdk.minimumAmounts()   // MinimumAmount[]
    ```
  </CodeBlockTab>
</CodeBlockTabs>

For what each member returns, see [Merchant](/in-store/integration/android_sdk#merchant) and
[Device and SDK](/in-store/integration/android_sdk#device-and-sdk) in the Android SDK reference. On dual-screen
terminals, `Accept.displays` finds the customer-facing screen; see
[Use a customer screen](/in-store/integration/android_sdk#use-a-customer-screen).

<Accordions type="multiple">
  <Accordion title="Merchant members" id="merchant-members">
    | Member                  | Returns                | Description                                                                             |
    | :---------------------- | :--------------------- | :-------------------------------------------------------------------------------------- |
    | `info()`                | `MerchantInformation?` | The merchant's registered business profile. `null` if the profile is not available yet. |
    | `config()`              | `MerchantConfig`       | The merchant's payment configuration.                                                   |
    | `availableCurrencies()` | `List<String>`         | ISO 4217 codes the merchant can accept. Shorthand for `config().availableCurrencies`.   |
    | `onboardingStatus()`    | `OnboardingStatus`     | Whether the merchant may accept payments yet.                                           |
  </Accordion>

  <Accordion title="SDK members" id="sdk-members">
    | Member             | Returns               | Description                                                                                                                                                                                                                                                                              |
    | :----------------- | :-------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
    | `version`          | `String`              | The SDK's version. Readable before `initialize()`.                                                                                                                                                                                                                                       |
    | `isProduction`     | `Boolean`             | Whether `initialize()` targeted production (`true`) or sandbox (`false`).                                                                                                                                                                                                                |
    | `deviceId()`       | `String?`             | This device's stable id, assigned on the first successful `authenticate()`. `null` before that. When the Tapaya Terminal app knows the device, the SDK uses its id, so every app on the device, and your app after a reinstall, counts as the same device. Quote it in support requests. |
    | `minimumAmounts()` | `List<MinimumAmount>` | The minimum payable amount per supported currency. Each entry is `currency: String, amount: Long` in the currency's minor unit.                                                                                                                                                          |
  </Accordion>
</Accordions>

## Handle errors [#error-handling]

Every checked failure carries one of the names below. On Kotlin each is a subclass of the sealed
`AcceptException`; on React Native they are all one `AcceptError` class whose `code` holds the name, with the
payload fields (`minimum`, `currency`, `state`, …) on the same object.

The async calls (`authenticate`, `merchant.*`, `payments.status`/`cancel`/`refund`,
`plugin.install`/`activateTerminal`/`status`/`logout`/`updateInfo`, `clear`) fail with one. `payments.pay()` never
throws, and reports the same failures as a `CreationFailed` event carrying the cause.

<Callout title="Result vs. exception" type="info">
  A payment that reaches the terminal but does not succeed is **not** an exception; it arrives as
  `PaymentEvent.Result` carrying `PayResult.Declined`, `Canceled`, or `Failed(reason)`. Likewise, terminal
  activation reports `ActivateTerminalResult.Failed(reason)`.
</Callout>

Wrap the call in a `try`/`catch` and branch on the cases you handle, falling back to a broad catch. Kotlin
branches on the exception subclass; React Native guards with `AcceptError.is()` and switches on `code`.

<CodeBlockTabs defaultValue="kotlin" groupId="accept-language">
  <CodeBlockTabsList>
    <CodeBlockTabsTrigger value="kotlin">
      Android (Kotlin)
    </CodeBlockTabsTrigger>

    <CodeBlockTabsTrigger value="typescript">
      React Native (TypeScript)
    </CodeBlockTabsTrigger>
  </CodeBlockTabsList>

  <CodeBlockTab value="kotlin">
    ```kotlin
    try {
        val status = Accept.payments.status(paymentToken)
    } catch (e: SessionExpired) {
        // Re-authenticate
    } catch (e: NoInternetConnection) {
        // Ask the user to check connectivity
    } catch (e: AcceptException) {
        // Handle any other SDK error
        Log.e("Payment", "Error: ${e.message}")
    }
    ```
  </CodeBlockTab>

  <CodeBlockTab value="typescript">
    ```typescript
    import Accept, { AcceptError } from '@tapayadot/accept-react-native';

    try {
        const status = await Accept.payments.status(paymentToken);
    } catch (error) {
        if (!AcceptError.is(error)) throw error;

        switch (error.code) {
            case 'SessionExpired':
                // Re-authenticate
                break;
            case 'NoInternetConnection':
                // Ask the user to check connectivity
                break;
            case 'AmountBelowMinimum':
                // Payload fields sit on the error itself
                alert(`Minimum is ${error.minimum} ${error.currency}`);
                break;
            default:
                throw error;
        }
    }
    ```
  </CodeBlockTab>
</CodeBlockTabs>

<Accordions type="multiple">
  <Accordion title="Lifecycle errors" id="lifecycle-errors">
    | Error              | Description                                      |
    | :----------------- | :----------------------------------------------- |
    | `NotInitialized`   | A call needs `Accept.initialize()` first.        |
    | `NotAuthenticated` | A call needs `Accept.auth.authenticate()` first. |
    | `SessionExpired`   | Authenticated session expired; re-authenticate.  |
  </Accordion>

  <Accordion title="Payment errors" id="payment-errors">
    | Error                                              | Description                                                    |
    | :------------------------------------------------- | :------------------------------------------------------------- |
    | `PaymentInProgress`                                | A previous `pay()` is still awaiting a result.                 |
    | `CurrencyNotAvailableForMerchant(code)`            | Currency not configured for the merchant.                      |
    | `UnsupportedCurrency(code)`                        | Currency not recognized by the SDK.                            |
    | `AmountBelowMinimum(minimum, currency)`            | Amount below the configured minimum.                           |
    | `TransactionTimeoutOutOfRange(transactionTimeout)` | `transactionTimeout` outside the 0 to 120 second range.        |
    | `PaymentCreationFailed(cause)`                     | Any other failure while creating a payment.                    |
    | `PaymentNotFound`                                  | `status()`/`cancel()`/`refund()` token unknown to the backend. |
  </Accordion>

  <Accordion title="Location errors" id="location-errors">
    | Error                        | Description                                                                 |
    | :--------------------------- | :-------------------------------------------------------------------------- |
    | `LocationPermissionRequired` | Host app lacks location permission.                                         |
    | `LocationUnavailable`        | The device has never had a location fix, and no provider could produce one. |
    | `LocationTimeout`            | The device has never had a location fix, and none arrived in time.          |
  </Accordion>

  <Accordion title="Terminal app errors" id="terminal-app-errors">
    | Error                                 | Description                                                                                                  |
    | :------------------------------------ | :----------------------------------------------------------------------------------------------------------- |
    | `PluginUnavailable`                   | Plugin app not installed, or its service could not be bound.                                                 |
    | `PluginTimeout`                       | Plugin did not respond in time.                                                                              |
    | `ActivationInProgress`                | A previous `activateTerminal()` is still awaiting a result.                                                  |
    | `NoTidsAvailableForMerchant`          | Merchant has no unassigned terminal (TID) left to activate.                                                  |
    | `PluginAlreadyAuthenticated`          | Plugin already authenticated for this merchant.                                                              |
    | `PluginMerchantMismatch`              | Plugin activated for a different merchant or device; call `plugin.logout()`, then activate again.            |
    | `PluginNotReadyForPayments(status)`   | `pay()` ran while the plugin was not in `PluginStatus.ReadyForPayments`; `status` carries the current state. |
    | `MerchantOnboardingIncomplete(state)` | Merchant has not finished onboarding.                                                                        |
    | `PluginStoreUnavailable`              | `install()` could not open a store listing.                                                                  |
    | `PluginSelfInstallUnavailable`        | No store on the device, and no `accept-installer` (React Native: `selfInstall`).                             |
    | `PluginInstallAuthRequired`           | A direct install needs `authenticate()` first.                                                               |
    | `PluginInstallPermissionRequired`     | The user has not let your app install unknown apps.                                                          |
    | `PluginDownloadNotPermitted`          | The merchant may not install outside a store. Contact [developers@tapaya.com](mailto:developers@tapaya.com). |
  </Accordion>

  <Accordion title="System errors" id="system-errors">
    * `NoInternetConnection`: the device has no network connectivity.
    * `Unknown(cause)`: any failure the SDK does not recognize as one of its own.
  </Accordion>

  <Accordion title="Turn on debug logs" id="turn-on-debug-logs">
    Set how much the SDK logs, and send its logs to your own logging tool. Logging defaults to `DEBUG` in sandbox and
    `NONE` in production.

    <CodeBlockTabs defaultValue="kotlin" groupId="accept-language">
      <CodeBlockTabsList>
        <CodeBlockTabsTrigger value="kotlin">
          Android (Kotlin)
        </CodeBlockTabsTrigger>

        <CodeBlockTabsTrigger value="typescript">
          React Native (TypeScript)
        </CodeBlockTabsTrigger>
      </CodeBlockTabsList>

      <CodeBlockTab value="kotlin">
        ```kotlin
        Accept.setLogLevel(AcceptLogLevel.DEBUG) // NONE, ERROR, WARN, INFO, DEBUG, VERBOSE
        Accept.setLogger(object : AcceptLogger {
            override fun log(level: AcceptLogLevel, tag: String, message: String, throwable: Throwable?) {
                Timber.tag(tag).d(throwable, "%s: %s", level, message)
            }
        })
        ```
      </CodeBlockTab>

      <CodeBlockTab value="typescript">
        ```typescript
        Accept.setLogLevel('DEBUG'); // NONE, ERROR, WARN, INFO, DEBUG, VERBOSE
        Accept.setLogger((entry) => {
            Sentry.addBreadcrumb({ category: entry.tag, message: entry.message });
        });
        ```
      </CodeBlockTab>
    </CodeBlockTabs>

    * Messages are already redacted. Pass `null` to `setLogger()` to log to Logcat again.
    * `setDebugLoggingEnabled(enabled)` is a shortcut for `DEBUG` or `NONE`.
  </Accordion>
</Accordions>
