# Payment form

## What is crypto payment form?

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.&#x20;

Crypto payment form is a block with the information about payment conditions and crypto address where funds should be sent.&#x20;

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.&#x20;

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 a fixed amount**&#x20;

**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.&#x20;

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.&#x20;

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".

<figure><img src="https://3581776959-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFe844yi2U8Swnqhi7iE8%2Fuploads%2FNZPzXF0bTGys9XC828Km%2Fimage.png?alt=media&#x26;token=d3e0598f-cc0f-4272-b3fd-6d0c536e93e3" alt="0xprocessing payment form" width="563"><figcaption><p>payment form</p></figcaption></figure>

<figure><img src="https://3581776959-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFe844yi2U8Swnqhi7iE8%2Fuploads%2F5FrpP8Fpu75IJBccVtsi%2Fimage.png?alt=media&#x26;token=f49373e8-6390-41ee-9eb6-e947660739b8" alt="0xprocessing  success payment" width="563"><figcaption><p>success payment</p></figcaption></figure>

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

**SuccessURL** - 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

[**More about parameters** ](https://docs.0xprocessing.com/0xprocessing-api/deposits/payment-form-with-fixed-amount)

## Payment form without a fixed amount&#x20;

**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.

<figure><img src="https://3581776959-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFe844yi2U8Swnqhi7iE8%2Fuploads%2FYoHA8gbX9zAXacvfSCJ8%2Fimage.png?alt=media&#x26;token=eda6fbe6-cd2f-4b29-80ae-3db8b1bf2a2b" alt="" width="548"><figcaption><p>Example Payment form without a fixed amount integration on merchant side</p></figcaption></figure>

To display the QR code as an image, please add the QR code data to the "img" tag with the "src" attribute.

[**More about payment data**](https://docs.0xprocessing.com/0xprocessing-api/deposits/payment-without-fixed-amount)

### Static wallet&#x20;

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

<figure><img src="https://3581776959-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFe844yi2U8Swnqhi7iE8%2Fuploads%2FfcWMePFiGU7PD8gdP8fi%2Fimage.png?alt=media&#x26;token=e0b29001-4ef1-42a2-90a6-03644119e8c7" alt=""><figcaption><p>Example static wallet integration on merchant side</p></figcaption></figure>

#### How to create QR code for static wallet? <a href="#qrcodeimplementation-howtocreateqrcode" id="qrcodeimplementation-howtocreateqrcode"></a>

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:

```markup
<img src="https://chart.googleapis.com/chart?chs=150x150&cht=qr&chl=bitcoin:3AFaCnqriLNxj15kqtp5Pxn8puHfuqbX7W&choe=UTF-8">
```

<figure><img src="https://3581776959-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFe844yi2U8Swnqhi7iE8%2Fuploads%2FqszRIP8unOT5gmTT9iP8%2Fimage.png?alt=media&#x26;token=3f953a86-3db7-4fad-a144-4fd579070ba6" alt=""><figcaption><p>QR example</p></figcaption></figure>

**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.

### Payment form generated by the link

In the link you need to put your merchant account ID (required), currency of payment, amount, SuccessUrl and CancelUrl to redirect client after payment:

#### <mark style="color:blue;"><https://app.0xprocessing.com/payment/create/?MerchantId=\\_\\_\\_\\_\\_\\&Currency=\\_\\_\\_\\_\\_\\&Amount=\\_\\_\\_\\_\\_\\&AmountUsd=\\_\\_\\_\\_\\&BillingID=\\_\\_\\_\\_\\_\\&ClientID=\\_\\_\\_\\_\\_\\&SuccessUrl=\\_\\_\\_\\_\\_\\&CancelUrl=\\_\\_\\_\\_\\_\\&AutoReturn=\\_\\_\\_\\_\\>\_</mark> &#x20;

if the payment details are not specified in the link, the client can enter them independently in a special form

<div data-full-width="true"><figure><img src="https://3581776959-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFe844yi2U8Swnqhi7iE8%2Fuploads%2Fd1XUkgkIh1vVYoHzITJI%2Fimage.png?alt=media&#x26;token=5ac1bc52-d706-453f-9bc0-a094429d0714" alt="0xprocessing payment creation form"><figcaption><p>payment creation form </p></figcaption></figure></div>

<figure><img src="https://3581776959-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFe844yi2U8Swnqhi7iE8%2Fuploads%2FRzYIOaugxOH6dUOewOCd%2Fimage.png?alt=media&#x26;token=9aae6c0d-3499-4330-8b9e-5d0d91cf8b03" alt="0xprocessing payment form"><figcaption><p>payment form</p></figcaption></figure>
