Widget query params
Additional query params can be added to widget allowing to skip steps within payment flow.
Example string:
https://guardarian.com/calculator/v1?partner_api_token=YOUR_API_KEY&theme=blue&type=narrow&swap_enabled=true
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 | VISA_MC, PIX, OPEN_BANKING, REVOLUT_PAY, SEPA, SWIFT, SPEI, GOOGLE_PAY, APPLE_PAY, PSE | Specifies the payment category. | VISA_MC |
skip_choose_payment_category | true, false | If true, skips the step where the user chooses a payment category. | true |
2. Redirect URL Parameters
These parameters allow defining custom URLs for redirecting users based on different outcomes of the transaction (success, failure, or cancellation).
| 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/v1/?partner_api_token=PARTNER_API_TOKEN&create_nav_behaviour=new_tab"
allow="camera;microphone;fullscreen;payment"
style="height: 363px; width: 480px; border: none">
</iframe>
Example 1: Widget Custom Color
https://guardarian.com/calculator/v1?partner_api_token=YOUR_API_KEY&theme=green&type=narrow&default_fiat_currency=DKK&body_background=lightpink&default_crypto_currency=ETH&to_network=BSC
Example 2: Payment in a New Window
https://guardarian.com/calculator/v1?partner_api_token=YOUR_API_KEY&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
Example 3: Custom Widget with Orange Theme and EUR Amount Setting
https://guardarian.com/calculator/v1?partner_api_token=YOUR_API_KEY&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
Example 4: Gradient Theme Widget with Initial Amount of 1000 USD
https://guardarian.com/calculator/v1?partner_api_token=YOUR_API_KEY&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
Example 5: Widget "Without Shadows", 50 EUR and Other Parameters
https://guardarian.com/calculator/v1?partner_api_token=YOUR_API_KEY&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