RU

Pay — merchant side

https://{Environment}.payture.com/vwapi/Pay

The command makes a payment when payment card details are entered directly on the Merchant's web page or in the Merchant's mobile app. It lets you charge funds in a one-step payment (SessionType=Pay) or place a hold on funds in a two-step payment (SessionType=Block).

Two payment scenarios are possible: payment with a registered card and with an unregistered card.

Important!

To use this payment option, the Merchant must comply with the PCI DSS security standard. If you do not have this certificate, we recommend using the Pay command on the Payture side.

Interaction flow

Note that when 3-D Secure authentication is used, the order of the operation changes slightly, as described in the 3-D Secure section.

eWallet payment flow with card data entry on the Merchant side

Unregistered card

The Pay command charges or places a hold on funds on a card that has not been registered before. The request must include the Customer's bank card details.

Request

curl https://sandbox3.payture.com/vwapi/Pay \
-X POST \
-H "Content-Type: application/x-www-form-urlencoded" \
-d VWID=VWMerchantside \
--data-urlencode "DATA= \
VWUserLgn=123@ya.ru; \
VWUserPsw=2645363; \
CardId=FreePay; \
OrderId=5f63838d-fb03-00c6-c890-c67cfc1c54ea; \
Amount=12480; \
CardNumber=4111111111100031; \
CardHolder=Ivan Ivanov; \
EMonth=12; \
EYear=22; \
SecureCode=123; \
PhoneNumber=79156783333; \
IP=241.22.197.12; \
AdditionalField1=Value1; \
AdditionalField2=Value2" \
Get link

Parameter names in requests are case-sensitive

ParameterDescriptionFormat
VWIDPayment terminal name
Provided with the test/production access credentials
String
Mandatory
DATAPayment parameters
A URL-encoded string containing key-value pairs separated by “;” (semicolon). Keys and values are separated by “=” (equals sign)
String
Mandatory

DATA parameter keys

ParameterDescriptionFormat
VWUserLgnCustomer identifier in the Payture systemString [1..50]
Mandatory
VWUserPswAdditional access parameter for the Customer's private information (Customer password)String [1..50]
Mandatory
CardIdFor a payment with an unregistered card, pass the value CardId=FreePayString [36]
Mandatory
OrderIdUnique payment ID in the Merchant's system
Recommended format: GUID/UUID or alphanumeric. Other formats may cause failures in banking services
String [1..50]
Mandatory
AmountPayment amount in kopecks (or another minor unit of the terminal currency)
Digits only, with no decimal or other separators
Integer
Mandatory
CardNumberCard number
Digits without spaces
String [13..19]
Mandatory
EMonthCard expiration month
2 digits
Integer
Mandatory
EYearCard expiration year
Last 2 digits of the year
Integer
Mandatory
SecureCodeCVC2/CVV2 code
3 or 4 digits. Whether it is required depends on the payment type and the payment terminal configuration
Integer
Optional
CardHolderCardholder's last and first name
Latin letters and spaces only
String [1..30]
Optional
SessionTypePayment type. Determines the number of payment steps:
Pay — one-step payment (default)
Block — two-step payment
String
Optional
AddCardSave-card flag
True — the card must be added. False by default
Boolean
Optional
PhoneNumberCustomer phone number
Digits only, no separators. Format: [country code][operator code][subscriber number]
String
Optional
EmailCustomer email
Can be passed if it is not used as VWUserLgn
String [1..50]
Optional
IPCustomer IP address
IPv4 or IPv6
String
Optional
ChequeReceipt information in JSON format, Base64-encodedString
Optional
Additional parametersAny additional Merchant parameters
There can be several additional parameters. Each parameter is passed separately
—
Optional

Example of the DATA parameter (decoded):

VWUserLgn=123@ya.ru;
VWUserPsw=2645363;
CardId=FreePay;
OrderId=5f63838d-fb03-00c6-c890-c67cfc1c54ea;
Amount=12480;
CardNumber=4111111111100031;
CardHolder=Ivan Ivanov;
EMonth=12;
EYear=22;
SecureCode=123;
SessionType=Block;
PhoneNumber=79156783333;
IP=241.22.197.12;
AdditionalField1=Value1;
AdditionalField2=Value2

Response

An XML string with the Pay element

Response examples

<Pay VWUserLgn="123@ya.ru" OrderId="5f63838d-fb03-00c6-c890-c67cfc1c54ea" MerchantOrderId="[CUSTOMERS_PAY]-[1715289]-[1]" Success="True" Amount="12480"/>
ParameterDescriptionFormat
SuccessOperation success flag. Possible values:
True — the operation succeeded
False — the operation failed
3DS — 3‑D Secure authentication is required
String
Mandatory
VWUserLgnCustomer identifier in the Payture system
Matches the value passed in the request
String [1..50]
Mandatory
OrderIdPayment ID in the Merchant's system
Matches the value passed in the request
String [1..50]
Mandatory
MerchantOrderIdPayment ID in the Payture system
An additional payment ID assigned by the Payture system. Contains the payment attempt number
String [1..50]
Mandatory
AmountPayment amount in kopecks (or another minor unit of the terminal currency)
Returned if “Success=True” or “Success=3DS”. Matches the value passed in the request
Integer
Optional
ACSUrl3-D Secure authentication server URL
Returned if “Success=3DS”
String
Optional
PaReq3-D Secure authentication request
Returned if “Success=3DS”
String
Optional
ThreeDSKeyUnique transaction identifier (MD)
Returned if “Success=3DS”
String
Optional
ThreeDSVersion3-D Secure protocol version:
1.0 — version 1
2.1 — version 2
Returned if “Success=3DS”
String
Optional
AddInfoAdditional transaction parameters that can be returned in the payment gateway response by arrangement with Payture support
A description of the format and available parameters is available here (in Russian)
Object
Optional
ErrCodeError code. See error codes
Returned if “Success=False”
String
Optional

Registered card

The Pay command charges or places a hold on funds on the Customer's registered card. The card must have the “IsActive” status. The request must include the identifier of the previously added card, CardId.

Request

curl https://sandbox3.payture.com/vwapi/Pay \
-X POST \
-H "Content-Type: application/x-www-form-urlencoded" \
-d VWID=VWMerchantside \
--data-urlencode "DATA= \
VWUserLgn=123@ya.ru; \
VWUserPsw=2645363; \
CardId=00a94d92-1d84-44be-fa32-1c9591443347; \ 
OrderId=5f63838d-fb03-00c6-c890-c67cfc1c54ea; \
Amount=12480; \
SecureCode=123; \
IP=241.22.197.12; \
AdditionalField1=Value1; \
AdditionalField2=Value2" \
Get link

Parameter names in requests are case-sensitive

ParameterDescriptionFormat
VWIDPayment terminal name
Provided with the test/production access credentials
String
Mandatory
DATAPayment parameters
A URL-encoded string containing key-value pairs separated by “;” (semicolon). Keys and values are separated by “=” (equals sign)
String
Mandatory

DATA parameter keys

ParameterDescriptionFormat
VWUserLgnCustomer identifier in the Payture systemString [1..50]
Mandatory
VWUserPswAdditional access parameter for the Customer's private information (Customer password)String [1..50]
Mandatory
CardIdIdentifier of a previously registered card in the Payture systemString [36]
Mandatory
OrderIdUnique payment ID in the Merchant's system
Recommended format: GUID/UUID or alphanumeric. Other formats may cause failures in banking services
String [1..50]
Mandatory
AmountPayment amount in kopecks (or another minor unit of the terminal currency)
Digits only, with no decimal or other separators
Integer
Mandatory
SecureCodeCVC2/CVV2 code
3 or 4 digits. Whether it is required depends on the payment type and the payment terminal configuration
Integer
Optional
SessionTypePayment type. Determines the number of payment steps:
Pay — one-step payment (default)
Block — two-step payment
String
Optional
IPCustomer IP address
IPv4 or IPv6
String
Optional
ChequeReceipt information in JSON format, Base64-encodedString
Optional
Additional parametersAny additional Merchant parameters
There can be several additional parameters. Each parameter is passed separately
—
Optional

Example of the DATA parameter (decoded):

VWUserLgn=123@ya.ru;
VWUserPsw=2645363;
CardId=00a94d92-1d84-44be-fa32-1c9591443347;
OrderId=5f63838d-fb03-00c6-c890-c67cfc1c54ea;
Amount=12480;
SecureCode=123;
SessionType=Block;
IP=241.22.197.12;
AdditionalField1=Value1;
AdditionalField2=Value2

Response

An XML string with the Pay element

Response examples

<Pay VWUserLgn="123@ya.ru" OrderId="5f63838d-fb03-00c6-c890-c67cfc1c54ea" MerchantOrderId="[CUSTOMERS_PAY]-[1715289]-[1]" Success="True" Amount="12480"/>
ParameterDescriptionFormat
SuccessOperation success flag. Possible values:
True — the operation succeeded
False — the operation failed
3DS — 3‑D Secure authentication is required
String
Mandatory
VWUserLgnCustomer identifier in the Payture system
Matches the value passed in the request
String [1..50]
Mandatory
OrderIdPayment ID in the Merchant's system
Matches the value passed in the request
String [1..50]
Mandatory
MerchantOrderIdPayment ID in the Payture system
An additional payment ID assigned by the Payture system. Contains the payment attempt number
String [1..50]
Mandatory
AmountPayment amount in kopecks (or another minor unit of the terminal currency)
Returned if “Success=True” or “Success=3DS”. Matches the value passed in the request
Integer
Optional
ACSUrl3-D Secure authentication server URL
Returned if “Success=3DS”
String
Optional
PaReq3-D Secure authentication request
Returned if “Success=3DS”
String
Optional
ThreeDSKeyUnique transaction identifier (MD)
Returned if “Success=3DS”
String
Optional
ThreeDSVersion3-D Secure protocol version:
1.0 — version 1
2.1 — version 2
Returned if “Success=3DS”
String
Optional
AddInfoAdditional transaction parameters that can be returned in the payment gateway response by arrangement with Payture support
A description of the format and available parameters is available here (in Russian)
Object
Optional
ErrCodeError code. See error codes
Returned if “Success=False”
String
Optional