Bellow you can find detailed specification of transmissible and receivable data, if you do not have an ability to use libwebtopay library.

Structure of payment form

You should send data of the form in POST method. Address: https://www.paysera.com/pay/

Available request parameters

Parameter Length Necessary Description
projectid 11 Yes Unique project number. Only activated projects can accept payments.
orderid 40 Yes Order number from your system.
lang 3 No It is possible to indicate user language (ISO 639-2/B: LIT, RUS, ENG, etc.). If paysera.com does not support selected language, system will automatically choose language according IP address or ENG by default.
amount 11 No Amount in cents the client has to pay.
currency 3 No Payment currency (USD, EUR) you want that client would pay. If selected currency in specific payment way cannot be accepted, system will convert automatically to acceptable currency according day currency rate. Payamount and paycurrency answers will be given to your website.
accepturl 255 Yes Full address (URL), to which the client is directed after a successful payment.
cancelurl 255 Yes Full address (URL), to which the client is directed after an unsuccessful payment or cancellation.
callbackurl 255 Yes Full address (URL), into which a seller will get information about committed payment.

Script must return text "OK". Only then our system will register, that information about payment has been received.

If there is no answer "OK", message will be sent 4 times (when we get it, after hour, after three hours and after 24 hours).
payment 20 No Payment type. The parameter that should be empty. List of payment types will be provided to the user. It is used only if the user wants the payment to be made by a concrete method.
country 2 No Payer's country (LT, EE, LV, GB, PL, DE). All possible types of payment in that country are immediately indicated to the payer, after selecting a country.
paytext 255* No Payment purpose visible when making the payment. If not specified, default text is used:
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.

If these variables are not specified, the default purpose text will be used.

Example of a payment purpose:

Payment for goods made to order [order_nr] in website [site_name].
p_firstname 255 No Payer's name. Requested in the majority of payment methods. Necessary for certain payment methods.
p_lastname 255 No Payer's surname. Requested in the majority of payment methods. Necessary for certain payment methods.
p_email 255 No Payer's email address is necessary. If the email address is not received, the client will be requested to enter it. At this email address Paysera will inform the payer about the payment status.
p_street 255 No Payer's address, to which goods will be sent (e.g.: Mėnulio g. 7 - 7). Necessary for certain payment methods.
p_city 255 No Payer's city, into which goods will be sent (example: Vilnius). Necessary for certain payment methods.
p_state 20 No Payer's state code (necessary, when buying in USA). Necessary for certain payment methods.
p_zip 20 No Payer's postal code. Lithuanian postal codes can be found here. Necessary for certain payment methods.
p_countrycode 2 No Payer's country code. List with country codes is here. Necessary for certain payment methods.
sign 255 Yes Parameter with data signature. It is necessary to make sure that data is being sent from your website.

If you use not a PHP programing language, you have to pay attention in coding when generating 'sign' parameter. PHP functions strlen() and strtolower() do not maintain UTF-8, because of that operations are being performed not with UTF-8, but with bytes: strlen('ąbčd') == 6 and strtolower('ĄBČD') == 'ĄbČd'.

If You use PHP programming language, we suggest You to use LibWebToPay library, which has a method for sign generation.

only_payments 0 No Show only those payment methods that are separated by commas.
disallow_payments 0 No Hide payment methods separated by comma.
charset 255 No Your data encoding (default utf-8).
repeat_request 1 No If this parameter equals 1, previous request is repeat using 'orderid' parameter
test 1 No The parameter, which allows to test the connection. The payment is not executed, but the result is returned immediately, as if the payment has been made. To test, it is necessary to activate the mode for a particular project by logging in and selecting: "Manage projects" -> "Payment gateway" (for a specific project) -> "Allow test payments" (check).
version 9 Yes A version number of Paysera system specification (API).

* Final length may vary depending on payment type specification

Structure of the payment notification

Paysera.com sends answer to your indicated address: callbackurl. Additional GET parameters (list of description is below) are added to your indicated address callbackurl. All these parameters are transmissible with prefix wp_.

Encoded response parameters

Parameter Length Description
projectid 11 Unique project number. Only activated projects can accept payments.
orderid 40 Order number from your system.
lang 3 It is possible to indicate the user language (ISO 639-2/B: LIT, RUS, ENG, etc.). If Paysera does not support the selected language, the system will automatically choose a language according to the IP address or ENG language by default.
amount 11 Amount in cents the client has to pay.
currency 3 Payment currency (USD, EUR) you want that client would pay. If selected currency in specific payment way cannot be accepted, system will convert automatically to acceptable currency according day currency rate. Payamount and paycurrency answers will be given to your website.
payment 20 Payment type. The parameter that should be empty. List of payment types will be provided to the user. It is used only if the user wants the payment to be made by a concrete method.
country 2 Payer's country (LT, EE, LV, GB, PL, DE). All possible types of payment in that country are immediately indicated to the payer, after selecting a country.
paytext 0 Payment purpose visible when making the payment.
_ss2 0 Parameter, which checks if you get the answer from our server. This is the most reliable way to check it.
_ss1 0 Parameter, which checks if you get the answer from our server. This is not as reliable as _ss2 to check it. You can download script example from here.
name 255 Payer's name received from the payment system. Sent only if the payment system provides such.
surename 255 Payer's surname received from the payment system. Sent only if the payment system provides such.
status 255 Payment status:
  • 0 - payment has not been executed
  • 1 - payment successful
  • 2 - payment order accepted, but not yet executed (this status does not guarantee execution of the payment)
error 20 Error code
test 1 The parameter, which allows to test the connection. The payment is not executed, but the result is returned immediately, as if the payment has been made. To test, it is necessary to activate the mode for a particular project by logging in and selecting: "Manage projects" -> "Payment gateway" (for a specific project) -> "Allow test payments" (check).
payment_country 2 Country of the payment method. If the payment method is available in more than one country (international) – the parameter is not sent. The country is provided in the two-character (ISO 3166-1 alpha-2) format, e.g.: LT, PL, RU, EE.
payer_ip_country 2 Country of the payer established by the IP address of the payer. The country is provided in two-character (ISO 3166-1 alpha-2) format, e.g.: LT, PL, RU, EE.
payer_country 2 Country of the payer established by the country of the payment method, and if the payment method is international – by the IP address of the payer. The country is provided in the two-character (ISO 3166-1 alpha-2) format, e.g.: LT, PL, RU, EE.
p_email 0 Payer's email address is necessary. If the email address is not received, the client will be requested to enter it. At this email address Paysera will inform the payer about the payment status.
requestid 40 It is a request number, which we receive when the user presses on the logo of the bank. We transfer this request number to the link provided in the "callbackurl" field.
payamount 0 Amount of the transfer in cents. It can differ, if it was converted to another currency.
paycurrency 0 The transferred payment currency (USD, EUR). It can differ from the one you requested, if the currency could not be accepted by the selected payment method.
version 9 A version number of Paysera system specification (API).