# Paynow

* [How to Connect Paynow ](#how-to-connect-paynow)
* [How to form a link for payment](#how-to-form-a-link-for-payment)&#x20;
* [Example of a link to pay ](#example-of-a-link-to-pay)
* [How to process the result](#how-to-process-the-result)

## How to Connect Paynow&#x20;

Enter your paynow account. Go to the settings by clicking on the gear.

![](/files/KZLBbnQFnU20E6eCLN7L)

Next we go to Sklepy i punkty płatności

![](/files/KR7KBvWHAY4IT0p5jQPo)

Below in the settings of the store line Adres powiadomień - we specify the url address to receive the callback payment:

**<https://chatter.salebot.pro/paynow\\_callback/result>**

![](/files/xyXIcatIgQpYWR6KYYpJ)

Below you need to copy the api key (Klucz dostępu do API) and secret key (Klucz obliczania podpisu)

![](/files/yTNd0MdC9aV0aikkuo1E)

Go to your project on salebot.pro and in the section **Payment systems - Paynow** write down the found keys.

&#x20;                                              ![](/files/SI2p7gxGMZ2vmoCGVtwl)

![](/files/BHYy8BkMPgDg9NtNY2Bm)

## How to form a link for payment&#x20;

### Required settings

{% hint style="warning" %}
Before specifying the variable with the payment amount, the client must have an email variable with its email address
{% endhint %}

An example of how you can request and save your email address below.

**email** - buyer’s email (if not specified by fake)&#x20;

**payment\_description** - the payment description is displayed in the web interface (Attention! Cyrillic will be automatically replaced by the Latin alphabet, no more than 255 characters). If not specified fill in automatically: **Payment of invoice number "here number"**

To generate a link to payment, you need to set the value of the **payment\_sum** variable (such as 150 or 100.55 (via point!)), immediately after that the **paynow\_pay\_url** variable will appear. This variable can be displayed with a link or placed on the button with the text "Pay".&#x20;

The link has the form: *<https://paywall.paynow.pl/NOH0-0LT-SEY-XOI?token=eyJraWQiOiJhMDAyNjJjYS02NTU3LTRjOTktOGU0NC1kMTFlMTAxYjhhNTIiLCJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJOT0gwLTBMVC1TRVktWE9JIiwiYXVkIjoicGF5d2FsbC5zYW5kYm94LnBheW5vdy5wbCIsImlzcyI6InNhbmRib3gucGF5bm93LnBsIiwiZXhwIjoxNjE5NTkyOTc4LCJpYXQiOjE2MTk1MDY1Nzh9.dnCfjADHiTynvXk41TVxsQEVfDAnHFDC\\_9sdzWF4G2s>*

### Optional parameters&#x20;

Also, before setting the **payment\_sum** value, you can specify the following optional variables to configure the payment.&#x20;

**first\_name** - buyer’s name&#x20;

**last\_name** - buyer’s name&#x20;

**language** - the language of the page payment in the format BCP47/RFC5646 (eg pl-PL, en-US)currency - Payment currency code ISO 4217. If not specified, the default value (PLN) is used.

{% hint style="info" %}
**Please note:**

* First specify the email
* Next optional parameters **first\_name, payment\_description**, etc.
* And last, assign the value of the **payment\_sum** variable
  {% endhint %}

## Example of a link to pay&#x20;

First, we will query and save the client email. We will create a block with the request to enter the email and save the input in the arrow:

![](/files/BDW3kFqMGgLjFSX24rU6)

In the next block the message will not be displayed, we will specify a description of the payment and after it will immediately set the variable with a payment amount of 10 zl (default zloty)

![](/files/xZj3WE5jlFu0TGGMo6Cb)

Next, at the right place, print the paynow\_pay\_url variable that contains the link. In the example, this is the next block.

![](/files/iHLcxla0kQJh3fyLk8We)

![](/files/d2vEzaqKxpAgb042SWaw)

## How to process the result&#x20;

After successful payment in the bot will come kolbeks, on which you can understand that there was a successful payment.&#x20;

These callbacks in the system you see as messages from the user, so that they can not be sent by the user, they consist of the first 10 characters of the secret key and the account success, for example: omc79l97u4\_success&#x20;

These callbacks DO NOT SEE the user, they are displayed only to the operator.&#x20;

The type of comparison should be "Full match"&#x20;

Also, after successful payment, the paynow\_payment\_completed variable is set to True.&#x20;

For example, you can make a successful payment processing block with a condition and print the corresponding message to the user:

![](/files/RKDheWoBfbl4w6AksVQV)

![](/files/FhGu2cprcnSnaEoayxmc)

Upon completion of payment, the paynow\_callback\_data variable will be added to the client, containing the payment system response data for the completed transaction. You can extract the necessary data from the dictionary using the get method.

{% hint style="warning" %}
To make a repeat payment, you must reset the payment\_sum, the previously generated link, and after you reset the payment\_sum variable to get a new link. You can specify a previous value.
{% endhint %}

&#x20;                                          ![](/files/KrminJRFSPd4FsMetoAP)

{% hint style="warning" %}
The payment notification compares the value of the paynow\_payment\_id variable with the payment identifier from the notification if they do not match means the payment was made by an old link. In your correspondence with the user you will see a notification about this.
{% endhint %}

{% hint style="warning" %}
We strongly recommend that you do not re-link your payment if the previous one has not been completed or cancelled!
{% endhint %}


---

# 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://docs.mavibot.ai/integrations/payment/paynow.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.
