Promo codes for VISA and MASTERCARD programs
Promo codes for VISA and MASTERCARD programs
VISA/MASTERCARD discount program description
The mechanism is designed for processing payments for orders from a service provider participating in the VISA/MASTERCARD payment system discount program. This program provides a discount on the order if payment is made using any VISA/MASTERCARD card. It also includes the possibility of participating in VISA discount programs when paying with premium card types. The payer on the service provider's side expresses their desire to pay for the order using one of the premium cards. WEBPAY ensures that the payment is made with the specified card type.
Description of the mechanism for working with VISA and MASTERCARD promo codes:
- The payer on the service provider's side expresses their desire to pay for the order using any VISA/MASTERCARD payment system card or a VISA premium card. WEBPAY ensures that the payment is made with the specified payment system or the specified type of VISA premium card.
- Based on the selected payment system type, the service provider determines the discount value and promo code. The discount amount is passed in the
wsb_discount_pricefield (Fields for building a product/service cart) and must be accounted for in the total order amount. The discount description text can also be passed in thewsb_discount_namefield. When working with JSON API, use the following request. - If a promo code value is provided and the service provider participates in the VISA or MASTERCARD discount program, the WEBPAY system checks the payer's card for compliance with the promo code. If a discrepancy is found, the payment is blocked.
Possible promo code values for VISA/MASTERCARD cards, passed in the wsb_discount_promo_code field, are listed in the table below:
| Card Type | Promo Code Value |
|---|---|
| VISA | visa |
| MASTERCARD (excluding MAESTRO and BELKART-MAESTRO cards) | mastercard |
Possible promo code values for VISA premium cards, passed in the wsb_discount_promo_code field, are listed in the table below:
| Card Type | Promo Code Value |
|---|---|
| VISA Gold | gold |
| VISA Platinum | platinum |
| VISA Infinite | infinite |
For example, if payment with a VISA Gold premium card is selected, the authorization request would look as follows.
Info
The case of the promo code does not matter in this instance. If payment is allowed without selecting a card type, the wsb_discount_promo_code field can be omitted or left empty.
<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_customer_name" value="Ivanov Petr Petrovich">
<input type="hidden" name="wsb_customer_address" value="Minsk, ul. Shafarnyanskaya, d.11, of.54">
<input type="hidden" name="wsb_service_date" value="Delivery by January 1, 2016">
<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="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="31.40">
<!-- SecretKey value in the example is 1 -->
<input type="hidden" name="wsb_signature" value="bc8ea3bee19c247d090c79c8bbb7974f9484db96">
<input type="hidden" name="wsb_tax" value="10.50">
<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_order_contract" value="Contract No. 152/12-1 dated 01/12/19">
<input type="hidden" name="wsb_discount_promo_code" value="gold">
<input type="submit" value="Buy">
</form>Testing the VISA/MASTERCARD discount program
The process of executing test payment requests is similar to that described in JSON API or in the section Order creation for payment, with some exceptions:
- You must contact WEBPAY technical support at support@webpay.by to enable the VISA/MASTERCARD discount program functionality for your account.
- To enable the input of different card numbers in the test environment, the
wsb_testparameter must be passed with a value of0. - During testing, you can specify any 16-digit VISA or MASTERCARD card numbers. A set of such cards can be created using open resources for generating bank card numbers. When generating premium card numbers, use the following first 6 digits of the card (card BIN):
| Card Type | Card BIN |
|---|---|
| VISA Gold | 480066 |
| VISA Platinum | 417685 |
| VISA Infinite | 455674 |