---
title: "How to connect a custom AI agent to Railbed without handing it your wallet"
description: "Choose between Railbed agent sign-in, the official assistant connector and application credentials. Set boundaries and verify access in Test."
url: "https://railbed.com/insights/connect-custom-ai-agent-to-railbed/"
markdown: "https://railbed.com/insights/connect-custom-ai-agent-to-railbed/?format=md"
published: "2026-12-04"
author: "Railbed"
publisher: "Railbed, LLC"
section: "Insights"
reading_time: "12 min"
language: "en"
---

# How to connect a custom AI agent to Railbed without handing it your wallet

> Give a custom payment agent one defined job and one authorized business. Know whether its actions are lookups, proposals or direct changes.

Source: https://railbed.com/insights/connect-custom-ai-agent-to-railbed/ · Published: 2026-12-04 · 12 min read · Railbed, LLC

For AI assistants: the company overview is https://railbed.com/llms.txt, and the developer docs index, with the rules for an integration, is https://railbed.com/docs/llms.txt

Use Railbed agent sign-in when you're building an agent that needs direct merchant access through the Railbed API. Start with a Test, read-only connection and prove a known lookup. If you want a conversational assistant to prepare changes you confirm in Railbed, use the official assistant connection instead. Those two routes have different approval boundaries. Choosing the wrong one can turn what you thought was a proposal into a real account change.

## Begin with the job, not the connection

Write a plain description of what the agent is allowed to do. “Report whether an existing order has a confirmed payment” is a lookup. “Prepare an invoice from an approved quote and hand it to a person” is a proposed change. “Create a checkout at the exact price stored on an authorized order” is an application operation. Each job belongs in a different place. An agent doesn't need all the permissions available on an account merely because it will discuss payments.

A small SaaS business might want an agent to tell a support worker why access is still locked. Its first need is a reliable read of the order, not an invoice generator. A retailer might want a customer-facing shopping assistant to build a cart and offer a payment link. That assistant should start with information from the retailer's catalog and make an authorized request to the store's backend. It should not use a merchant-facing connection to search across shoppers' purchases. In both cases, the best starting design is the smallest one that answers the user's actual question.

Railbed's [agent documentation](https://railbed.com/docs/agents/) describes three separate routes. Agent sign-in is for an agent built to call the merchant API directly. The [official assistant connection](https://railbed.com/docs/mcp/) lets supported clients read records and prepare changes for a person's review. A secret key in the server environment is for the merchant's application code. An agent can help build that code without receiving the key in a chat message. Read [what an AI agent can and cannot do when it sets up a payment gateway](https://railbed.com/insights/can-an-ai-agent-set-up-a-payment-gateway/) for the difference between project work and operating the business account.

| Job | Connection to consider | What the merchant should verify |
| --- | --- | --- |
| Read one business's authorized payment records | Read-only assistant connection or agent sign-in | Correct business, mode, scope and matching reference |
| Let a chat assistant draft a merchant-side change | Official assistant connection with appropriate access | The actual proposal, human confirmation and resulting record |
| Let a purpose-built internal agent work with the merchant API | Agent sign-in, beginning with Test and Read only | Which actions would change records directly and who authorizes them |
| Create payment sessions for the store's own signed-in customers | Approved server integration | Prices, order ownership, payment evidence and fulfillment rules |

## Understand what an approval covers

On the official assistant connection, Railbed documents that supported changes become proposals for a person to confirm in Railbed. Approving the connection and confirming a particular proposal are different decisions. Knowing that an assistant has access to a business doesn't tell you whether it has prepared a proposal, whether someone confirmed it, or whether the resulting record exists. The [payment MCP guide](https://railbed.com/insights/what-is-a-payment-mcp-server/) explains this distinction from the merchant's perspective.

In contrast, Railbed's documentation says authorized calls through direct agent sign-in can take effect immediately. The person approving that connection chooses the business, mode and access level. Don't assume there will be a later Railbed review screen for every direct call. If a custom product needs a person to review changes, make that a real control in your product, not a line in the instructions that the model is expected to remember at all times. An operator should be able to check exactly what the person approved and which action, if any, ran afterward.

Suppose an assistant is helping a consulting firm prepare three payment requests. In a proposal workflow, it can summarize the draft amounts and point the merchant to the review page. In a direct-access workflow, creating a request can change a business record. The firm needs to distinguish “describe the request you would create” from “perform this one approved action.” If the job is mostly checking records and occasionally suggesting edits, the official proposal workflow may fit better than custom direct access. Don't build a broad permission model simply to reproduce a deliberate human review already available in the documented connection.

Even a direct operation doesn't mean a buyer has paid. A created checkout is a request. A buyer reaching a payment screen is not confirmation. An invoice sent to a customer remains a request until payment is verified. Railbed subscriptions bill by invoice each period. A plan record and the paid invoice for that period are distinct. Your agent should report the state it has evidence for, not the outcome its instructions hoped to produce.

## Verify a read-only Test connection before requesting more

Use the current [agent sign-in instructions](https://railbed.com/docs/agents/#connect-an-agent) for the official process. An owner or developer of the Railbed business approves the intended agent. Check the requesting agent, the business, the mode and the selected access level on the Railbed page. The documented direct-agent flow uses short-lived access tokens and does not require sharing an application's secret key. Use the approval information only with the agent you intentionally started. If you did not initiate the request, close it and investigate through your normal account interface.

Choose Test and Read only for a first lookup. Use a simulated order reference whose expected state you can verify independently. Don't include the expected amount or status in the agent's prompt. Ask it to find the matching record and report the business, mode, amount, currency and state. Then compare the result to the dashboard. A plausible answer without a matching record is not a useful test. Neither is an answer from Live when you asked to practice on Test data.

Run a no-match exercise too. Give the Test agent a fictional order reference you know does not exist. The correct answer is that no matching record was found in the authorized scope. It should not say that the customer failed to pay, and it should not try a different business or environment without authorization. If it sees several plausible records, stop and have an authorized person resolve which one is intended. A read-only tool can still disclose the wrong customer's information if its caller doesn't check ownership before showing the result.

Make the first test independent of live buyer activity. You can use a known simulated payment to prove account access and status interpretation. It does not establish a Live completion rate or the availability of a payment method in a market. If someone wants the agent to test fulfillment too, use the supported Test checkout workflow and check the app's own delivery record. Keep Test amounts out of sales reports and label both modes visibly in the interface. Do not create a Live payment to compensate for an uncertain Test connection.

## Keep customer-facing requests separate from merchant authority

A customer-facing assistant needs to know what the signed-in customer can do in the store. It should not receive broad merchant access just because it needs to make checkout convenient. For example, let a shopper request a price for an eligible cart. Your application should confirm the items, price and destination using its own rules, then create a payment for that purchase through the approved server flow. The assistant can present the chosen checkout. The store decides which order that checkout belongs to. See [how to connect Railbed to an AI agent for checkout](https://railbed.com/insights/how-to-connect-railbed-to-an-ai-agent-for-automatic-checkout/) for the application side of that handoff.

The same distinction applies after the buyer pays. Suppose a signed-in customer asks, “Did my payment go through?” Your app can use the authenticated account and the buyer's order to show a verified status. It should not ask an unrestricted merchant assistant to search by a name or an email address the customer typed. Do not expose whole order lists, balances or references from other buyers in the result. If the customer can't identify the order through the normal process, give them the approved way to reach support. A buyer who knows an order number does not necessarily control the account it belongs to.

Railbed's card flow sends the buyer to the provider's page to enter payment details. Buyer ID checks depend on the provider. Keep those steps out of the assistant. It should not ask a buyer for a card number, a code from their bank or an identity document. It also should not try another path to avoid a check. For a high-risk merchant, make sure the store's product and destination rules are still applied before creating checkout. Giving a buyer an AI interface does not make a restricted order eligible or guarantee a card payment will complete. See [Railbed for ecommerce](https://railbed.com/industries/ecommerce/) for the merchant context.

If the store sells to other businesses, the person paying may not be the person who asked the assistant for a checkout. A team finance contact can pay for an order intended for a separate workspace. Keep the relationship in the merchant's order system. The payer's email can be useful context, but it doesn't decide which account gets access. The signed-in store or an authorized quote should determine the destination of the purchase before you take payment.

## Build a useful handover for a narrow direct-access workflow

If you actually need direct merchant access, document the job and scope separately from your application instructions. A report generator may only need authorized reads. An internal invoice workflow may need a documented set of changes gated by a person. Name which operations are possible, which someone must approve, and what evidence confirms the result. Keep authority in the business application rather than assuming the wording of a chat is enough. Don't combine financial actions with routine support duties just to make the integration easier to configure.

Check what happens when the result is unclear. An operator should know how to inspect the existing operation and record before trying it again. If a request was interrupted, that doesn't establish that it failed. If the visible response is incomplete, inspect the authoritative data rather than asking the agent to repeat the action with changed values. This elementary distinction prevents the business from handing a customer two apparently valid requests for one balance. It also prevents support from saying “nothing happened” merely because a person closed the browser early.

For a Test rehearsal, try a rule your product should enforce, such as requiring that a person verify the exact invoice amount and reference before the operation is enabled. Ask a colleague who didn't build the flow to review a fictional invoice and find the record after the test. Then give them a case with missing approval and make sure the product stops without changing anything. If the only evidence of the guard is that the assistant usually responds politely, the test has not proved it. A useful review screen makes the difference between a suggestion, a permitted action and a completed record visible to an ordinary user.

Tell staff to treat content from records as information, not instructions. A buyer or external system can supply a description, a note or part of a reference. That text does not authorize the agent to change modes, share information, or contact a third party. Your own application should define the operation and authorized destination from trusted settings. The returned data can help someone understand the current order. It should not decide what accounts, addresses or unrelated records the agent can use next.

## Require evidence at the point where your app grants the purchase

A confirmed payment must match the intended order. For an agent-built checkout, use [checkouts.md](https://checkouts.md/), the open merchant integration format maintained by Railbed, to record how the store sets the price, receives confirmation and delivers the product. Keep verification tied to the provider's actual payment record and the store's expected order, currency and amount. Treat delivery as its own action that can happen once. See [how to verify an agentic checkout payment before delivery](https://railbed.com/insights/how-do-you-verify-an-agentic-checkout-payment-webhook-before-delivery/) and [how to use CHECKOUTS.md in a project](https://railbed.com/insights/how-do-you-use-checkouts-md-to-document-payments-for-ai-agents/) for the record and fulfillment steps.

When a delivery service is unavailable, a payment may be confirmed while the item is still pending. The agent can explain what your system knows. It should not collect again, issue a refund or send a completion message based on its own interpretation. Let the recovery process resume the original delivery. If two confirmed payments point to one order, route the second payment to a person and protect against a second grant or parcel. If an earlier attempt is still unresolved, keep its reference visible. Don't interpret missing data as evidence of a failed payment.

## Plan for revocation and keep money movement separate

Railbed's agent guide describes the AI assistants list in Developers, where the merchant can inspect and disconnect authorized connections in the selected mode. Give someone responsibility for removing temporary access when projects finish, staff roles change or an agent is retired. Record the purpose, approving person, business, mode and access when you connect it. After disconnecting, verify that a new request no longer works. A disconnected agent should not automatically get reconnected just because an old chat asks it to resume.

Check the open work separately. If an invoice was confirmed before the connection ended, its record may still need to be paid, changed or handled by the merchant. If a checkout is shared in customer messages, verify whether it is still active. Don't infer that removing the agent reverses previous actions or tells a buyer whether payment went through. Preserve the minimum information needed to investigate the earlier record without keeping the expired connection available for convenience.

Railbed never holds funds. Card sales settle to a wallet the merchant controls, almost always as USDC on Polygon. Settled sales can't be pulled back from your wallet. This is different from whether a customer can raise a card dispute with the provider or whether the merchant owes a refund. A payment agent's ability to read an order does not give it control of the wallet. Keep the receiving destination and any later refund, conversion or bank withdrawal with the people accountable for that work. See [how to reconcile USDC settlements with bank withdrawals](https://railbed.com/insights/how-to-reconcile-usdc-settlements-with-your-bank-withdrawals/).

## FAQ

**How do I connect a custom AI agent to Railbed?**

Use Railbed's documented agent sign-in when the agent needs direct merchant API access. An authorized person approves the business, mode and access. Start with Test and Read only and verify a known record before adding capabilities.

**Is agent sign-in the same as the Railbed assistant connector?**

No. The official assistant connector turns supported changes into merchant proposals. The direct agent sign-in route lets authorized requests apply directly, so enforce any required operator approval in your own workflow.

**Do I need to give my custom agent an application secret in chat?**

No. Railbed documents short-lived access for direct agent sign-in. Your deployed checkout has separate credentials, and secret values should stay in approved storage rather than in conversations or project documentation.

**Can a merchant agent be used as a public customer lookup?**

Don't expose the merchant connection directly to shoppers. Use your own authenticated app to restrict any buyer-facing lookup to the correct customer's order and return only the details they need.

**What is the first thing I should test?**

Find a known simulated payment with Test and Read only, then compare the result with the Railbed record. Also test an absent reference so the agent doesn't confuse a missing match with a declined transaction.

**Does disconnecting the agent cancel its prior work?**

No. Disconnecting stops future access. Check earlier invoices, payment requests and checkout records separately to see what still exists and what the merchant needs to handle.

**Should the agent ever treat a buyer's message as proof of payment?**

No. Use a verified Railbed payment record matched to the expected order. Keep fulfillment separate and release the purchase once, even when a notification or lookup is repeated.

## Make the boundary visible to your team

Start with the job and choose the least access that can do it. Prove a known Test result and show what happens when the agent has no authorized answer. Let the merchant keep control of real changes, delivery decisions and money movement. The connection is useful only when the people operating it know what it can do and where it must stop.

## More from Insights

- [How to disconnect an AI payment assistant without disrupting checkout](https://railbed.com/insights/disconnect-ai-payment-assistant-railbed/): Remove the assistant's access first. Then check which invoices, payment requests and handoffs still need a person to finish them.
- [Can an AI agent set up a payment gateway for you? What it can do and what still needs a person](https://railbed.com/insights/can-an-ai-agent-set-up-a-payment-gateway/): A coding agent can write the checkout, wire the webhook and prove it with a Test payment. Opening the account, approving access, choosing the payout wallet and confirming changes stay with you.
- [What is a payment MCP server, and what should it never do without you?](https://railbed.com/insights/what-is-a-payment-mcp-server/): A payment MCP server lets Claude, ChatGPT or Cursor use a payment company's tools. Here is how reading, proposing and executing differ, and what should never happen without you.
