---
updatedAt: 2026-09-08T00:33:31.000Z
agentTools:
  projectIndex: https://docs.zerohash.com/llms.txt
---

# Crypto Deposits

Use this developer guide for an efficient integration to the Crypto Deposits SDK

<Callout icon="📘" theme="info">
  ### You must use zh-web-sdk >= 3.8.0 to be able to use this product
</Callout>

<br />

## Acquire Access Token

To invoke the Crypto Deposits SDK, you'll need to acquire an access token using `crypto-deposits` permission. Please see endpoint API Reference [here](https://docs.zerohash.com/reference/post_client-auth-token). After obtaining the access token, you can start using the SDK.

## Web Application

We recommend to first read our [Overview](https://docs.zerohash.com/reference/sdk-overview), [Installation](https://docs.zerohash.com/reference/sdk-instalation) and [Getting Started](https://docs.zerohash.com/reference/sdk-getting-started) guides.

Example using React:

```typescript
import { useMemo } from 'react'
import ZeroHashSDK, { AppIdentifier } from 'zh-web-sdk'

// Mint this JWT on your server by exchanging your ZeroHash API key. Never do the
// exchange in the browser.
const jwt = '<JWT_TOKEN_HERE>'

const App = () => {
  // Create the SDK once, not on every render. Use 'cert' for sandbox, 'prod' to go live.
  const sdk = useMemo(() => new ZeroHashSDK({ env: 'cert' }), [])

  const openCryptoDeposits = () =>
    sdk.openModal({ appIdentifier: AppIdentifier.CRYPTO_DEPOSITS, jwt })

  return <button onClick={openCryptoDeposits}>Deposit crypto</button>
}

export default App
```

For a line by line explanation on how to integrate, please take a look at the following guide (note that the guide may target a different App, but the process should be the same for all Apps):

<Recipe slug="web-sdk-integration" title="Web SDK Integration" />

## Native mobile

To use our SDK on mobile apps, we have native SDK solutions available in three different flavors: `Kotlin` , `Swift`  and `Capacitor` . You can find more about each on their respective guides below:

* [zerohash-ios (Swift/iOS)](https://docs.zerohash.com/docs/ios-sdk)
* ​[zerohash-android (Kotlin/Android)](https://docs.zerohash.com/docs/android-sdk)
* [zerohash-capacitor](https://docs.zerohash.com/docs/capacitor-plugin)

For more info, head to our [Integration with Mobile Apps](https://docs.zerohash.com/docs/mobile-sdks) page and select the platform you're using to build your app.

### Events

We forward events from the UI to the native app using the postMessage API. You can handle these events from the WebView component. Currently, these are the events we have:

<Table align={["left","left"]}>
  <thead>
    <tr>
      <th>
        Message
      </th>

      <th>
        Meaning
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        CRYPTO_DEPOSITS_APP_LOADED
      </td>

      <td>
        The SDK is loaded and visible to the customer.
      </td>
    </tr>

    <tr>
      <td>
        CRYPTO_DEPOSITS_CLOSE_BUTTON_CLICKED
      </td>

      <td>
        The close (X) button was clicked in the top right corner of the UI.
      </td>
    </tr>

    <tr>
      <td>
        CRYPTO_DEPOSITS_COMPLETED
      </td>

      <td>
        The Deposit submitted by the customer resulted in a successful transaction and a "Transaction confirmed" page was displayed to the user.

        The payload of this event is: `type: "CRYPTO_DEPOSIT_COMPLETED", transactionId: <TRANSACTION_ID>, cryptoDepositId: <CRYPTO_DEPOSIT_ID>`
      </td>
    </tr>

    <tr>
      <td>
        CRYPTO_DEPOSITS_FAILED
      </td>

      <td>
        The Deposit submitted by the customer resulted in a failed transaction and a "Transaction failed" page was displayed to the user.

        The payload of this event is: `type: "CRYPTO_DEPOSITS_FAILED", transactionId: <TRANSACTION_ID>, cryptoDepositId: <CRYPTO_DEPOSIT_ID>`
      </td>
    </tr>

    <tr>
      <td>
        TOKEN_EXPIRED
      </td>

      <td>
        The token is expired and needs to be refreshed. See [Acquire Access Token](https://docs.zerohash.com/reference/retrieving-access-token) to refresh it.
      </td>
    </tr>
  </tbody>
</Table>

### Webhooks and status updates

You can see our full list of status updates and webhooks on the link below:

* [Status updates](https://docs.zerohash.com/reference/deposit-status-updates)