SwiftPay provides official SDKs for JavaScript/TypeScript, Python, and React. Choose the SDK that best fits your integration pattern.Documentation Index
Fetch the complete documentation index at: https://docs.swiftpay.finance/llms.txt
Use this file to discover all available pages before exploring further.
SDK Selection Guide
Checkout SDK
Browser and React SDK for payment UI. Use for customer-facing checkout flows.
Node.js SDK
TypeScript/JavaScript backend SDK for server-side invoice and payment management.
Python SDK
Python SDK with sync and async support for FastAPI, Django, and standard servers.
x402 Node.js Guard
HTTP 402 payment middleware for Express and Fastify. Protect routes with per-request payments.
Quick Comparison
| Feature | Checkout | Node.js | Python | x402 Node | x402 FastAPI |
|---|---|---|---|---|---|
| Use case | UI checkout | Backend mgmt | Backend mgmt | Route protection | Route protection |
| Auth required | Publishable key | Secret key | Secret key | Secret key | Secret key |
| Invoice creation | ✅ | ✅ | ✅ | — | — |
| Payment detection | SSE/Polling | Webhooks | Webhooks | Auto-settle | Auto-settle |
| x402 handling | — | ✅ | ✅ | ✅ | ✅ |
| Type safety | TypeScript | TypeScript | Type hints | TypeScript | Type hints |
Installation Quick Start
- Checkout SDK
- Node.js API Client
- Python API Client
- x402 Node.js
- x402 FastAPI
Common Integration Patterns
1. Accept Payments (Frontend + Backend)
- Frontend: Use Checkout SDK to display payment UI
- Backend: Use Node.js or Python SDK to create invoices and track payments
2. Payment-Gated API (Existing Backend)
Protect your existing API routes with x402 paywalls:- Express/Fastify: Use x402 Node Guard
- FastAPI: Use x402 FastAPI Guard
3. Programmatic Integration (Headless)
Build custom checkout UI with the backend SDK:- Create invoices with Node.js or Python SDK
- Poll
/invoices/{id}/transactionsfor payment confirmation - Deliver content when status changes to
paid
Full Package Information
For complete API references, parameter details, and advanced usage patterns, visit the official package pages:- Checkout SDK on NPM
- Node.js API Client on NPM
- x402 Node Guard on NPM
- Python API Client on PyPI
- x402 FastAPI Guard on PyPI