You are working on the hyperswitch repository (Rust payment processing system).…
- User
You are working on the hyperswitch repository (Rust payment processing system).
REPOSITORY SETUP:
- Repository: juspay/hyperswitch
- Working directory: ./repos/hyperswitch_pool_3 (already cloned)
- Base commit: 54e910582fac9bd6fe300a9a96926adf5123403e
- Task ID: juspay__hyperswitch-7910
- Version: v1.114.0
TASK DESCRIPTION: Bug: refactor(connector): [stripebilling] Change BillingConnectorPaymentSync from charges api to payment intents api.
Change the url from charge api to stripes payment intent api.
DETAILED CONTEXT & HINTS:
Type of Change
- Bugfix
- New feature
- Enhancement
- Refactoring
- Dependency updates
- Documentation
- CI/CD
Description
This PR changes the url of billing connector payment sync flow from using stripe charge api to stripe payment intents api. Because in Recovery Flow there is a chance to call stripe's psync flow to update the error codes and other details for an attempt. And psync flow accepts payment intent id rather than the charge id. To reuse the existing flow we need payment_intent id to propogate.
Additional Changes
- This PR modifies the API contract
- This PR modifies the database schema
- This PR modifies application configuration/environment variables
Motivation and Context
How did you test it?
To test this You can follow the steps of this PR: #7461 Tested it locally. And the logs are as following.
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
CRITICAL INSTRUCTIONS - WORK FAST AND EFFICIENTLY:
-
Create DENSE, ACTION-FOCUSED todos IMMEDIATELY
- Make todos specific and actionable
- Focus on HIGH-IMPACT actions only
- 5-8 todos maximum - be surgical, not exhaustive
-
Execute aggressively:
- Use bash commands to search efficiently
- Read multiple related files in quick succession
- Make ALL related changes in one edit
- Skip unnecessary exploration
-
File operations:
- All repo files: './repos/hyperswitch_pool_3/'
- Use targeted edits over whole file rewrites
-
NO TESTING UNLESS CRITICAL:
- Focus on making the actual code changes
- Only test if explicitly required
-
Maximize information density:
- Each turn should accomplish significant work
- Batch file reads when examining related code
- Use search commands to locate code quickly
EFFICIENCY IS CRITICAL. Make substantial progress every turn.
Assistant
I'll work on this task to refactor the Stripe billing connector to use the Payment Intents API instead of the Charges API for the BillingConnectorPaymentSync functionality. Let me start by exploring the codebase to understand the current implementation.
Assistant
I need to explore the codebase to find the Stripe billing connector implementation and understand how it currently uses the charges API versus how it should use the payment intents API.
Let me start by looking for the relevant files in the connectors directory.
Assistant
Now let me examine the main stripe billing connector implementation:
Assistant
Now I need to examine the transformers module to understand how the URL is currently constructed and what changes are needed. Let me read the transformers file:
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 →