Инструменты страницы



Request for refund in full amount, monetary funds (refund)

The request used for making a refund is refund.do (see Connection URLs).

Orders that initiate recurring payments cannot be reversed and refunded, as in these cases there is no real debiting.


Upon this request, the funds for the specified order are to be returned to the payer. The request will end with an error if the funds have not been debited for this order. To process a refund operation, it is necessary to have the corresponding permissions in the system.

In this document, the following data type conventions are used when describing request and response parameters:

  • A<n> – a sequence of Latin letters of length <n>;
  • A..<n> – a sequence of Latin letters with a length not exceeding <n>;
  • N<n> – a sequence of digits of length <n>;
  • N..<n> – a sequence of digits with a length not exceeding <n>;
  • AN<n> – a sequence of Latin letters and numbers of fixed length <n>;
  • AN.. <n> – a sequence of Latin letters and numbers with a length not exceeding <n>;
  • ANS<n> – a sequence of Latin letters, numbers and characters of fixed length <n>
  • ANS.. <n> – a sequence of Latin letters, numbers and characters with a length not exceeding <n>;
  • UTC – date and time, in this case: the date must be passed without specifying the time zone, Moscow time, for the SOAP protocol, the standard encoding xs: dateTime is used.

Request parameters

The request parameters are given in table below.

Name Type Mandatory Description

userName

AN..30

Yes

Login of the service account of the merchant.

password

AN..30

Yes

Merchant's service account password.

orderId

ANS36

Yes

Identifier of the order in the payment system. It is unique within the system. Missing if order registration failed due to an error detailed in ErrorCode.

amount

N..12

Yes

Payment amount in minimum currency units.

jsonParams

String

No

Additional parameters of the request. Format: {«Name1»: «Value1», «Name2»: «Value2»}.

It is forbidden to pass reserved names in the parameter (if they are passed, the order may be rejected):

  • sbrf_spasibo:amount_bonus
  • sbrf_sbermiles:amount_bonus
  • loyaltyId

If you specify amount=0 in the request, a refund is made for the entire amount of the order.

Response parameters

The response parameters are given in table below.

Name Type Mandatory Description

errorCode

ANS..3

No

Error code. Can be missing if the result has not caused an error.

errorMessage

AN..512

No

Error description in the language passed in the language parameter in the request.

Error codes

Error code Error text
0

The request has been processed without system errors.

5

Access denied.

5

The user must change the password.

5

[orderId] is empty.

5

Incorrect amount.

6

Wrong order number.

7

Payment must be in the correct state.

7

The refund amount exceeds the debited amount.

7

System error.

Examples

POST request example

userName=test-api&password=testPwd&orderId=148a2a67-25ff-7d1b-b28d-391800a7dca8&amount=101000

Пример ответа

{"errorCode":0}