Overview

The @nekuda/react-nekuda-js securely collects user information details and manages saved information 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 information methods
  • Customizable React components
  • Simple integration
  • 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 Information Form Component Step 4: Wrap Your App with the Provider That’s it! This setup will render a complete information form.

SDK Components & Usage

<NekudaWalletProvider>

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

<NekudaInformationForm>

A pre-built, styled information form component that includes common payment fields.
Recommended Approach: We highly recommend using <NekudaInformationForm> instead of individual field components. The complete form component automatically captures comprehensive information data and user context that enhances payment success rates and provides valuable insights for transaction processing. This holistic approach ensures optimal performance and better user experience for your payment flows.

useNekudaWallet() Hook

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

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 payment 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 information collection:

Security and PCI Compliance

  • Secure Data Collection: Sensitive payment 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.