# Payment handler

Suitable for most projects. To install it, just [download the module](https://github.com/unitpay/base_module) and follow the instructions in the readme.txt file.

**Step 1.** Create the unitpay\_payments table in the database:

![](https://244174165-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2Fdokumentacziya%2F-M9xezG_6tZ_3GRmvyig%2F-M9y5QnvXUy3IVvgAmUR%2F0.png?generation=1592327257632028\&alt=media)

The unitpay\_payments table will log information about payments made

**Step 2**. Place the scripts in any directory on the web server that can be accessed via the Internet. Make sure that php version 5.x.x or higher is installed on the server and the mysqli extension is available (for working with mysql databases).

**Step 3.** In config.php, specify parameters for connecting to the database, the cost of one unit (item) of goods, the secret key (you can find it in the project settings in your unitpay.money account), as well as the table with users and the field in this table that must be updated after payment.

**Step 4.** In your unitpay. money account, enter the handler's address in the project settings. In this case, this is the absolute URL at which index.php of the current module can be accessed.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.unitpay.ru/en/modules/basic.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
