SDKs & Libraries

Your language. Your stack.

Official client libraries maintained by Paynectra engineers — always in sync with the latest API version.

𝓝

Node.js

v4.2.1

🐍

Python

v3.1.0

🐘

PHP

v2.9.4

💎

Ruby

v2.3.2

Java

v3.0.1

🐹

Go

v1.8.0

#

.NET / C#

v4.1.2

🍎

Swift

v2.0.5

🤖

Kotlin

v1.4.0

⚛️

React Native

v2.1.3

Quickstart Guide

This guide walks you through everything you need to create your first payment with Paynectra — from installing the SDK to handling a successful webhook confirmation. Most developers complete this in under 30 minutes.

You'll need a Paynectra account to follow this guide. Sign up for free — sandbox access is available immediately, no approval required.

Step 1 — Install the SDK

Install the Paynectra SDK for your language using your preferred package manager:

Terminal
1# Node.js
2npm install Paynectra
3
4# Python
5pip install Paynectra
6
7# PHP (Composer)
8composer require Paynectra/Paynectra-php
9
10# Ruby
11gem install Paynectra

Step 2 — Configure Authentication

All API requests must include your secret API key in the Authorization header. Store it as an environment variable — never hard-code it in your source files.

Security tip: Use separate API keys for sandbox and production. Rotate your production key immediately if you suspect exposure. Keys can be revoked from your dashboard at any time.

Authentication

Paynectra uses API keys to authenticate requests. You can view and manage your API keys in the Paynectra Dashboard. Your API keys carry many privileges, so be sure to keep them secure.

Authentication to the API is performed via HTTP Bearer auth. Provide your API key as the bearer token value:

HTTP Header
1Authorization: Bearer sk_live_4Kj9pMnQrTxWvZ2bLsYeHcDfGaUo8iN1
2Content-Type: application/json
3Paynectra-Version: 2026-01-01

API Key Types

  • Publishable keys (pk_live_...) — safe to expose in client-side code. Used to tokenise card data in the browser.
  • Secret keys (sk_live_...) — must only be used server-side. Used for all server-to-server API calls.
  • Restricted keys — create scoped keys with read-only or endpoint-specific access for third-party integrations.

Sandbox Testing

The Paynectra Sandbox is a complete replica of the production environment. Use sandbox API keys (prefixed sk_test_) to simulate the full payment lifecycle without moving real money.

Test Card Numbers

4242 4242 4242 4242 Visa — always succeeds Success
4000 0000 0000 0002 Visa — always declined Declined
4000 0025 0000 3155 Requires 3D Secure authentication 3DS Required
5555 5555 5555 4444 Mastercard — always succeeds Success
3782 822463 10005 Amex — always succeeds Success

Use any future expiry date, any 3-digit CVV (4-digit for Amex), and any cardholder name.

Webhook Events

Paynectra sends real-time event notifications to your endpoint whenever something significant happens in your account. Configure webhook URLs in your dashboard under Developers → Webhooks.

Event Reference

payment.created A new payment intent was created Payment
payment.succeeded Payment was successfully captured Success
payment.failed Payment attempt failed or was declined Failed
dispute.created A chargeback dispute has been opened Dispute
dispute.won You won a chargeback dispute Won
payout.paid A settlement payout was sent to your bank Payout
fraud.flagged A transaction was flagged for review Fraud
subscription.renewed A recurring subscription was successfully renewed Subscription

Verifying Webhook Signatures

Every webhook request includes a Paynectra-Signature header that lets you verify the payload originated from Paynectra. Always validate this before processing:

verify_webhook.js
1const { Paynectra } = require('Paynectra');
2
3// Your webhook signing secret from the dashboard
4const webhookSecret = process.env.Paynectra_WEBHOOK_SECRET;
5
6app.post('/webhook', (req, res) => {
7  const sig = req.headers['Paynectra-signature'];
8  let event;
9
10  try {
11    event = Paynectra.webhooks.constructEvent(
12      req.body, sig, webhookSecret
13    );
14  } catch (err) {
15    return res.status(400).send(`Webhook Error: ${err.message}`);
16  }
17
18  switch (event.type) {
19    case 'payment.succeeded':
20      fulfillOrder(event.data); break;
21    case 'payment.failed':
22      notifyCustomer(event.data); break;
23  }
24  res.json({ received: true });
25});
Platform Plugins

Pre-built integrations for popular platforms

Skip the custom integration — install our certified plugin and accept payments in minutes.

WooCommerce

Full-featured WordPress plugin. Supports subscriptions, multi-currency, and 3DS2. 50,000+ active installs.

Download plugin

Shopify

Official Shopify payment app. One-click install, auto-captures, and full refund management from Shopify admin.

Install app

Magento 2

Enterprise-grade Magento 2 extension with full order management, multi-store support, and tokenised vaulting.

View extension

Start building in the Sandbox today

Free sandbox access. No approval required. Test payments, webhooks, and every API endpoint before going live.