Skip to main content

PyPi Package Version Supported Python versions PyPi downloads

pyXRocketAPI

pyXRocketAPI is a Python client for the xRocket Pay API. It supports application information, balances, invoices, cheques, payouts, withdrawals, currency rates, and health checks.

Installation

pip install pyXRocketAPI

Quick start

from pyXRocketAPI import xRocketPayAPI

client = xRocketPayAPI(token="your-pay-api-token")
invoice = client.create_invoice(price_currency="USDT", price_amount="10.00")
print(invoice.id, invoice.links.web_link)

For integration testing, use the xRocket testnet instead of production:

client = xRocketPayAPI(token="testnet-token", testnet=True)

Nested request models

Known nested API objects are passed as model instances, not dictionaries. The same models deserialize API responses and implement to_dict() for request bodies.

from pyXRocketAPI import InvoiceCallback, InvoiceCustomer, InvoiceUrl, xRocketPayAPI

client = xRocketPayAPI(token="your-pay-api-token")
invoice = client.create_invoice(
    price_currency="USDT",
    price_amount="10.00",
    callback=InvoiceCallback(
        callbackUrl="https://example.com/webhooks/invoice",
        payload={"order_id": "123"},
    ),
    url=InvoiceUrl(
        successUrl="https://example.com/success",
        cancelUrl="https://example.com/cancel",
    ),
    customer=InvoiceCustomer(
        id="customer-123",
        email="customer@example.com",
        telegramId="123456789",
    ),
    data={"internal_order_id": "123"},
)

payload and data remain ordinary dictionaries because xRocket defines them as arbitrary JSON objects without a fixed schema. Use MassPayout instances for every item passed to create_mass_payouts().

Safety

The token grants access to the application and must not be committed to source control. Financial POST operations are not retried automatically. Supply and retain the relevant client identifier (client_invoice_id, client_payout_id, client_cheque_id, or client_withdrawal_id) so that a timed-out operation can be reconciled safely.

Errors from the API raise xRocketAPIException; its problem_type, kind, status, and instance attributes expose the RFC 9457 error response.

AI-supported creation.

Metadata

Release files for pyXRocketAPI 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyXRocketAPI 1.0.0
File Size Uploaded Provenance Actions
pyxrocketapi-1.0.0.tar.gz 27.8 kB Without provenance Details for pyxrocketapi-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pyXRocketAPI 1.0.0
File Interpreter ABI Platform Actions
pyxrocketapi-1.0.0-py3-none-any.whl Python 3 none any Details for pyxrocketapi-1.0.0-py3-none-any.whl

Total release size: 50.7 kB

Release files / pyxrocketapi-1.0.0.tar.gz

Download URL pyxrocketapi-1.0.0.tar.gz
Size 27.8 kB
Tags Source
SHA-256 checksum
How to use checksums
b8500dd16685b4a6e8a377bb6e2f2c9ab299ee3789ffa7ad1828a20f938596f3
BLAKE2b-256 checksum
How to use checksums
c6e0b85e7da09e977c52016123b3584680bdca3ffe9fedb55b2eb6f813ea6cb6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.0

Release files / pyxrocketapi-1.0.0-py3-none-any.whl

Download URL pyxrocketapi-1.0.0-py3-none-any.whl
Size 22.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
caff593db6f2aab521b4c838a38c47f69183ccd67bacd26e5771dccb90ef0404
BLAKE2b-256 checksum
How to use checksums
5678bc486a616499c3c5fc9d67bdb34ff8d4ff77da5cd2492ef4a608922d5d05
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.0

Security for pyXRocketAPI 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page