Powered by Smartsupp

Python SDK Now Available in Beta

Python developers can now integrate Lumen Pay faster than ever.

We love Python. It powers some of the largest fintechs in the world. That is why we are excited to launch the official Lumen Pay Python SDK, making integration seamless for Django, Flask, and FastAPI applications.

Installation

Install the package via pip:

pip install lumenpay

Usage Example

Here is how simple it is to create a payment intent in a Flask route:

import lumenpay
from flask import Flask, request

lumenpay.api_key = "sk_live_..."

app = Flask(__name__)

@app.route("/pay", methods=["POST"])
def pay():
    intent = lumenpay.PaymentIntent.create(
        amount=2000,
        currency="usd",
        payment_method_types=["card"]
    )
    return {"client_secret": intent.client_secret}

Features

  • Type Hinting: Full support for Python type hints for better IDE autocompletion.
  • Async Support: Includes an `AsyncLumenPay` client for high-performance `asyncio` applications.
  • Webhook Helpers: Built-in utilities to verify webhook signatures with one line of code.

Check out the full documentation on our GitHub repository.

← Previous Understanding 3D Secure 2.0 Compliance Next → Scaling E-commerce in Rwanda

Read Next