Skip to content

GET /sessions/{id}?sessionResult={sessionResult} issue using adyen API Library #1467

@kekkovad

Description

@kekkovad

Describe the bug
Trying to perform the GET /sessions/{id}?sessionResult={sessionResult} I got HTTP 500 (errorCode 701) as response.
I'm developing Hosted Checkout solution with Node.js

To Reproduce
Perform the call as shown in the docs (Hosted Checkout):

// Adyen Node API Library v18.0.0
// Require the parts of the module you want to use
const { Client, CheckoutAPI } = require('@adyen/api-library');
// Initialize the client object
// For the live environment, additionally include your liveEndpointUrlPrefix.
const client = new Client({apiKey: "ADYEN_API_KEY", environment: "TEST"});

// Send the request
const checkoutAPI = new CheckoutAPI(client);
const response = checkoutAPI.PaymentsApi.getResultOfPaymentSession("sessionId", "string");

https://docs.adyen.com/online-payments/build-your-integration/sessions-flow/?platform=Web&integration=Hosted+Checkout&programming_language=js#step-5-get-the-outcome

Additional context
the following is not working for me:
const response = checkoutAPI.PaymentsApi.getResultOfPaymentSession(sessionId, sessionResult);

But the GET call works if I use axios this way
https://checkout-test.adyen.com/v69/sessions/${sessionId}?sessionResult=${sessionResult}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions