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:
| Parameter | Example | Description |
|---|---|---|
default_fiat_currency | EUR | The default fiat currency to be used (e.g., EUR, USD). |
partner_api_token | xxx-xxx-xxx-xxx | The API token provided by the partner to authenticate the transaction. |
default_crypto_currency | ETH | The default cryptocurrency to be used (e.g., ETH, BTC). |
default_from_amount | 1000 | The default amount to be exchanged from the fiat currency. |
default_fiat_amount | 4 | The default amount in fiat currency. |
3. Currencies/Networks Parameters
These parameters define the currency and network details and are required for most transactions:
| Parameter | Example | Description |
|---|---|---|
from_network | EUR | The network for the currency being exchanged from. |
to_network | ETH | The 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:
| Parameter | Example | Description |
|---|---|---|
email | [email protected] | The customer's email address. |
5. Customer's Billing Info Parameters
These parameters provide additional billing information of the customer:
| Parameter | Example | Description |
|---|---|---|
us_region_alpha_2 | US_AL | US region code (Alpha-2 format). |
country_alpha_2 | UK | Country code (Alpha-2 format). |
street_address | Baker street | The street address of the customer. |
apt_number | 777 | Apartment number. |
post_index | 777 | Postal index or ZIP code. |
first_name | John | The first name of the customer. |
last_name | Snow | The last name of the customer. |
region | British | The region of the customer's residence. |
city | London | The city where the customer resides. |
6. Payment Category Parameters
These parameters define the payment method and its behavior:
| Parameter | Available Values | Example | Description |
|---|---|---|---|
payment_category | VISA_MC, PIX, OPEN_BANKING, REVOLUT_PAY, SEPA, SWIFT, SPEI, GOOGLE_PAY, APPLE_PAY, PSE | VISA_MC | The payment category to be used. |
skip_choose_payment_category | true, false | true | If 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:
| Parameter | Available Values | Example | Description |
|---|---|---|---|
kyc_shared_token | - | xxxx-xxxx-xxxx-xxxx | The token representing KYC verification status. |
kyc_shared_token_provider | sumsub | sumsub | The 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:
| Parameter | Example |
|---|---|
redirects_successful | https://guardarian.com |
redirects_failed | https://guardarian.com |
redirects_cancelled | https://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.