Skip to main content

Widget query parameters

The Guardarian widget (Calculator v2) is an embeddable exchange calculator that opens Guardarian checkout after a customer selects an amount and currency pair.

The widget is for partners that want to add a buy, sell or swap flow with a ready-made interface.

The widget provides the interface, while an API integration lets a partner build and control its own interface.

Base URL and required signing parameters​

The widget base URL is:

https://guardarian.com/calculator/v2

Every Calculator v2 widget URL requires partner_id and signature:

ParameterDescription
partner_idYour partner identifier.
signatureThe signature generated for the widget URL.

The examples below use YOUR_PARTNER_ID and YOUR_SIGNATURE as placeholders. Replace them with your partner identifier and the signature for the configured URL before using it.

https://guardarian.com/calculator/v2?partner_id=YOUR_PARTNER_ID&theme=blue&type=narrow&swap_enabled=true&signature=YOUR_SIGNATURE

Final signed URL example​

https://guardarian.com/calculator/v2?partner_id=<partner_id>&theme=blue&type=narrow&swap_enabled=false&default_side=buy_crypto&side_toggle_disabled=true&without_box_shadow=true&button_background=black&widget_height=400&body_background=hex_efefef&select_background=black&submit_button_color=white&default_fiat_currency=EUR&external_partner_link_id=0&default_from_amount=100&default_crypto_currency=EGLD&default_crypto_network=EGLD&signature=<signature>

Replace <partner_id> and <signature> with your actual values.

Parameters​

1. Payment category parameters​

These parameters define the payment methods and allow skipping the step to choose a payment category.

ParameterAvailable ValuesDescriptionExample
payment_categoryValues returned by GET /v1/payment-categoriesSpecifies the payment category.VISA_MC
skip_choose_payment_categorytrue, falseIf true, skips the step where the customer chooses a payment category.true

2. Redirect URL parameters​

These parameters define URLs for redirecting customers based on the transaction outcome.

ParameterDescriptionExample
redirects_successfulURL to redirect after a successful transaction.https://guardarian.com
redirects_failedURL to redirect after a failed transaction.https://guardarian.com
redirects_cancelledURL to redirect after a canceled transaction.https://guardarian.com

3. Widget color parameters​

These parameters control the appearance and color scheme of the widget.

ParameterAvailable ValuesDescriptionExample
themegradient, green, blue, orangeSets the overall theme color of the widget.blue
calc_backgroundcrimson, hex_ff0000Background color for the calculator.crimson
button_backgroundcrimson, hex_ff0000Background color for buttons.hex_ff0000
button_background_disabledcrimson, hex_ff0000Background color for disabled buttons.crimson
body_backgroundcrimson, hex_ff0000Background color for the widget body.crimson
without_box_shadowtrueRemoves the box shadow from the widget if true.true
widget_height-Sets the height of the widget in pixels.600
active_tab_backgroundcrimson, rgb(0,0,0)Background color for active tabs.rgb(0,0,0)
active_tab_colorwhite, rgb(0,0,0)Text color for active tabs.white
select_backgroundblack, rgb(0,0,0)Background color for dropdowns.black
select_colorwhite, rgb(0,0,0)Text color for dropdowns.white
submit_button_colorblack, whiteText color for the submit button.black

4. Currencies​

ParameterDescriptionExample
default_crypto_currencyDefault crypto currency selected in widget.ETH
default_crypto_networkDefault network for crypto currency.BASE
default_swap_from_currencyDefault source currency for swaps.ETH
default_swap_from_networkNetwork of the source currency for swaps.BASE
default_swap_to_currencyDefault target currency for swaps.ETH
default_swap_to_networkNetwork of the target currency for swaps.BASE

5. Checkout parameters​

These parameters define how the checkout content is displayed (e.g., in the same tab, a new tab, or within an iframe).

ParameterAvailable ValuesDescriptionExample
create_nav_behavioursame_tab, new_tab, iframeDefines how the new content is opened: in the same tab, a new tab, or within an iframe.same_tab

Example:

<iframe
src="https://guardarian.com/calculator/v2/?partner_id=YOUR_PARTNER_ID&create_nav_behaviour=new_tab&signature=YOUR_SIGNATURE"
allow="camera;microphone;fullscreen;payment"
style="height: 363px; width: 480px; border: none">
</iframe>

Example 1: Widget custom color​

https://guardarian.com/calculator/v2?partner_id=YOUR_PARTNER_ID&theme=green&type=narrow&default_fiat_currency=DKK&body_background=lightpink&default_crypto_currency=ETH&to_network=BSC&signature=YOUR_SIGNATURE

Example 2: Payment in a new window​


https://guardarian.com/calculator/v2?partner_id=YOUR_PARTNER_ID&theme=blue&type=wide&create_nav_behaviour=new_tab&[email protected]&first_name=Anna&last_name=Taylor&post_index=12345&country_alpha_2=GR&redirects_successful=https://example.com/thankyou&signature=YOUR_SIGNATURE

Example 3: Custom widget with orange theme and EUR amount​


https://guardarian.com/calculator/v2?partner_id=YOUR_PARTNER_ID&theme=orange&type=narrow&fiat_currencies_list=%5B%7B%22ticker%22%3A%22EUR%22%2C%22network%22%3A%22EUR%22%7D%5D&crypto_currencies_list=%5B%7B%22ticker%22%3A%22ETH%22%2C%22network%22%3A%22ETH%22%7D%5D&from_amount=555&calc_background=orange&button_background=hex_ff4500&redirects_successful=https://example.com/success&signature=YOUR_SIGNATURE

Example 4: Gradient widget with an initial amount of 1000 USD​


https://guardarian.com/calculator/v2?partner_id=YOUR_PARTNER_ID&theme=gradient&type=narrow&fiat_currencies_list=%5B%7B%22ticker%22%3A%22EUR%22%2C%22network%22%3A%22EUR%22%7D%5D&crypto_currencies_list=%5B%7B%22ticker%22%3A%22ETH%22%2C%22network%22%3A%22ETH%22%7D%5D&from_amount=555&switchable=true&button_background=rgb(255,105,180)&calc_background=rgb(255,20,147)&redirects_cancelled=https://example.com/cancelled&signature=YOUR_SIGNATURE

Example 5: Widget without shadows and an initial amount of 50 EUR​


https://guardarian.com/calculator/v2?partner_id=YOUR_PARTNER_ID&theme=orange&type=narrow&default_crypto_currency=BTC&default_fiat_currency=EUR&default_from_amount=50&switchable=false&from_network=BTC&skip_choose_payment_category=false&skip_choose_payout_address=false&calc_background=crimson&button_background=purple&button_background_disabled=purple&widget_height=600&without_box_shadow=true&redirects_successful=https://example.com/success&active_tab_background=crimson&active_tab_color=white&select_background=black&select_color=white&submit_button_color=purple&signature=YOUR_SIGNATURE