Skip to content

Support for dynamic baseURL or liveEndpointUrlPrefix configuration in API clients #1530

Description

@Jijithnair

Hi Team,

Currently, the PaymentsApi and similar classes in the Adyen Java API client module (checkout) require the baseURL or liveEndpointUrlPrefix to be defined at construction time. Once the API instance is created, there appears to be no supported way to override or change this value dynamically at runtime.

This becomes limiting in scenarios where different request contexts may require different endpoint routing, such as switching between regional prefixes or environments.

I would like to know the design reasoning such that introducing 'dynamic' behaviour here can go wrong. That brings me to my next query on the possibility to consider an enhancement that allows setting or overriding the base URL dynamically per request — or at least decouple it from being hardcoded in the constructor? Even exposing a method to set the liveEndpointUrlPrefix or baseURL after construction would help in advanced routing scenarios.

Thanks for your consideration!

Code reference:

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions