Skip to content

Latest commit

Β 

History

History
97 lines (67 loc) Β· 3.05 KB

File metadata and controls

97 lines (67 loc) Β· 3.05 KB

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