juspay/hyperswitch

[TASK] Missing `payment_link` config in `docker_compose.toml` breaks SDK loading

Open

#9324 aperta il 9 set 2025

Vedi su GitHub
 (3 commenti) (0 reazioni) (1 assegnatario)Rust (4676 fork)batch import
good first issuehacktoberfest

Metriche repository

Star
 (42.690 star)
Metriche merge PR
 (Merge medio 8g 12h) (212 PR mergiate in 30 g)

Descrizione

Problem

The docker_compose.toml file is missing the following required block:

[payment_link]
sdk_url = "http://localhost:9050/HyperLoader.js"

Without this config, when generating payment links the SDK tries to fetch from https://beta.hyperswitch.io instead of the locally running backend. This results in failed payment_methods calls and the payment link not loading correctly for users.

Solution

Add the missing [payment_link] block to docker_compose.toml with the correct sdk_url pointing to the local service (http://localhost:9050/HyperLoader.js).

Expected Outcome

  • Payment links generated locally should correctly load the SDK from the configured local URL.
  • The payment_methods call should hit the backend specified in the hyperswitch-web service config instead of https://beta.hyperswitch.io.
  • Users should be able to open a generated payment link and see it working without SDK load failures.

Files to Modify

  • config/docker_compose.toml

Verification

  1. Run docker compose up
  2. Generate a payment link with:
    curl --location 'http://localhost:8081/payments' \
      --header 'Content-Type: application/json' \
      --header 'api-key: snd_5jYonmRK338pDuk1FqxSYfpPNutQUuVFEVV23qzpqzbQ4DYfbksIgdwIkgjb3vnP' \
      --data '{
          "amount": 100,
          "currency": "USD",
          "payment_link": true,
          "profile_id": "pro_ARVaflLlXRmGS5i8jfq5",
          "return_url": "http://www.google.com"
      }'
    
  3. Open the generated payment link in a browser
  4. Confirm that the SDK loads successfully and the payment_methods API call hits the local backend

Guida contributor