Verify request is used to calls the wayforpay page and client card verification.
Request parameters
The request with the required parameters is generated on the side of the merchant and transferred with the help of POST method through HTTP protocol to URL https://secure.wayforpay.com/verify
In order to confirm the data validity, there shall be generated and transferred in the HMAC_MD5 request the control signature with use of the merchant SecretKey.
The line, subject to HMAC_MD5, is generated through concatenation of UTF-8-encoded merchantAccount, merchantDomainName, orderReference, amount, currency separated with “;” (semicolon)
PARAMETER | DESCRIPTION | MANDATORY |
---|---|---|
merchantAccount | Merchant identifier. This value is assigned by WayForPay | yes |
merchantAuthType | Authorization type. May possess one of the following values:
| no |
merchantDomainName | Domain name of the merchant web-site | yes |
merchantSignature | Request signature | yes |
apiVersion | Protocol version. By default: 1 | yes |
returnUrl | URL, where the system shall redirect the client with the payment result. *In case of parameter absence, the client is redirected to the page of the payment result checkout psp | yes |
serviceUrl | URL, where the system shall send the answer with the result of crediting directly to the merchant | no |
orderReference | Unique order number in the merchant system | yes |
amount | Verify amount=0 | yes |
currency | Verify currency: UAH | yes |
paymentSystem | lookupCard |
|
clientEmail | Client e-mail | no |
clientPhone | Client telephone number | no |
clientCountry | Client country | no |
clientAddress | Client address | no |
clientCity | Client city | no |
clientState | Client state/region | no |
clientZipCode | Client Zip-code | no |
Response parameters
PARAMETER | DESCRIPTION | EXAMPLE |
---|---|---|
merchantAccount | Merchant identifier | test_merchant |
orderReference | Unique order number in the merchant system | 1212dd1 |
merchantSignature | hash_hmac |
|
amount | Order amount | 100 |
currency | Order currency | UAH |
| Payer e-mail | |
phone | Payer telephone number | +38063-333-33-33 |
createdDate | Date of order creation in psp (UTC) | 123456789 |
processingDate | Transaction processing date (UTC) | 12345678 |
cardPan | Card number masking (44****4444) | 42****4242 |
cardType | Card type: Visa/MasterCard | Visa |
issuerBankCountry | Card country | Ukraine |
issuerBankName | Card bank name | PrivatBank |
recToken | Card token for recurring payments | 121213321-3213213-3213213-321-3 |
transactionStatus | Transaction status | Approved |
reason | Rejection reason | Ok |
reasonCode | Rejection code | 1100 |
fee | psp commission | 0.00 |
paymentSystem | Payment system through which the payment was made. | card |
Request authentication
In order to confirm the data validity, there shall be generated and transferred in the HMAC_MD5 request the control signature with use of the merchant SecretKey.
The line, subject to HMAC_MD5, is generated through concatenation of UTF-8-encoded merchantAccount, merchantDomainName, orderReference, amount, currency separated with “;” (semicolon)
Example of HTTP POST request:
{
"merchantAccount": "test_merch_n1",
"merchantDomainName": "merchant.com.ua",
"merchantAuthType": "SimpleSignature",
"merchantSignature": "9a9b6f197eea8319ee87c4b7079c4c28",
"orderReference": "VRF-PP-1445852171",
"amount": "0",
"currency": "UAH",
"clientEmail": "some@mail.com",
"clientPhone": "+38(066)0000000",
"returnUrl": "http://local.com/service",
"serviceUrl": "http://local.com/service",
"language": "RU"
}
Merchant notification as to transaction status
For authorized and verified orders (as well as in case of the order status change), the WayForPay server sends to serviceUrl the request (HTTP_POST) that includes order details.
This information is supplemented with the control signature HMAC_MD5.
In case WayForPay DOES NOT receive correct answer from the merchant server, then the system will send the requests within 4 days or till correct answer reception.
{
"merchantAccount":"test_merchan_n1",
"orderReference":"DH783023",
"merchantSignature":"",
"amount":3.36,
"currency":"UAH",
"authCode":"541963",
"email":"client@mail.ua",
"phone":"380501234567",
"createdDate":12345678,
"processingDate":12345678,
"cardPan":"41****8217",
"cardType":"visa",
"issuerBankCountry":"980",
"issuerBankName":"Privatbank",
"recToken":"",
"transactionStatus":"WaitingAmountConfirm",
"reason":5105,
"reasonCode":"",
"fee":0,
"paymentSystem":"card"
}
The WayForPay system waits the following answer from the merchant server:
In order to confirm the data validity, there shall be generated and transferred in the HMAC_MD5 request the control signature with use of the merchant SecretKey.
The line, subject to HMAC_MD5, is generated through concatenation of UTF-8-encoded orderReference, status, time separated with “;” (semicolon)
Example of correct answer from the merchant
{
"orderReference":"DH783023",
"status":"accept",
"time":1415379863,
"signature":""
}