Skip to content

Voltax Payment SDK

Unify fragmented African payment gateways into a single, standardized, and strictly typed API. Build faster, switch providers easily, and maintain less code.

Building payment integrations across Africa means dealing with multiple providers, each with their own APIs, data formats, and quirks. Voltax eliminates this complexity by providing:

  • 🛡 Strictly Typed: Built with TypeScript + Zod for compile-time and runtime validation
  • 🔗 Standardized API: One interface (VoltaxProvider) for all gateways
  • 🔄 Adapter Pattern: Swap providers without rewriting business logic
  • Lightweight: Tree-shakeable, ESM & CJS support
  • 🔒 Secure: No hardcoded keys, enforced validation checks
import Voltax, { Currency, PaymentStatus } from "@noelzappy/voltax";
// Initialize with your provider credentials
const voltax = new Voltax({
paystack: { secretKey: process.env.PAYSTACK_SECRET_KEY },
flutterwave: { secretKey: process.env.FLUTTERWAVE_SECRET_KEY },
});
// Same API for any provider
const payment = await voltax.paystack.initializePayment({
amount: 5000,
email: "customer@example.com",
currency: Currency.NGN,
reference: "order-123",
});
// Redirect customer to payment page
console.log(payment.authorizationUrl);
// Later, verify the payment
const result = await voltax.paystack.verifyTransaction("order-123");
if (result.status === PaymentStatus.SUCCESS) {
// Fulfill the order
}
ProviderCountriesStatus
PaystackNigeria, Ghana, South Africa, Kenya✅ Supported
FlutterwaveNigeria, Ghana, Kenya, South Africa + 30 more✅ Supported
HubtelGhana✅ Supported

API Reference

Explore the complete API documentation with all classes, interfaces, and types.