Adyen / Adyen/adyen-java-api-library

Support for dynamic baseURL or liveEndpointUrlPrefix configuration in API clients

Open
#1,530 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

do not stale
Dominant language
Java
Stars
148
Forks
158
Avg merge
3d 3h
Merged PRs (30d)
10

Description

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: https://github.com/Adyen/adyen-java-api-library/blob/ce9367f7bccb39df131ecaa961964e830bf1be0a/src/main/java/com/adyen/service/checkout/PaymentsApi.java#L39

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with src/main/java/com/adyen/service/checkout/PaymentsApi.java at the referenced constructor and compare how similar API client classes define baseURL or liveEndpointUrlPrefix. Clarify whether routing should be configurable per request or after construction, then agree on the API shape and verification needed before implementation; the issue provides no named tests or accepted behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.