Skip to content

RimMirK/aiorocket2

Repository files navigation

aiorocket2  🚀 aiorocket2 🚀

PyPI Python Version License Documentation Issues StandWithUkraine

aiorocket2 is an asynchronous Python client for the xRocket Pay API, providing full access to all methods and parameters of the payment system.
All types, enums, and data structures are mirrored as closely as possible to the original API.


#StandWithUkraine

🚀 Features

  • Complete wrapper for all xRocket API methods
  • Asynchronous access via asyncio
  • Full typing support and enums
  • Direct parameter mapping from API
  • Production-ready and test-friendly

📦 Installation

pip install aiorocket2

Requires Python 3.7+


🔑 Getting an API Key

  1. Open the bot @xRocket or @xrocket_testnet_bot for the testnet
  2. Go to: xRocket API -> xRocket Pay → Create App → API token
  3. Copy the token and use it in your code

⚡ Quick Start

import asyncio
from aiorocket2 import xRocketClient

async def main():
    client = xRocketClient(api_key="YOUR_API_KEY")
    
    # Get application info
    info = await client.get_info()
    print(info)
    
    # Example: create a invoice
    invoice = await client.create_invoice(
        amount=10, # 10 USDT to pay
        min_payment=0, # For single payment pass 0
        num_payments=1, # For single payment pass 1
        currency="USDT",
        description="Buy some products",
        hidden_message="Thanks for payment!", # this will appear to the payer after payment
        comments_enabled=True
    )
    print(invoice.link)

asyncio.run(main())

All library methods mirror the xRocket API exactly, including types, required and optional parameters.


📚 Documentation

Full documentation is available online: aiorocket2 Docs Includes:

  • Description of all API methods
  • Usage examples
  • List of all enums and data structures

👨‍💻 Authors


📝 License

This project is licensed under GNU GPLv3. Full license text

Releases

No releases published

Packages

No packages published

Languages