Python API Integration
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.

Easy Installation & Setup Guide
- Register a Merchant Profile: Visit the PayerURL dashboard, sign up for a merchant account, and complete your basic platform configuration.
- Generate API Credentials: Navigate to your dashboard’s developer portal and click "Generate Keys" to retrieve your unique Public and Secret Keys.
- Whitelist Server IP Addresses: To ensure optimal API security, add your production or development server's IP to your PayerURL security whitelist.
- Install via PIP: Open your terminal and run pip install payerurl-python-sdk to grab the official, open-source integration package.
- Import the Library Module: Add import payerurl at the top of your backend python script to initialize the payment gateway class.
- Verify System Requirements: Ensure your runtime environment is utilizing Python 3.7+ or higher along with standard cryptographic dependencies.
- Set Up Local Variables: Store your credentials securely inside your projects .env configuration file to keep sensitive keys out of your main codebase.
- Define Runtime Environments: Set your gateway environment variable toggle to SANDBOX for internal mock testing or LIVE for real production transactions.
- Set Gateway Timeouts: Declare your preferred network timeout thresholds in your system settings to cleanly manage connection lifetimes.
- Instantiate the Gateway Client: Pass your environment configurations into the PayerURL client instance block to authenticate all outbound API calls.
- Build Checkout Payloads: Map your customer invoices using real-time fiat-to-crypto rates, complete with order IDs and user metadata strings.
- Generate Binance Pay Links: Call the native transaction wrapper to instantly return cryptographically secured checkout URLs and live Binance QR codes.
- Declare the Notify Endpoint: Provide a clean public route mapping in your Python script (/payment/webhook) to catch incoming server-to-server callbacks.
- Enforce HMAC Signature Checks: Validate incoming payloads against your secret token using rigorous HMAC-SHA256 signature logic to eliminate spoofing risks.
- Trigger Order Automation: Parse successful payment events directly inside your web framework to update database records and fulfill user orders instantly.
Supported Crypto Networks & Blockchains
All checkout operations run entirely through end-to-end encrypted API tunnels. PayerURL never accesses or stores your store’s private keys or sensitive customer financial credentials. Your funds remain entirely yours.
