> For the complete documentation index, see [llms.txt](https://docs.railbridge.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.railbridge.ai/readme.md).

# Developer Platform

<h2 align="center">RailBridge AI Documentation</h2>

<p align="center">Merchant Operating System for AI Agent Payments</p>

{% columns %}
{% column width="50%" %}

### Get started in 5 minutes

Setting up your first API to receive stablecoin payments should be the easiest part of getting started. Compliant with Coinbase's x402 standard.

No guesswork, no complexity. Just your first successful agentic payment.&#x20;

<a href="/spaces/0qKSt55rjBTBXsOayqrg" class="button primary" data-icon="rocket-launch">Get started</a> <a href="/spaces/0qKSt55rjBTBXsOayqrg/pages/CMxQRprlZuNtAveIlGig" class="button secondary" data-icon="book">Documentation</a>
{% endcolumn %}

{% column width="50%" %}
{% code title="client.js" overflow="wrap" lineNumbers="true" expandable="true" %}

```javascript
import express from "express";
import { createRailbridgeFromEnv } from "@railbridgeai/merchant-sdk";

const app = express();
const port = 4025; 
const rb = createRailbridgeFromEnv(process.env);

app.get("/health", (_req, res) => {
  res.json({ status: "ok", service: "merchant-sdk-minimal" });
});

await rb.protectExpress(
  app,
  {
    apiId: "premium_api",
    method: "GET",
    path: "/api/premium",
  },
  async (_req, res) => {
    // Keep your business logic inside the handler.
    res.json({
      ok: true,
      source: "merchant-sdk-minimal",
      message: "premium content unlocked via RailBridge merchant SDK",
    });
  },
);

app.listen(port, () => {

});

```

{% endcode %}
{% endcolumn %}
{% endcolumns %}

<h2 align="center"></h2>

<p align="center">Follow our X for more updates.</p>

<table data-card-size="large" data-view="cards"><thead><tr><th></th><th></th><th></th><th></th><th data-hidden data-card-cover data-type="files"></th></tr></thead><tbody><tr><td><h4><i class="fa-x-twitter">:x-twitter:</i></h4></td><td>X</td><td>Join our Discord community to post questions, get help, and share resources with over 3,000 like-minded developers.</td><td><a href="https://x.com/RailBridgeAI" class="button secondary">Follow X</a></td><td></td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.railbridge.ai/readme.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
