Skip to content

feat(subscription): Add endpoint to get Subscription estimate#9637

Merged
likhinbopanna merged 52 commits intomainfrom
subscription-estimate-endpoint
Oct 8, 2025
Merged

feat(subscription): Add endpoint to get Subscription estimate#9637
likhinbopanna merged 52 commits intomainfrom
subscription-estimate-endpoint

Conversation

@jagan-jaya
Copy link
Contributor

@jagan-jaya jagan-jaya commented Oct 1, 2025

Type of Change

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

Description

Add support in subscription to get an estimate for the provided plan_price

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?

  1. Create merchant, API Key, billing processor
  2. GET subscription estimate
    Request
curl --location 'http://localhost:8080/subscriptions/estimate?item_price_id=standard-plan-USD-Monthly' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'X-Profile-Id: pro_BSjmSsJE4oqVfDdiJViI' \
--header 'api-key: dev_4IM0uzCEoKQ9lkSaTUEceuErgHTSnZhcc0CsjiSc1P2jVv5W4p9nYumBWwnJLqLb'

Response

{
    "amount": 1200,
    "currency": "USD",
    "plan_id": null,
    "item_price_id": null,
    "coupon_code": null,
    "customer_id": "Azyd6UUz25MpkdBC",
    "line_items": [
        {
            "item_id": "standard-plan-USD-Monthly",
            "item_type": "plan_item_price",
            "description": "Standard Plan",
            "amount": 1200,
            "currency": "USD",
            "quantity": 1
        }
    ]
}

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

jagan-jaya and others added 30 commits September 24, 2025 19:08
@jagan-jaya jagan-jaya changed the title Subscription estimate endpoint feat(subscription): Add to get Subscription estimate Oct 3, 2025
@jagan-jaya jagan-jaya changed the title feat(subscription): Add to get Subscription estimate feat(subscription): Add endpoint to get Subscription estimate Oct 8, 2025
@jagan-jaya jagan-jaya marked this pull request as ready for review October 8, 2025 10:07
@jagan-jaya jagan-jaya requested review from a team as code owners October 8, 2025 10:07
deepanshu-iiitu
deepanshu-iiitu previously approved these changes Oct 8, 2025
@likhinbopanna likhinbopanna added this pull request to the merge queue Oct 8, 2025
Merged via the queue into main with commit 15bc0a3 Oct 8, 2025
22 of 25 checks passed
@likhinbopanna likhinbopanna deleted the subscription-estimate-endpoint branch October 8, 2025 14:07
aadityaguptaa pushed a commit that referenced this pull request Nov 10, 2025
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
Co-authored-by: Gaurav Rawat <104276743+GauravRawat369@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add estimate endpoint

5 participants