PayWeavePayWeaveBack to Home
Introduction

Getting Started

PayWeave gives you four ways to add MPP payments to your endpoints. Use one or combine them depending on your needs.

Apps

Apps let you add payment gating directly in your code using SDK middleware. Create an app in the PayWeave dashboard, get your credentials, and drop a one-line middleware into your Express, Fastify, Hono, or Next.js server.

Best for:

Full control over pricing logic, including dynamic per-request pricing.

Custom response handling and in-process payment verification with no extra network hop.

Get started with Apps →

Gateways

Gateways are reverse proxies that sit in front of any upstream API and handle payment verification automatically. Configure them entirely from the PayWeave dashboard - no code changes to your upstream required.

Best for:

Monetizing third-party APIs you don't control.

Adding payments without touching application code.

Managing pricing from a UI.

Get started with Gateways →

Functions

Functions let you deploy serverless TypeScript handlers directly on PayWeave. Write code in the built-in editor, set a price per handler, and PayWeave hosts it - no infrastructure to manage.

Best for:

Building new paid APIs from scratch without deploying a server.

AI tool endpoints, data transformations, and lookup APIs.

Get started with Functions →

Files

Files let you sell digital downloads with per-download pricing. Upload datasets, model weights, documents, or any file to a collection and set a price — agents pay via MPP and download directly.

Best for:

Selling datasets, ML models, research data, and digital goods.

Content that agents need to download and process locally.

Get started with Files →

Comparison

AppsGatewaysFunctionsFiles
Code changesMiddleware per routeNoneWrite handler codeNone
Pricing configIn codeDashboard UIDashboard UIDashboard UI
Dynamic pricingPer-request (function)Per-endpointPer-handlerPer-file
LatencyIn-process+1 hop (proxy)Managed (edge)Streamed from R2
Custom logicFull controlNoneFull controlNone
InfrastructureYou manageYou manage upstreamFully managedFully managed
You can use all four together - Apps for your own services, Gateways for third-party APIs you want to resell, Functions for quick serverless endpoints, and Files for paid downloads.