Integration
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 behaviour of the web form to your needs.
Environments
Environment |
URL |
|---|---|
Integration |
|
Production |
Form Type
The redirect-form is used to redirect the client to a page with the appropriate parameters - https://buy.kryptonim.com/redirect-form
Query parameters
Form supported parameters:
Parameter |
Type |
Optional |
Description |
Example |
Default Value |
Comments |
|---|---|---|---|---|---|---|
|
string |
yes |
Amount in the Fiat currency |
|
- |
- |
|
string |
yes |
Fiat currency |
|
|
In capital letters. Check available currencies. |
|
string |
yes |
Amount in the Crypto currency |
|
- |
- |
|
string |
yes |
Cryptocurrency |
|
- |
In capital letters. Check available currencies. |
|
string |
yes |
Wallet’s Network |
|
- |
Required if convertedCurrency is specified. Check available blockchains |
|
string |
yes |
Customer’s wallet address |
|
- |
- |
|
string |
yes |
selected payment method ( |
|
|
Option |
|
string |
yes |
Customer’s e-mail address |
|
- |
- |
Redirection after payment
Parameter |
Type |
Optional |
Description |
Example |
Default Value |
Comments |
|---|---|---|---|---|---|---|
|
string |
yes |
URL to redirect the user upon successful transaction. If param is not defined default success page will be displayed https://www.kryptonim.com/success |
|
- |
- |
|
string |
yes |
URL to redirect the user upon failed transaction. If param is not defined default error page will be displayed https://www.kryptonim.com/fail |
|
- |
- |
Form colour theme
Parameter |
Type |
Optional |
Description |
Example |
Default Value |
Comments |
|---|---|---|---|---|---|---|
|
string |
yes |
Form theme. Options available: |
|
|
- |
Billing address section (available for US, CA and GB countries only)
Parameter |
Type |
Optional |
Description |
Example |
Default Value |
Comments |
|---|---|---|---|---|---|---|
|
string |
yes |
Customer’s first name |
|
- |
- |
|
string |
yes |
Customer’s surname |
|
- |
- |
|
string |
yes |
Customer’s city |
|
- |
for US, CA, GB only |
|
string |
yes |
Customer’s street address |
|
- |
for US, CA, GB only |
|
string |
yes |
Customer’s postal code |
|
- |
for US, CA, GB only |
|
string |
yes |
Customer’s country |
|
- |
for US, CA, GB only |
|
string |
yes |
ISO country code in capital letters; for US, CA, GB only |
|
- |
for US, CA, GB only |
|
string |
yes |
Customer’s state |
|
- |
for US, CA, GB only |
Example usage
To integrate a payment form into your website, you need to construct a URL or form action that includes the desired parameters. For example, to use the redirect-form endpoint for a transaction with a specified amount, currency, and success URL, the URL could look like this:
Integration environment:
Production environment:
This URL would initiate a 20EUR buy transaction with USDC on Polygon as exchanged currency, with predefined wallet address and customer email. 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.
Redirect after payments
The behavior of the form after a successful or unsuccessful payment is determined by the presence of successUrl and failureUrl parameters.
If the parameter is defined, the form will automatically redirect to the specified URL after a successful or unsuccessful payment.
If the parameter is not included in the URL, the form will display the default success or error page.
Success Event
Trigger: Clicking the “Done” button.
Callback data:
{
onClose: true,
status: 'success',
transactionData: {
amount: string,
currency: string,
convertedAmount: string,
convertedCurrency: string,
walletAddress: string,
processingFee: string,
networkFee: string,
blockchain: string,
email: string
}
}
Error Event
Trigger: Clicking the “Try again” button.
Callback data:
{
onClose: true,
status: 'error'
}