Simplified payment
Simplified payment
Workflow description
Simplified Payment is a payment method using a bank card where, for a set of parameters (customer's payment card within the service/goods provider), there is no need to enter all payment details. Full data entry is only required during the initial payment to initiate the service binding to the card. To enable this service, you must contact WEBPAY technical support at support@webpay.by and make minor changes to the interaction script between the ervice/goods provider's application and the WEBPAY software complex. This option will make payments more convenient for the customer, which in turn increases the attractiveness of your resource.
A customer is understood to be a cardholder who has been authorized on the merchant's website. Authorization is essential here as it allows associating a unique number with the customer.
Card binding is performed on the WEBPAY software complex side. Customer data - card number mask, name as on the card, card expiration date, email, and phone - are stored linked to the customer's unique number. A new card can be bound by the customer in one click after any successful payment to the service/goods provider.

The "Simplified Payment" service bound to a card will avoid unnecessary data entry during subsequent purchases. It will be sufficient to select a payment card from the list and enter only the CVV/CVC.

Info
The customer retains the ability to make payments using the standard scheme. For this, it is enough not to select a payment method from the list of bound cards. Even if the customer has a bound card (or several cards), they can still make payments without using the binding advantages.
Payment execution
To implement the "Simplified Payment" service, the service/goods provider only needs to make minimal changes to the JSON API request or HTML form for proceeding to payment. Note that payments in the test environment are always made with one card by default, which is automatically substituted. To be able to enter different cards and bind them, the wsb_test parameter must be set to 0.
One new field is also added - wsb_customer_id - this field contains the unique number of the registered Customer on the Service Provider side (maximum field length is 64 characters, the field is case-insensitive).
This parameter must participate in the formation of the order signature. Thus, the order signature calculation algorithm changes. The electronic signature wsb_signature must be formed according to the following rule from the values of the following fields:
wsb_seedwsb_storeidwsb_customer_idwsb_order_numwsb_testwsb_currency_idwsb_totalSecretKey
The fields must be combined into a single string, and the concatenation order must not be violated. Then, depending on the specified protocol version (wsb_version), the MD5 of the combined string is calculated (if the version is not specified), or SHA1 (for version 2).
Please Note
- If changes are not made to the interaction protocol with the WEBPAY software complex, all payments will be processed using the standard scheme.
- To be able to enter different cards and bind them, the
wsb_testparameter must be set to0. - During testing, you can specify any 16-digit VISA or MASTERCARD card numbers. A set of such cards can be created using a bank card generation resource.
<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="Your Store Name">
<input type="hidden" name="wsb_order_num" value="ORDER-12345678">
<input type="hidden" name="wsb_test" value="0">
<input type="hidden" name="wsb_currency_id" value="BYN">
<input type="hidden" name="wsb_seed" value="1242649174">
<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_invoice_item_name[0]" value="Product 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="Product 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="20.90">
<!-- SecretKey value in the example is 1 -->
<input type="hidden" name="wsb_signature" value="7bba5020b4033e9086e5f4240a24163dc0d4562b">
<input type="hidden" name="wsb_shipping_name" value="Shipping Cost">
<input type="hidden" name="wsb_shipping_price" value="0.98">
<input type="hidden" name="wsb_discount_name" value="Product Discount">
<input type="hidden" name="wsb_discount_price" value="0.58">
<input type="hidden" name="wsb_customer_id" value="1234567">
<input type="submit" value="Buy">
</form>