Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 16 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
</p>

<p align="center">
<strong>Deploy your own branded x402 payment facilitator in minutes.</strong>
<strong>Free, fast, open source x402 payment infrastructure.</strong>
</p>

<p align="center">
Expand All @@ -20,11 +20,24 @@

---

OpenFacilitator is an open source platform that lets anyone deploy their own x402 payment facilitator. Self-host for free or use our managed service for instant setup.
OpenFacilitator is an open source x402 payment facilitator. Use the public `pay.openfacilitator.io` endpoint with no signup, or fork and self-host when you need full control.

## 🚀 Quick Start

### Self-Hosted (Free)
### Public Endpoint

```bash
npm install @openfacilitator/sdk
```

```typescript
import { OpenFacilitator } from '@openfacilitator/sdk';

// Uses https://pay.openfacilitator.io by default
const facilitator = new OpenFacilitator();
```

### Self-Hosted

```bash
# Clone the repository
Expand All @@ -37,11 +50,6 @@ docker compose up -d

Your facilitator will be running at `http://localhost:3001`

### Managed Service

Visit [openfacilitator.io](https://openfacilitator.io) to deploy your own facilitator:
- **$5/mo**: Bring your own domain with auto-SSL

## 📦 Project Structure

```
Expand Down Expand Up @@ -306,4 +314,3 @@ This project is licensed under the Apache License 2.0 - see the [LICENSE](LICENS
---

Built with ❤️ for the x402 ecosystem

1 change: 0 additions & 1 deletion apps/dashboard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
"date-fns": "^4.1.0",
"lucide-react": "^0.468.0",
"next": "^15.5.9",
"next-themes": "^0.4.6",
"prism-react-renderer": "^2.4.1",
"react": "^19.0.0",
"react-dom": "^19.0.0",
Expand Down
16 changes: 8 additions & 8 deletions apps/dashboard/src/app/dashboard/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,19 @@ import { BillingSection } from '@/components/billing-section';
import { EmptyState } from '@/components/empty-state';
import { FeaturesSpotlight } from '@/components/dashboard/FeaturesSpotlight';

const FREE_ENDPOINT = 'https://pay.openfacilitator.io';
const PUBLIC_ENDPOINT = 'https://pay.openfacilitator.io';

// Free Endpoint Section
function FreeEndpointSection() {
// Public Endpoint Section
function PublicEndpointSection() {
const [copied, setCopied] = useState(false);
const { toast } = useToast();

const handleCopy = async () => {
await navigator.clipboard.writeText(FREE_ENDPOINT);
await navigator.clipboard.writeText(PUBLIC_ENDPOINT);
setCopied(true);
toast({
title: 'Copied!',
description: 'Free endpoint URL copied to clipboard',
description: 'Public endpoint URL copied to clipboard',
});
setTimeout(() => setCopied(false), 2000);
};
Expand All @@ -42,8 +42,8 @@ function FreeEndpointSection() {
<div className="border-2 border-dashed border-border rounded-lg p-5">
<div className="flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4">
<div>
<p className="text-muted-foreground mb-1">Don't need your own domain?</p>
<p className="font-mono">{FREE_ENDPOINT}</p>
<p className="text-muted-foreground mb-1">Use the dogfooded OpenFacilitator endpoint</p>
<p className="font-mono">{PUBLIC_ENDPOINT}</p>
<p className="text-sm text-muted-foreground">Just use ours · No setup needed</p>
</div>
<Button variant="outline" size="sm" onClick={handleCopy}>
Expand Down Expand Up @@ -184,7 +184,7 @@ export default function DashboardPage() {

{/* Shared Facilitator Option */}
<div className="mb-12">
<FreeEndpointSection />
<PublicEndpointSection />
</div>

{/* Billing Section (only show if has facilitators) */}
Expand Down
14 changes: 12 additions & 2 deletions apps/dashboard/src/app/docs/api/page.mdx
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { ApiEndpoint } from '@/components/docs/ApiEndpoint';

<PageHeader title="HTTP API Reference" description="For direct HTTP integration without the SDK." />
<PageHeader title="HTTP API Reference" description="Use pay.openfacilitator.io without the SDK." />

## Base URL

```
https://pay.openfacilitator.io
```

Or your self-hosted instance.
The SDK uses this URL by default. Direct HTTP clients can call the same host.

## Endpoints

Expand Down Expand Up @@ -108,3 +108,13 @@ All endpoints return errors in this format:
| 400 | Bad request (invalid payload) |
| 401 | Unauthorized |
| 500 | Internal server error |

## Public Stats

High-level public stats are available without payment or authentication:

```bash
curl https://api.openfacilitator.io/public/stats
```

This returns aggregate public facilitator usage, rolling response-time metrics, and Solana settlement timing. It does not expose wallet-level feeds or private customer data.
2 changes: 1 addition & 1 deletion apps/dashboard/src/app/docs/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ const bottomNavItems = [

const moreMenuItems = [
{ href: '/docs/api', label: 'HTTP API' },
{ href: '/docs/dns-setup', label: 'DNS Setup' },
{ href: '/docs/self-hosting', label: 'Self-Hosting' },
{ href: '/docs/dns-setup', label: 'DNS Setup' },
{ href: '/docs/sdk/errors', label: 'Error Handling' },
];

Expand Down
6 changes: 3 additions & 3 deletions apps/dashboard/src/app/docs/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ export default function DocsPage() {
OpenFacilitator <span className="text-primary">Documentation</span>
</h1>
<p className="text-lg text-muted-foreground">
Run your own x402 payment facilitator with full network support.
Use the public pay.openfacilitator.io endpoint, or fork the open source stack when you need full control.
</p>
</div>

<div className="grid grid-cols-1 md:grid-cols-2 gap-4">
<Link href="/docs/quickstart" className="block p-6 border border-border rounded-lg hover:border-primary hover:bg-muted/50 transition-colors">
<h3 className="font-semibold text-lg text-foreground">Quickstart</h3>
<p className="text-muted-foreground text-sm mt-1">
Get started in 5 minutes
Add x402 payments with the public endpoint
</p>
</Link>

Expand All @@ -30,7 +30,7 @@ export default function DocsPage() {
<Link href="/docs/api" className="block p-6 border border-border rounded-lg hover:border-primary hover:bg-muted/50 transition-colors">
<h3 className="font-semibold text-lg text-foreground">HTTP API</h3>
<p className="text-muted-foreground text-sm mt-1">
Raw API endpoints
Raw pay.openfacilitator.io endpoints
</p>
</Link>

Expand Down
14 changes: 6 additions & 8 deletions apps/dashboard/src/app/docs/quickstart/page.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<PageHeader title="Quickstart" description="Get started with OpenFacilitator in 5 minutes." />
<PageHeader title="Quickstart" description="Use pay.openfacilitator.io in minutes." />

## Installation

Expand All @@ -11,15 +11,12 @@ npm install @openfacilitator/sdk
```typescript
import { OpenFacilitator } from '@openfacilitator/sdk';

// Uses https://pay.openfacilitator.io by default
// Uses https://pay.openfacilitator.io by default.
const facilitator = new OpenFacilitator();

// Or use your own
const myFacilitator = new OpenFacilitator({
url: 'https://pay.yourdomain.com',
});
```

No account, API key, or custom domain is required.

## Verify a Payment

```typescript
Expand Down Expand Up @@ -67,4 +64,5 @@ if (result.success) {

- [SDK Reference](/docs/sdk) — Full API documentation
- [Networks](/docs/networks) — See all supported chains
- [Self-Hosting](/docs/self-hosting) — Run your own facilitator
- [HTTP API](/docs/api) — Use the facilitator without the SDK
- [Self-Hosting](/docs/self-hosting) — Fork and run your own instance when you need full control
7 changes: 1 addition & 6 deletions apps/dashboard/src/app/docs/sdk/installation/page.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,10 @@ import { OpenFacilitator } from '@openfacilitator/sdk';
// Uses https://pay.openfacilitator.io by default
const facilitator = new OpenFacilitator();

// Or configure with options
// Advanced: configure a self-hosted or private facilitator
const customFacilitator = new OpenFacilitator({
// Custom facilitator URL
url: 'https://pay.yourdomain.com',

// Optional: Request timeout (default: 30000ms)
timeout: 30000,

// Optional: Custom headers
headers: {
'X-Custom-Header': 'value',
},
Expand Down
Loading
Loading