RU

GetState

https://{Environment}.payture.com/apim/GetState

The 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 \
Get link

Parameter names in requests are case-sensitive

ParameterDescriptionFormat
KeyPayment terminal name
Provided with the test/production access credentials
String
Mandatory
OrderIdUnique 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"/>
ParameterDescriptionFormat
SuccessOperation success flag (status retrieval). Possible values:
True — the order was found and its status retrieved
False — the status request could not be completed
String
Mandatory
OrderIdPayment ID in the Merchant's system
Matches the value passed in the request
String [1..50]
Mandatory
ForwardedIndicates whether the payment was forwarded to another terminalBoolean
Mandatory
StatePayment status. See transaction statuses
Returned if “Success=True”
String
Optional
MerchantContractPayment terminal name
Matches the value passed in the request. Returned if “Success=True”
String [1..50]
Optional
FinalTerminalFinal terminal on which the payment was processed
Returned if “Forwarded=True”
String
Optional
AmountPayment amount in kopecks (or another minor unit of the terminal currency)
Returned if “Success=True”
Integer
Optional
RRNUnique transaction number assigned by the acquiring bank (Retrieval Reference Number)
Returned if “Success=True”
String [12]
Optional
AddInfoAdditional 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
ErrCodeError 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

On this page