Skip to content

feat(router): Add is_split_payment field to payments response (v2)#10140

Merged
Gnanasundari24 merged 5 commits into
mainfrom
split-payments-list
Nov 11, 2025
Merged

feat(router): Add is_split_payment field to payments response (v2)#10140
Gnanasundari24 merged 5 commits into
mainfrom
split-payments-list

Conversation

@AnuthaDev

@AnuthaDev AnuthaDev commented Nov 5, 2025

Copy link
Copy Markdown
Contributor

Type of Change

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

Description

  • Added a field is_split_payment to Payments - List Response. Used by dashboard to show whether a payment is a split payment in the Payment Operations Screen.

Additional Changes

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

Motivation and Context

Closes #10139

How did you test it?

Request:

curl --location 'http://localhost:8080/v2/payments/list' \
--header 'Content-Type: application/json' \
--header 'x-profile-id: pro_HzkiTClLRhwyS1wsZVh8' \
--header 'Authorization: api-key=dev_f0AKEGnVxI8krvop8qE1DpicS4ip8NHm0MEQJJ4aQUiuGuBg4ua5OK8OvEOluOJp' \
--header 'api-key: dev_f0AKEGnVxI8krvop8qE1DpicS4ip8NHm0MEQJJ4aQUiuGuBg4ua5OK8OvEOluOJp'

Response:

{
    "count": 1,
    "total_count": 1,
    "data": [
        {
            "id": "12345_pay_019a57fd21f670a39cca26adff34121d",
            "merchant_id": "cloth_seller_v2_yDO5Rd1r7V2S8L0eFYg1",
            "profile_id": "pro_HzkiTClLRhwyS1wsZVh8",
            "customer_id": "12345_cus_019a57fd056a7ac189e218d16a4b37b5",
            "payment_method_id": null,
            "status": "requires_capture",
            "amount": {
                "order_amount": 100,
                "currency": "USD",
                "shipping_cost": null,
                "order_tax_amount": null,
                "external_tax_calculation": "skip",
                "surcharge_calculation": "skip",
                "surcharge_amount": null,
                "tax_on_surcharge": null,
                "net_amount": 100,
                "amount_to_capture": null,
                "amount_capturable": 100,
                "amount_captured": 0
            },
            "created": "2025-11-06T07:06:38.466Z",
            "payment_method_type": "card",
            "payment_method_subtype": "card",
            "connector": "adyen",
            "merchant_connector_id": "mca_9z2OVPuwa2ohCwwElOfN",
            "customer": null,
            "merchant_reference_id": null,
            "connector_payment_id": "B9G4KNPFWGF5K5V5",
            "connector_response_reference_id": "12345_att_019a57fd2e8679a28ef3ba504d91b5fe",
            "metadata": null,
            "description": null,
            "authentication_type": "no_three_ds",
            "capture_method": "manual",
            "setup_future_usage": "on_session",
            "attempt_count": 0,
            "error": null,
            "cancellation_reason": null,
            "order_details": null,
            "return_url": null,
            "statement_descriptor": null,
            "allowed_payment_method_types": null,
            "authorization_count": 0,
            "modified_at": "2025-11-06T07:06:44.978Z",
            "is_split_payment": false
        }
    ]
}

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

@AnuthaDev AnuthaDev self-assigned this Nov 5, 2025
@AnuthaDev AnuthaDev requested a review from a team as a code owner November 5, 2025 12:57
@AnuthaDev AnuthaDev added the M-api-contract-changes Metadata: This PR involves API contract changes label Nov 5, 2025
@AnuthaDev AnuthaDev requested a review from a team as a code owner November 5, 2025 12:57
@AnuthaDev AnuthaDev added api-v2 T-Core For Work done by the core team labels Nov 5, 2025
@semanticdiff-com

semanticdiff-com Bot commented Nov 5, 2025

Copy link
Copy Markdown

Review changes with  SemanticDiff

Changed Files
File Status
  api-reference/v2/openapi_spec_v2.json  29% smaller
  crates/api_models/src/payments.rs  0% smaller
  crates/hyperswitch_domain_models/src/payments.rs  0% smaller
  crates/router/src/core/payments/transformers.rs  0% smaller

@codecov

codecov Bot commented Nov 5, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 6 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (main@0b08059). Learn more about missing BASE report.

Files with missing lines Patch % Lines
crates/hyperswitch_domain_models/src/payments.rs 0.00% 4 Missing ⚠️
crates/router/src/core/payments/transformers.rs 0.00% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main   #10140   +/-   ##
=======================================
  Coverage        ?    4.05%           
=======================================
  Files           ?     1227           
  Lines           ?   304998           
  Branches        ?        0           
=======================================
  Hits            ?    12369           
  Misses          ?   292629           
  Partials        ?        0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@AnuthaDev AnuthaDev force-pushed the split-payments-list branch from 54ccbf3 to a4ae47a Compare November 6, 2025 06:59
hrithikesh026
hrithikesh026 previously approved these changes Nov 6, 2025
@AnuthaDev AnuthaDev force-pushed the split-payments-list branch from 661758e to 1955840 Compare November 6, 2025 08:03
Comment thread crates/router/src/core/payments/transformers.rs Outdated
@Gnanasundari24 Gnanasundari24 added this pull request to the merge queue Nov 10, 2025
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 10, 2025
@Gnanasundari24 Gnanasundari24 added this pull request to the merge queue Nov 11, 2025
Merged via the queue into main with commit cf6e5a1 Nov 11, 2025
25 of 27 checks passed
@Gnanasundari24 Gnanasundari24 deleted the split-payments-list branch November 11, 2025 07:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api-v2 M-api-contract-changes Metadata: This PR involves API contract changes T-Core For Work done by the core team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update Payments - List Response to indicate whether a payment is a split payment

5 participants