Run the action gateway in 5 minutes
The action gateway puts your agents' Stripe refunds under their Burnbound policy. It runs in your account, with your Stripe key: Burnbound never sees it. This guide puts it on Render, Railway, Fly.io or Docker Compose in a few minutes, from the panel's Connect your gateway assistant. How refunds are decided is in Action gateway: Stripe refunds under your agent's policy.
1. Create the gateway in Burnbound
In the dashboard, under Organization → Action gateway, click Create the gateway. Copy its id and its secret (bbgw_…) now: the secret is shown once. If you lose it, rotate it and use the new one.
2. Create a restricted Stripe key
In Stripe, Developers → API keys → Create restricted key, in test mode first (rk_test_…), with only:
| Resource | Permission |
|---|---|
| Charges | Read |
| Customers | Read |
| PaymentIntents | Read |
| Refunds | Write |
A live key (rk_live_…) also needs GATEWAY_ALLOW_LIVE=1, once the gateway works in test mode.
3. Pick a platform
Below the gateway's details, the Connect your gateway assistant shows each platform's variables with your gateway's id already in. Every template pins the image ghcr.io/martinvarelaa/burnbound-action-gateway to a version, never latest, and health-checks /healthz. The two secrets, BURNBOUND_GATEWAY_SECRET and STRIPE_SECRET_KEY, go into the platform's secrets, never into a file.
- Render. Deploy to Render creates the service from the Blueprint and asks once for the gateway id and the two secrets. Use a paid instance: a free one sleeps, and the first refund after it would time out.
- Railway. New → Docker Image with the pinned image, the variables (the secrets as sealed variables) and a domain under Networking. Railway sets
PORTand the gateway listens on it. - Fly.io. From a folder with the
fly.tomltemplate:fly launch --copy-config --no-deploy, the id infly.toml,fly secrets set STRIPE_SECRET_KEY=… BURNBOUND_GATEWAY_SECRET=…, thenfly deploy. - Docker Compose, next to your agents. The assistant shows
docker-compose.yml. Write the two secrets tosecrets/stripe_secret_keyandsecrets/burnbound_gateway_secret, putBURNBOUND_GATEWAY_ID=<id>in the Compose environment file next to it (the assistant shows the command), thendocker compose up -d. The port is published on the machine's loopback only.
On a platform the gateway is reachable from the internet. It already refuses any request without an agent key of your organization, and the templates open nothing else.
4. Run check
Before the first refund, run the gateway's own test:
node gateway.mjs check
From Render's Shell, railway ssh, fly ssh console -C "node gateway.mjs check" or docker compose run --rm gateway node gateway.mjs check. It checks, in order, that the configuration loads, that Burnbound answers and accepts the gateway's signature, and that the Stripe key can read charges in the mode GATEWAY_ALLOW_LIVE says. It ends with check passed, or with one line per problem and exit code 1. It never prints the Stripe key or the gateway secret, only their last 4 characters.
Once check passes, the dashboard shows the gateway connected, with how long ago it last called Burnbound. More than 24 hours without contact shows a warning: check that the gateway is running and that its secret is current.
5. Point your agents at it
Set BURNBOUND_GATEWAY_URL in the MCP server's environment to the gateway's https:// URL (with Compose on the same machine, http:// with the loopback address and port 8787), and allow Stripe · refund on the agent. The details are in steps 4 and 5 of the refunds guide.
Burnbound itself is set up in the quickstart. The same policy covers the agent's x402 payments to APIs from the catalog.