aws-samples / aws-samples/sample-agentic-serverless-payments

40+ production APIs with x402 support for testing agent payment flows

Open
#14 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
9
Forks
4
PR merge metrics
No merged PRs in 30d

Description

## Production x402 endpoints for testing

Your serverless x402 example is a great reference implementation! I maintain an API gateway with 40+ services that all support x402 natively, which could be useful as additional test targets or for demonstrating agent-to-service payment flows.

## Integration example

```typescript
// Using your x402 payment infrastructure to access external APIs
const GATEWAY = 'https://agent-gateway-kappa.vercel.app';

// Each endpoint returns 402 with standard x-payment headers
// Agents using your payment flow can access these services:

// Web scraping
const scrape = { url: `${GATEWAY}/api/scraper/scrape`, body: { url: 'https://docs.aws.amazon.com', format: 'markdown' } };

// Code execution in sandbox
const code = { url: `${GATEWAY}/api/code/run`, body: { code: 'print(2**256)', language: 'python' } };

// Crypto data
const price = { url: `${GATEWAY}/api/crypto/price/ETH` };

// Screenshots
const shot = { url: `${GATEWAY}/api/screenshot/capture`, body: { url: 'https://aws.amazon.com' } };
```

## Available services

40+ endpoints covering web scraping, screenshots, code execution, web search, crypto/DeFi data, agent memory (vector search), file storage, PDF generation, and more.

All priced at ~$0.002/request via x402 (USDC on Base)
Full catalog: https://api-catalog-three.vercel.app

Could work as external services in your demo — showing an agent autonomously paying for and consuming real-world APIs.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.