feat(BTI-584): update Klarna MOR to DataRequestKey flow#11
Merged
Conversation
Klarna no longer returns a reservation number; follow-up actions reference the prior Reserve through the Buckaroo DataRequestKey service parameter. - Fix cancelReservation to post to /json/DataRequest with DataRequestKey (was posting to /json/transaction with OriginalTransactionKey) - Add updateReservation and extendReservation DataRequest actions - Align allowed service parameters and required_fields per action with the BPS Klarna docs (operatingCountry mandatory on Reserve; Pay requires an invoice) - Remove AddShippingInfo: the gateway rejects it for the klarna service (ActionUnknown); shipping details ride on the Pay request instead - Refund keeps the base OriginalTransactionKey path Verified end-to-end against the Buckaroo test gateway: Reserve -> hosted-page approval -> ExtendReservation -> Pay (captured) -> Refund all succeed.
vegimcarkaxhija
approved these changes
Jul 7, 2026
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.
What
Updates the existing Klarna MOR (
klarna) builder to the new BPS spec: Klarna no longer returns a reservation number, so every follow-up references the prior Reserve through the Buckaroo DataRequestKey (a service parameter), posted to/json/DataRequest.Changes
cancelReservation— was posting to/json/transactionwithOriginalTransactionKey; now posts to/json/DataRequestwithDataRequestKey, per docs.updateReservationandextendReservationDataRequest actions.required_fieldsper action with the BPS Klarna docs:operatingCountrymandatory on Reserve, billing/shipping optional; Pay requires an invoice.klarnaservice (Unknown action 'AddShippingInfo'). Shipping details ride on the Pay request (shippingMethod/company/trackingNumber), matching the up-to-date docs. Note: BTI-584 lists AddShippingInfo, but it does not exist for this service.OriginalTransactionKeypath.Verification