Ai Tools

Using AI Assistants

Use Claude, ChatGPT, and other AI tools to help integrate NjiaPay

You can use AI assistants like Claude, ChatGPT, Cursor, and others to help you integrate NjiaPay into your application. Our documentation is optimized for AI consumption, making it easy for these tools to help you understand the API and generate code.

Quick Setup

For the best experience with AI assistants that support MCP (Model Context Protocol), connect directly to our documentation:

MCP Server URL: https://docs.njiapay.com/mcp

Claude Desktop

claude mcp add --transport http njiapay https://docs.njiapay.com/mcp

Cursor

Add to .cursor/mcp.json:

{
  "mcpServers": {
    "njiapay": {
      "type": "http",
      "url": "https://docs.njiapay.com/mcp"
    }
  }
}

VS Code (with GitHub Copilot)

Add to .vscode/mcp.json:

{
  "servers": {
    "njiapay": {
      "type": "http",
      "url": "https://docs.njiapay.com/mcp"
    }
  }
}

Option 2: Reference Documentation URLs

For AI assistants that don't support MCP, you can reference our documentation directly:

  • Quick Reference: https://docs.njiapay.com/llms.txt
  • Full Documentation: https://docs.njiapay.com/llms-full.txt

Example Prompts

Once connected, you can ask your AI assistant questions like:

Getting Started

"How do I create a payment with NjiaPay?"
"Show me how to set up NjiaPay in a Next.js app"
"What are the required API keys for NjiaPay?"

Implementation

"Generate a function to create a NjiaPay payment intent"
"How do I handle NjiaPay webhook events?"
"Show me how to process a refund with NjiaPay"

Troubleshooting

"What does this NjiaPay error mean: [error message]"
"Why is my payment intent not working?"
"How do I test NjiaPay in sandbox mode?"

What AI Can Help With

AI assistants with access to our documentation can:

  • Explain Concepts - Understand payment intents, attempts, webhooks, etc.
  • Generate Code - Create integration code in your preferred language
  • Debug Issues - Help troubleshoot errors and failed payments
  • Find Information - Quickly locate specific endpoints or parameters
  • Best Practices - Suggest proper error handling and security approaches

Example Workflow

Here's how you might use an AI assistant to integrate NjiaPay:

1. Initial Setup

You ask:

"I need to integrate NjiaPay payments into my Node.js API.
Show me how to create a payment intent."

AI provides:

  • The endpoint and authentication details
  • A working code example with your tech stack
  • Explanation of required parameters
  • Links to relevant documentation

2. Implementation

You ask:

"How do I redirect the user to the checkout page after
creating the intent?"

AI provides:

  • Explanation of the redirect_url response field
  • Example of how to handle the redirect in your framework
  • Best practices for returning users after payment

3. Webhooks

You ask:

"Show me how to set up a webhook endpoint to receive
payment notifications"

AI provides:

  • Webhook event types and structure
  • Example webhook handler code
  • How to verify webhook authenticity
  • Status update handling logic

Limitations

While AI assistants are helpful, please note:

Always verify critical information like API keys, security practices, and production configurations against the official documentation.
  • AI responses may occasionally be outdated
  • For account-specific issues, contact support directly
  • Security-sensitive implementations should be reviewed by your team
  • Production deployments should follow our official integration guides

Need Human Help?

AI assistants are great for quick answers, but we're here when you need us:

  • Complex Integrations - Talk to our integration team
  • Account Issues - Contact support
  • Custom Requirements - Discuss with sales
  • Security Questions - Reach out to our security team