Kryptonim integration
Redirecting users to the Web Form
This guide offers an overview of the available query parameters for the Web Form. While these parameters are optional, they can be mixed and matched as necessary. By integrating them into the URL, you can tailor the behavior of the web form to your needs.
There are two web forms for integration. They differ in the way they are used.
- The redirect-form is used to redirect the client to a page with the appropriate parameters.
- The iframe-form is a streamlined version of the previous form, perfect for displaying in an iframe on the merchant's site.
Both forms support the following parameters:
Code
When both the amount and currency parameters are provided, Kryptonim will execute a conversion of the specified fiat currency to its equivalent value in the chosen cryptocurrency, according to the prevailing exchange rate.
Alternatively, when the convertedAmount and convertedCurrency parameters are specified, Kryptonim will compute the equivalent value in the designated fiat currency, based on the input amount of the identified cryptocurrency, utilizing the current exchange rate.
Example Usage
To integrate a payment form into your website, you would construct a URL or form action that includes the desired parameters. For example, to use the /iframe-form endpoint for a transaction with a specified amount, currency, and success URL, the URL could look like this:
Example
https://buy.kryptonim.com/redirect-form?amount=50¤cy=EUR&convertedCurrency=USDC&blockchain=Polygon&address=0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359&successUrl=https://kryptonim.com/?status=success&failureUrl=https://kryptonim.com/?status=fail&customerMail=john@krypotnim.com
This URL would initiate a transaction for 50 EUR and redirect to the specified success URL upon a successful transaction. Additional parameters can be appended as query parameters to tailor the form further to your needs.
Remember to URL-encode the parameter values to correctly format special characters and spaces within the URL.