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

https://intg.kryptonim.com

Production

https://buy.kryptonim.com

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

amount

string

yes

Amount in the Fiat currency

20

-

-

currency

string

yes

Fiat currency

EUR

EUR

In capital letters. Check available currencies.

convertedAmount

string

yes

Amount in the Crypto currency

20

-

-

convertedCurrency

string

yes

Cryptocurrency

USDC

-

In capital letters. Check available currencies.

blockchain

string

yes

Wallet’s Network

Polygon

-

Required if convertedCurrency is specified. Check available blockchains

address

string

yes

Customer’s wallet address

0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359

-

-

paymentMethod

string

yes

selected payment method (card, bank)

card

card

Option bank only available for EUR, skips the third step

customerMail

string

yes

Customer’s e-mail address

john@krypotnim.com

-

-

Redirection after payment

Parameter

Type

Optional

Description

Example

Default Value

Comments

successUrl

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

https://www.kryptonim.com/success

-

-

failureUrl

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

https://www.kryptonim.com/fail

-

-

Form colour theme

Parameter

Type

Optional

Description

Example

Default Value

Comments

theme

string

yes

Form theme. Options available: light, dark

dark

light

-

Billing address section (available for US, CA and GB countries only)

Parameter

Type

Optional

Description

Example

Default Value

Comments

firstName

string

yes

Customer’s first name

John

-

-

lastName

string

yes

Customer’s surname

Doe

-

-

billingCity

string

yes

Customer’s city

NY

-

for US, CA, GB only

billingStreetAddress

string

yes

Customer’s street address

2 Pacific Rd.

-

for US, CA, GB only

billingPostalCode

string

yes

Customer’s postal code

10460

-

for US, CA, GB only

billingCountry

string

yes

Customer’s country

US

-

for US, CA, GB only

billingCountryCode

string

yes

ISO country code in capital letters; for US, CA, GB only

USA

-

for US, CA, GB only

billingState

string

yes

Customer’s state

New York 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:

https://intg.kryptonim.com/redirect-form?amount=20&currency=EUR&convertedCurrency=USDC&blockchain=Polygon&address=0xEe513661c24978e1797eECCd78b304F92A5d1749&customerMail=john@krypotnim.com

Production environment:

https://buy.kryptonim.com/redirect-form?amount=20&currency=EUR&convertedCurrency=USDC&blockchain=Polygon&address=0xEe513661c24978e1797eECCd78b304F92A5d1749&customerMail=john@krypotnim.com

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'
}