juspay/hyperswitch · error · hyperswitch_domain_models::router_data::ErrorResponse
REFUND_FAILED
REFUND_FAILED
Error message
REFUND_FAILED
What it means
Error "REFUND_FAILED" thrown in juspay/hyperswitch.
Source
Thrown at crates/hyperswitch_connectors/src/connectors/celero/transformers.rs:850
impl TryFrom<RefundsResponseRouterData<Execute, CeleroRefundResponse>>
for RefundsRouterData<Execute>
{
type Error = error_stack::Report<errors::ConnectorError>;
fn try_from(
item: RefundsResponseRouterData<Execute, CeleroRefundResponse>,
) -> Result<Self, Self::Error> {
match item.response.status {
CeleroResponseStatus::Success => Ok(Self {
response: Ok(RefundsResponseData {
connector_refund_id: item.data.request.refund_id.clone(),
refund_status: enums::RefundStatus::Success,
}),
..item.data
}),
CeleroResponseStatus::Error => Ok(Self {
response: Err(hyperswitch_domain_models::router_data::ErrorResponse {
code: "REFUND_FAILED".to_string(),
message: item.response.msg.clone(),
reason: Some(item.response.msg),
status_code: item.http_code,
attempt_status: None,
connector_transaction_id: Some(
item.data.request.connector_transaction_id.clone(),
),
connector_response_reference_id: None,
network_decline_code: None,
network_advice_code: None,
network_error_message: None,
connector_metadata: None,
}),
..item.data
}),
}
}
}View on GitHub (pinned to 973a5edb12)
Solutions
- Verify the payment is captured/settled and the refund amount does not exceed the captured amount
- Check the refund status in the Celero dashboard and reconcile manually
- Inspect the Celero error response for the specific decline reason
When it happens
Trigger: Thrown at crates/hyperswitch_connectors/src/connectors/celero/transformers.rs:847 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of juspay/hyperswitch@973a5edb12 (2026-08-19).
Data as JSON: /api/errors/8d72496233421ec8.
Report an issue: GitHub.