Comment on page
Payment form for crypto payments differs from classic payment methods. Users can send their funds using exchanges and crypto wallet applications instead of classic payment forms.
Crypto payment form is a block with the information about payment conditions and crypto address where funds should be sent.
The main idea is to provide a user with a deposit crypto address and all necessary information about deposit limits, exchange rates and other payment conditions.
Also it will be a good idea to provide crypto addresses using QR codes that users can use as an automatic way to open their wallet application and send a cryptocurrency in one click.
In this section you will learn how to provide the user with all the necessary information, how to implement QR codes to your payment form and what best practices exist in order to make the payment form user friendly, to increase its conversion rate and to avoid user mistakes.
Payment form with fixed amount - form generated on the 0Xprocessing side, with a fixed payment amount, unique wallet address for payment and buttons to connect Web3 wallets.
In this form we get such data as the type of cryptocurrency, the amount that must be sent for the deposit to be successful, the address to which you need to send money, QR code, which is a wallet address, which can be scanned for example in the application exchange from which you will send money.
Also, there are buttons to connect Web3 wallets and convenient payment from them. To do this, the user must have funds either on Metamask, or on another web3 wallet and connect it through "Wallet connect".
To manage the form after receiving the payment status, the following parameters are used:
CancelURL - the address to which the Cancel button will be redirected from the payment form. The address must support SSL
SucsessURL - the address to which the Back to website button will be redirected from the payment form. The address must support SSL
AutoReturn - true if the user needs to be automatically redirected from the form to SuccessUrl after confirming the transactions in the blockchain
Payment without a fixed amount is a type of payment in which the merchant can create his custom payment form based on the received payment data with a unique address for each payment. The client can pay any amount at his discretion, but not less than the minimum amount, the payment will be automatically accounted by the system upon confirmation in the blockchain.
Example Payment form without a fixed amount integration on merchant side
To display the QR code as an image, please add the QR code data to the "img" tag with the "src" attribute.
When requesting a top-up on the merchant platform side, sends a request to 0Xprocessing to generate the client's wallet, the merchant receives the client's wallet from 0Xprocessing and can convert it into a QR code using any popular services. All this data can be embedded in the client's account on the merchant's platform
Example static wallet integration on merchant side
In order to create the QR code you can use Google Chart Service and encode the URI.
To create simple QR codes including the link to the wallet address the following parameters should be used: https://chart.googleapis.com/chart?chs=150x150&cht=qr&chl=bitcoin:3AFaCnqriLNxj15kqtp5Pxn8puHfuqbX7W&choe=UTF-8
You can use this link directly inside the <img> tag:
chs - QR code size ("150x150" size is used as an example) cht - chart type ("qr" is necessary for QR code) chl - the data encoded in the QR code ("bitcoin:3AFaCnqriLNxj15kqtp5Pxn8puHfuqbX7W" has been used in the example above, but additional parameters can be used according to "BIP-0021" standard documentation: https://github.com/bitcoin/bips/blob/master/bip-0021.mediawiki) choe - encoding type of the QR code data ("UTF-8" is required by "BIP-0021" standard)
When the user scans this QR code they will be able to open the wallet application and to make the deposit in one click.
In the link you need to put your merchant account ID (required), currency of payment, amount, SuccessUrl and CancelUrl to redirect client after payment:
if the payment details are not specified in the link, the client can enter them independently in a special form