Polish payment system

How to Connect Paynow

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

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

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

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

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

Required settings

Before specifying the variable with the payment amount, the client must have an email variable with its email address

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

email - buyer’s email (if not specified by fake)

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

The link has the form:

Optional parameters

Also, before setting the payment_sum value, you can specify the following optional variables to configure the payment.

first_name - buyer’s name

last_name - buyer’s name

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.

Please note:

  • First specify the email

  • Next optional parameters first_name, payment_description, etc.

  • And last, assign the value of the payment_sum variable

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:

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)

Next, at the right place, print the paynow_pay_url variable that contains the link. In the example, this is the next block.

How to process the result

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

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

These callbacks DO NOT SEE the user, they are displayed only to the operator.

The type of comparison should be "Full match"

Also, after successful payment, the paynow_payment_completed variable is set to True.

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

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.

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.

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.

We strongly recommend that you do not re-link your payment if the previous one has not been completed or cancelled!

Last updated