SDKs & Libraries

Accelerate Your Integration

Notch Pay provides official client libraries for various programming languages to simplify integration with our API. These libraries handle the complexities of API requests, authentication, and error handling, allowing you to focus on building your application.

Why Use Our SDKs?

  • Simplified API integration with pre-built methods
  • Automatic handling of authentication and headers
  • Comprehensive error handling and validation
  • Type definitions and code completion

SDK Features

  • Complete API coverage for all Notch Pay services
  • Webhook signature verification utilities
  • Idiomatic code for each language
  • Comprehensive documentation and examples

Available SDKs

JavaScript

Integrate Notch Pay into your web applications, Node.js backends, or React Native apps.

  • Promise-based API
  • TypeScript support
  • Browser and Node.js compatibility
  • Comprehensive error handling
View JavaScript SDK →

PHP

Integrate Notch Pay into your PHP applications and frameworks like Laravel, Symfony, or WordPress.

  • PSR-4 compliant
  • Composer support
  • Laravel integration
  • Comprehensive error handling
View PHP SDK →

Python

Integrate Notch Pay into your Python applications and frameworks like Django or Flask.

  • Python 3.6+ support
  • Async/await support
  • Django integration
  • Comprehensive error handling
View Python SDK →

Mobile SDKs

Integrate Notch Pay into your iOS and Android applications.

  • Native iOS SDK (Swift)
  • Native Android SDK (Kotlin)
  • React Native support
  • Flutter support
View Mobile SDKs →

Installation

Each SDK has its own installation instructions. Please refer to the specific SDK documentation for detailed installation steps.

JavaScript

# Using npm
npm install notchpay-js

# Using yarn
yarn add notchpay-js

PHP

composer require notchpay/notchpay-php

Python

pip install notchpay

Basic Usage

All SDKs follow a similar pattern for basic operations. Here’s a quick example of creating a payment using different SDKs:

JavaScript

const Notch Pay = require('notchpay-js');
const notchpay = new Notch Pay('YOUR_PUBLIC_KEY');

notchpay.payments.create({
  amount: 5000,
  currency: 'XAF',
  customer: {
    email: 'customer@example.com',
    name: 'John Doe'
  },
  description: 'Payment for Order #123',
  callback: 'https://example.com/callback'
})
.then(response => {
  / Redirect to payment page
  window.location.href = response.authorization_url;
})
.catch(error => {
  console.error('Error:', error);
});

PHP

<?php
require_once 'vendor/autoload.php';

$notchpay = new \Notch Pay\Notch Pay('YOUR_PUBLIC_KEY');

try {
    $payment = $notchpay->payments->create([
        'amount' => 5000,
        'currency' => 'XAF',
        'customer' => [
            'email' => 'customer@example.com',
            'name' => 'John Doe'
        ],
        'description' => 'Payment for Order #123',
        'callback' => 'https://example.com/callback'
    ]);
    
    / Redirect to payment page
    header('Location: ' . $payment->authorization_url);
    exit;
} catch (\Notch Pay\Exception\ApiException $e) {
    echo 'Error: ' . $e->getMessage();
}

Python

import notchpay

notchpay.api_key = 'YOUR_PUBLIC_KEY'

try:
    payment = notchpay.Payment.create(
        amount=5000,
        currency='XAF',
        customer={
            'email': 'customer@example.com',
            'name': 'John Doe'
        },
        description='Payment for Order #123',
        callback='https://example.com/callback'
    )
    
    # Redirect to payment page
    print(payment.authorization_url)
except notchpay.error.Notch PayError as e:
    print(f"Error: {e}")

Error Handling

All SDKs provide comprehensive error handling to help you debug issues and provide appropriate feedback to your users. Each SDK throws specific exceptions or returns error objects that contain detailed information about what went wrong.

Webhooks

Our SDKs also provide utilities for handling webhooks, making it easy to verify and process webhook notifications from Notch Pay.

Community Libraries

In addition to our official SDKs, there are community-maintained libraries for other programming languages and frameworks. While these are not officially supported by Notch Pay, they can be useful for integrating with our API.

Need Help?

SDK Documentation

Each SDK has detailed documentation with guides, examples, and API references to help you get started quickly.

GitHub Repositories

All our SDKs are open source. Visit our GitHub repositories to view the source code, report issues, or contribute.

Technical Support

Our technical support team is available to help you with any SDK integration issues or questions.

Contact Support

Developer Community

Join our developer community to connect with other developers, share knowledge, and get help with your integration.

Join Community

Next Steps