Skip to main content

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}
AttributeTypeDescriptionMandatoryLocationExample
appIdnumberThe 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.
Yespath1234
invoiceIdnumberHow to get invoiceId, please refer to SDK in-app payments documentation.Yespath4567

Response parameters

AttributeTypeDescriptionMandatoryLocationExample
codestringResponse code.YesbodyОК;
ERROR;
BAD_REQUEST;
NOT_FOUND.
messagestringExplanation of the response code.NobodyInvoice has already been refunded
bodyobjectResponse body.NobodyN/A
timestampstringResponse time.Yesbody2025-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.