Skip to content

feat(router): enhance conflicted payment handling - #14288

Open
AkshayaFoiger wants to merge 16 commits into
mainfrom
integrity-check-fix
Open

AkshayaFoiger wants to merge 16 commits into
mainfrom
integrity-check-fix

Conversation

@AkshayaFoiger

@AkshayaFoiger AkshayaFoiger commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

Type of Change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring
  • Dependency updates
  • Documentation
  • CI/CD

Description

Chnages done in this PR

  1. Move the integrity failure error response to 2xx

  2. Store amount_received in case of conflicted state

  3. Add an endpoint that communicates, the next possible status a payment can be updated to in case of manual status update

JWT and Merchant Api Authentication

curl --location 'http://localhost:8080/payments/pay_5b1SeLET7b79rhXSxMhp/manual-status-update' \
--header 'Accept: application/json' \
--header 'api-key: dev_GmjSiz3bZa6nLsz0A16q7gWeFE86PNwsLaaLJySAoJw0kU9g7yQBOX6xr9UHOPik' \
  1. Allow manual status update if the payment is in the conflicted state
  2. Handle integrity checks for features such as partial authorization and overcapture
  3. Fix the mapping of UNSPECIFIED status received from UCS

Note: populating amount captured and amount capturable from the connector is mandatory to handle integrity checks

This PR does not cover

  1. Refund integrity failure UCS bridge
  2. Currency integrity failure handling - we are not storing the currency sent by the connector, nor we convert the amount between currencies .
  3. We aren't tracking the amount received from connector for manual capture. So, amount received from the connector is not stored for manual multiple.

Additional Changes

  • This PR modifies the API contract
  • This PR modifies the database schema
  • This PR modifies application configuration/environment variables

How did you test it?

Conflicts are tested by hardcoding response value

A conflicted UCS payment
curl --location 'http://localhost:8080/payments' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'api-key: dev_XhE3ks2ofjKFs0Y2fjdOIBVH8es567ikncnkM47mpAKXOfgIodabRdaANatzWZoC' \
--data '{
    "amount": 100,
    "currency": "USD",
    
    "confirm": true,
    "description": "abcd",
    
    "capture_method": "automatic",

    "payment_channel": "telephone_order", 
    
    "payment_method": "card",
    "payment_method_type": "debit",
    "payment_method_data": {
        "card": {
            "card_number": "4111 1111 1111 1111", 
            "card_exp_month": "12",
            "card_exp_year": "30",
            "card_holder_name": "CL-BRW2",
            "card_cvc": "999",
            "card_network": "VISA"
        }
    },
    "return_url": "https://google.com",

    "billing": {
        "address": {
            "line1": "123 Main St",
    
    
            
            "zip": "10001"
            
            
            
        }
    
    },

    
    "customer_acceptance": {
        "acceptance_type": "online",
        "accepted_at": "2025-03-27T13:56:49.848Z",
        "online": {
            "ip_address": null,
            "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.3 Safari/605.1.15"
        }
    },
    "setup_future_usage": "off_session"

    ,"browser_info": {
        "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36",
        "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
        "language": "nl-NL",
        "color_depth": 24,
        "screen_height": 723,
        "screen_width": 1536,
        "time_zone": 0,
        "java_enabled": true,
        "java_script_enabled": true,
        "ip_address": "13.232.74.226"
    }

    
    ,"customer_id": "234363"
    

    
}'

Response

{
    "payment_id": "pay_nJicMBRWxEGg9nZeCRuJ",
    "merchant_id": "21c5e7b8-8af9-4757-ad59-5d050e29dff1",
    "status": "conflicted",
    "amount": 100,
    "net_amount": 100,
    "shipping_cost": null,
    "amount_capturable": 0,
    "amount_received": 50,
    "processor_merchant_id": "21c5e7b8-8af9-4757-ad59-5d050e29dff1",
    "initiator": null,
    "sdk_authorization": "cHJvZmlsZV9pZD1wcm9fbjRkT2ZLalBDNDhGcFJUclFFT3AscHVibGlzaGFibGVfa2V5PXBrX2Rldl8xZjBkMTY3YjliZTk0ZjY0OWU4NzNhNTI5NGZjNzk4NCxjbGllbnRfc2VjcmV0PXBheV9uSmljTUJSV3hFR2c5blplQ1J1Sl9zZWNyZXRfbVlHOWxtb3o4bVg4N05jdENrWmMsY3VzdG9tZXJfaWQ9MjM0MzYzLGNsaWVudF9zZXNzaW9uX2lkPWNsaWVudF9zZXNzX1FlMm1hQ1Q2Mzh5N29EbVUzV1ZILHBheW1lbnRfaWQ9cGF5X25KaWNNQlJXeEVHZzluWmVDUnVK",
    "connector": "stripe",
    "state_metadata": null,
    "client_secret": "pay_nJicMBRWxEGg9nZeCRuJ_secret_mYG9lmoz8mX87NctCkZc",
    "created": "2026-09-18T08:18:25.894Z",
    "modified_at": "2026-09-18T08:18:27.076Z",
    "connector_customer_id": "cus_VHVsFRxuFn2lc5",
    "currency": "USD",
    "customer_id": "234363",
    "customer": {
        "id": "234363",
        "name": null,
        "email": null,
        "phone": null,
        "phone_country_code": null,
        "customer_document_details": null
    },
    "description": "abcd",
    "refunds": null,
    "disputes": null,
    "mandate_id": null,
    "mandate_data": null,
    "setup_future_usage": "off_session",
    "off_session": null,
    "capture_on": null,
    "capture_method": "automatic",
    "payment_method": "card",
    "payment_method_data": {
        "card": {
            "last4": "1111",
            "card_type": null,
            "card_subtype": null,
            "card_segment_type": null,
            "funding_source": null,
            "card_network": null,
            "card_issuer": null,
            "card_issuing_country": null,
            "card_isin": "411111",
            "card_extended_bin": null,
            "card_exp_month": "12",
            "card_exp_year": "30",
            "card_holder_name": "CL-BRW2",
            "payment_checks": null,
            "authentication_data": null,
            "auth_code": null
        },
        "billing": null
    },
    "payment_token": null,
    "shipping": null,
    "billing": {
        "address": {
            "city": null,
            "country": null,
            "line1": "123 Main St",
            "line2": null,
            "line3": null,
            "zip": "10001",
            "state": null,
            "first_name": null,
            "last_name": null,
            "origin_zip": null
        },
        "phone": null,
        "email": null
    },
    "order_details": null,
    "email": null,
    "name": null,
    "phone": null,
    "return_url": "https://google.com/",
    "authentication_type": "no_three_ds",
    "statement_descriptor_name": null,
    "statement_descriptor_suffix": null,
    "next_action": null,
    "cancellation_reason": null,
    "error_code": "IE",
    "error_message": "Integrity Check Failed! Value mismatched for fields amount expected 100 but found 50",
    "unified_code": null,
    "unified_message": null,
    "error_details": {
        "unified_details": null,
        "issuer_details": null,
        "connector_details": {
            "code": "IE",
            "message": "Integrity Check Failed!",
            "reason": "Integrity Check Failed! Value mismatched for fields amount expected 100 but found 50"
        }
    },
    "payment_experience": null,
    "payment_method_type": "debit",
    "connector_label": null,
    "business_country": null,
    "business_label": null,
    "business_sub_label": null,
    "allowed_payment_method_types": null,
    "manual_retry_allowed": null,
    "connector_transaction_id": "pi_3UGx02GcUb6n1v1609D2pzZ1",
    "frm_message": null,
    "metadata": null,
    "connector_metadata": null,
    "connector_response_metadata": null,
    "feature_metadata": {
        "redirect_response": null,
        "search_tags": null,
        "apple_pay_recurring_details": null,
        "pix_additional_details": null,
        "boleto_additional_details": null,
        "pix_automatico_additional_details": null,
        "finix_additional_details": null
    },
    "reference_id": null,
    "payment_link": null,
    "profile_id": "pro_n4dOfKjPC48FpRTrQEOp",
    "surcharge_details": null,
    "applied_offer": null,
    "attempt_count": 1,
    "merchant_decision": null,
    "merchant_connector_id": "mca_Kdhm3nc9ro5Dgq0zaQEW",
    "incremental_authorization_allowed": null,
    "authorization_count": null,
    "incremental_authorizations": null,
    "external_authentication_details": null,
    "external_3ds_authentication_attempted": false,
    "expires_on": "2026-09-18T08:33:25.894Z",
    "fingerprint": null,
    "fingerprint_type": null,
    "browser_info": {
        "language": "nl-NL",
        "time_zone": 0,
        "ip_address": "13.232.74.226",
        "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36",
        "color_depth": 24,
        "java_enabled": true,
        "screen_width": 1536,
        "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
        "screen_height": 723,
        "java_script_enabled": true
    },
    "payment_channel": null,
    "payment_method_id": null,
    "network_transaction_id": null,
    "payment_account_reference": null,
    "network_transaction_link_id": null,
    "payment_method_status": "active",
    "updated": "2026-09-18T08:18:27.076Z",
    "split_payments": null,
    "frm_metadata": null,
    "extended_authorization_applied": null,
    "extended_authorization_last_applied_at": null,
    "request_extended_authorization": null,
    "capture_before": null,
    "merchant_order_reference_id": null,
    "order_tax_amount": null,
    "connector_mandate_id": "pm_1UGx02GcUb6n1v16SbrCWDT8",
    "card_discovery": "manual",
    "force_3ds_challenge": false,
    "force_3ds_challenge_trigger": false,
    "issuer_error_code": null,
    "issuer_error_message": null,
    "is_iframe_redirection_enabled": null,
    "whole_connector_response": null,
    "enable_partial_authorization": null,
    "enable_overcapture": null,
    "is_overcapture_enabled": null,
    "network_details": null,
    "is_stored_credential": null,
    "mit_category": null,
    "billing_descriptor": null,
    "is_account_funded_transaction": null,
    "recipient_details": null,
    "tokenization": null,
    "partner_merchant_identifier_details": null,
    "payment_method_tokenization_details": {
        "payment_method_id": "pm_jAtpQZ2Y8UVv0y5DbRuz",
        "payment_method_status": "active",
        "psp_tokenization": false,
        "network_tokenization": false,
        "network_transaction_id": "117538849501131",
        "network_transaction_link_id": null,
        "is_eligible_for_mit_payment": true
    },
    "installment_options": null,
    "installment_data": null,
    "sender_payment_instrument_id": null
}

Manual status update

curl --location 'http://localhost:8080/payments/pay_rOMckxWkvNK6RfNcCGVe/manual-status-update' \
--header 'Accept: application/json' \
--header 'X-Merchant-Id: e4d8a6af-bb92-4855-a899-86c3ef9c3a42' \
--header 'Content-Type: application/json' \
--header 'api-key: test_admin' \
--data '{
    "intent_status": "partially_captured"
}'

Response

{
    "payment_id": "pay_rOMckxWkvNK6RfNcCGVe",
    "attempt_id": "pay_rOMckxWkvNK6RfNcCGVe_1",
    "intent_status": "partially_captured",
    "attempt_status": "partial_charged"
}
Test conflicted refund via hyperswitch connector
{
    "refund_id": "ref_nCGDoXJpvCQ57yLMLojZ",
    "payment_id": "pay_YnvVulxmaPoGjjjPamoz",
    "amount": 50,
    "currency": "USD",
    "status": "review",
    "reason": "Customer returned product",
    "metadata": {
        "udf1": "value1",
        "new_customer": "true",
        "login_date": "2019-09-10T10:11:12Z"
    },
    "error_message": "Integrity Check Failed! as data mismatched for fields refund_amount expected 50 but found 30",
    "error_code": "IE",
    "unified_code": null,
    "unified_message": null,
    "created_at": "2026-09-18T08:08:42.812Z",
    "updated_at": "2026-09-18T08:08:43.807Z",
    "connector": "stripe",
    "profile_id": "pro_n4dOfKjPC48FpRTrQEOp",
    "merchant_connector_id": "mca_Kdhm3nc9ro5Dgq0zaQEW",
    "split_refunds": null,
    "issuer_error_code": null,
    "issuer_error_message": null,
    "raw_connector_response": null,
    "connector_refund_id": "re_3UGwqOGcUb6n1v160JmFbsy6"
}
Test conflicted capture via ucs
{
    "payment_id": "pay_gut0ey4x72DpZoWOkGha",
    "merchant_id": "52e4baf5-0d21-43ef-8da0-e4eafee77df8",
    "status": "conflicted",
    "amount": 50,
    "net_amount": 50,
    "shipping_cost": null,
    "amount_capturable": 50,
    "amount_received": 50,
    "processor_merchant_id": "52e4baf5-0d21-43ef-8da0-e4eafee77df8",
    "initiator": null,
    "sdk_authorization": "cHJvZmlsZV9pZD1wcm9fR0RKeFk0d2R4ZVJzb0tQcFhveVgscHVibGlzaGFibGVfa2V5PXBrX2Rldl8yNjc4ZWYxZjA0NGY0OGJkYWMzYjQwZmYxNzMyNDU1NCxjbGllbnRfc2VjcmV0PXBheV9ndXQwZXk0eDcyRHBab1dPa0doYV9zZWNyZXRfUGN0SEdNZjhoUWg5UG5rMWZHczksY3VzdG9tZXJfaWQ9MjM0MzYzLHBheW1lbnRfaWQ9cGF5X2d1dDBleTR4NzJEcFpvV09rR2hh",
    "connector": "stripe",
    "state_metadata": null,
    "client_secret": "pay_gut0ey4x72DpZoWOkGha_secret_PctHGMf8hQh9Pnk1fGs9",
    "created": "2026-09-20T17:37:37.809Z",
    "modified_at": "2026-09-20T17:37:43.249Z",
    "connector_customer_id": null,
    "currency": "USD",
    "customer_id": "234363",
    "customer": {
        "id": "234363",
        "name": null,
        "email": null,
        "phone": null,
        "phone_country_code": null,
        "customer_document_details": null
    },
    "description": "abcd",
    "refunds": null,
    "disputes": null,
    "mandate_id": null,
    "mandate_data": null,
    "setup_future_usage": "off_session",
    "off_session": null,
    "capture_on": null,
    "capture_method": "manual",
    "payment_method": "card",
    "payment_method_data": {
        "card": {
            "last4": "1111",
            "card_type": null,
            "card_subtype": null,
            "card_segment_type": null,
            "funding_source": null,
            "card_network": null,
            "card_issuer": null,
            "card_issuing_country": null,
            "card_isin": "411111",
            "card_extended_bin": null,
            "card_exp_month": "03",
            "card_exp_year": "30",
            "card_holder_name": "CL-BRW2",
            "payment_checks": {
                "cvc_check": "pass",
                "address_line1_check": "pass",
                "address_postal_code_check": "pass"
            },
            "authentication_data": null,
            "auth_code": null
        },
        "billing": null
    },
    "payment_token": null,
    "shipping": null,
    "billing": {
        "address": {
            "city": null,
            "country": null,
            "line1": "123 Main St",
            "line2": null,
            "line3": null,
            "zip": "10001",
            "state": null,
            "first_name": null,
            "last_name": null,
            "origin_zip": null
        },
        "phone": null,
        "email": null
    },
    "order_details": null,
    "email": null,
    "name": null,
    "phone": null,
    "return_url": "https://google.com/",
    "authentication_type": "no_three_ds",
    "statement_descriptor_name": null,
    "statement_descriptor_suffix": null,
    "next_action": null,
    "cancellation_reason": null,
    "error_code": "IE",
    "error_message": "Integrity Check Failed! Value mismatched for fields capture_amount expected 50 but found 100",
    "unified_code": null,
    "unified_message": null,
    "error_details": {
        "unified_details": null,
        "issuer_details": null,
        "connector_details": {
            "code": "IE",
            "message": "Integrity Check Failed!",
            "reason": "Integrity Check Failed! Value mismatched for fields capture_amount expected 50 but found 100"
        }
    },
    "payment_experience": null,
    "payment_method_type": "debit",
    "connector_label": null,
    "business_country": null,
    "business_label": null,
    "business_sub_label": null,
    "allowed_payment_method_types": null,
    "manual_retry_allowed": null,
    "connector_transaction_id": "pi_3UHogIGcUb6n1v161AEicxO1",
    "frm_message": null,
    "metadata": {
        "error_on_requires_action": true
    },
    "connector_metadata": null,
    "connector_response_metadata": null,
    "feature_metadata": {
        "redirect_response": null,
        "search_tags": null,
        "apple_pay_recurring_details": null,
        "pix_additional_details": null,
        "boleto_additional_details": null,
        "pix_automatico_additional_details": null,
        "finix_additional_details": null
    },
    "reference_id": "pi_3UHogIGcUb6n1v161AEicxO1",
    "payment_link": null,
    "profile_id": "pro_GDJxY4wdxeRsoKPpXoyX",
    "surcharge_details": null,
    "applied_offer": null,
    "attempt_count": 1,
    "merchant_decision": null,
    "merchant_connector_id": "mca_N7f0NOOIoPHRxRoFZIXk",
    "incremental_authorization_allowed": false,
    "authorization_count": null,
    "incremental_authorizations": null,
    "external_authentication_details": null,
    "external_3ds_authentication_attempted": false,
    "expires_on": "2026-09-20T17:52:37.809Z",
    "fingerprint": null,
    "fingerprint_type": null,
    "browser_info": {
        "language": "nl-NL",
        "time_zone": 0,
        "ip_address": "13.232.74.226",
        "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36",
        "color_depth": 24,
        "java_enabled": true,
        "screen_width": 1536,
        "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
        "screen_height": 723,
        "java_script_enabled": true
    },
    "payment_channel": null,
    "payment_method_id": "pm_Cg43LY3duc4dSAmpoRHq",
    "network_transaction_id": "117538849501131",
    "payment_account_reference": null,
    "network_transaction_link_id": null,
    "payment_method_status": null,
    "updated": "2026-09-20T17:37:43.249Z",
    "split_payments": null,
    "frm_metadata": null,
    "extended_authorization_applied": false,
    "extended_authorization_last_applied_at": null,
    "request_extended_authorization": null,
    "capture_before": null,
    "merchant_order_reference_id": null,
    "order_tax_amount": null,
    "connector_mandate_id": null,
    "card_discovery": "manual",
    "force_3ds_challenge": false,
    "force_3ds_challenge_trigger": false,
    "issuer_error_code": null,
    "issuer_error_message": null,
    "is_iframe_redirection_enabled": null,
    "whole_connector_response": null,
    "enable_partial_authorization": null,
    "enable_overcapture": null,
    "is_overcapture_enabled": false,
    "network_details": null,
    "is_stored_credential": null,
    "mit_category": null,
    "billing_descriptor": null,
    "is_account_funded_transaction": null,
    "recipient_details": null,
    "tokenization": null,
    "partner_merchant_identifier_details": null,
    "payment_method_tokenization_details": null,
    "installment_options": null,
    "installment_data": null,
    "sender_payment_instrument_id": null
}

Checklist

  • I formatted the code cargo +nightly fmt --all
  • I addressed lints thrown by cargo clippy
  • I reviewed the submitted code
  • I added unit tests for my changes where possible

@AkshayaFoiger
AkshayaFoiger requested review from a team as code owners September 17, 2026 11:44
@semanticdiff-com

semanticdiff-com Bot commented Sep 17, 2026

Copy link
Copy Markdown

Review changes with  SemanticDiff

Changed Files
File Status
  crates/router/src/core/payments/operations/payment_response.rs  59% smaller
  crates/api_models/src/events/payment.rs  53% smaller
  crates/router/src/routes/app.rs  50% smaller
  crates/hyperswitch_domain_models/src/errors/api_error_response.rs  50% smaller
  crates/router_env/src/logger/types.rs  38% smaller
  crates/api_models/src/enums.rs  31% smaller
  crates/router/src/routes/lock_utils.rs  23% smaller
  crates/api_models/src/payments.rs  12% smaller
  crates/router/src/core/payments.rs  11% smaller
  crates/hyperswitch_interfaces/src/integrity.rs  5% smaller
  Cargo.lock Unsupported file format
  crates/api_models/src/errors/types.rs  0% smaller
  crates/common_utils/src/errors.rs  0% smaller
  crates/external_services/Cargo.toml Unsupported file format
  crates/hyperswitch_domain_models/src/router_request_types.rs  0% smaller
  crates/hyperswitch_interfaces/Cargo.toml Unsupported file format
  crates/hyperswitch_interfaces/src/unified_connector_service/transformers.rs Unsupported file format
  crates/router/Cargo.toml Unsupported file format
  crates/router/src/compatibility/stripe/errors.rs  0% smaller
  crates/router/src/connector/utils.rs  0% smaller
  crates/router/src/core/payments/flows/authorize_flow.rs  0% smaller
  crates/router/src/core/payments/flows/complete_authorize_flow.rs  0% smaller
  crates/router/src/core/payments/transformers.rs  0% smaller
  crates/router/src/core/relay/utils.rs  0% smaller
  crates/router/src/core/unified_connector_service/transformers.rs  0% smaller
  crates/router/src/routes/payments.rs  0% smaller

@AkshayaFoiger AkshayaFoiger self-assigned this Sep 17, 2026
@AkshayaFoiger AkshayaFoiger added the A-core Area: Core flows label Sep 17, 2026
split_payments: None,
webhook_url: None,
merchant_order_reference_id: None,
is_overcapture_enabled: None,

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

v2

split_payments: None,
webhook_url: None,
merchant_order_reference_id: None,
is_overcapture_enabled: None,

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

v2

@AkshayaFoiger AkshayaFoiger added the S-test-ready Status: This PR is ready for cypress-tests label Sep 18, 2026
maverox
maverox previously approved these changes Sep 18, 2026
Comment thread crates/router/src/core/payments.rs Outdated
payment_intent: &storage::PaymentIntent,
payment_attempt: &storage::PaymentAttempt,
) -> Vec<enums::ManualUpdateIntentStatus> {
use enums::ManualUpdateIntentStatus as Status;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we import at the top

Comment thread crates/api_models/src/enums.rs
Comment thread crates/api_models/src/payments.rs Outdated
pub payment_id: id_type::PaymentId,
/// The statuses that a manual status update for this payment may currently target,
/// computed from the payment's capture method and requested/received/capturable amounts.
pub eligible_statuses: Vec<enums::ManualUpdateIntentStatus>,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this can be HashSet

hrithikesh026
hrithikesh026 previously approved these changes Sep 18, 2026
maverox
maverox previously approved these changes Sep 18, 2026
swangi-kumari
swangi-kumari previously approved these changes Sep 18, 2026

@swangi-kumari swangi-kumari left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

connector changes looks good to me.

@XyneSpaces

Copy link
Copy Markdown
Contributor

[should-fix] payments_manual_status_update_eligible_statuses in crates/router/src/core/payments.rs is a new async hot-path function without #[instrument]. Add #[instrument(skip_all, fields(payment_id))] so tracing captures it consistently with neighboring core functions.

[should-fix] The new match payment_attempt.capture_method.unwrap_or_default() silently treats a missing capture_method as the default value, which can yield incorrect eligible-status calculations. Make the missing case explicit or validate the field upstream.

let non_failed_status = match payment_attempt.capture_method {
    Some(capture_method) => match capture_method { ... },
    None => /* return explicit error or handle explicitly */,
};

[should-fix] The newly introduced // TODO: comments in crates/hyperswitch_interfaces/src/integrity.rs leave known gaps tracked inside production source. Resolve them in this PR or move tracking to an issue; TODOs in shipped code tend to rot.

@github-actions github-actions Bot removed the S-test-ready Status: This PR is ready for cypress-tests label Sep 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-core Area: Core flows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants