Skip to content

Add x402 environment configuration for dev deployments#54

Merged
crtahlin merged 1 commit intodevfrom
feature/x402-env-config
Jan 20, 2026
Merged

Add x402 environment configuration for dev deployments#54
crtahlin merged 1 commit intodevfrom
feature/x402-env-config

Conversation

@crtahlin
Copy link

@crtahlin crtahlin commented Jan 20, 2026

Summary

Enables x402 configuration for dev branch deployments via GitHub environment variables.

  • Use GitHub staging environment for dev branch deployments
  • Write x402 config from GitHub Variables to /opt/swarm_connect_dev.env
  • Configure dev container to load env file for x402 settings

Closes #53

Variables to configure in staging environment

After merging, set these variables in the staging environment:

gh variable set X402_ENABLED --body "true" --env staging --repo datafund/swarm_connect
gh variable set X402_PAY_TO_ADDRESS --body "<wallet>" --env staging --repo datafund/swarm_connect
gh variable set X402_NETWORK --body "base-sepolia" --env staging --repo datafund/swarm_connect
gh variable set X402_FACILITATOR_URL --body "https://x402.org/facilitator" --env staging --repo datafund/swarm_connect
gh variable set X402_FREE_TIER_ENABLED --body "true" --env staging --repo datafund/swarm_connect

Test plan

  • Merge to dev branch
  • Set staging environment variables
  • Verify deployment creates env file
  • Verify dev gateway starts with x402 enabled
  • Test protected endpoint returns 402 with payment requirements

- Use GitHub staging environment for dev branch deployments
- Write x402 config from GitHub Variables to /opt/swarm_connect_dev.env
- Configure dev container to load env file for x402 settings

Variables to configure in staging environment:
- X402_ENABLED
- X402_PAY_TO_ADDRESS
- X402_NETWORK
- X402_FACILITATOR_URL
- X402_FREE_TIER_ENABLED
@crtahlin crtahlin merged commit 58b3dce into dev Jan 20, 2026
@crtahlin crtahlin deleted the feature/x402-env-config branch January 20, 2026 08:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant