Fiat Withdrawals

Web Application

Example using React:

import React from 'react';
import ZeroHashSDK, { AppIdentifier } from 'zh-web-sdk';

const App = () => {
  const sdk = new ZeroHashSDK({
    zeroHashAppsURL: "",
    fiatWithdrawalsJWT: "<JWT_TOKEN_HERE>" 

  sdk.openModal({appIdentifier: AppIdentifier.FIAT_WITHDRAWALS})
  return <></>;

export default App;

Mobile Application (WebView)

To use our SDK on mobile apps, you don't need to install or include zh-web-sdk as a dependency in your project. We use a proxy server that calls the SDK internally to make it work for mobile applications.


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:

SDK_MOBILE_READYThe SDK is ready to receive postMessage events (e.g OPEN_MODAL)
FIAT_WITHDRAWALS_APP_LOADEDThe SDK is loadedSDK loaded and is visible to the customer.
FIAT_WITHDRAWALS_CLOSE_BUTTON_CLICKEDThe close (X) button was clicked in the top right corner of the UI.
FIAT_WITHDRAWALS_COMPLETEDThe flow was completed and internal calls were made successfully. Note: “completed” does not equate to “approved” or “success”. The flow can be successfully completed, but the participant status could be “rejected”, for example.
FIAT_WITHDRAWALS_FAILEDThe customer encountered an error that cannot be rectified in their current session.


To control the WebView, you can also send messages using the postMessage API after receiving SDK_MOBILE_READY from WebView. Currently, the accepted messages are:

Open Modal

Opens the modal with the JWT provided for identifier provided.

{type: "OPEN_MODAL", payload: {jwt: "<JWT_HERE>", appIdentifier: "fiat-withdrawals"}}

Close Modal

Closes the modal for identifier provided.

{type: "CLOSE_MODAL", payload:{appIdentifier: "fiat-withdrawals"}}

For more details on how to use our SDK with WebViews, please refer to Integration with Mobile Apps