SADAD Payment Gateway Package for Next.js - Server Actions and API Routes

    SADAD Payment Gateway Package for Next.js - Server Actions and API Routes

    356 views
    software

    Open source Next.js package for SADAD Payment Gateway. Server actions, client components, and API route handlers for Qatar e-commerce applications.

    Louis Innovations releases a dedicated SADAD Payment Gateway package for Next.js, the most popular React framework for production applications.

    Why a Dedicated Next.js Package?

    Next.js has unique capabilities like Server Actions, Server Components, and API Routes that require purpose-built integrations. Generic React components miss these opportunities. Our package leverages the full power of Next.js 14 and 15.

    Package Features:

    Server Actions - Process payments, create invoices, and handle refunds directly in Server Actions. No separate API route needed. Type-safe form handling with automatic revalidation.

    Client Components - Pre-built checkout button, payment status display, and refund request form. Styled with CSS modules for easy customization. Zero layout shift during loading states.

    API Route Handlers - Webhook verification endpoint that validates SADAD signatures. Payment status polling endpoint with built-in caching. Works with both Pages Router and App Router.

    Middleware Integration - SADAD webhook signature verification as Next.js middleware. Automatic request logging for payment operations.

    Environment Variable Validation - Checks for required SADAD credentials at build time. Clear error messages when configuration is missing. Support for different credentials per environment.

    TypeScript Support - Full type definitions for all components, actions, and handlers. Exported types for building custom integrations on top of the package.

    Use Cases:

    E-commerce stores built with Next.js can integrate SADAD payments in under an hour. SaaS platforms can add subscription billing. Service businesses can generate payment links for clients.

    Repository: github.com/louisinnovationsqatar/sadad-nextjs

    Built for Qatar's growing community of Next.js developers. MIT licensed, free for commercial use.