BTC / USDLoading...
BTC / AEDLoading...
ETH / USDLoading...
ETH / AEDLoading...
USDT / USD1.00
BTC / USDLoading...
BTC / AEDLoading...
ETH / USDLoading...
ETH / AEDLoading...
USDT / USD1.00
Developer APIOpen Source⏱ 5 Min SetupUpdated November 2025

Python API Integration Integration

Integrate robust, server-side crypto processing into your Python backend. Effortlessly automate direct-to-wallet invoices, secure webhook listeners, and multi-token payouts with minimal configuration.

Real Time
Settlement
4.2k+
Integrations
99%
Success Rate
Core Python Devs
Team

About This Integration

Everything you need to know about setting up this payment gateway

Accelerate your backend development with PayerURL’s official, open-source SDK for Python. Distributed under the MIT license, this lightweight package allows developers to integrate a decentralized, direct-to-wallet checkout experience in under 10 minutes without complex merchant onboarding. The system handles automated currency conversions across 169+ fiat pairs using real-time market rates and securely signs every API payload using robust HMAC SHA256 signatures to eliminate tampering risks. Once a user triggers a Binance Pay QR code or transfers on-chain assets, your backend application’s notify_url instantly receives an asynchronous server-to-server webhook to process order fulfillment automatically.

Need a Custom Solution?

For high-volume marketplaces, multi-vendor stores, and large enterprises. Get custom token integrations, dedicated API routing, and 24/7 priority developer support.

Key Benefits

Why Developers Choose This Package

Trusted by 1,000+ active merchants worldwide with 29 five-star reviews on WordPress.org

🏦

No Merchant Account Needed

Payments go directly to your crypto wallet with zero middlemen

🌍

169+ Fiat Currencies

USD, EUR, GBP, CAD, JPY and more β€” converted at live market rates

⚑

10-Minute Integration

Simple pip install, clear docs, copy-paste code for any framework

πŸ”’

No KYC for Withdrawals

Basic accounts withdraw without any identity verification

πŸ“±

Binance QR Code Payments

Customers scan and pay without ever leaving your app

πŸ’Έ

Zero Hidden Fees

No network surcharges or platform fees on the SDK

πŸ› οΈ

Django, Flask & FastAPI Ready

Works with any Python web framework out of the box

πŸ””

Auto Webhook Validation

CryptoPaymentNotify handles auth, signature, and status automatically

⭐

29 Five-Star Reviews

Verified on WordPress.org β€” praised for support and reliability

πŸ§‘β€πŸ’»

24/7 Telegram Support

Real humans, fast hands-on help for any integration issue

Setup Guide

Installation Guide

Follow these steps to get up and running in 5 Min Setup

1πŸ“¦ Installation via pip

pip install binance-and-crypto-payment python-dotenv

2πŸ”‘ Get Your API Keys (Free)

  • Sign up at dash.payerurl.com β€” takes under 2 minutes, no credit card required
  • Go to Dashboard β†’ Get API Credentials
  • Copy your Public Key and Secret Key

3πŸ” Secure Configuration

Create a .env file in your project root and add it to .gitignore:

PAYERURL_PUBLIC_KEY=your_public_key
PAYERURL_SECRET_KEY=your_secret_key
BASE_URL=https://yourdomain.com

⚠️ In production β€” skip the .env file and set these variables directly in your hosting dashboard (Railway, Render, Heroku, VPS).

4πŸš€ Quick Start

import os
import time
from dotenv import load_dotenv
from binance_and_crypto_payment import CryptoPaymentClient
load_dotenv()

client = CryptoPaymentClient(
    public_key=os.getenv("PAYERURL_PUBLIC_KEY"),
    secret_key=os.getenv("PAYERURL_SECRET_KEY")
)
BASE_URL = os.getenv("BASE_URL", "http://localhost:8000").rstrip("/")

items = [{"name": "Product", "qty": "1", "price": "10.00"}]

data = {
    "first_name":   "John",
    "last_name":    "Doe",
    "email":        "[email protected]",
    "redirect_url": f"{BASE_URL}/payment/success/",
    "notify_url":   f"{BASE_URL}/payment/notify/",
    "cancel_url":   f"{BASE_URL}/payment/cancel/",
}

response = client.payment(
    invoice_id=f"PYP-{int(time.time())}",
    amount=10.00,
    currency="USD",
    items=items,
    data=data
)

payment_url = response["redirect_to"]
print(payment_url)  # Redirect customer here

5πŸ”— Django Integration

Checkout view, success/cancel callbacks, and webhook handler:

# views.py
from django.views import View
from django.http import JsonResponse, HttpResponse
from django.views.decorators.csrf import csrf_exempt
from django.views.decorators.http import require_POST
from binance_and_crypto_payment import CryptoPaymentClient, CryptoPaymentNotify, CryptoPaymentException

class CheckoutView(View):
    def post(self, request):
        client = CryptoPaymentClient(public_key=PUBLIC_KEY, secret_key=SECRET_KEY)
        response = client.payment(
            invoice_id=f"PYP-{int(time.time())}",
            amount=float(request.POST.get("amount", 10.00)),
            currency="USD",
            items=[{"name": "Order", "qty": "1", "price": request.POST.get("amount", "10.00")}],
            data={
                "first_name":   request.user.first_name,
                "last_name":    request.user.last_name,
                "email":        request.user.email,
                "redirect_url": f"{BASE_URL}/payment/success/",
                "notify_url":   f"{BASE_URL}/payment/notify/",
                "cancel_url":   f"{BASE_URL}/payment/cancel/",
            }
        )
        return redirect(response["redirect_to"])

@csrf_exempt
@require_POST
def notify_payerurl(request):
    notify = CryptoPaymentNotify(public_key=PUBLIC_KEY, secret_key=SECRET_KEY)
    try:
        result = notify.process(request)
    except CryptoPaymentException as e:
        return JsonResponse({"status": e.code, "message": e.message}, status=200)

    if result["type"] == "cancelled":
        return JsonResponse({"status": 20000, "message": "Order cancelled"}, status=200)

    data = result["data"]
    # YOUR BUSINESS LOGIC HERE
    # data["order_id"], data["transaction_id"], data["confirm_rcv_amnt"]
    return JsonResponse({"status": 2040, "message": "Payment processed successfully"}, status=200)
# urls.py
urlpatterns = [
    path("payment/checkout/", CheckoutView.as_view(), name="checkout"),
    path("payment/success/",  payment_success,        name="payment_success"),
    path("payment/cancel/",   payment_cancel,         name="payment_cancel"),
    path("payment/notify/",   notify_payerurl,        name="payment_notify"),
]

6πŸ”— Flask Integration

from flask import Flask, request, redirect, jsonify
from binance_and_crypto_payment import CryptoPaymentClient, CryptoPaymentNotify, CryptoPaymentException

app = Flask(__name__)

@app.route("/payment/checkout/", methods=["POST"])
def checkout():
    client = CryptoPaymentClient(public_key=PUBLIC_KEY, secret_key=SECRET_KEY)
    response = client.payment(
        invoice_id=f"PYP-{int(time.time())}",
        amount=float(request.form.get("amount", 10.00)),
        currency="USD",
        items=[{"name": "Order", "qty": "1", "price": request.form.get("amount", "10.00")}],
        data={
            "first_name":   request.form.get("first_name"),
            "last_name":    request.form.get("last_name"),
            "email":        request.form.get("email"),
            "redirect_url": f"{BASE_URL}/payment/success/",
            "notify_url":   f"{BASE_URL}/payment/notify/",
            "cancel_url":   f"{BASE_URL}/payment/cancel/",
        }
    )
    return redirect(response["redirect_to"])

@app.route("/payment/notify/", methods=["POST"])
def notify_payerurl():
    notify = CryptoPaymentNotify(public_key=PUBLIC_KEY, secret_key=SECRET_KEY)
    try:
        result = notify.process(request)
    except CryptoPaymentException as e:
        return jsonify({"status": e.code, "message": e.message}), 200

    if result["type"] == "cancelled":
        return jsonify({"status": 20000, "message": "Order cancelled"}), 200

    data = result["data"]
    # YOUR BUSINESS LOGIC HERE
    return jsonify({"status": 2040, "message": "Payment processed successfully"}), 200

7πŸ”— FastAPI Integration

from fastapi import FastAPI, Request, Form
from fastapi.responses import JSONResponse, RedirectResponse
from binance_and_crypto_payment import CryptoPaymentClient, CryptoPaymentNotify, CryptoPaymentException

app = FastAPI()

@app.post("/payment/checkout/")
async def checkout(amount: float = Form(...), first_name: str = Form(...),
                   last_name: str = Form(...), email: str = Form(...)):
    client = CryptoPaymentClient(public_key=PUBLIC_KEY, secret_key=SECRET_KEY)
    response = client.payment(
        invoice_id=f"PYP-{int(time.time())}",
        amount=amount, currency="USD",
        items=[{"name": "Order", "qty": "1", "price": str(amount)}],
        data={
            "first_name": first_name, "last_name": last_name, "email": email,
            "redirect_url": f"{BASE_URL}/payment/success/",
            "notify_url":   f"{BASE_URL}/payment/notify/",
            "cancel_url":   f"{BASE_URL}/payment/cancel/",
        }
    )
    return RedirectResponse(url=response["redirect_to"])

@app.post("/payment/notify/")
async def notify_payerurl(request: Request):
    notify = CryptoPaymentNotify(public_key=PUBLIC_KEY, secret_key=SECRET_KEY)
    try:
        result = notify.process(request)
    except CryptoPaymentException as e:
        return JSONResponse({"status": e.code, "message": e.message}, status_code=200)

    if result["type"] == "cancelled":
        return JSONResponse({"status": 20000, "message": "Order cancelled"}, status_code=200)

    data = result["data"]
    # YOUR BUSINESS LOGIC HERE
    return JSONResponse({"status": 2040, "message": "Payment processed successfully"}, status_code=200)
uvicorn main:app --reload

Supported Cryptocurrencies & Networks

USDT
TRC20 (Tron), ERC20 (Ethereum), BEP20 (BSC)
USDC
ERC20 (Ethereum), BEP20 (BSC)
Bitcoin (BTC)
Bitcoin Network
Ethereum (ETH)
ERC20
BNB
BEP20 (BSC)
Binance Pay
Binance QR Code

Webhook Reference

Callback URL Summary

URLTriggerMethod
redirect_urlCustomer paid successfullyGET (browser redirect)
cancel_urlCustomer cancelled paymentGET (browser redirect)
notify_urlGateway confirms payment server-sidePOST (webhook)

πŸ’‘ redirect_url and cancel_url are browser redirects β€” use them to show the customer a page. notify_url is a server-side webhook β€” use it to update your database.

Webhook Payload Fields

FieldDescription
order_idYour original invoice ID
transaction_idBlockchain transaction hash
status_code200 = completed, 20000 = cancelled
confirm_rcv_amntAmount received in fiat
confirm_rcv_amnt_currFiat currency (e.g. USD)
coin_rcv_amntAmount received in crypto
coin_rcv_amnt_currCrypto symbol (e.g. USDT)
txn_timeTransaction timestamp

Notify Response Codes

CodeMeaning
2040Payment processed successfully
2030Auth error (key mismatch or missing)
2031Auth format error (invalid base64)
2050Validation error (missing fields or incomplete order)
20000Order cancelled
5000Internal server error

⚠️ Always return HTTP 200 for all responses β€” including errors. PayerURL reads the JSON status field, not the HTTP status code. Returning non-200 will cause indefinite retries.

Full Payment Flow

1

Your app calls the API and gets a payment URL via CryptoPaymentClient

2

Customer is redirected to a secure hosted checkout page

3

Customer scans the Binance QR code or pays with any supported crypto

4

Blockchain confirms the transaction β€” funds land directly in your wallet

5

redirect_url receives the customer browser redirect after payment

6

notify_url receives a signed POST webhook β€” update your database here

Your App ──► PayerURL API ──► Checkout Page ──► Customer Pays
                                                        β”‚
Your Wallet ◄── Funds (instant) ◄── Blockchain Confirmed β”˜
                                                   β”‚          β”‚
         redirect_url (success/cancel) β—„β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜          β”‚
                    notify_url (webhook) β—„β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Compared to Other Solutions

FeaturePayerURLStripe / PayPalCoinbase Commerce
No merchant accountβœ…βŒβœ…
Direct to your walletβœ…βŒPartial
No KYC requiredβœ… (Basic)❌❌
Binance QR supportβœ…βŒβŒ
Python SDKβœ…βœ…βœ…
Django / Flask / FastAPIβœ…βœ…βŒ
169+ fiat currenciesβœ…Partial❌
Zero platform feesβœ…βŒβŒ
Webhook supportβœ…βœ…βœ…

Frequently Asked Questions

Do I need a Binance account?

Yes, to accept Binance QR payments. For USDT/BTC/ETH/USDC, you only need the corresponding wallet address configured in your PayerURL dashboard.

Is there a transaction fee?

No platform fees from PayerURL. Standard blockchain network fees may apply depending on the coin and network chosen by the customer.

Can I use this without KYC?

Yes. Basic accounts can receive and withdraw crypto without mandatory identity verification.

What should my notify_url return?

Return {"status": 2040, "message": "Payment processed successfully"} with HTTP 200. Always return HTTP 200 for all responses β€” the gateway reads the JSON status field.

What is the difference between redirect_url and notify_url?

redirect_url is a browser redirect shown to the customer after payment. notify_url is a server-side webhook used to update your database β€” it fires independently of what the customer does.

Does this work with Django REST Framework / FastAPI?

Yes β€” it is a pure Python client that works with any Python web framework.

What Python versions are supported?

Python 3.8 and above (3.8, 3.9, 3.10, 3.11, 3.12, 3.13).

Key Features

  • 169+ Fiat Currency Support (USD, EUR, GBP, JPY, AED, INR, BDT, etc.)
  • Real-Time Exchange Rate Conversion
  • Direct Wallet Settlement β€” PayerURL never holds your funds
  • No KYC Required (Basic Accounts)
  • HMAC-SHA256 Signature Verification via CryptoPaymentNotify
  • Django, Flask, and FastAPI integration examples included
  • Automatic webhook validation and error handling
  • 100% Free & Open Source (MIT License)
  • Python 3.8+ Compatible
  • 24/7 Telegram Support

Requirements

  • Python 3.8 or higher (3.8, 3.9, 3.10, 3.11, 3.12, 3.13)
  • pip packages: binance-and-crypto-payment, python-dotenv
  • Free PayerURL merchant account
  • A crypto wallet address to receive payments
  • Publicly accessible HTTPS domain for notify_url

🧾 MIT License β€” free for personal and commercial use.

Automated Address Rotation Active

Ready to AcceptCrypto on WooCommerce?

Connect your store directly to your private wallets. Accept global payments with auto-rotating blockchain addresses, zero middleman custody, and instant status updates.

Limitless
XPUB Address Rotation
100%
Non-Custodial Control
169+
Local Fiat Currencies
5-Minute Simple Setup
No Registration Fees
Instant Wallet Payouts