Let me analyze the payment update logic in hyperswitch to see if the netamount is…
- User
Let me analyze the payment update logic in hyperswitch to see if the net_amount is properly handled during incremental authorization. Based on the bug report, when a payment is created with amount=6500 and shipping_cost=100, the net_amount should be 6600. Then during incremental authorization when increasing to 6700, it should remain 6600 as the original net_amount, but the bug shows it gets incremented again to 6700.
Looking at the current incremental authorization code, I need to understand what happens in update_trackers. The issue is likely that when processing incremental authorization, we should not recalculate net_amount from scratch but rather preserve the original net_amount calculation and only update the total authorized amount.
Assistant
I'll analyze the payment update logic in Hyperswitch to understand how net_amount is handled during incremental authorization. Let me first explore the codebase to locate the relevant files.
Assistant
Let me try a broader search for payment-related files:
Assistant
Now let me search for incremental authorization specific files:
Assistant
Great! Let me also search for update_trackers to understand how payment trackers are updated:
Assistant
Let me look for tracker-related files:
Assistant
Let me look at the key file for incremental authorization:
Assistant
Let me also look at the payment update operation to understand how net_amount is handled:
Assistant
Now let me check how net_amount is calculated during initial payment creation to understand how it should be preserved:
Assistant
(no content)
Assistant
Let me now search for the NetAmount structure to understand how it's computed and managed:
Assistant
(no content)
Assistant
(no content)
Assistant
(no content)
Assistant
Let me read the relevant portion of the NetAmount structure:
Assistant
Let me take a different approach and examine the core payment logic around net_amount more thoroughly:
Assistant
Let me examine how payment amounts and net_amount are calculated in the initial payment creation, particularly focusing on the shipping cost:
Assistant
(no content)
Assistant
Let me search for the payment intent structures and how net_amount is set:
Assistant
Let me look at how net_amount is computed in the payment attempt structure by examining the storage layer:
Assistant
Let me check the storage implementation for payment attempts:
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
Identical first prompt
claude-sonnet-4-5-20250929Compare side by side →
claude-sonnet-4-5-20250929Compare side by side →
claude-sonnet-4-5-20250929Compare side by side →
claude-sonnet-4-5-20250929Compare side by side →
claude-sonnet-4-5-20250929Compare side by side →
claude-sonnet-4-5-20250929Compare side by side →
claude-sonnet-4-5-20250929Compare side by side →
claude-sonnet-4-5-20250929Compare side by side →
claude-sonnet-4-5-20250929Compare side by side →
claude-sonnet-4-5-20250929Compare side by side →
claude-sonnet-4-5-20250929Compare side by side →