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.
Example of the URL address: https://www.paysera.com/pay/?data=your_DATA_parameter&sign=your_SIGN_parameter
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 functionhttp_build_query
-
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 functionbase64_encode
-
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 functionstr_replace
orstrtr
. -
The final result string is signed - the sign parameter is generated. Algorithm to generate
sign parameter:
sign = md5(data + password)
Here md5 is cryptographic hash function, data - encoded parameters, password - your project password.
Extra parameters for recurring payments of PIS
There is an option to create recurring payments by providing additional data in the request. After that the bank will execute PIS payment automatically by defined period and frequency. Only a couple of banks provide this option: SEB and Swedbank
Available frequencies for all enabled periodic payment methods:
weekly
monthly
quarterly
semiannual
annual
Available frequencies for some enabled periodic payment methods:
daily
every_working_day
last_day_of_month
last_working_day_of_month
The date format should be yyyy-mm-dd.
The date format should be yyyy-mm-dd.
Request parameters
Seller should not rely on accepturl to confirm an order. Instead, order confirmation on the Seller side should be done per callbackurl.
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:
Callback
For more information on callbacks - see the chapter Callback .