Skip to main content

Query Parameters to the Transaction Link

To create a transaction by passing parameters through the URL, you need to provide specific parameters that define the transaction details. Below is a breakdown of the parameters required to construct the URL for initiating a transaction.

1. Create a Transaction by Passing Query Parameters

To create a transaction, you need to provide the necessary parameters in the URL as shown in the example below:

Example URL with Parameters:

https://payments.guardarian.com/?api_key=xxxx-xxxx-xxxx-xxxx&from_currency=EUR&from_amount=1000&to_currency=XRP&to_network=XRP&redirects_successful=https://google.com

2. Required Parameters

These are essential parameters needed to create a transaction:

ParameterExampleDescription
default_fiat_currencyEURThe default fiat currency to be used (e.g., EUR, USD).
partner_api_tokenxxx-xxx-xxx-xxxThe API token provided by the partner to authenticate the transaction.
default_crypto_currencyETHThe default cryptocurrency to be used (e.g., ETH, BTC).
default_from_amount1000The default amount to be exchanged from the fiat currency.
default_fiat_amount4The default amount in fiat currency.

3. Currencies/Networks Parameters

These parameters define the currency and network details and are required for most transactions:

ParameterExampleDescription
from_networkEURThe network for the currency being exchanged from.
to_networkETHThe network for the currency being exchanged to.

4. Customer's Info Parameters

These parameters are used for customers who have already been authenticated on the partner's platform:

ParameterExampleDescription
email[email protected]The customer's email address.

5. Customer's Billing Info Parameters

These parameters provide additional billing information of the customer:

ParameterExampleDescription
us_region_alpha_2US_ALUS region code (Alpha-2 format).
country_alpha_2UKCountry code (Alpha-2 format).
street_addressBaker streetThe street address of the customer.
apt_number777Apartment number.
post_index777Postal index or ZIP code.
first_nameJohnThe first name of the customer.
last_nameSnowThe last name of the customer.
regionBritishThe region of the customer's residence.
cityLondonThe city where the customer resides.

6. Payment Category Parameters

These parameters define the payment method and its behavior:

ParameterAvailable ValuesExampleDescription
payment_categoryVISA_MC, PIX, OPEN_BANKING, REVOLUT_PAY, SEPA, SWIFT, SPEI, GOOGLE_PAY, APPLE_PAY, PSEVISA_MCThe payment category to be used.
skip_choose_payment_categorytrue, falsetrueIf set to true, skips the step of choosing a payment category.

7. Customer's KYC Parameters

These parameters are used for customers who have already passed KYC on the partner’s platform:

ParameterAvailable ValuesExampleDescription
kyc_shared_token-xxxx-xxxx-xxxx-xxxxThe token representing KYC verification status.
kyc_shared_token_providersumsubsumsubThe provider of the KYC service (e.g., Sumsub).

8. Redirect URLs Parameters

You can specify URLs to which the user will be redirected after the transaction is completed, canceled, or fails. The URLs must be valid:

ParameterExample
redirects_successfulhttps://guardarian.com
redirects_failedhttps://guardarian.com
redirects_cancelledhttps://guardarian.com
  • Success URL: Redirect URL after a successful transaction.
  • Failure URL: Redirect URL if the transaction fails.
  • Cancel URL: Redirect URL if the transaction is canceled.

Conclusion

By structuring the URL with the necessary parameters, you can effectively create a transaction link that guides the user through a predefined payment process. Ensure to replace placeholders with actual values when using this in a production environment.