RU

Refund

https://{Environment}.payture.com/api/Refund

The Refund command returns funds charged with the Pay or Charge command to the Customer's card. It is used with both the one-step and the two-step payment flows.

Processing the request refunds funds to the Customer's card in full or in part.

Important! For the refund to succeed, the payment must have the Charged status at the time the request is processed.

Request

curl https://sandbox3.payture.com/api/Refund \
-X POST \
-H "Content-Type: application/x-www-form-urlencoded" \
-d Key=Merchant \
-d Password=123 \
-d Amount=12480 \
-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
PasswordPayment terminal password
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
AmountAmount to refund, in kopecks. If the parameter is omitted, a full refund is made
Digits only, without decimal or other separators
Integer
Optional
ChequeFiscal receipt data in JSON format, Base64-encodedString
Optional

Response

XML string with the Refund element.

Response examples

<Refund Success="True" OrderId="5f63838d-fb03-00c6-c890-c67cfc1c54ea" NewAmount="0"/>
ParameterDescriptionFormat
SuccessOperation success flag. Possible values:
True — the operation succeeded
False — the operation failed
String
Mandatory
OrderIdPayment ID in the Merchant's system
Matches the value passed in the request
String [1..50]
Mandatory
NewAmountRemaining charged amount after the refund, in kopecks
Returned if “Success=True”
Integer
Optional
ErrCodeError code. See error codes
Returned if “Success=False”
String
Optional

On this page