Skip to content

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

@Shailesh-714

Description

@Shailesh-714

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

Metadata

Metadata

Assignees

Labels

good first issueGood for newcomershacktoberfestIssues that are up for grabs for Hacktoberfest participants

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions