GetState
https://{Environment}.payture.com/vwapi/GetStateThe GetState command retrieves the current status of a payment.
Request
curl https://sandbox3.payture.com/vwapi/GetState \
-X POST \
-H "Content-Type: application/x-www-form-urlencoded" \
-d Key=Merchant \
-d OrderId=5f63838d-fb03-00c6-c890-c67cfc1c54ea \Parameter names in requests are case-sensitive
| Parameter | Description | Format |
|---|---|---|
| Key | Payment terminal name 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 |
Response
An XML string with the GetState element
Response examples
<GetState Success="True" OrderId="5f63838d-fb03-00c6-c890-c67cfc1c54ea" State="Refunded" Forwarded="False" MerchantContract="Merchant" Amount="12480" RRN="003770024290" VWUserLgn="123@ya.ru" PANMask="521885xxxxxx5484"/>| Parameter | Description | Format |
|---|---|---|
| Success | Operation success flag (for retrieving the status). Possible values:True — the order was found and its status retrievedFalse — the status request could not be completed | String Mandatory |
| OrderId | Payment ID in the Merchant's system Matches the value passed in the request | String [1..50] Mandatory |
| Forwarded | Indicates whether the payment was forwarded to another terminal | Boolean Mandatory |
| State | Payment status. See transaction statuses Returned if “Success=True” | String Optional |
| MerchantContract | Payment terminal name Matches the value passed in the request. Returned if “Success=True” | String [1..50] Optional |
| FinalTerminal | Final terminal on which the payment was processed Returned if “Forwarded=True” | String Optional |
| Amount | Payment amount in kopecks (or another minor unit of the terminal currency) Returned if “Success=True” | Integer Optional |
| RRN | Unique transaction number assigned by the acquiring bank (Retrieval Reference Number) Returned if “Success=True” | String [12] Optional |
| VWUserLgn | Customer identifier in the Payture system Returned if “Success=True” | String [1..50] Optional |
| PANMask | Masked card number (first 6 and last 4 digits: 123456xxxxxx1234) Returned if “Success=True” | String [13..19] 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=True” + “State=Rejected” – the payment error code is specified; “Success=False” – the error code of the status request itself is specified | String Optional |
