> ## Documentation Index
> Fetch the complete documentation index at: https://developers.fd.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# SDK Overview

> Add AI-native payments to any stack — official SDKs for TypeScript, Python, and Java.

## Introduction

Finance District provides SDKs for TypeScript, Python, and Java, making it simple to integrate the **Prism X402 Payment Protocol** into your existing applications. Our SDKs handle authentication, request signing, and payment verification with minimal setup.

## Find Your Integration

Pick the framework you're already using:

<CardGroup cols={3}>
  <Card title="Express" icon="node-js" href="/prism/sdk/typescript/express">
    Add payment middleware to Express apps
  </Card>

  <Card title="NestJS" icon="node-js" href="/prism/sdk/typescript/nestjs">
    Guards and decorators for NestJS
  </Card>

  <Card title="Next.js" icon="react" href="/prism/sdk/typescript/nextjs">
    API routes and middleware for Next.js
  </Card>

  <Card title="Fastify" icon="bolt" href="/prism/sdk/typescript/fastify">
    Plugin for Fastify applications
  </Card>

  <Card title="Django (Coming Soon)" icon="python" href="/prism/sdk/python/django">
    Middleware and decorators for Django
  </Card>

  <Card title="FastAPI (Coming Soon)" icon="python" href="/prism/sdk/python/fastapi">
    Dependencies for FastAPI routes
  </Card>

  <Card title="Flask (Coming Soon)" icon="python" href="/prism/sdk/python/flask">
    Decorators for Flask routes
  </Card>

  <Card title="Java Servlet (Coming Soon)" icon="java" href="/prism/sdk/java/servlet">
    Filters for servlet-based apps
  </Card>

  <Card title="Node.js HTTP" icon="code" href="/prism/sdk/typescript/http">
    Native Node.js HTTP server
  </Card>
</CardGroup>

## Language SDKs

If you don't use any of the frameworks above, start with the base SDK for your language:

<CardGroup cols={3}>
  <Card title="TypeScript SDK" icon="js" href="/prism/sdk/typescript">
    Node.js and TypeScript applications
  </Card>

  <Card title="Python SDK (Coming Soon)" icon="python" href="/prism/sdk/python">
    Python applications
  </Card>

  <Card title="Java SDK (Coming Soon)" icon="java" href="/prism/sdk/java/servlet">
    Java applications
  </Card>
</CardGroup>

## What You Get

* **🔐 Authentication** - Project Identify Token management and request signing
* **💳 Payment Verification** - X402 protocol support
* **🛡️ Error Handling** - Proper error types and validation
* **📝 Type Safety** - Full type definitions
* **🚀 Framework Integration** - Drop-in middleware/decorators
* **⚡ Performance** - Production-ready

## Quick Example

Here's how simple it is to add payment verification to an existing route:

<CodeGroup>
  ```typescript Express theme={"theme":{"light":"github-light","dark":"one-dark-pro"}}
  app.get(
    "/premium-content",
    fdPayment({ amount: 100, currency: "USD" }),
    (req, res) => {
      res.json({ content: "Your premium content" });
    },
  );
  ```

  ```python Django theme={"theme":{"light":"github-light","dark":"one-dark-pro"}}
  @require_payment(amount=100, currency='USD')
  def premium_content(request):
      return JsonResponse({'content': 'Your premium content'})
  ```

  ```python FastAPI theme={"theme":{"light":"github-light","dark":"one-dark-pro"}}
  @app.get('/premium-content')
  async def premium_content(
      payment: PaymentVerified = Depends(require_payment(100, 'USD'))
  ):
      return {'content': 'Your premium content'}
  ```

  ```python Flask theme={"theme":{"light":"github-light","dark":"one-dark-pro"}}
  @app.route('/premium-content')
  @require_payment(amount=100, currency='USD')
  def premium_content():
      return jsonify({'content': 'Your premium content'})
  ```
</CodeGroup>

## Need Help?

<Card title="GitHub" icon="github" href="https://github.com/1stdigital">
  Report issues or request features
</Card>
