refund_create
Initiate a refund for a successful Robokassa payment. Supports full and partial refunds with optional fiscal receipt.
Instructions
Initiate a refund for a successful Robokassa payment.
Requires op_key — obtained from check_payment (OpStateExt) or the
Result2 webhook payload for the original operation.
Refund amount:
- Omit refund_sum for a FULL refund of the original operation.
- Pass a numeric amount for a partial refund.
Fiscal receipt:
- Omit items to refund without emitting a fiscal receipt (appropriate
when the original sale was not fiscalized through Robokassa).
- Pass a list of items to emit a receipt for the refund. Each item:
{name, quantity, cost, tax, payment_method, payment_object} where
tax ∈ none/vat0/vat5/vat7/vat10/vat20/vat105/vat107/vat110/vat120,
payment_method ∈ full_payment/advance/..., payment_object ∈
commodity/service/payment/...
Authentication:
Uses JWT signed with Password#3. This is distinct from Password#1
(checkout) and Password#2 (XML status). Access to the Refund API must
be enabled in the Robokassa cabinet separately.
Returns:
{success: bool, request_id: str | None, message: str | None}.
Store request_id to poll refund status via refund_status.
Common failure messages: NotEnoughOperationFunds, OperationNotFound,
AlreadyRefunded.
Credentials may be passed explicitly or via the ROBOKASSA_PASSWORD3 env var.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| op_key | Yes | ||
| password3 | No | ||
| refund_sum | No | ||
| items | No | ||
| algorithm | No | HS256 |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||