Overview

The @nekuda/react-nekuda-js SDK securely collects payment information and manages saved payment methods, enabling your AI agents to handle both guest and returning customer checkouts.
Requirements:
• React 17+ or React 18
• Valid nekuda public key

Key Features:

  • PCI-compliant secure collection via isolated iframes
  • Card Management - Save, update, and manage multiple payment methods
  • Customizable React components with theming support
  • Simple integration with automatic API configuration
  • Saved Cards - Enable one-click checkout for returning customers

Installation

npm install @nekuda/react-nekuda-js

Quick Integration

Step 1: Obtain your nekuda public key from the nekuda Portal. Step 2: Import the SDK Step 3: Create the Payment Form Component Step 4: Wrap Your App with the Provider That’s it! This setup will render a complete payment form.

SDK Components & Usage

<NekudaWalletProvider>

Initializes the SDK and must wrap any components that use nekuda. Example:

<NekudaPaymentForm>

A pre-built payment form component that securely collects all payment information.

onSave Callback Pattern

Accesses SDK functionality from within components wrapped by <NekudaWalletProvider>.

Next Steps

<NekudaCardManagement>

A complete card management interface for users to view, add, and manage their saved payment methods.

Understanding the Flow

1

User ID Management

You generate and manage user IDs in your system. These IDs link saved cards to your users.
2

Frontend Collection

The React SDK securely collects and tokenizes information in the browser.
3

Backend Processing

Your backend uses the secret API key (never exposed in frontend) to process information using the stored cards.

Next Steps

After integrating the payment collection:

Security and PCI Compliance

  • Secure Data Collection: Sensitive information (card number, CVC, expiry) is collected within secure iframes hosted by nekuda. This data never touches your servers directly.
  • Tokenization: Upon successful submission, the SDK returns a secure, single-use token representing the information details. This token can be safely passed to your backend.
  • No PCI Scope: By using the iframed elements, your PCI DSS compliance scope is reduced, as you don’t handle or store raw cardholder data.