Pay — recurring payments
https://{Environment}.payture.com/vwapi/PayThe command makes a payment with a previously linked card without the Customer's involvement (a recurring payment) or a one-click payment without re-entering the card details (a one-click card-on-file payment). The card must have the “IsActive” status.
The payment does not require passing CVV2/CVC2 or completing 3-D Secure authentication.
Recurring and one-click payments can be made with both the “Merchant side” and the “Payture side” integration options.
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; \
AdditionalField1=Value1; \
AdditionalField2=Value2" \Parameter names in requests are case-sensitive
| Parameter | Description | Format |
|---|---|---|
| VWID | Name of the payment terminal for recurring / one-click payments | 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 |
| 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;
SessionType=Block;
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. Authentication may be required for one-click payments, depending on the terminal configuration. The 3DS value is not returned for recurring payments | 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 |
| 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 — merchant side
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 charges funds in a one-step payment or places a hold on funds in a two-step payment.
PaySubmit3DS
The PaySubmit3DS command completes a charge or a hold of funds on a card protected by 3-D Secure. It is sent after the Pay request (merchant side) once the 3-D Secure authentication results have been received from the issuing bank.
