This technical document is intended for partners and their developers who are interested in using the Guardarian project for cryptocurrency exchanges. It outlines a new flow that allows partners to handle payment method selection for users during transactions. By integrating this new flow, partners can create transactions via an API call and redirect users to the URL from the response without requiring them to select a payment method. The document provides a detailed explanation of the new flow, including its functionality, implementation requirements, and benefits. It aims to help partners and their developers understand the new flow and seamlessly integrate it into their existing systems.
The current flow for the Guardarian project allows partners to create transactions and redirect users to the transaction URL. However, users are required to select the payment method themselves. When creating a transaction, partners pass the necessary data to the API:
{
"from_amount": 1200.24,
"from_currency": "EUR",
"to_currency": "BTC",
"from_network": "EUR",
"to_network": "BTC"
}
Once the API call is made, the user is redirected to the transaction URL (response field redirect_url) to complete the exchange. At this point, the user is required to select their preferred payment method from the available options. The user must also provide their payment details and complete the exchange.
The Guardarian project has introduced a new flow to improve the payment process for partners and users. By integrating the flow, partners can create transactions through an API call and direct users to the URL provided in the response without requiring them to select a payment method.
The Guardarian project has developed a new flow that enables partners to preselect a payment method category for users during transactions. Partners can achieve this by passing a payment method category value in the field deposit.payment_category and setting the boolean field deposit.skip_choose_payment_category to true. This means that users will no longer have to select their preferred payment method during the exchange, and instead, the selected payment method category will be automatically applied to the transaction.
Example request with the new deposit block:
{
"from_amount": 1200.24,
"from_currency": "EUR",
"to_currency": "BTC",
"from_network": "EUR",
"to_network": "BTC",
"deposit": { // <-- note the new block
"payment_category": "VISA_MC",
"skip_choose_payment_category": true
}
}
| field | type | available values |
|---|---|---|
payment_category |
string enum |
VISA_MC, PIX, OPEN_BANKING, REVOLUT_PAY, SEPA, SWIFT, SPEI, GOOGLE_PAY, APPLE_PAY, PSE |
skip_choose_payment_category |
boolean |
true / false |
<aside> ℹ️ It’s important to note that Guardarian may have multiple payment methods that pertain to the selected payment category. In such cases Guardarian systems will automatically select the best payment method for the selected payment method category, based on fees of each payment method available. This ensures that users receive the most optimal payment method based on the crypto amount estimate for the selected payment category.
</aside>
While the new flow automatically preselects the payment method category, users will still have the option to select other payment methods on the payment step if they so desire. This means that if a user wants to choose a different payment method, they can do so by navigating through the available payment method options at the payment step. This provides users with the flexibility to choose a payment method that better suits their preferences, if they find that the preselected payment method does not fit them.
Overall, the new flow simplifies the transaction process by eliminating the need for users to select a payment method, while still providing users with the flexibility to choose a different payment method if needed. It improves the user experience and reduces friction during the transaction process, making it more efficient and user-friendly for both partners and users.
Guardarian has different currencies available for different payment categories, and trying to use a non-supported currency in the from_currency field while creating a transaction for a selected category will result in an error. Here is how to get the list of available currencies for a selected category:
// GET "/v1/currencies/fiat?payment_category=<category>"
// Example response:
[
{
"ticker": "EUR", // <-- please use the ticker field for the field "from_currency"
// <...>
},
{
"ticker": "USD",
// <...>
}
]
<aside> ⚠️ To implement the payment preselection flow, partners must contact Guardarian to have this flow enabled for their account. The new flow is not enabled by default for all partners, so it’s essential to contact Guardarian to have it activated.
</aside>