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:
| Parameter | Description |
|---|---|
partner_id | Your partner identifier. |
signature | The 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.
| Parameter | Available Values | Description | Example |
|---|---|---|---|
payment_category | Values returned by GET /v1/payment-categories | Specifies the payment category. | VISA_MC |
skip_choose_payment_category | true, false | If 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.
| Parameter | Description | Example |
|---|---|---|
redirects_successful | URL to redirect after a successful transaction. | https://guardarian.com |
redirects_failed | URL to redirect after a failed transaction. | https://guardarian.com |
redirects_cancelled | URL to redirect after a canceled transaction. | https://guardarian.com |
3. Widget color parameters
These parameters control the appearance and color scheme of the widget.
| Parameter | Available Values | Description | Example |
|---|---|---|---|
theme | gradient, green, blue, orange | Sets the overall theme color of the widget. | blue |
calc_background | crimson, hex_ff0000 | Background color for the calculator. | crimson |
button_background | crimson, hex_ff0000 | Background color for buttons. | hex_ff0000 |
button_background_disabled | crimson, hex_ff0000 | Background color for disabled buttons. | crimson |
body_background | crimson, hex_ff0000 | Background color for the widget body. | crimson |
without_box_shadow | true | Removes the box shadow from the widget if true. | true |
widget_height | - | Sets the height of the widget in pixels. | 600 |
active_tab_background | crimson, rgb(0,0,0) | Background color for active tabs. | rgb(0,0,0) |
active_tab_color | white, rgb(0,0,0) | Text color for active tabs. | white |
select_background | black, rgb(0,0,0) | Background color for dropdowns. | black |
select_color | white, rgb(0,0,0) | Text color for dropdowns. | white |
submit_button_color | black, white | Text color for the submit button. | black |
4. Currencies
| Parameter | Description | Example |
|---|---|---|
default_crypto_currency | Default crypto currency selected in widget. | ETH |
default_crypto_network | Default network for crypto currency. | BASE |
default_swap_from_currency | Default source currency for swaps. | ETH |
default_swap_from_network | Network of the source currency for swaps. | BASE |
default_swap_to_currency | Default target currency for swaps. | ETH |
default_swap_to_network | Network 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).
| Parameter | Available Values | Description | Example |
|---|---|---|---|
create_nav_behaviour | same_tab, new_tab, iframe | Defines 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