feat: added sdk authorization support in pmm#1415
Open
Conversation
aritro2002
reviewed
Mar 11, 2026
aritro2002
reviewed
Mar 11, 2026
aritro2002
reviewed
Mar 11, 2026
aritro2002
reviewed
Mar 17, 2026
aritro2002
reviewed
Mar 17, 2026
aritro2002
previously approved these changes
Mar 23, 2026
aritro2002
previously approved these changes
Mar 23, 2026
src/Components/SavedMethodsV2.res
Outdated
| ~pmSessionId=keys.pmSessionId->Option.getOr(""), | ||
| ~logger, | ||
| ~customPodUri, | ||
| ~sdkAuthorization=keys.sdkAuthorization->Option.getOr(""), |
Contributor
There was a problem hiding this comment.
extract sdkAuthorization from keys at line no. 17
src/Components/SavedMethodsV2.res
Outdated
| ~pmSessionId=keys.pmSessionId->Option.getOr(""), | ||
| ~logger, | ||
| ~customPodUri, | ||
| ~sdkAuthorization=keys.sdkAuthorization->Option.getOr(""), |
| pmManagementOptionsDict | ||
| ->Option.forEach(x => x->Dict.set("launchTime", Date.now()->JSON.Encode.float)) | ||
| ->ignore | ||
| let sdkAuthorizationId = pmManagementOptionsDict->getStringFromDict("sdkAuthorization", "") |
Contributor
There was a problem hiding this comment.
no need to make this new variable sdkAuthorizationId
assign value directly to sdkAuthorization and use
src/Utilities/PaymentHelpersV2.res
Outdated
| ] | ||
| switch keys.pmSessionId { | ||
| | Some(pmSessionId) => | ||
| let headers = [("Authorization", `${keys.sdkAuthorization->Option.getOr("")}`)] |
Contributor
There was a problem hiding this comment.
no need to use template literal here
src/Utilities/PaymentHelpersV2.res
Outdated
| ] | ||
| switch keys.pmSessionId { | ||
| | Some(pmSessionId) => | ||
| let headers = [("Authorization", `${keys.sdkAuthorization->Option.getOr("")}`)] |
Contributor
There was a problem hiding this comment.
extract and use values from key at line no. 371
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Type of Change
Description
This PR adds support for SDK Authorization in the Hyperswitch Web SDK for Payment Methods Management flow to enable platform-connected merchant flows.
Added Support for
sdkAuthorizationheader in Payment Methods Management FlowAfter this support, From merchant integration - we will not need to collect
pmSessionId,pmClientSecretandprofileIdMerchant will only need to pass
sdkAuthorizationand we will extractpmSessionIdfrom it, OnlypmSessionIdis needed as It is a path parameter for all the API endpointsPrevious Authorization Headers
New Authorization Headers
Major Changes -
How did you test it?
Tested via Checking the SDK authorization integration flow
Created Intent using this body
Headers
Passed the
sdkAuthorizationto SDKPayment Methods Management Flow
Screen.Recording.2026-03-11.at.2.07.06.PM.mov
Checklist
npm run re:build