Integration with specification
Bellow you can find detailed specification of transmissible and receivable data.
If it's available (there is PHP with required version in your server), we strongly advise to use libwebtopay library to generate requests and process callbacks.
Structure of request data
You should send data of the form in GET or POST method. Address: https://www.paysera.com/pay/
There are always 2 fields sent: data and sign.
Generating request fields from parameters
All parameters are joined to URL-encoded string. For example:
['param1' => 'abc', 'param2' => 'Some string with symbols %=&'] 'param1=abc¶m2=Some+string+with+symbols+%25%3D%26'In PHP language this is done by function
Result string is encoded in base64 encoding. For example:
'param1=abc¶m2=Some+string+with+symbols+%25%3D%26' 'cGFyYW0xPWFiYyZwYXJhbTI9U29tZStzdHJpbmcrd2l0aCtzeW1ib2xzKyUyNSUzRCUyNg=='In PHP language this is done by function
In the result string symbols "/" are replaced with "_", and symbols "+" with "-". We get similar to
base64 encoding, which is safe to send in URL without further processing. For example:
'MViDYlV7V0iHR2w2OkJjRFFpY11hizJDhk+EZjl/' 'MViDYlV7V0iHR2w2OkJjRFFpY11hizJDhk-EZjl_'In PHP language this is done by function
The final result string is signed - the sign parameter is generated. Algorithm to generate
sign = md5(data + password)Here md5 is cryptographic hash function, data - encoded parameters, password - your project password.
Script must return text "OK". Only then our system will register, that information about the payment has been received.If there is no answer "OK", the message will be sent 4 times (when we get it, after an hour, after three hours and after 24 hours).
Payment for goods and services (for nb. [order_nr]) ([site_name]).
If you specify the payment purpose, it is necessary to include the following variables, which will be replaced with the appropriate values in the final purpose text:[order_nr] - payment number.
[site_name] or [owner_name] - website address or company name.
Can be set to 0 or 1. If it is set to 1, the payer can skip the additional step where he needs to accept consent using PIS payment. If this parameter is used, additional text is required to be added to your page:
Buyer consent text in other languages provided below the table**
* Final length may vary depending on payment type specification
** Buyer consent text:
For more information on callbacks - see the chapter Callback .