> ## Documentation Index
> Fetch the complete documentation index at: https://paystack-sdk.efobi.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Introduction

> A type-safe, platform-agnostic TypeScript SDK for the Paystack API

## What is the Paystack TypeScript SDK?

The Paystack TypeScript SDK (`@efobi/paystack`) is a modern, type-safe client library for integrating Paystack payment services into your TypeScript and JavaScript applications. Built with developer experience in mind, it provides a clean, intuitive interface for working with the Paystack API across any JavaScript runtime.

<Note>
  This SDK is actively under development. Check the [API Coverage](#api-coverage) section to see which endpoints are currently available.
</Note>

## Key Features

The SDK is designed to provide a superior developer experience while maintaining robust functionality:

<CardGroup cols={2}>
  <Card title="Type-Safe" icon="shield-check">
    Full TypeScript support with strict typing. Get IntelliSense autocomplete and catch errors at compile time.
  </Card>

  <Card title="Platform-Agnostic" icon="globe">
    Works seamlessly in Node.js, Bun, Deno, browsers, and edge runtimes like Cloudflare Workers.
  </Card>

  <Card title="Runtime Validation" icon="check-circle">
    Built-in input and output validation using Zod schemas ensures data integrity at runtime.
  </Card>

  <Card title="Modern API" icon="code">
    Clean, promise-based interface that follows modern JavaScript best practices.
  </Card>

  <Card title="Lightweight" icon="feather">
    Minimal dependencies keep your bundle size small. Only peer dependency is Zod.
  </Card>

  <Card title="Secure" icon="lock">
    Built-in API key validation and secure webhook signature verification using Web Crypto API.
  </Card>
</CardGroup>

## Use Cases

The Paystack SDK is perfect for:

* **E-commerce platforms** - Accept payments, manage customers, and handle subscriptions
* **SaaS applications** - Implement recurring billing and subscription management
* **Payment gateways** - Build custom payment flows with full control
* **Fintech applications** - Create transfers, verify accounts, and manage virtual accounts
* **Marketplaces** - Handle split payments and manage subaccounts
* **Serverless functions** - Process webhooks and verify transactions in edge runtimes

## API Coverage

The SDK currently supports the following Paystack APIs:

<AccordionGroup>
  <Accordion title="Fully Implemented" icon="check" defaultOpen>
    * **Transactions** - Initialize, verify, list, and charge transactions
    * **Transaction Split** - Create and manage split payment configurations
    * **Dedicated Virtual Accounts** - Create and manage virtual bank accounts
    * **Transfer Recipients** - Create and manage transfer recipients
    * **Transfers** - Send money to recipients and manage transfers
    * **Verification** - Verify bank accounts, card BINs, and more
    * **Miscellaneous** - Access banks, countries, and states
  </Accordion>

  <Accordion title="Coming Soon" icon="clock">
    * Terminal & Virtual Terminal
    * Customers & Customer Management
    * Direct Debit
    * Apple Pay
    * Subaccounts
    * Plans & Subscriptions
    * Products & Payment Pages
    * Payment Requests
    * Settlements
    * Transfers Control
    * Bulk Charges
    * Integration Settings
    * Charge API
    * Disputes & Refunds
  </Accordion>
</AccordionGroup>

## How It Works

The SDK follows a simple, consistent pattern across all API modules:

<Steps>
  <Step title="Initialize the SDK">
    Create a new `Paystack` instance with your secret key:

    ```typescript theme={null}
    import { Paystack } from '@efobi/paystack';

    const paystack = new Paystack('sk_test_your_secret_key_here');
    ```
  </Step>

  <Step title="Call API methods">
    Access API modules through the main instance:

    ```typescript theme={null}
    const result = await paystack.transaction.initialize({
      email: 'customer@email.com',
      amount: '50000' // Amount in kobo (₦500.00)
    });
    ```
  </Step>

  <Step title="Handle responses">
    All methods return an object with `data` and `error` properties:

    ```typescript theme={null}
    if (result.error) {
      console.error('Validation error:', result.error.flatten());
    } else if (result.data) {
      console.log('Success:', result.data);
    }
    ```
  </Step>
</Steps>

## Why Choose This SDK?

<CardGroup cols={2}>
  <Card title="Developer Experience">
    TypeScript-first design means you get autocomplete, type checking, and inline documentation in your IDE.
  </Card>

  <Card title="Runtime Safety">
    Zod validation catches invalid data before it reaches the API, providing clear error messages.
  </Card>

  <Card title="Universal Compatibility">
    One codebase works everywhere - from Node.js servers to Cloudflare Workers to React Native apps.
  </Card>

  <Card title="Modern Standards">
    Uses Web Crypto API for webhook verification, ensuring compatibility with modern runtimes.
  </Card>
</CardGroup>

## Next Steps

<CardGroup cols={2}>
  <Card title="Installation" icon="download" href="/installation">
    Install the SDK and configure your environment
  </Card>

  <Card title="Quick Start" icon="rocket" href="/quickstart">
    Build your first integration in minutes
  </Card>
</CardGroup>

## Get Help

Need assistance or want to contribute?

* Report issues on [GitHub](https://github.com/efobi-dev/paystack/issues)
* Join discussions on [GitHub Discussions](https://github.com/efobi-dev/paystack/discussions)
* Read the official [Paystack API Documentation](https://paystack.com/docs/api/)
* Contact the author: [owen@efobi.dev](mailto:owen@efobi.dev)
