RU

Refund

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

This command refunds funds charged in a one-step or two-step payment.

Processing the request results in a full or partial refund of the charged funds to the Customer's card.

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

Request

curl https://sandbox3.payture.com/vwapi/Refund \
-X POST \
-H "Content-Type: application/x-www-form-urlencoded" \
-d VWID=Merchant \
--data-urlencode "DATA= \
OrderId=5f63838d-fb03-00c6-c890-c67cfc1c54ea; \
Password=123; \
Amount=12480" \
Get link

Parameter names in requests are case-sensitive

ParameterDescriptionFormat
VWIDPayment terminal name
Provided with the test/production access credentials
String
Mandatory
DATARefund parameters
A URL-encoded string containing key-value pairs separated by “;” (semicolon). Keys and values are separated by “=” (equals sign)
String
Mandatory

DATA parameter keys

ParameterDescriptionFormat
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 (1/100 of a ruble). If the parameter is omitted from the request, a full refund is made
Digits only, with no decimal or other separators
Integer
Optional
ChequeReceipt information in JSON format, Base64-encodedString
Optional

Example of the DATA parameter (decoded):

OrderId=5f63838d-fb03-00c6-c890-c67cfc1c54ea;
Amount=12480;
Password=123

Response

An XML string with the Refund element

Response examples

<Refund Success="True" OrderId="5f63838d-fb03-00c6-c890-c67cfc1c54ea" NewAmount="7800"/>
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