MD

Katpay API Documentation

Build secure payment solutions with Katpay's comprehensive API. Process payments, manage virtual accounts, and handle payouts with ease.

Overview

Katpay provides a robust API for processing payments in Nigeria. Our API allows you to create virtual accounts, process transactions, and manage payouts securely.

PCI DSS Compliant
Bank-Level Security
Real-time Processing

Base URL

https://api.katpay.com/v1

Authentication

All API requests require authentication using your API keys. Keep your keys secure and never expose them in client-side code.

Required Headers

Header Description Required
Authorization Bearer token with your API secret Required
api-key Your public API key Required
Content-Type Must be application/json Required
JavaScript
const headers = {
  'Authorization': `Bearer ${apiSecret}`,
  'Content-Type': 'application/json',
  'api-key': apiKey
};

Quick Start

1

Get Your API Keys

Navigate to your dashboard and generate your API keys from the Developer section. You'll receive an apiKey and apiSecret.

2

Set Up Authentication

Include the required headers in all your API requests. Never expose your apiSecret in client-side code.

3

Create Your First Virtual Account

Use the Virtual Accounts API to create dynamic account numbers for your customers.

4

Handle Webhooks

Set up webhook endpoints to receive real-time notifications about transaction status.

Virtual Accounts

Create dynamic virtual accounts for your customers. These accounts are tied to your merchant account and allow you to receive payments.

POST
/virtual-accounts
Create a new virtual account for a customer

Request Body

Parameter Type Description Required
email string Customer's email address Required
name string Customer's full name Required
phoneNumber string Customer's phone number Required
bankCode array Array of bank codes (e.g., ["PALMPAY", "OPAY"]) Required
merchantID string Your merchant ID Required
JavaScript
const axios = require('axios');

const apiKey = 'your-api-key';
const apiSecret = 'your-api-secret';

const headers = {
  'Authorization': `Bearer ${apiSecret}`,
  'Content-Type': 'application/json',
  'api-key': apiKey
};

const data = {
  email: 'customer@example.com',
  name: 'John Doe',
  phoneNumber: '+2348012345678',
  bankCode: ['PALMPAY'],
  merchantID: apiKey
};

axios.post('https://api.katpay.com/v1/virtual-accounts', data, { headers })
  .then(response => {
    console.log('Virtual account created:', response.data);
  })
  .catch(error => {
    console.error('Error:', error.response.data);
  });

Supported Banks

Bank Code Bank Name Status
PALMPAY PalmPay Active
OPAY OPay Active
20897 Other Bank Active

Security Best Practices

Protect Your API Keys