Skip to main content

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.

ParameterAvailable ValuesDescriptionExample
payment_categoryVISA_MC, PIX, OPEN_BANKING, REVOLUT_PAY, SEPA, SWIFT, SPEI, GOOGLE_PAY, APPLE_PAY, PSESpecifies the payment category.VISA_MC
skip_choose_payment_categorytrue, falseIf 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).

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/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