-
Notifications
You must be signed in to change notification settings - Fork 147
Description
Description
[Test Env] Adyen Java SDK 19.x – Klarna /payments/details fails due to missing redirectResult in DetailsRequest model
Steps to reproduce
Step 1: install Adyen Java SDK 19.0.0
Step 2: trigger API /payment for Klarna
Step3: once we got sucessful response for /payment API , redirect to ThirdPart and complete transaction from klarna
Step4 : Once trasaction complete in Klarna , for confirmation trigger redirect call to /payment/details api by using sdk 19.0.0
Step 5: Observation Unable to find PaymentDetailsRequest but in sdk we had DetailRequest which don't have attribute redirectResult but used DetailRequest.PaymentCompletionDetails.redirectResult to populate redirectResult but unfortunately we are getting validation error which mentioned below
Error:
message":"Error occurred while verifying Ayden paylod com.adyen.model.checkout.DetailsRequest@639edc6f[authenticationData=,details=class PaymentCompletionDetails {\n MD: null\n paReq: null\n paRes: null\n billingToken: null\n cupsecureplusSmscode: null\n facilitatorAccessToken: null\n oneTimePasscode: null\n orderID: null\n payerID: null\n payload: null\n paymentID: null\n paymentStatus: null\n redirectResult: [X3XtfGC9!H4sIAAAAAAAA/21TXW/bOBD8L3ouXVL8lIHiIMt2nBa1HZ8TX4sCAUWuYiG2rFBUUqfIfz8ysXG5671J3N2Z2dndX4lxoD3Y3CfDJMWpQDhFmK6xGlI+TPn35EPiwNYOjF/q4x4aP9ZeJ8NfiTYPfXh3uTGHvvGXNhlSqrjAHxJtbe3rQ6N35+S663pwRUx0x0A1XwTgtmsdVOHvgs5k9vnqio7pxfivNQ+x+512jW7fKLtBB10XAG/rwJKUUCpVCYWwthwJKzVSxBCkSiCcUFaWiicvQcY+8kV60zsHjXlj/hLgH/Wuh2TI0wxjHFPb+gZcpEiGMnRQOt3Y4mBDzknKrX7rMxSbtzZO4ddW9uDMVjf+ZEZ4/jb+9udiPl8Evkmx+PouZwUVRDWxuDKsolhLVFFtEYPSoJILibilICADSYQJpQdX39XBzmXXvq+eLZUqVssp22RiNL2JvrV6t4Ku3/n/pP6PxQ4eeuh8/tuwzkIvGw93TsfgwB/bCFPMJsWXxfX69mIyn6wui+jGFsz9ofeD80fuPezb14VIKk4AIFOIMp0ixpVGmjKFOMFGWcuJJYpIiQnOeMo5ZnIsZJbnqhBKpnwqimIiOB4rJkdFGJWijKRilHKZTvMpL/JMFKNcpEUuMBZ4Mn7n83v5j+fhJhLH1XDge9dcu1142XrfdsMfH398PHfQbQ9tCw75YM9A2yM0A3PY/xb/5+F0GqtX1D/u2tp+ulhimk3zIHBKec5JMcl5RvNpENjd181pedq+HDymA4WJkIQxQVISjpANZl/r76PSbib1bbbdsM/rw2z+8ISPz5uf9hm3m/XNVXf1bDP1dP2vdpba6X0Xh+hetyBQdL0x4XoCrz/cQ7SAxwOhYRQmK0skTJWhICBDFlfcUCmExDaieqdN3dyd1yL+QqvDRkVYjFElbaUNC4oJA8IyqnVJoQRTZqLMAj6umGTCGFlpLMAShEny8vI3LYQc2XUEAAA=AQy1QVgl5d8hsl0Lo8Z6CbzMT5+EYVUEI5hOZhl5ZSk=]\n resultCode: null\n threeDSResult: null\n threeds2ChallengeResult: null\n threeds2Fingerprint: null\n},paymentData=,threeDSAuthenticationOnly=] CORRELATION_ID=dc707c50-225b-47a1-9633-176e593dc0d4 DYSON_SESSION_ID=18c6bd83-0c8e-450d-8ac1-98271ca58f78 ","contextMap":{"APP_NODE":"APP_NODE=1 ","CORRELATION_ID":"CORRELATION_ID=dc707c50-225b-47a1-9633-176e593dc0d4 ","DYSON_SESSION_ID":"DYSON_SESSION_ID=18c6bd83-0c8e-450d-8ac1-98271ca58f78 ","IP_ADDRESS":"IP_ADDRESS=52.215.255.122 ","THREAD_ID":"THREAD_ID=338 ","Tenant":""},"endOfBatch":false,"loggerFqcn":"org.apache.log4j.Category","threadId":338,"threadPriority":5,"origin":"PLATFORM"}
Actual behavior
We are currently upgrading our Adyen Java SDK from 13.0.0 to 19.x and are testing Klarna payments as part of this upgrade.
Issue summary
After a successful /payments call for Klarna (resultCode = RedirectShopper), the subsequent /payments/details call fails because the Java SDK 19.x DetailsRequest model does not support redirectResult as a top-level field, and instead forces details to be present.
However, for Klarna redirect flows, the Checkout API expects only redirectResult at the top level, and does not use details or paymentData.
Observed /payments response (expected)
{
"resultCode": "RedirectShopper",
"action": {
"type": "redirect",
"method": "GET",
"url": "..."
}
}
No paymentData is returned, which we understand is correct for Klarna.
Problem in Java SDK 19.x
In com.adyen.model.checkout.DetailsRequest:
There is no redirectResult field
details is marked as required:
openapiRequiredFields.add("details");
This forces us to send:
{
"details": {
"redirectResult": "..."
}
}
Which the Adyen API rejects for Klarna flows.
The API expects instead:
{
"redirectResult": "..."
}
Could you please confirm:
Whether this is a known issue in the Adyen Java SDK 19.x OpenAPI model
If there is an officially recommended workaround until upgrading
We are happy to provide logs, correlation IDs, or sample requests if needed.
Thank you for your support
Expected behavior
We expect it should not fail at validation and successfully trigger /payment/detail APi to adyen and get response back
Code snippet or screenshots (if applicable)
Adyen Java API Library version
19.0.0
Java version
17
Operating System
macOS
Additional context
already created a ticket which support team and its ticket Details here https://ca-test.adyen.com/ca/ui/contact-us/support-tickets/500QD00000pYgxAYAS