How-to
Last updated
Last updated
Log in to your Cryptopay account
Navigate to Integration → Online checkout
Generate a new key
Add the following meta tags to your web page.
Add the following code to your web page.
Environment
src
Sandbox
Production
Checkout initialization.
Parameter
Usage
Description
widgetKey
Required
Your widget key - see Step 1
accounts
Optional
embedded
Optional
If false
, the checkout will popup on the page
If true
, the checkout will be embedded
elId
Optional
cryptopay-widget
by default. The place on your web page where the checkout will be plugged in
locale
Optional
Can be en
, de
, fr
, es
, pt
, ru
and jp
which means English, German, French, Spanish, Portuguese, Russian or Japanese language.
If parameter is not set, the language will be taken from the browser settings.
styleOptions
Optional
closeButtons
- Optional. Use false
to hide the blue Close buttons. See the screenshots below.
backToSelect
- Optional. Use false
to hide the Back button that returns the users to the initial "Choose a coin to pay with" screen
Checkout calling.
Parameter
Type
Usage
Description
amount
number (double)
Required
Purchase amount
currency
string
Required
Purchase currency
customId
string
Required
Purchase reference ID in your system
name
string
Optional
Purchase name
description
string
Optional
Purchase description
metadata
object
Optional
Key-valued data
onOpen
function
Optional
Function to be called upon checkout opening
onClose
function
Optional
Function to be called upon checkout closing
Checkout destruction. After calling this method you will need to initialise new checkout.
Skip this parameter to make all supported cryptocurrencies available by default. Choose which cryptocurrencies you want your customers to pay with. Can be BTC
, ETH
, LTC
, USDT, ...
(See )