Full Refund
This method allows you to perform a full refund for an invoice.
info
It may take up to 10 business days for the refunded funds to be credited to the buyer's account.
tip
If you don't know where to start, please read monetization guide.
Interaction Parameters
For real payments:
PATCH
https://public-api.rustore.ru/public/applications/{appId}/invoices/{invoiceId}
caution
For test payments use another method:
PATCH
https://public-api.rustore.ru/public/sandbox/applications/{appId}/invoices/{invoiceId}
| Attribute | Type | Description | Mandatory | Location | Example |
|---|---|---|---|---|---|
appId | number | The application ID from the RuStore console, where the refund is processed. 1. Go to the Applications tab and select the desired application. 2. Copy the ID from the application's URL – it is the set of digits between apps/ and /versions. For example, for the URL https://console.rustore.ru/apps/123456/versions, the application ID is 123456. | Yes | path | 1234 |
invoiceId | number | How to get invoiceId, please refer to SDK in-app payments documentation. | Yes | path | 4567 |
Response parameters
| Attribute | Type | Description | Mandatory | Location | Example |
|---|---|---|---|---|---|
code | string | Response code. | Yes | body | • ОК;• ERROR;• BAD_REQUEST;• NOT_FOUND. |
message | string | Explanation of the response code. | No | body | Invoice has already been refunded |
body | object | Response body. | No | body | N/A |
timestamp | string | Response time. | Yes | body | 2025-02-25T07:25:01.273Z |
Successful response
{
"code": "OK",
"message": null,
"body": {},
"timestamp": "2025-02-25T07:25:01.273Z"
}
Error response
{
"code": "ERROR",
"message": "Jwe token is expired"",
"body": null,
"timestamp": "2025-02-25T07:25:01.277Z"
}
Error list
Something went wrong;Invoice has already been refunded;Cannot refund now. Try again later;Refund amount cannot exceed payment amount;Invoice cannot be refunded;Invoice status must be CONFIRMED;Forbidden.