Developer Portal

Build with NexaPay

Everything you need to integrate NexaPay into your applications. Explore our APIs, SDKs, and developer tools.

188
API Endpoints
4
Official SDKs
99.9%
Uptime
<50ms
Avg Latency

Official SDKs

Use our SDKs to integrate faster with less code

📦

JavaScript SDK

v3.2.1

Official JavaScript/TypeScript SDK for Node.js and browsers

npm install @nexapay/sdk
Promise-based APITypeScript supportAuto-retry logicWebhook helpers
View Documentation
🐍

Python SDK

v2.1.0

Python SDK for server-side integrations

pip install nexapay
Async supportType hintsDjango integrationFlask helpers
View Documentation
🐘

PHP SDK

v2.0.3

PHP SDK for Laravel and other frameworks

composer require nexapay/sdk
Laravel packagePSR-7 compatibleOAuth2 clientWebhook signature
View Documentation
💎

Ruby SDK

v1.5.0

Ruby gem for Rails applications

gem install nexapay
Rails integrationActiveRecord helpersSidekiq supportRake tasks
View Documentation

Code Examples

Get started quickly with these common integration patterns

Quick Startjavascript
import { NexaPay } from '@nexapay/sdk';

const client = new NexaPay({
  apiKey: process.env.NEXAPAY_API_KEY,
  merchantId: 'your_merchant_id'
});

// List all products
const products = await client.products.list();
console.log(products);

// Create an order
const order = await client.orders.create({
  store_id: 'store_123',
  items: [
    { product_id: 'prod_001', quantity: 2 }
  ]
});
Authenticationpython
from nexapay import NexaPayClient

# Initialize with OAuth
client = NexaPayClient(
    client_id='your_client_id',
    client_secret='your_client_secret',
    redirect_uri='https://your-app.com/callback'
)

# Get access token
token = client.auth.get_token(authorization_code)
client.set_access_token(token.access_token)

# Make authenticated requests
stores = client.stores.list()
Webhook Handlerjavascript
import { Webhook } from '@nexapay/sdk';

app.post('/webhooks/nexapay', (req, res) => {
  const webhook = new Webhook(process.env.WEBHOOK_SECRET);
  
  // Verify signature
  if (!webhook.verify(req)) {
    return res.status(401).send('Invalid signature');
  }
  
  const event = webhook.parse(req.body);
  
  switch (event.type) {
    case 'order.created':
      handleNewOrder(event.data);
      break;
    case 'inventory.low':
      alertLowStock(event.data);
      break;
  }
  
  res.json({ received: true });
});

Ready to Start Building?

Get your API key and start integrating NexaPay into your application today.