Skip to main content

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.

SwiftPay provides official SDKs for JavaScript/TypeScript, Python, and React. Choose the SDK that best fits your integration pattern.

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

FeatureCheckoutNode.jsPythonx402 Nodex402 FastAPI
Use caseUI checkoutBackend mgmtBackend mgmtRoute protectionRoute protection
Auth requiredPublishable keySecret keySecret keySecret keySecret key
Invoice creation
Payment detectionSSE/PollingWebhooksWebhooksAuto-settleAuto-settle
x402 handling
Type safetyTypeScriptTypeScriptType hintsTypeScriptType hints

Installation Quick Start

npm install @swiftpayfi/checkout-sdk

Common Integration Patterns

1. Accept Payments (Frontend + Backend)

  1. Frontend: Use Checkout SDK to display payment UI
  2. 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:

3. Programmatic Integration (Headless)

Build custom checkout UI with the backend SDK:
  • Create invoices with Node.js or Python SDK
  • Poll /invoices/{id}/transactions for 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: All SDKs are in v0.1.0-beta — production-ready with active development.