Skip to content

fix: correct Berlin Group SCA authorisation URL segment order#5

Open
hongwei1 wants to merge 2 commits into
OpenBankProject:mainfrom
hongwei1:main
Open

fix: correct Berlin Group SCA authorisation URL segment order#5
hongwei1 wants to merge 2 commits into
OpenBankProject:mainfrom
hongwei1:main

Conversation

@hongwei1

Copy link
Copy Markdown
Contributor

Summary

  • The payment SCA flow in otp/+page.server.ts called /obp/v1.3/berlin-group/..., but OBP-API registers these Berlin Group v1.3 payment routes at /berlin-group/v1.3/... with no /obp/ prefix (see Http4sBGv13AIS.scala/Http4sBGv13PIS.scala), so both the create-authorisation POST and the OTP-submit PUT were hitting a non-existent path.
  • Fixed both calls to use the correct /berlin-group/v1.3/${paymentService}/${paymentProduct}/${paymentId}/authorisations[/${authorisationId}] path.

Test plan

  • Exercise the Portal "payment" OTP flow end-to-end against a running OBP-API instance and confirm the authorisation POST/PUT succeed (200/201) instead of 404.

hongwei1 added 2 commits July 18, 2026 08:23
The payment SCA endpoints called /obp/v1.3/berlin-group/... but
OBP-API registers these routes at /berlin-group/v1.3/... with no
/obp/ prefix, so both the create-authorisation POST and OTP-submit
PUT calls were hitting a non-existent path.
…t approval

The SCA confirmation page submitted the OTP to
/obp/v3.1.0/banks/{bank}/consents/{id}/challenge, which only
transitions consents in status INITIATED -- Berlin Group consents are
created in status received, so this endpoint could never succeed
regardless of OTP correctness.

Call the real BG-native pair instead: start the authorisation in
load() (POST .../consents/{id}/authorisations) and submit the answer
in the form action (PUT .../consents/{id}/authorisations/{authorisationId}),
threading the authorisationId through a hidden form field.
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.

1 participant