iFrame
Request address and request parameters for opening cashier in iFrame version 2.0
Opening the cashier in the iFrame version
Open and manage the cashier widget via the cashier iframe library. This method uses a global cashier object after loading the script in a web environment.
Include a file in html
To use the cashier widget, include the script tag inside your HTML:
Replace X.X.X with a specific version (e.g. 1.0.0) or use v=latest to always load the latest version.
If v=latest is used, browser caching must be disabled to ensure the most recent script is always loaded.
Cashier initialization
Initialize the cashier iFrame after the page has loaded by calling the following method:
For stage
For production
url — Cashier environment URL.
root — A reference to the DOM element (HTMLDivElement) where the cashier will be embedded.
The method resolves on the init event after all source files are loaded.
Cashier display
Once initialized, display the cashier content by calling:
Request parameters
key
string
Cashier token
"abc123..."
balance
number
Available balance to show
10.55
process_crypto
boolean
Enables Metamask and crypto payment options
true
header
booleaan
Show/hide header (title with back button)
true
nav
boolean
Show/hide navigation buttons (Deposit/Withdraw)
true
mode
string
Initial mode to open with
'deposit' | 'withdraw' | 'saved_methods'
Balance update
To dynamically update the displayed balance:
Event handling
Subscribe to cashier iframe events using:
Available events:
init
change_header_title
deposit_page_open
withdraw_page_open
payin_form_open
payout_form_open
amount_change
pay_with_crypto
To unsubscribe, call the function returned by .on(...).
Navigation
To navigate back within the iframe (equivalent to react-router’s back):
Cleanup
To unmount the Cashier iFrame and remove all listeners:
Example code
Changelog ## 1.0.0
Last updated