Payment form fields
Payment form fields
Please Note
All text fields must be filled with text in UTF-8.
Code example for order creation for payment
<form action="https://securesandbox.webpay.by/" method="post">
<input type="hidden" name="*scart">
<input type="hidden" name="wsb_version" value="2">
<input type="hidden" name="wsb_language_id" value="russian">
<input type="hidden" name="wsb_storeid" value="11111111">
<input type="hidden" name="wsb_store" value="The name of your Store">
<input type="hidden" name="wsb_order_num" value="ORDER-12345678">
<input type="hidden" name="wsb_test" value="1">
<input type="hidden" name="wsb_currency_id" value="BYN">
<input type="hidden" name="wsb_seed" value="1242649174">
<input type="hidden" name="wsb_customer_name" value="Ivanov Ivan">
<input type="hidden" name="wsb_customer_address" value="Minsk Shafarnyanskaya str. 11-54">
<input type="hidden" name="wsb_service_date" value="Delivery till 1 january 2016 year">
<input type="hidden" name="wsb_return_url" value="http://yoursiteurl.com/success.php">
<input type="hidden" name="wsb_cancel_return_url" value="http://yoursiteurl.com/cancel.php">
<input type="hidden" name="wsb_notify_url" value="http://yoursiteurl.com/notify.php">
<input type="hidden" name="wsb_email" value="ivanov@test.by">
<input type="hidden" name="wsb_phone" value="375291234567">
<input type="hidden" name="wsb_invoice_item_name[0]" value="Goods 1">
<input type="hidden" name="wsb_invoice_item_quantity[0]" value="2">
<input type="hidden" name="wsb_invoice_item_price[0]" value="10">
<input type="hidden" name="wsb_invoice_item_name[1]" value="Goods 2">
<input type="hidden" name="wsb_invoice_item_quantity[1]" value="1">
<input type="hidden" name="wsb_invoice_item_price[1]" value="0.5">
<input type="hidden" name="wsb_total" value="31.40">
<!-- In the example SecretKey equal 1 -->
<input type="hidden" name="wsb_signature" value="266e9c04a24dfb5fc75775c42a831a49488f8303">
<input type="hidden" name="wsb_tax" value="10.50">
<input type="hidden" name="wsb_shipping_name" value="Shipping costs">
<input type="hidden" name="wsb_shipping_price" value="0.98">
<input type="hidden" name="wsb_discount_name" value="Discount">
<input type="hidden" name="wsb_discount_price" value="0.58">
<input type="hidden" name="wsb_order_contract" value="Contract №152/12-1 12.01.19">
<input type="submit" value="Buy">
</form>Main payment form fields
| Field Name | Required | Description | Notes |
|---|---|---|---|
*scart | yes | This field has no value and indicates the request type | |
wsb_storeid | yes | Store identifier in the WEBPAY system. This ID is created during registration in the WEBPAY system and is sent via email | |
wsb_store | no | Store name that will be displayed on the payment form. Defaults to the billing account settings | Maximum field length is 64 characters |
wsb_order_num | yes | Unique order identifier assigned by the store | Maximum field length is 64 characters. When paying via ERIP, the field value cannot start with 0 (zero) |
wsb_currency_id | yes | Currency identifier. Three-letter currency code according to ISO4271 | Allowed values: BYN, USD, EUR, RUB |
wsb_version | yes | Payment form version | Current version number: 2 |
wsb_language_id | no | Payment form language identifier | Allowed values: russian, english. If no value is provided, it is determined by browser settings |
wsb_seed | yes | Random sequence of characters used to generate the order signature | Order electronic signature |
wsb_signature | yes | Control value (electronic signature) of the order — the result of the SHA1 function (for version 2, see field wsb_version) or MD5 if the protocol version is not specified. This value is a hex sequence | Order electronic signature |
wsb_return_url | no | URL address to which the customer is returned in case of successful payment by clicking the button on the payment result page. If you need to set up an automatic redirect to an URL address, you can contact WEBPAY support at support@webpay.by | The order ID (wsb_order_num) and transaction number (wsb_tid) in the WEBPAY system are appended to this URL |
wsb_cancel_return_url | no | URL address to which the customer is returned in case of unsuccessful payment | The order ID (wsb_order_num) is appended to this URL |
wsb_notify_url | no | This URL is called regardless of whether a redirect to the URL in the wsb_return_url field occurred or not. The main purpose of this URL is to notify the site of a successful payment if the user did not click the "Back to the site" button on the payment form. Defaults to the billing account settings. Attention! Sending notifications is only possible to standard ports: 80 (http), 443 (https), 8080 (http_alt), 8443 (pcsync-https) | Payment notifier |
wsb_test | yes | Field indicating a test payment.
| In the Sandbox test environment, the value of this field must be 1 |
wsb_3ds_payment_option | no | Field that allows forcibly changing the requirement for the payer to pass 3D-Secure. 3D-Secure management is not available for stores working through the acquiring bank "Priorbank" OJSC. To enable this functionality, contact your personal WEBPAY manager | Allowed values:
|
wsb_customer_name | no | Name of the goods/services recipient | Maximum field length is 255 characters |
wsb_customer_address | no | Address of the goods/services recipient | Maximum field length is 255 characters |
wsb_service_date | no | Terms of provision of goods/services/works | Maximum field length is 255 characters |
wsb_show_wt | no | Payment session token. Used to restore the payment session if the scenario was interrupted | Possible values:
https://PAYMENT_PAGE_URL/{wsb_show_wt} |
Fields for building a product/service cart
| Field Name | Required | Description | Notes |
|---|---|---|---|
wsb_invoice_item_name[{n}] | yes | Name of the product unit | Index {n} must start from 0 and increment by 1 for each subsequent position |
wsb_invoice_item_quantity[{n}] | yes | Quantity of product units. Integer value indicating the quantity of each product item | Index {n} must start from 0 and increment by 1 for each subsequent position |
wsb_invoice_item_price[{n}] | yes | Unit price of the product. Number defining the cost of each unit (BYN, USD, EUR, RUB with 2 decimal places) | Index {n} must start from 0 and increment by 1 for each subsequent position |
wsb_tax | no | Field containing the tax amount in Belarusian rubles added to the total order amount | When paying via ERIP, this field is ignored (tax amount is added to the unit price) |
wsb_shipping_name | no | Field defining the name (method) of delivery | Maximum field length is 255 characters |
wsb_shipping_price | no | Field containing the shipping cost added to the total order amount | |
wsb_discount_name | no | Field containing discount description | Maximum field length is 255 characters |
wsb_discount_price | no | Field containing the discount amount subtracted from the total order amount | Value must be a positive number (without the "-" minus sign) |
wsb_discount_promo_code | no | Field contains the discount promo code value for the order when working with VISA and MASTERCARD discount programs | Maximum field length is 32 characters |
wsb_total | yes | This field is calculated. Its value represents the total payment amount for the order. Calculation formula: wsb_total = wsb_invoice_item_quantity[0] * wsb_invoice_item_price[0] + wsb_invoice_item_quantity[1] * wsb_invoice_item_price[1] + ... wsb_invoice_item_quantity[n] * wsb_invoice_item_price[n] + wsb_tax + wsb_shipping_price - wsb_discount_price | Payment will not be processed if wsb_total does not match the calculated value of goods. An error will be displayed to the customer |
Additional fields
| Field Name | Required | Description | Notes |
|---|---|---|---|
wsb_order_tag | no | Order tag. Used to categorize orders, group orders, or for other needs | Maximum field length is 64 characters |
wsb_email | no | Customer's email address | The value of this field will be automatically populated in the corresponding field of the payment form |
wsb_phone | no | Customer's phone number | |
wsb_order_contract | no | Contract number with the service customer/payer | |
wsb_tab | no | Defines the active tab with the required payment instrument (card payment/ERIP) | Possible values: erip, cardPayment. If the field is absent, the default tab order is used — card payment first, then ERIP |
wsb_card_number_short | no | Determines the possibility of payment with the specified payer's card. The WEBPAY system verifies the card number data (first 6 and last 4 digits) between the card number provided in this field and what the payer entered during payment. If the first 6 and last 4 digits of the card number match, payment is allowed; otherwise, the payment attempt is rejected and an error is displayed to the payer | The value is an integer consisting of the first 6 and last 4 digits of the card number. For example: 1234561234 |
wsb_card_halva | no | Determines whether the payer's card belongs to the "Halva" installment card of JSC "MTBank" and enables payment with this card. This field does not affect payments with cards other than the "Halva" installment card of JSC "MTBank" | Possible values:
|