Payment result on the merchant side
Payment result on the merchant side
This functionality allows the merchant to display the payment result on their own side. Immediately after the payment is processed, the payer will be redirected to the URL specified by the merchant without displaying the payment result on the WEBPAY payment page.
Please Note
To enable this functionality, a request must be sent to the WEBPAY support team at support@webpay.by, specifying the wsb_storeid (Billing Id) from which the requests will be made.
To instruct the WEBPAY system to redirect the payer to the merchant's page, the following fields must be added to the order creation request for payment (either the HTML form or the JSON API):
wsb_redirect— set to the value1.wsb_return_format— set to the valuejson.
After the payer completes the order payment, the WEBPAY system will redirect them to the URL specified by the merchant in the wsb_return_url field (for successful payments) or the wsb_cancel_return_url field (for unsuccessful payments). The WEBPAY system will also send the following parameters with the payment result to the merchant in JSON format:
| Name | Description |
|---|---|
orderNumber | Unique order identifier assigned by the store |
invoiceNumber | Unique order identifier assigned by the WEBPAY system |
rrn | Transaction number in the VISA/MASTERCARD/BELKART system |
trimPan | Payer's bank payment card number in the format 123456xxxxxx7890 used for the payment |
responseCode | Internal WEBPAY operation result code |
responseText | Text message describing the operation result |
{
"orderNumber": "ORDER-12345678",
"invoiceNumber": "123456789",
"rrn": "123456789123",
"trimPan": "123456xxxxxx1234",
"responseCode": "W0545",
"responseText": "Insufficient funds"
}