Pay — merchant side
https://{Environment}.payture.com/vwapi/PayThe 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.
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" \Parameter names in requests are case-sensitive
| Parameter | Description | Format |
|---|---|---|
| VWID | Payment terminal name Provided with the test/production access credentials | String Mandatory |
| DATA | Payment 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
| Parameter | Description | Format |
|---|---|---|
| VWUserLgn | Customer identifier in the Payture system | String [1..50] Mandatory |
| VWUserPsw | Additional access parameter for the Customer's private information (Customer password) | String [1..50] Mandatory |
| CardId | For a payment with an unregistered card, pass the value CardId=FreePay | String [36] Mandatory |
| OrderId | Unique 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 |
| Amount | Payment amount in kopecks (or another minor unit of the terminal currency) Digits only, with no decimal or other separators | Integer Mandatory |
| CardNumber | Card number Digits without spaces | String [13..19] Mandatory |
| EMonth | Card expiration month 2 digits | Integer Mandatory |
| EYear | Card expiration year Last 2 digits of the year | Integer Mandatory |
| SecureCode | CVC2/CVV2 code 3 or 4 digits. Whether it is required depends on the payment type and the payment terminal configuration | Integer Optional |
| CardHolder | Cardholder's last and first name Latin letters and spaces only | String [1..30] Optional |
| SessionType | Payment type. Determines the number of payment steps:Pay — one-step payment (default)Block — two-step payment | String Optional |
| AddCard | Save-card flag True — the card must be added. False by default | Boolean Optional |
| PhoneNumber | Customer phone number Digits only, no separators. Format: [country code][operator code][subscriber number] | String Optional |
| Customer email Can be passed if it is not used as VWUserLgn | String [1..50] Optional | |
| IP | Customer IP address IPv4 or IPv6 | String Optional |
| Cheque | Receipt information in JSON format, Base64-encoded | String Optional |
| Additional parameters | Any 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=Value2Response
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"/>| Parameter | Description | Format |
|---|---|---|
| Success | Operation success flag. Possible values:True — the operation succeededFalse — the operation failed3DS — 3‑D Secure authentication is required | String Mandatory |
| VWUserLgn | Customer identifier in the Payture system Matches the value passed in the request | String [1..50] Mandatory |
| OrderId | Payment ID in the Merchant's system Matches the value passed in the request | String [1..50] Mandatory |
| MerchantOrderId | Payment ID in the Payture system An additional payment ID assigned by the Payture system. Contains the payment attempt number | String [1..50] Mandatory |
| Amount | Payment 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 |
| ACSUrl | 3-D Secure authentication server URL Returned if “Success=3DS” | String Optional |
| PaReq | 3-D Secure authentication request Returned if “Success=3DS” | String Optional |
| ThreeDSKey | Unique transaction identifier (MD) Returned if “Success=3DS” | String Optional |
| ThreeDSVersion | 3-D Secure protocol version: 1.0 — version 1 2.1 — version 2 Returned if “Success=3DS” | String Optional |
| AddInfo | Additional 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 |
| ErrCode | Error 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" \Parameter names in requests are case-sensitive
| Parameter | Description | Format |
|---|---|---|
| VWID | Payment terminal name Provided with the test/production access credentials | String Mandatory |
| DATA | Payment 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
| Parameter | Description | Format |
|---|---|---|
| VWUserLgn | Customer identifier in the Payture system | String [1..50] Mandatory |
| VWUserPsw | Additional access parameter for the Customer's private information (Customer password) | String [1..50] Mandatory |
| CardId | Identifier of a previously registered card in the Payture system | String [36] Mandatory |
| OrderId | Unique 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 |
| Amount | Payment amount in kopecks (or another minor unit of the terminal currency) Digits only, with no decimal or other separators | Integer Mandatory |
| SecureCode | CVC2/CVV2 code 3 or 4 digits. Whether it is required depends on the payment type and the payment terminal configuration | Integer Optional |
| SessionType | Payment type. Determines the number of payment steps:Pay — one-step payment (default)Block — two-step payment | String Optional |
| IP | Customer IP address IPv4 or IPv6 | String Optional |
| Cheque | Receipt information in JSON format, Base64-encoded | String Optional |
| Additional parameters | Any 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=Value2Response
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"/>| Parameter | Description | Format |
|---|---|---|
| Success | Operation success flag. Possible values:True — the operation succeededFalse — the operation failed3DS — 3‑D Secure authentication is required | String Mandatory |
| VWUserLgn | Customer identifier in the Payture system Matches the value passed in the request | String [1..50] Mandatory |
| OrderId | Payment ID in the Merchant's system Matches the value passed in the request | String [1..50] Mandatory |
| MerchantOrderId | Payment ID in the Payture system An additional payment ID assigned by the Payture system. Contains the payment attempt number | String [1..50] Mandatory |
| Amount | Payment 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 |
| ACSUrl | 3-D Secure authentication server URL Returned if “Success=3DS” | String Optional |
| PaReq | 3-D Secure authentication request Returned if “Success=3DS” | String Optional |
| ThreeDSKey | Unique transaction identifier (MD) Returned if “Success=3DS” | String Optional |
| ThreeDSVersion | 3-D Secure protocol version: 1.0 — version 1 2.1 — version 2 Returned if “Success=3DS” | String Optional |
| AddInfo | Additional 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 |
| ErrCode | Error code. See error codes Returned if “Success=False” | String Optional |
Pay — Payture side
The command opens the payment page on the Payture payment gateway side. It is sent after a successful Init payment initialization command.
Pay — recurring payments
The command makes a payment with a previously linked card without the Customer's involvement (recurring payment) or a one-click payment without re-entering card details (one-click card-on-file payment). The card must have the IsActive status.
