Skip to content

fix(router): Take merchant ID from headers in API Key - Revoke (v2) #8808

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 5, 2025

Conversation

AnuthaDev
Copy link
Contributor

Type of Change

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

Description

  • Removed merchant ID from path in API Keys - Revoke
  • Changed auth to read merchant ID from headers

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 #8807

How did you test it?

  • V1:
    Request:
curl --location --request DELETE 'http://localhost:8080/api_keys/merchant_1753949938/dev_8Xwp8SIyp0R4ItROu0tR' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: test_admin'

Response:

{
    "merchant_id": "merchant_1753949938",
    "key_id": "dev_8Xwp8SIyp0R4ItROu0tR",
    "revoked": true
}
  • V2:
    Request:
curl --location --request DELETE 'http://localhost:8080/v2/api-keys/dev_DULXUEOAUgYKxuxE7PQN' \
--header 'x-merchant-id: cloth_seller_v2_hFIzh6a4wFsbtEkKYLxD' \
--header 'Authorization: admin-api-key=test_admin' \
--header 'api-key: test_admin'

Response:

{
    "merchant_id": "cloth_seller_v2_hFIzh6a4wFsbtEkKYLxD",
    "key_id": "dev_DULXUEOAUgYKxuxE7PQN",
    "revoked": true
}

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 added this to the July 2025 Release milestone Jul 31, 2025
@AnuthaDev AnuthaDev self-assigned this Jul 31, 2025
@AnuthaDev AnuthaDev requested review from a team as code owners July 31, 2025 08:31
Copy link

semanticdiff-com bot commented Jul 31, 2025

Review changes with  SemanticDiff

Changed Files
File Status
  crates/router/src/routes/api_keys.rs  71% smaller
  crates/router/src/core/api_keys.rs  0% smaller

@Gnanasundari24 Gnanasundari24 added this pull request to the merge queue Aug 5, 2025
Merged via the queue into main with commit d164954 Aug 5, 2025
15 of 20 checks passed
@Gnanasundari24 Gnanasundari24 deleted the v2-api-key-revoke-fix branch August 5, 2025 08:25
pixincreate added a commit that referenced this pull request Aug 6, 2025
…ordea-sepa

* 'main' of github.com:juspay/hyperswitch: (89 commits)
  feat(router): [worldpayvantiv] add dispute list sync and implement dispute (#8830)
  feat(core): Add support for Void after Capture (#8839)
  fix(wasm): [FISERV] Added GooglePay Payment Method Type (#8832)
  feat(connector): [Barclaycard] Add Google Pay Payment Method (#8786)
  chore(version): 2025.08.06.0
  feat(core): Added additional authentication fields for 3ds external authentication (#8758)
  refactor(core): propagate network_transaction_id in response of payment (#8829)
  fix(core): add fix for stopping multiple event locking idempotent logs (#8034)
  feat(connector): [AUTHORIZEDOTNET] create connector customer flow added (#8774)
  feat(core): Add L2_L3 Data Support  (#8828)
  feat(connector): [NMI] Add mandates flow (#8652)
  fix(connector): [Wise] send uuid as connector_transaction_id (#8836)
  feat(core): populate UCS status_code in response headers (#8788)
  feat(external_services): Fixed Url for Unified Connector Service gRPC Client (#8587)
  chore: reorder v2 migrations folders (#8671)
  fix(router): Take merchant ID from headers in API Key - Revoke (v2) (#8808)
  fix(connector): (payload) currency auth key wasm changes (#8825)
  feat(payment-methods): add filtering logic for payment method list v2 (#8606)
  feat(router): add support for apple pay pre-decrypted token in the payments confirm call (#8815)
  chore(version): 2025.08.05.0
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FIX]: Take merchant ID from headers in API Key Revoke (v2)
4 participants