Charge
https://{Environment}.payture.com/vwapi/ChargeThe Charge command captures funds on the Customer's card that were previously held by the Pay command. It is used in the two-step payment flow.
Processing the request captures an amount that does not exceed the held amount (equal to or less than it).
Important! For the capture to succeed, the payment must have the Authorized status at the time the request is executed.
Request
curl https://sandbox3.payture.com/vwapi/Charge \
-X POST \
-H "Content-Type: application/x-www-form-urlencoded" \
-d VWID=Merchant \
-d Password=123 \
-d OrderId=5f63838d-fb03-00c6-c890-c67cfc1c54ea \Parameter names in requests are case-sensitive
| Parameter | Description | Format |
|---|---|---|
| VWID | Payment terminal name Provided with the test/production access credentials | String Mandatory |
| Password | Payment terminal password Provided with the test/production access credentials | String 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 | Amount to capture, in kopecks (1/100 of a ruble). If the parameter is omitted from the request, the full amount is captured Digits only, with no decimal or other separators | Integer Optional |
| Cheque | Receipt information in JSON format, Base64-encoded | String Optional |
Response
An XML string with the Charge element
Response examples
<Charge Success="True" OrderId="5f63838d-fb03-00c6-c890-c67cfc1c54ea" Amount="12480"/>| Parameter | Description | Format |
|---|---|---|
| Success | Operation success flag. Possible values:True — the operation succeededFalse — the operation failed | String Mandatory |
| OrderId | Payment ID in the Merchant's system Matches the value passed in the request | String [1..50] Mandatory |
| Amount | Final amount charged to the Customer's card Returned if “Success=True” | Integer Optional |
| ErrCode | Error code. See error codes Returned if “Success=False” | String Optional |
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.
Unblock
The request fully releases funds previously held on the Customer's card. It is used in the two-step payment flow.
