GetRefunds
https://{Environment}.payture.com/api/GetRefundsThe GetRefunds command is used to retrieve the list of refunds for an order.
Request
curl https://sandbox3.payture.com/api/GetRefunds \
-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 GetRefunds element
Response examples
<GetRefunds Success="True" OrderId="5f63838d-fb03-00c6-c890-c67cfc1c54ea" Forwarded="True" MerchantContract="Merchant"
FinalTerminal="Merchant" State="Charged" Amount="300000" NewAmount="100000">
<Item RefundDateTime="2023.08.17 18:22:07" RefundAmount="150000" RefundNewAmount="150000"/>
<Item RefundDateTime="2023.10.19 19:12:07" RefundAmount="50000" RefundNewAmount="100000"/>
</GetRefunds>| 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 |
| 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 |
| NewAmount | Remaining charged amount after the refund, in kopecks Returned if “Success=True” | Integer Optional |
| Item | List of refunds for the order Returned if “Success=True” | Object Optional |
| ErrCode | Error code. See error codes Returned if “Success=False” | String Optional |
Item element attributes
| Parameter | Description | Format |
|---|---|---|
| RefundDateTime | Refund date and time Returned if “Success=True” and the order has successful refunds | String Optional |
| RefundAmount | Refund amount in kopecks Returned if “Success=True” and the order has successful refunds | Integer Optional |
| RefundNewAmount | Remaining charged amount after the refund, in kopecks Returned if “Success=True” and the order has successful refunds | Integer Optional |
