GetState
https://{Environment}.payture.com/apim/GetStateThe GetState command is used to retrieve the current status of a payment.
Request
curl https://sandbox3.payture.com/apim/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
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"/>| Parameter | Description | Format |
|---|---|---|
| Success | Operation success flag (status retrieval). 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 |
| AddInfo | Additional transaction parameters that can be returned in the payment gateway response by arrangement with Payture support The format and possible parameters are described here (in Russian) | Object Optional |
| ErrCode | Error code. See error codes Returned if: “Success=True” + “State=Rejected” – contains the payment error code “Success=False” – contains the error code of the status request itself | String Optional |
GetRefunds
The GetRefunds command is used to retrieve the list of refunds for an order.
Payture eWallet
The Payture eWallet API lets you register customers and link payment cards to registered customer accounts. This enables recurring payments and payments with a saved card without re-entering card details, including one-click payments.
