juspay/hyperswitch · error · hyperswitch_domain_models::router_data::ErrorResponse

CAPTURE_FAILED

CAPTURE_FAILED

Error message

CAPTURE_FAILED

What it means

Error "CAPTURE_FAILED" thrown in juspay/hyperswitch.

Source

Thrown at crates/hyperswitch_connectors/src/connectors/celero/transformers.rs:711

                        item.data.request.connector_transaction_id.clone(),
                    ),
                    redirection_data: Box::new(None),
                    mandate_reference: Box::new(None),
                    connector_metadata: None,
                    network_txn_id: None,
                    network_txn_link_id: None,
                    connector_response_reference_id: None,
                    incremental_authorization_allowed: None,
                    authentication_data: None,
                    charges: None,
                    payment_account_reference: None,
                }),
                ..item.data
            }),
            CeleroResponseStatus::Error => Ok(Self {
                status: common_enums::AttemptStatus::Failure,
                response: Err(hyperswitch_domain_models::router_data::ErrorResponse {
                    code: "CAPTURE_FAILED".to_string(),
                    message: item
                        .response
                        .msg
                        .clone()
                        .unwrap_or(consts::NO_ERROR_MESSAGE.to_string()),
                    reason: None,
                    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

  1. Verify the payment is in a capturable state (authorized, not already captured/voided) before retrying
  2. Check the capture amount and currency against the original authorization in the Celero dashboard
  3. Inspect the Celero error response code/message in logs and reconcile the transaction manually if needed

When it happens

Trigger: Thrown at crates/hyperswitch_connectors/src/connectors/celero/transformers.rs:709 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/076f8b0d2511bc84. Report an issue: GitHub.